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: 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-05-20T10:02:11Z
Lists: pgsql-hackers
On Thu, May 19, 2022 at 2:12 PM shiy.fnst@fujitsu.com <shiy.fnst@fujitsu.com> wrote: > > On Wed, May 4, 2022 2:47 PM vignesh C <vignesh21@gmail.com> wrote: > > > > Thanks for the comments, the attached v13 patch has the changes for the same. > > > > Here are some comments on v13-0002 patch. > > 1) > + * Throw an error so that the user can take care of the initial data > + * copying and then create subscription with copy_data off. > > Should "with copy_data off" be changed to "with copy_data off or force"? Modified > 2) > case ALTER_SUBSCRIPTION_ADD_PUBLICATION: > case ALTER_SUBSCRIPTION_DROP_PUBLICATION: > ... > /* > * See ALTER_SUBSCRIPTION_REFRESH for details why this is > * not allowed. > */ > if (sub->twophasestate == LOGICALREP_TWOPHASE_STATE_ENABLED && opts.copy_data) > > I think we need some changes here, too. Should it be modified to: > if (sub->twophasestate == LOGICALREP_TWOPHASE_STATE_ENABLED && IS_COPY_DATA_ON_OR_FORCE(opts.copy_data)) Modified Thanks for the comments, the v14 patch attached at [1] has the changes for the same. [1] - https://www.postgresql.org/message-id/CALDaNm0xuYy35vOudVHBjov3fQ%3DjBRHJHKUUN9VarqO%3DYqtaxg%40mail.gmail.com Regards, Vignesh
Commits
-
Improved CREATE SUBSCRIPTION message for clarity
- 1e7ca1189ccc 17.0 landed
- 842b65905046 16.0 landed
-
Fix the test case introduced by commit 8756930190.
- 032465157347 16.0 landed
-
Raise a warning if there is a possibility of data from multiple origins.
- 875693019053 16.0 landed
-
Add wait_for_subscription_sync for TAP tests.
- 0c20dd33db16 16.0 cited
-
Bump catversion for commit d8cd0c6c95c0120168df93aae095df4e0682a08a.
- 5f858dd3bebd 16.0 cited
-
Allow users to skip logical replication of data having origin.
- 366283961ac0 16.0 landed
-
Improve two comments related to a boolean DefElem's value
- 8445f5a21d40 16.0 cited
-
doc: Fix man page whitespace issues
- d7ab2a9a3c0a 15.0 cited