On Fri, Nov 11, 2022 at 7:57 AM houzj.f...@fujitsu.com
<houzj.f...@fujitsu.com> wrote:
>
> On Monday, November 7, 2022 6:18 PM Masahiko Sawada <sawada.m...@gmail.com> 
> wrote:
> >
> > Here are comments on v42-0001:
> >
> > We have the following three similar name functions regarding to
> > starting a new parallel apply worker:
> > ---
> >          /*
> >           * Exit if any parameter that affects the remote connection
> > was changed.
> > -         * The launcher will start a new worker.
> > +         * The launcher will start a new worker, but note that the
> > parallel apply
> > +         * worker may or may not restart depending on the value of
> > the streaming
> > +         * option and whether there will be a streaming transaction.
> >
> > In which case does the parallel apply worker don't restart even if the
> > streaming option has been changed?
>
> Sorry, I forgot to reply to this comment. If user change the streaming option 
> from
> 'parallel' to 'on' or 'off', the parallel apply workers won't be restarted.
>

How about something like the below so as to be more explicit about
this in the comments?
diff --git a/src/backend/replication/logical/worker.c
b/src/backend/replication/logical/worker.c
index bfe326bf0c..74cd5565bd 100644
--- a/src/backend/replication/logical/worker.c
+++ b/src/backend/replication/logical/worker.c
@@ -3727,9 +3727,10 @@ maybe_reread_subscription(void)

        /*
         * Exit if any parameter that affects the remote connection was changed.
-        * The launcher will start a new worker, but note that the
parallel apply
-        * worker may or may not restart depending on the value of the streaming
-        * option and whether there will be a streaming transaction.
+        * The launcher will start a new worker but note that the parallel apply
+        * worker won't restart if the streaming option's value is changed from
+        * 'parallel' to any other value or the server decides not to stream the
+        * in-progress transaction.
         */

-- 
With Regards,
Amit Kapila.


Reply via email to