Re: Handle infinite recursion in logical replication setup

From: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>
To: Ashutosh Bapat <ashutosh(dot)bapat(dot)oss(at)gmail(dot)com>
Cc: vignesh C <vignesh21(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-03-31 03:44:53
Message-ID: CAA4eK1JzPw=SF0pgwNbq6Dke9vxrpGZpFyg5B3HR7=ziB1+2kg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, Mar 30, 2022 at 7:40 PM Ashutosh Bapat
<ashutosh(dot)bapat(dot)oss(at)gmail(dot)com> wrote:
> >
> > The changes for the same are available int the v5 patch available at [1].
> > [1] - https://www.postgresql.org/message-id/CALDaNm3wCf0YcvVo%2BgHMGpupk9K6WKJxCyLUvhPC2GkPKRZUWA%40mail.gmail.com
> >
>
> cb->truncate_cb = pg_decode_truncate;
> cb->commit_cb = pg_decode_commit_txn;
> cb->filter_by_origin_cb = pg_decode_filter;
> + cb->filter_remote_origin_cb = pg_decode_filter_remote_origin;
>
> Why do we need a new hook? Can we use filter_by_origin_cb?
>

I also think there is no need for a new hook in this case but I might
also be missing something that Vignesh has in his mind.

> Also it looks like
> implementation of pg_decode_filter and pg_decode_filter_remote_origin is same,
> unless my eyes are deceiving me.
>
> - <literal>binary</literal>, <literal>streaming</literal>, and
> - <literal>disable_on_error</literal>.
> + <literal>binary</literal>, <literal>streaming</literal>,
> + <literal>disable_on_error</literal> and
> + <literal>publish_local_only</literal>.
>
> "publish_local_only" as a "subscription" option looks odd. Should it be
> "subscribe_local_only"?
>

I also think "subscribe_local_only" fits better here.

--
With Regards,
Amit Kapila.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Paquier 2022-03-31 04:00:52 Re: pg_tablespace_location() failure with allow_in_place_tablespaces
Previous Message Andres Freund 2022-03-31 03:35:51 Re: Removing more vacuumlazy.c special cases, relfrozenxid optimizations