Re: Proposal: Out-of-Order NOTIFY via GUC to Improve LISTEN/NOTIFY Throughput
Joel Jacobson <joel@compiler.org>
From: "Joel Jacobson" <joel@compiler.org>
To: "Rishu Bagga" <rishu.postgres@gmail.com>,
pgsql-hackers <pgsql-hackers@postgresql.org>,
"nik@postgres.ai" <nik@postgres.ai>
Date: 2025-07-18T15:51:47Z
Lists: pgsql-hackers
On Fri, Jul 18, 2025, at 10:15, Joel Jacobson wrote: > On Fri, Jul 18, 2025, at 02:49, Rishu Bagga wrote: >> Hi all, >> >> There’s been some renewed attention on improving the performance of the >> LISTEN/NOTIFY system, which historically hasn’t scaled well under high >> notify frequency. Joel Jacobson recently shared some work on optimizing >> the LISTEN path [1], and I wanted to follow up with a proposal focused on >> the NOTIFY side. > > To clarify, my patch optimizes parallelizability of NOTIFY, without > degrading parallelizability of LISTEN/UNLISTEN. I realize my above clarification is not technically true, what I meant to say is: My patch improves NOTIFY TPS when many backends are listening on multiple channels by eliminating unnecessary syscall wake‑ups, but it doesn't increase the internal parallelism of the NOTIFY queue itself. /Joel