Re: [HACKERS] Subscription code improvements

From: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
To: Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com>
Cc: Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com>, Petr Jelinek <petr(dot)jelinek(at)2ndquadrant(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [HACKERS] Subscription code improvements
Date: 2018-03-07 14:13:41
Message-ID: 20180307141341.gwni3ilhvxpxprry@alvherre.pgsql
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Alvaro Herrera 2018-03-07 14:13:49 Re: [HACKERS] Subscription code improvements
Previous Message Peter Eisentraut 2018-03-07 14:04:04 Re: Typo in objectaccess.h prototype