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

From Rui Zhao
Subject Re: Race conditions in logical decoding
Date
Msg-id CAHWVJhHZhnwDMvs7Ev6W2DhMJypLYNn7xOxTeFAJucuty9h+_w@mail.gmail.com
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
Thanks. Going back to my original loop with the limit changed to
running->xcnt makes sense.

On 2026-Sep-21 at 15:35 UTC, Alvaro Herrera wrote:
> I think we should just go up to running->xcnt
> only;

Yes, scanning the subxids was unnecessary. My previous explanation
addressed overflow, but waiting for the parent covers the children in
the non-overflow case too. A note on the top-level-first ordering in
RunningTransactionsData would make that dependency explicit.

> maybe we should add
> something in SnapBuildBuildSnapshot()

Agreed. The explanation of why historic snapshots need no wait for
transactions to finish belongs there. The comment in
SnapBuildInitialSnapshot() can then focus on why the conversion to a
normal MVCC snapshot needs the wait.

Regards,
Rui



pgsql-hackers by date:

Previous
From: Jacob Champion
Date:
Subject: Re: contrib/pg_stat_tcpinfo
Next
From: "Jonathan S. Katz"
Date:
Subject: Re: PostgreSQL 19 Beta 4 release announcement draft