Re: Why ALTER SUBSCRIPTION ... SET (slot_name='none') requires subscription disabled?

From: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>
To: Japin Li <japinli(at)hotmail(dot)com>
Cc: "pgsql-hackers(at)lists(dot)postgresql(dot)org" <pgsql-hackers(at)lists(dot)postgresql(dot)org>, Ranier Vilela <ranier(dot)vf(at)gmail(dot)com>
Subject: Re: Why ALTER SUBSCRIPTION ... SET (slot_name='none') requires subscription disabled?
Date: 2021-07-16 06:06:14
Message-ID: CAA4eK1Lgie0A5yLyZ51a4gf6utdmXKANxo+-4LY+V8vmVY3Grw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, Jul 9, 2021 at 8:20 AM Japin Li <japinli(at)hotmail(dot)com> wrote:
>
> On Thu, 08 Jul 2021 at 18:17, Amit Kapila <amit(dot)kapila16(at)gmail(dot)com> wrote:
> > On Thu, Jul 8, 2021 at 3:43 PM Japin Li <japinli(at)hotmail(dot)com> wrote:
>
> Please consider review v3 patch. v3-0001 adds slot_name verification in
> parse_subscription_options() and comments for why we need disable subscription
> where set slot_name to NONE.
>

I think we back-patch this bug-fix till v10 where it was introduced
and update the comments only in HEAD. So, accordingly, I moved the
changes into two patches and changed the comments a bit. Can you
please test the first patch in back-branches? I'll also do it
separately.

> v3-0002 comes from Ranier Vilela, it reduce the
> overhead strlen in ReplicationSlotValidateName().
>

I think this patch has nothing to do with this bug-fix, so I suggest
you discuss this in a separate patch. Personally, I don't think it
will help in reducing any overhead but there doesn't appear to be any
harm in changing it as proposed.

--
With Regards,
Amit Kapila.

Attachment Content-Type Size
v4-0001-Don-t-allow-to-set-replication-slot_name-as.patch application/octet-stream 3.0 KB
v4-0002-Update-comments-for-AlterSubscription.patch application/octet-stream 1.3 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message vignesh C 2021-07-16 06:08:24 Re: [HACKERS] logical decoding of two-phase transactions
Previous Message David Rowley 2021-07-16 06:04:03 Re: Add proper planner support for ORDER BY / DISTINCT aggregates