Re: Handle infinite recursion in logical replication setup

From: Dilip Kumar <dilipbalaut(at)gmail(dot)com>
To: vignesh C <vignesh21(at)gmail(dot)com>
Cc: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>, Peter Smith <smithpb2250(at)gmail(dot)com>, Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>, "shiy(dot)fnst(at)fujitsu(dot)com" <shiy(dot)fnst(at)fujitsu(dot)com>, Ashutosh Bapat <ashutosh(dot)bapat(dot)oss(at)gmail(dot)com>, "kuroda(dot)hayato(at)fujitsu(dot)com" <kuroda(dot)hayato(at)fujitsu(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Handle infinite recursion in logical replication setup
Date: 2022-07-13 11:19:56
Message-ID: CAFiTN-vgCxOgsH_SzuqS4zF-9SfW22TCG=LqB5beV1rPscgwwQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Jul 12, 2022 at 2:58 PM vignesh C <vignesh21(at)gmail(dot)com> wrote:
>
> On Tue, Jul 12, 2022 at 9:51 AM Amit Kapila <amit(dot)kapila16(at)gmail(dot)com> wrote:

I find one thing confusing about this patch. Basically, this has two
option 'local' and 'any', so I would assume that all the local server
changes should be covered under the 'local' but now if we set some
origin using 'select pg_replication_origin_session_setup('aa');' then
changes from that session will be ignored because it has an origin id.
I think actually the name is creating confusion, because by local it
seems like a change which originated locally and the document is also
specifying the same.

+ If <literal>local</literal>, the subscription will request the publisher
+ to only send changes that originated locally. If <literal>any</literal>,

I think if we want to keep the option local then we should look up all
the origin in the replication origin catalog and identify whether it
is a local origin id or remote origin id and based on that filter out
the changes.

--
Regards,
Dilip Kumar
EnterpriseDB: http://www.enterprisedb.com

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Aleksander Alekseev 2022-07-13 11:48:33 Re: Building PostgreSQL in external directory is broken?
Previous Message Alexander Korotkov 2022-07-13 11:10:19 Building PostgreSQL in external directory is broken?