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

From Mihail Nikalayeu
Subject Re: Race conditions in logical decoding
Date
Msg-id CADzfLwWbawF1pE2fHDXR2O3rdY54v43mRJmOK4pDGWgzAmXwkw@mail.gmail.com
Whole thread Raw
In response to Re: Race conditions in logical decoding  (Andres Freund <andres@anarazel.de>)
Responses Re: Race conditions in logical decoding
List pgsql-hackers
Hello, Andres.

On Tue, Jan 20, 2026 at 6:50 PM Andres Freund <andres@anarazel.de> wrote:
> I don't think that's enough - during non-timetravel visibility semantics, you
> can only look at the clog if the transaction isn't marked as in-progress in
> the procarray.  ISTM that we need to do that here too?

Do you mean replace
> if (unlikely(!TransactionIdDidCommit(builder->committed.xip[i])))
to
> if (unlikely(TransactionIdIsInProgress(builder->committed.xip[i]) || !TransactionIdDidCommit(builder->committed.xip[i])))
?

If so, yes, it feels correct to me.

Mikhail.

pgsql-hackers by date:

Previous
From: Michael Paquier
Date:
Subject: Re: Add WALRCV_CONNECTING state to walreceiver
Next
From: Mihail Nikalayeu
Date:
Subject: Re: Issues with ON CONFLICT UPDATE and REINDEX CONCURRENTLY