Re: LISTEN/NOTIFY bug: VACUUM sets frozenxid past a xid in async queue

Joel Jacobson <joel@compiler.org>

From: "Joel Jacobson" <joel@compiler.org>
To: "Heikki Linnakangas" <hlinnaka@iki.fi>, "Tom Lane" <tgl@sss.pgh.pa.us>
Cc: pgsql-hackers <pgsql-hackers@postgresql.org>
Date: 2025-11-05T01:10:45Z
Lists: pgsql-hackers
On Tue, Nov 4, 2025, at 13:09, Heikki Linnakangas wrote:
> The elephant in the room of course is that a lookup in a linked list is 
> O(n) and it would be very straightforward to replace it with e.g. a hash 
> table. We should do that irrespective of this bug fix. But I'm inclined 
> to do it as a separate followup patch.

Thanks for the idea of replacing it with a local hash table.
I've implemented it in the patch set we're working on:
https://commitfest.postgresql.org/patch/6078/
https://www.postgresql.org/message-id/12c08e29-c21c-4a3d-a269-a48a1a26b18d%40app.fastmail.com

/Joel