Re: Fix a comment in worker.c - Mailing list pgsql-hackers

From Amit Kapila
Subject Re: Fix a comment in worker.c
Date
Msg-id CAA4eK1LZ7C555XSpBQVi3Md8OyAoveju1xVyq-NgJjFEFDzN0w@mail.gmail.com
Whole thread Raw
In response to Fix a comment in worker.c  (Masahiko Sawada <sawada.mshk@gmail.com>)
Responses Re: Fix a comment in worker.c  (Amit Kapila <amit.kapila16@gmail.com>)
List pgsql-hackers
On Wed, Feb 16, 2022 at 5:57 AM Masahiko Sawada <sawada.mshk@gmail.com> wrote:
>
> While reading the code, I realized that the second sentence of the
> following comment in worker.c is not correct:
>
>    /*
>     * Exit if the subscription was disabled. This normally should not happen
>     * as the worker gets killed during ALTER SUBSCRIPTION ... DISABLE.
>     */
>     if (!newsub->enabled)
>     {
>         ereport(LOG,
>                 (errmsg("logical replication apply worker for
> subscription \"%s\" will "
>                         "stop because the subscription was disabled",
>                         MySubscription->name)));
>
>         proc_exit(0);
>     }
>
> IIUC the apply worker normally exits here when the subscription is
> disabled since we don't stop the apply worker during ALTER
> SUBSCRIPTION DISABLE. I've attached a patch to remove it.
>

Yes, I also have the same understanding. Your patch LGTM. I'll push
this unless someone thinks otherwise.

-- 
With Regards,
Amit Kapila.



pgsql-hackers by date:

Previous
From: Peter Eisentraut
Date:
Subject: Re: Proposal for internal Numeric to Uint64 conversion function.
Next
From: Masahiko Sawada
Date:
Subject: Re: Design of pg_stat_subscription_workers vs pgstats