Re: Optimize LISTEN/NOTIFY
Joel Jacobson <joel@compiler.org>
From: "Joel Jacobson" <joel@compiler.org>
To: "Alexander Lakhin" <exclusion@gmail.com>
Cc: pgsql-hackers <pgsql-hackers@postgresql.org>
Date: 2026-05-20T11:47:09Z
Lists: pgsql-hackers
On Sat, Apr 18, 2026, at 21:00, Alexander Lakhin wrote: > While browsing through new inconsistencies and typos, I came across one > which I'm not sure what to do with. Could you help, please? > > async-notify.spec contains: > # Check ChannelHashAddListener array growth. > permutation listenc llisten l2listen l3listen lslisten > > But as far as I can see, ChannelHashAddListener() was eliminated in > 0002-optimize_listen_notify-v13.patch upthread [1]: > >> > Or thinking a little bigger: why are we maintaining the set of >> > channels-listened-to both as a list and a hash? Could we remove >> > the list form? >> Yes, it was indeed possible to remove the list form. >> > > So, maybe the comment or perhaps even the test case should be changed/ > removed? Yes, that test is a leftover from a previous patch version. I'll post a patch to remove it in a separate thread. Thanks for spotting. /Joel