Re: Optimize LISTEN/NOTIFY

Tom Lane <tgl@sss.pgh.pa.us>

From: Tom Lane <tgl@sss.pgh.pa.us>
To: "Joel Jacobson" <joel@compiler.org>
Cc: "Arseniy Mukhin" <arseniy.mukhin.dev@gmail.com>, pgsql-hackers <pgsql-hackers@postgresql.org>
Date: 2025-10-15T21:15:15Z
Lists: pgsql-hackers

Commits

Same data as JSON: GET /api/v1/messages/:b64id/commits the thread's linked commits as JSON, with link sources. API reference →
  1. Optimize LISTEN/NOTIFY via shared channel map and direct advancement.

  2. Fix incorrect logic for caching ResultRelInfos for triggers

"Joel Jacobson" <joel@compiler.org> writes:
> I assume the separate "advisory" queue position field
> would actually need to be two struct fields, since a queue position
> consists of a page and an offset, right?

No, I'd think you'd have both

    QueuePosition pos;            /* backend has read queue up to here */
    QueuePosition advisory_pos;   /* backend could skip queue to here */

in QueueBackendStatus.  The other seems way too confusing.

			regards, tom lane