From: | Peter Smith <smithpb2250(at)gmail(dot)com> |
---|---|
To: | Amit Kapila <amit(dot)kapila16(at)gmail(dot)com> |
Cc: | vignesh C <vignesh21(at)gmail(dot)com>, "Jonathan S(dot) Katz" <jkatz(at)postgresql(dot)org>, Dilip Kumar <dilipbalaut(at)gmail(dot)com>, Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>, Ashutosh Bapat <ashutosh(dot)bapat(dot)oss(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, "kuroda(dot)hayato(at)fujitsu(dot)com" <kuroda(dot)hayato(at)fujitsu(dot)com>, "shiy(dot)fnst(at)fujitsu(dot)com" <shiy(dot)fnst(at)fujitsu(dot)com> |
Subject: | Re: Handle infinite recursion in logical replication setup |
Date: | 2022-07-25 23:13:17 |
Message-ID: | CAHut+Pvq-a1+5XdRz+En6Hqc_jDGobPLascTs79CUZzmJMx+1Q@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Mon, Jul 25, 2022 at 6:54 PM Amit Kapila <amit(dot)kapila16(at)gmail(dot)com> wrote:
>
> On Mon, Jul 25, 2022 at 12:58 PM Peter Smith <smithpb2250(at)gmail(dot)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
From | Date | Subject | |
---|---|---|---|
Next Message | Peter Smith | 2022-07-25 23:34:11 | Re: Handle infinite recursion in logical replication setup |
Previous Message | Dave Cramer | 2022-07-25 21:53:10 | Re: Proposal to provide the facility to set binary format output for specific OID's per session |