From: Álvaro Herrera Date: Fri, 31 Oct 2025 16:43:15 +0000 (+0100) Subject: pg_createsubscriber: Fix error complaining about the wrong thing X-Git-Tag: REL_17_7~28 X-Git-Url: http://git.postgresql.org/gitweb/static/gitweb.js%3Cscript%20data-cfasync=?a=commitdiff_plain;h=14044eb25866113147ae82631f1e9259e5317cae;p=postgresql.git 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 Backpatch-through: 17 --- diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c index 067a04ec6c3..95c96d205f1 100644 --- a/src/bin/pg_basebackup/pg_createsubscriber.c +++ b/src/bin/pg_basebackup/pg_createsubscriber.c @@ -668,9 +668,9 @@ modify_subscriber_sysid(const struct CreateSubscriberOptions *opt) int rc = system(cmd_str); if (rc == 0) - pg_log_info("subscriber successfully changed the system identifier"); + pg_log_info("subscriber successfully reset WAL on the subscriber"); else - pg_fatal("could not change system identifier of subscriber: %s", wait_result_to_str(rc)); + pg_fatal("could not reset WAL on subscriber: %s", wait_result_to_str(rc)); } pg_free(cf);