From: | Japin Li <japinli(at)hotmail(dot)com> |
---|---|
To: | Ranier Vilela <ranier(dot)vf(at)gmail(dot)com> |
Cc: | Pg Hackers <pgsql-hackers(at)postgresql(dot)org>, pgsql-hackers(at)lists(dot)postgresql(dot)org |
Subject: | Re: Why ALTER SUBSCRIPTION ... SET (slot_name='none') requires subscription disabled? |
Date: | 2021-07-08 02:30:22 |
Message-ID: | SYYP282MB1678B7024191E2FAC29F90B1B6199@SYYP282MB1678.AUSP282.PROD.OUTLOOK.COM |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Thu, 08 Jul 2021 at 01:32, Ranier Vilela <ranier(dot)vf(at)gmail(dot)com> wrote:
>>OTOH, when I execute ALTER SUBSCRIPTION ... SET (slot_name=''), it doesn't
> complain. However,
>>SELECT select pg_create_logical_replication_slot('', 'pgoutput') complains
> slot name is too
>>short. Although, the slot will be created at publisher, and validate the
> slot name, IMO, we
>>can also validate the slot_name in parse_subscription_options() to get the
> error early.
>>Attached fixes it. Any thoughts?
> I think that this fix is better after the check if the name is equal to
> "none".
> Most of the time it will be "none" .
> While this, reduce the overhead with strlen into
> ReplicationSlotValidateName can it might be worth it.
>
> For convenience, I have attached a new version.
>
Thanks for your review! LGTM.
--
Regrads,
Japin Li.
ChengDu WenWu Information Technology Co.,Ltd.
From | Date | Subject | |
---|---|---|---|
Next Message | Bharath Rupireddy | 2021-07-08 03:03:02 | Re: Refactor "mutually exclusive options" error reporting code in parse_subscription_options |
Previous Message | David Rowley | 2021-07-08 01:31:23 | Re: [PATCH] expand the units that pg_size_pretty supports on output |