Re: Handle infinite recursion in logical replication setup

vignesh C <vignesh21@gmail.com>

From: vignesh C <vignesh21@gmail.com>
To: Amit Kapila <amit.kapila16@gmail.com>
Cc: Peter Smith <smithpb2250@gmail.com>, Alvaro Herrera <alvherre@alvh.no-ip.org>, "shiy.fnst@fujitsu.com" <shiy.fnst@fujitsu.com>, Ashutosh Bapat <ashutosh.bapat.oss@gmail.com>, "kuroda.hayato@fujitsu.com" <kuroda.hayato@fujitsu.com>, PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2022-07-12T09:28:04Z
Lists: pgsql-hackers

Attachments

On Tue, Jul 12, 2022 at 9:51 AM Amit Kapila <amit.kapila16@gmail.com> wrote:
>
> On Tue, Jul 12, 2022 at 8:43 AM vignesh C <vignesh21@gmail.com> wrote:
> >
> > On Mon, Jul 11, 2022 at 9:11 AM Peter Smith <smithpb2250@gmail.com> wrote:
> > >
> > > Here are my review comments for the v30* patches:
> > >
> > > ========
> > > v30-0001
> > > ========
> > >
> > > 1.1 <general>
> > >
> > > I was wondering if it is better to implement a new defGetOrigin method
> > > now instead of just using the defGetString to process the 'origin',
> > > since you may need to do that in future anyway if the 'origin' name is
> > > planned to become specifiable by the user. OTOH maybe you prefer to
> > > change this code later when the time comes. I am not sure what way is
> > > best.
> >
> > I preferred to do that change when the feature is getting extended.
> >
>
> +1.
>
> *
> +$node_C->safe_psql(
> +     'postgres', "
> +        DELETE FROM tab");
> +$node_B->safe_psql(
> +     'postgres', "
> +        DELETE FROM tab where a = 32");
> +
> +$node_A->wait_for_catchup($subname_BA);
> +$node_B->wait_for_catchup($subname_AB);
>
> Here, don't we need to use node_C instead of node_A for waiting as we
> have performed an operation on node_C?

No need to wait for node_C as we have dropped the subscription before
the delete operation. I have added the comment to make it clear.
The attached v32 patch has the changes for the same.

Regards,
Vignesh

Commits

  1. Improved CREATE SUBSCRIPTION message for clarity

  2. Fix the test case introduced by commit 8756930190.

  3. Raise a warning if there is a possibility of data from multiple origins.

  4. Add wait_for_subscription_sync for TAP tests.

  5. Bump catversion for commit d8cd0c6c95c0120168df93aae095df4e0682a08a.

  6. Allow users to skip logical replication of data having origin.

  7. Improve two comments related to a boolean DefElem's value

  8. doc: Fix man page whitespace issues