Re: Race conditions in logical decoding

From: Mihail Nikalayeu <mihailnikalayeu(at)gmail(dot)com>
To: Andres Freund <andres(at)anarazel(dot)de>
Cc: Antonin Houska <ah(at)cybertec(dot)at>, pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: Race conditions in logical decoding
Date: 2026-01-22 00:24:43
Message-ID: CADzfLwWbawF1pE2fHDXR2O3rdY54v43mRJmOK4pDGWgzAmXwkw@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hello, Andres.

On Tue, Jan 20, 2026 at 6:50 PM Andres Freund <andres(at)anarazel(dot)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.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Mihail Nikalayeu 2026-01-22 00:40:47 Re: Issues with ON CONFLICT UPDATE and REINDEX CONCURRENTLY
Previous Message Michael Paquier 2026-01-22 00:20:07 Re: Add WALRCV_CONNECTING state to walreceiver