Re: Handle infinite recursion in logical replication setup

vignesh C <vignesh21@gmail.com>

From: vignesh C <vignesh21@gmail.com>
To: "shiy.fnst@fujitsu.com" <shiy.fnst@fujitsu.com>
Cc: Amit Kapila <amit.kapila16@gmail.com>, Peter Smith <smithpb2250@gmail.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-06-01T17:55:02Z
Lists: pgsql-hackers
On Fri, May 27, 2022 at 12:34 PM shiy.fnst@fujitsu.com
<shiy.fnst@fujitsu.com> wrote:
>
> On Wed, May 25, 2022 7:55 PM vignesh C <vignesh21@gmail.com> wrote:
> >
> > The attached v16 patch has the changes for the same.
> >
>
> Thanks for updating the patch.
>
> Some comments for the document in 0002 patch.
>
> 1.
> +   <para>
> +    Lock the required tables in <literal>node1</literal> and
> +    <literal>node2</literal> till the setup is completed.
> +   </para>
> +
> +   <para>
> +    Create a publication in <literal>node1</literal>:
> +<programlisting>
> +node1=# CREATE PUBLICATION pub_node1 FOR TABLE t1;
> +CREATE PUBLICATION
> +</programlisting></para>
>
> If the table is locked in the very beginning, we will not be able to create the
> publication (because the locks have conflict). Maybe we should switch the order
> of creating publication and locking tables here.

Modified

> 2.
> In the case of "Adding a new node when data is present in the new node", we need
> to truncate table t1 in node3, but the truncate operation would be blocked
> because the table has be locked before. Maybe we need some changes for it.

This section contents have been removed because this is not feasible currently

Thanks for the comments, the v17 patch attached at [1] has the changes
for the same.
[1] - https://www.postgresql.org/message-id/CALDaNm1rMihO7daiFyLdxkqArrC%2BdtM61oPXc-XrTYBYnJg3nw%40mail.gmail.com

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