pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Markus Wanner <markus.wanner@enterprisedb.com>
To: Amit Kapila <amit.kapila16@gmail.com>
Cc: pgsql-hackers@postgresql.org <pgsql-hackers@postgresql.org>
Cc: Ajin Cherian <itsajin@gmail.com>
Subject: Re: [PATCH] Provide more information to filter_prepare
Date: Mon, 29 Mar 2021 11:41:05 +0200
Message-ID: <86f51dc5-a667-c22d-4644-f5fa7ce97f98@enterprisedb.com> (raw)
In-Reply-To: <CAA4eK1+LE1DoUBRj6_XJOiWX_Tyx4s86a7ghgOjG3-ssq9xhkw@mail.gmail.com>
References: <ee280000-7355-c4dc-e47b-2436e7be959c@enterprisedb.com>
	<CAA4eK1L1OWb4ia5PjmC5BpuktBZgfqZbz=9sWLv77dBpZfhu+A@mail.gmail.com>
	<f43bc7b3-798c-a259-17e2-51ab1e8eccc9@enterprisedb.com>
	<CAA4eK1JZkvN3G+aeQJuk1RdUczRZ3vUoF0mMFNS+S8g2gF8fQA@mail.gmail.com>
	<fd63284b-14fa-051a-fa51-e6999e8f4502@enterprisedb.com>
	<CAA4eK1L2amuh4Rzm-OSBTYBTvgjOk=8RZGDUuPnKLmqawt5FnQ@mail.gmail.com>
	<CAA4eK1LrZic4fBe4srM7HU2detDPytSovahtEdA8TVt3DNqx1w@mail.gmail.com>
	<6f322b21-cbb8-5f9a-b2aa-30323a6ab604@enterprisedb.com>
	<722e7841-f4fa-dddd-4466-990fcada5d78@enterprisedb.com>
	<CAA4eK1JzSf0sZ_yHAOHBfdEFytqdX=Jb8XN6gUiLDPx8Ud55sQ@mail.gmail.com>
	<CAA4eK1KdVg0h0_trfBYReU8NVSeL9SGPPXnuuMDHUzNs7C5t7w@mail.gmail.com>
	<590e0d87-8a7d-9310-ff6d-b484f15522d0@enterprisedb.com>
	<CAA4eK1+LE1DoUBRj6_XJOiWX_Tyx4s86a7ghgOjG3-ssq9xhkw@mail.gmail.com>

On 29.03.21 11:13, Amit Kapila wrote:
> This might or might not be valid for all logical replication solutions
> but in the publisher-subscriber model, it would easily lead to
> duplicate identifiers and block the replication. For example, when
> there are multiple subscriptions (say - 2) for multiple publications
> (again say-2), the two subscriptions are on Node-B and two
> publications are on Node-A. Say both publications are for different
> tables tab-1 and tab-2. Now, a prepared transaction involving
> operation on both tables will generate the same GID.

I think you are misunderstanding.  This is about a globally unique 
identifier for a transaction, which has nothing to do with a GID used to 
prepare a transaction.  This *needs* to be the same for what logical is 
the same transaction.

What GID a downsteam subscriber uses when receiving messages from some 
non-Postgres-provided output plugin clearly is out of scope for this 
documentation.  The point is to highlight how the xid can be useful for 
filter_prepare.  And that serves transaction identification purposes.

Regards

Markus





view thread (26+ messages)  latest in thread

Message-ID: <86f51dc5-a667-c22d-4644-f5fa7ce97f98@enterprisedb.com>
Permalink:  ../86f51dc5-a667-c22d-4644-f5fa7ce97f98@enterprisedb.com/
Also on:    postgresql.org/message-id/86f51dc5-a667-c22d-4644-f5fa7ce97f98@enterprisedb.com

 · 

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: markus.wanner@enterprisedb.com, amit.kapila16@gmail.com, itsajin@gmail.com
  Subject: Re: [PATCH] Provide more information to filter_prepare
  In-Reply-To: <86f51dc5-a667-c22d-4644-f5fa7ce97f98@enterprisedb.com>
  References: <ee280000-7355-c4dc-e47b-2436e7be959c@enterprisedb.com> <CAA4eK1L1OWb4ia5PjmC5BpuktBZgfqZbz=9sWLv77dBpZfhu+A@mail.gmail.com> <f43bc7b3-798c-a259-17e2-51ab1e8eccc9@enterprisedb.com> <CAA4eK1JZkvN3G+aeQJuk1RdUczRZ3vUoF0mMFNS+S8g2gF8fQA@mail.gmail.com> <fd63284b-14fa-051a-fa51-e6999e8f4502@enterprisedb.com> <CAA4eK1L2amuh4Rzm-OSBTYBTvgjOk=8RZGDUuPnKLmqawt5FnQ@mail.gmail.com> <CAA4eK1LrZic4fBe4srM7HU2detDPytSovahtEdA8TVt3DNqx1w@mail.gmail.com> <6f322b21-cbb8-5f9a-b2aa-30323a6ab604@enterprisedb.com> <722e7841-f4fa-dddd-4466-990fcada5d78@enterprisedb.com> <CAA4eK1JzSf0sZ_yHAOHBfdEFytqdX=Jb8XN6gUiLDPx8Ud55sQ@mail.gmail.com> <CAA4eK1KdVg0h0_trfBYReU8NVSeL9SGPPXnuuMDHUzNs7C5t7w@mail.gmail.com> <590e0d87-8a7d-9310-ff6d-b484f15522d0@enterprisedb.com> <CAA4eK1+LE1DoUBRj6_XJOiWX_Tyx4s86a7ghgOjG3-ssq9xhkw@mail.gmail.com> <86f51dc5-a667-c22d-4644-f5fa7ce97f98@enterprisedb.com>

* 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