Re: Race conditions in logical decoding - Mailing list pgsql-hackers

From Alvaro Herrera
Subject Re: Race conditions in logical decoding
Date
Msg-id arFgusAC7MFhUaAh@alvherre.pgsql
Whole thread
In response to Re: Race conditions in logical decoding  (Alvaro Herrera <alvherre@kurilemu.de>)
Responses Re: Race conditions in logical decoding
List pgsql-hackers
On 2026-Sep-21, Alvaro Herrera wrote:

> Yeah, maybe this approach isn't great after all.  We could turn that
> around and search for each loop around the snap->xmin..snap->xmax loop
> that is found in snap->xip in the running->xids array.  That reduces the
> number of times we go through XactLockTableWait() to only running
> transactions (same as in Rui's original patch [1]).  However, the
> running->xids array is not sorted, so we would have to qsort() it, or do
> a plain array walk for each element.

BTW just to make it clear what I'm talking about, attached is the patch
for this approach, which I'm now thinking to throw away in favor of
Rui's earlier version.  (The test contains the change Rui suggested
yesterday, and it's passing for me with this patch.)  I didn't touch the
commit message.

-- 
Álvaro Herrera               48°01'N 7°57'E  —  https://www.EnterpriseDB.com/
"Las cosas son buenas o malas segun las hace nuestra opinión" (Lisias)

Attachment

pgsql-hackers by date:

Previous
From: Alexandre Felipe
Date:
Subject: Re: aio: worker: Free SMGR objects when idle
Next
From: Daria Lepikhova
Date:
Subject: pg_verifybackup / pg_combinebackup: missing readdir() error check in directory scan