Re: Handle infinite recursion in logical replication setup
Peter Smith <smithpb2250@gmail.com>
From: Peter Smith <smithpb2250@gmail.com>
To: Amit Kapila <amit.kapila16@gmail.com>
Cc: vignesh C <vignesh21@gmail.com>,
"Jonathan S. Katz" <jkatz@postgresql.org>, Dilip Kumar <dilipbalaut@gmail.com>,
Alvaro Herrera <alvherre@alvh.no-ip.org>, Ashutosh Bapat <ashutosh.bapat.oss@gmail.com>, PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>, "kuroda.hayato@fujitsu.com" <kuroda.hayato@fujitsu.com>,
"shiy.fnst@fujitsu.com" <shiy.fnst@fujitsu.com>
Date: 2022-07-25T23:13:17Z
Lists: pgsql-hackers
On Mon, Jul 25, 2022 at 6:54 PM Amit Kapila <amit.kapila16@gmail.com> wrote: > > On Mon, Jul 25, 2022 at 12:58 PM Peter Smith <smithpb2250@gmail.com> wrote: > > ... > > > > Q2. parse_subscription_options > > > > Similarly, in the code (parse_subscription_options), I did not > > understand why the checks for special name values are implemented > > differently: > > > > The new 'origin' code is using pg_strcmpcase to check special values > > (none/any), and the old 'slot_name' code uses case-sensitive strcmp to > > check the special value (none). > > > > We have a restriction for slot_names for lower case letters (aka > "Replication slot names may only contain lower case letters, numbers, > and the underscore character.") whereas there is no such restriction > in origin name, that's why the check is different. So, if you try with > slot_name = 'NONE', you will get the error. > 2022-07-26 09:06:06.380 AEST [3630] STATEMENT: create subscription mysub connection 'host=localhost' publication mypub with (slot_name='None', enabled=false, create_slot=false); ERROR: replication slot name "None" contains invalid character HINT: Replication slot names may only contain lower case letters, numbers, and the underscore character. You are right. Thanks for the explanation. (Aside: Probably that error message wording ought to say "contains invalid characters" instead of "contains invalid character") ------ Kind Regards, Peter Smith. Fujitsu Australia
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