]> git.ipfire.org Git - thirdparty/postgresql.git/commitdiff
pg_createsubscriber: Fix error complaining about the wrong thing
authorÁlvaro Herrera <alvherre@kurilemu.de>
Fri, 31 Oct 2025 16:43:15 +0000 (17:43 +0100)
committerÁlvaro Herrera <alvherre@kurilemu.de>
Fri, 31 Oct 2025 16:43:15 +0000 (17:43 +0100)
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

src/bin/pg_basebackup/pg_createsubscriber.c

index 9fa5caaf91d67c88f1d553df1adc84b4631d68df..20d845126702538c9e1ccd5235ea42f419ac4257 100644 (file)
@@ -706,9 +706,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);