Local visibility with logical decoding - Mailing list pgsql-hackers

From Marko Tiikkaja
Subject Local visibility with logical decoding
Date
Msg-id CAL9smLBPrRLj7uwUrxtVT7wdkzJd+j=CB+SRepOpS0hgtP8dog@mail.gmail.com
Whole thread Raw
Responses Re: Local visibility with logical decoding  (Antonin Houska <ah@cybertec.at>)
Re: Local visibility with logical decoding  (Andres Freund <andres@anarazel.de>)
List pgsql-hackers
Hi,

It appears that when logical decoding sends out the data from the output plugin, it is not guaranteed that the decoded transaction's effects are visible on the source server.  Is this the way it's supposed to work?

If so, would doing something like this in the output plugin be reasonable?

    TransactionId xid = transaction->xid;
    if (transaction->is_known_as_subxact)
        xid = transaction->toplevel_xid;

    if (TransactionIdIsInProgress(xid))
        XactLockTableWait(xid, NULL, NULL, XLTW_None);


-marko

pgsql-hackers by date:

Previous
From: Daniel Gustafsson
Date:
Subject: Re: Support for NSS as a libpq TLS backend
Next
From: Peter Geoghegan
Date:
Subject: Re: Binary support for pgoutput plugin