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: Ashutosh Bapat <ashutosh.bapat.oss@gmail.com>,
Peter Smith <smithpb2250@gmail.com>, "kuroda.hayato@fujitsu.com" <kuroda.hayato@fujitsu.com>, PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2022-03-08T14:46:24Z
Lists: pgsql-hackers
On Mon, Mar 7, 2022 at 9:57 PM vignesh C <vignesh21@gmail.com> wrote: > > On Mon, Mar 7, 2022 at 5:51 PM Amit Kapila <amit.kapila16@gmail.com> wrote: > > > > On Mon, Mar 7, 2022 at 5:01 PM Ashutosh Bapat > > <ashutosh.bapat.oss@gmail.com> wrote: > > > > > > Hi Vignesh, > > > I agree with Peter's comment that the changes to > > > FilterRemoteOriginData() should be part of FilterByOrigin() > > > > > > Further, I wonder why "onlylocal_data" is a replication slot's > > > property. A replication slot tracks the progress of replication and it > > > may be used by different receivers with different options. I could > > > start one receiver which wants only local data, say using > > > "pg_logical_slot_get_changes" and later start another receiver which > > > fetches all the data starting from where the first receiver left. This > > > option prevents such flexibility. > > > > > > As discussed earlier in the thread, local_only can be property of > > > publication or subscription, depending upon the use case, but I can't > > > see any reason that it should be tied to a replication slot. > > > > > > > I thought it should be similar to 'streaming' option of subscription > > but may be Vignesh has some other reason which makes it different. > > Yes, this can be removed from the replication slot. It is my mistake > that I have made while making the code similar to two-phase, I'm > working on making the changes for this. I will fix and post an updated > version for this. I have made the changes for this, the changes for this are available in the v3 patch attached at [1]. [1] - https://www.postgresql.org/message-id/CALDaNm0JcV-7iQZhyy3kehnWTy6x%3Dz%2BsX6u6Df%2B%2By8z33pz%2BBw%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