Re: [HACKERS] Subscription code improvements - Mailing list pgsql-hackers

From Alvaro Herrera
Subject Re: [HACKERS] Subscription code improvements
Date
Msg-id 20180307141341.gwni3ilhvxpxprry@alvherre.pgsql
Whole thread Raw
In response to Re: [HACKERS] Subscription code improvements  (Masahiko Sawada <sawada.mshk@gmail.com>)
Responses Re: [HACKERS] Subscription code improvements  (Masahiko Sawada <sawada.mshk@gmail.com>)
List pgsql-hackers
0001:

there are a bunch of other messages of the same ilk in the file.  I
don't like how the current messages are worded; maybe Peter or Petr had
some reason why they're like that, but I would have split out the reason
for not starting or stopping into errdetail.  Something like

errmsg("logical replication apply worker for subscription \"%s\" will not start", ...)
errdetail("Subscription has been disabled during startup.")

But I think we should change all these messages in unison rather than
only one of them.

Now, your patch changes "will not start" to "will stop".  But is that
correct?  ISTM that this happens when a worker is starting and
determines that it is not needed.  So "will not start" is more correct.
"Will stop" would be correct if the worker had been running for some
time and suddenly decided to terminate, but that doesn't seem to be the
case, unless I misread the code.

Your patch also changes "disabled during startup" to just "disabled".
Is that a useful change?  ISTM that if the subscription had been
disabled prior to startup, then the worker would not have started at
all, so we would not be seeing this message in the first place.  Again,
maybe I am misreading the code?  Please explain.

-- 
Álvaro Herrera                https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services


pgsql-hackers by date:

Previous
From: Peter Eisentraut
Date:
Subject: Re: Typo in objectaccess.h prototype
Next
From: Alvaro Herrera
Date:
Subject: Re: [HACKERS] Subscription code improvements