Local visibility with logical decoding

From: Marko Tiikkaja <marko(at)joh(dot)to>
To: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Local visibility with logical decoding
Date: 2020-07-20 14:27:30
Message-ID: CAL9smLBPrRLj7uwUrxtVT7wdkzJd+j=CB+SRepOpS0hgtP8dog@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Geoghegan 2020-07-20 15:17:25 Re: Binary support for pgoutput plugin
Previous Message Daniel Gustafsson 2020-07-20 13:35:51 Re: Support for NSS as a libpq TLS backend