pgsql: pg_createsubscriber: Fix error complaining about the wrong thing

Started by Alvaro Herrera8 months ago4 messagescomitters
Jump to latest
#1Alvaro Herrera
alvherre@2ndquadrant.com

pg_createsubscriber: Fix error complaining about the wrong thing

The code updates the system identifier, then runs pg_walreset; if the
latter fails, it complains about the former, which makes no sense.
Change the error message to complain about the right thing.

Noticed while reviewing a patch touching nearby code.

Author: Álvaro Herrera <alvherre@kurilemu.de>
Backpatch-through: 17

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/11144915e101eff94556192f5f18f6ac133da43e

Modified Files
--------------
src/bin/pg_basebackup/pg_createsubscriber.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

#2Peter Eisentraut
peter_e@gmx.net
In reply to: Alvaro Herrera (#1)
Re: pgsql: pg_createsubscriber: Fix error complaining about the wrong thing

On 31.10.25 18:08, Álvaro Herrera wrote:

pg_createsubscriber: Fix error complaining about the wrong thing

The code updates the system identifier, then runs pg_walreset; if the
latter fails, it complains about the former, which makes no sense.
Change the error message to complain about the right thing.

- pg_log_info("subscriber successfully changed the system identifier");
+ pg_log_info("subscriber successfully reset WAL on the subscriber");

Maybe that message has one "subscriber" too many?

#3Peter Eisentraut
peter_e@gmx.net
In reply to: Peter Eisentraut (#2)
Re: pgsql: pg_createsubscriber: Fix error complaining about the wrong thing

On 04.11.25 11:40, Peter Eisentraut wrote:

On 31.10.25 18:08, Álvaro Herrera wrote:

pg_createsubscriber: Fix error complaining about the wrong thing

The code updates the system identifier, then runs pg_walreset; if the
latter fails, it complains about the former, which makes no sense.
Change the error message to complain about the right thing.

- pg_log_info("subscriber successfully changed the system identifier");
+ pg_log_info("subscriber successfully reset WAL on the subscriber");

Maybe that message has one "subscriber" too many?

I have fixed this.

#4Alvaro Herrera
alvherre@2ndquadrant.com
In reply to: Peter Eisentraut (#3)
Re: pgsql: pg_createsubscriber: Fix error complaining about the wrong thing

On 2025-Nov-06, Peter Eisentraut wrote:

On 04.11.25 11:40, Peter Eisentraut wrote:

Maybe that message has one "subscriber" too many?

I have fixed this.

Thanks.

--
Álvaro Herrera 48°01'N 7°57'E — https://www.EnterpriseDB.com/
"I can see support will not be a problem. 10 out of 10." (Simon Wittber)
(http://archives.postgresql.org/pgsql-general/2004-12/msg00159.php)