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

From: "Joel Jacobson" <joel(at)compiler(dot)org>
To: "Heikki Linnakangas" <hlinnaka(at)iki(dot)fi>, "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: LISTEN/NOTIFY bug: VACUUM sets frozenxid past a xid in async queue
Date: 2025-11-05 01:10:45
Message-ID: cdc4954a-fcfd-4474-8bd2-633756ad687c@app.fastmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Naga Appani 2025-11-05 01:13:09 Re: [Proposal] Expose internal MultiXact member count function for efficient monitoring
Previous Message Joel Jacobson 2025-11-05 01:06:54 Re: Optimize LISTEN/NOTIFY