Re: LISTEN/NOTIFY bug: VACUUM sets frozenxid past a xid in async queue - Mailing list pgsql-hackers

From Joel Jacobson
Subject Re: LISTEN/NOTIFY bug: VACUUM sets frozenxid past a xid in async queue
Date
Msg-id cdc4954a-fcfd-4474-8bd2-633756ad687c@app.fastmail.com
Whole thread Raw
In response to Re: LISTEN/NOTIFY bug: VACUUM sets frozenxid past a xid in async queue  (Heikki Linnakangas <hlinnaka@iki.fi>)
List 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



pgsql-hackers by date:

Previous
From: "Joel Jacobson"
Date:
Subject: Re: Optimize LISTEN/NOTIFY
Next
From: Naga Appani
Date:
Subject: Re: [Proposal] Expose internal MultiXact member count function for efficient monitoring