pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Antonin Houska <ah@cybertec.at>
To: Mihail Nikalayeu <mihailnikalayeu@gmail.com>
Cc: Andres Freund <andres@anarazel.de>
Cc: pgsql-hackers@lists.postgresql.org
Subject: Re: Race conditions in logical decoding
Date: Thu, 22 Jan 2026 11:32:58 +0100
Message-ID: <124728.1769077978@localhost> (raw)
In-Reply-To: <CADzfLwWbawF1pE2fHDXR2O3rdY54v43mRJmOK4pDGWgzAmXwkw@mail.gmail.com>
References: <85833.1768840165@localhost>
	<62335.1768897833@localhost>
	<5k2dfckyp6zv2fiovosvtbya5onvplgviz5n4kdamxupff4vi2@yytzfnwr2ox7>
	<CADzfLwWbawF1pE2fHDXR2O3rdY54v43mRJmOK4pDGWgzAmXwkw@mail.gmail.com>

Mihail Nikalayeu <mihailnikalayeu@gmail.com> wrote:

> 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])))

This way the synchronous replication gets stuck, as it did when I tried to use
XactLockTableWait(): subscriber cannot confirm replication of certain LSN
because publisher is not able to even finalize the commit (due to the waiting
for the subscriber's confirmation), and therefore publisher it's not able to
decode the data and send it to the subscriber.

-- 
Antonin Houska
Web: https://www.cybertec-postgresql.com





view thread (38+ messages)  latest in thread

Message-ID: <124728.1769077978@localhost>
Permalink:  ../124728.1769077978@localhost/
Also on:    postgresql.org/message-id/124728.1769077978@localhost

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-hackers@postgresql.org
  Cc: ah@cybertec.at, mihailnikalayeu@gmail.com, andres@anarazel.de
  Subject: Re: Race conditions in logical decoding
  In-Reply-To: <124728.1769077978@localhost>
  References: <85833.1768840165@localhost> <62335.1768897833@localhost> <5k2dfckyp6zv2fiovosvtbya5onvplgviz5n4kdamxupff4vi2@yytzfnwr2ox7> <CADzfLwWbawF1pE2fHDXR2O3rdY54v43mRJmOK4pDGWgzAmXwkw@mail.gmail.com> <124728.1769077978@localhost>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox