agora inbox for [email protected]help / color / mirror / Atom feed
[PATCH v31 05/11] Add Incremental View Maintenance support to psql 190+ messages / 2 participants [nested] [flat]
* [PATCH v31 05/11] Add Incremental View Maintenance support to psql @ 2019-12-20 01:21 Yugo Nagata <[email protected]> 0 siblings, 0 replies; 190+ messages in thread From: Yugo Nagata @ 2019-12-20 01:21 UTC (permalink / raw) Add tab completion and meta-command output for IVM. --- src/bin/psql/describe.c | 32 +++++++++++++++++++++++++++++++- src/bin/psql/tab-complete.c | 14 +++++++++----- 2 files changed, 40 insertions(+), 6 deletions(-) diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c index 6433497bcd..df559dce42 100644 --- a/src/bin/psql/describe.c +++ b/src/bin/psql/describe.c @@ -1574,6 +1574,7 @@ describeOneTableDetails(const char *schemaname, char relpersistence; char relreplident; char *relam; + bool isivm; } tableinfo; bool show_column_details = false; @@ -1586,7 +1587,26 @@ describeOneTableDetails(const char *schemaname, initPQExpBuffer(&tmpbuf); /* Get general table info */ - if (pset.sversion >= 120000) + if (pset.sversion >= 170000) + { + printfPQExpBuffer(&buf, + "SELECT c.relchecks, c.relkind, c.relhasindex, c.relhasrules, " + "c.relhastriggers, c.relrowsecurity, c.relforcerowsecurity, " + "false AS relhasoids, c.relispartition, %s, c.reltablespace, " + "CASE WHEN c.reloftype = 0 THEN '' ELSE c.reloftype::pg_catalog.regtype::pg_catalog.text END, " + "c.relpersistence, c.relreplident, am.amname, " + "c.relisivm\n" + "FROM pg_catalog.pg_class c\n " + "LEFT JOIN pg_catalog.pg_class tc ON (c.reltoastrelid = tc.oid)\n" + "LEFT JOIN pg_catalog.pg_am am ON (c.relam = am.oid)\n" + "WHERE c.oid = '%s';", + (verbose ? + "pg_catalog.array_to_string(c.reloptions || " + "array(select 'toast.' || x from pg_catalog.unnest(tc.reloptions) x), ', ')\n" + : "''"), + oid); + } + else if (pset.sversion >= 120000) { printfPQExpBuffer(&buf, "SELECT c.relchecks, c.relkind, c.relhasindex, c.relhasrules, " @@ -1706,6 +1726,10 @@ describeOneTableDetails(const char *schemaname, (char *) NULL : pg_strdup(PQgetvalue(res, 0, 14)); else tableinfo.relam = NULL; + if (pset.sversion >= 170000) + tableinfo.isivm = strcmp(PQgetvalue(res, 0, 15), "t") == 0; + else + tableinfo.isivm = false; PQclear(res); res = NULL; @@ -3560,6 +3584,12 @@ describeOneTableDetails(const char *schemaname, printfPQExpBuffer(&buf, _("Access method: %s"), tableinfo.relam); printTableAddFooter(&cont, buf.data); } + + /* Incremental view maintance info */ + if (verbose && tableinfo.relkind == RELKIND_MATVIEW && tableinfo.isivm) + { + printTableAddFooter(&cont, _("Incremental view maintenance: yes")); + } } /* reloptions, if verbose */ diff --git a/src/bin/psql/tab-complete.c b/src/bin/psql/tab-complete.c index f121216ddc..946d47fa1f 100644 --- a/src/bin/psql/tab-complete.c +++ b/src/bin/psql/tab-complete.c @@ -1245,6 +1245,7 @@ static const pgsql_thing_t words_after_create[] = { {"FOREIGN TABLE", NULL, NULL, NULL}, {"FUNCTION", NULL, NULL, Query_for_list_of_functions}, {"GROUP", Query_for_list_of_roles}, + {"INCREMENTAL MATERIALIZED VIEW", NULL, NULL, &Query_for_list_of_matviews, NULL, THING_NO_DROP | THING_NO_ALTER}, {"INDEX", NULL, NULL, &Query_for_list_of_indexes}, {"LANGUAGE", Query_for_list_of_languages}, {"LARGE OBJECT", NULL, NULL, NULL, NULL, THING_NO_CREATE | THING_NO_DROP}, @@ -3256,7 +3257,7 @@ psql_completion(const char *text, int start, int end) if (HeadMatches("CREATE", "SCHEMA")) COMPLETE_WITH("TABLE", "SEQUENCE"); else - COMPLETE_WITH("TABLE", "SEQUENCE", "MATERIALIZED VIEW"); + COMPLETE_WITH("TABLE", "SEQUENCE", "MATERIALIZED VIEW", "INCREMENTAL MATERIALIZED VIEW"); } /* Complete PARTITION BY with RANGE ( or LIST ( or ... */ else if (TailMatches("PARTITION", "BY")) @@ -3601,13 +3602,16 @@ psql_completion(const char *text, int start, int end) COMPLETE_WITH("SELECT"); /* CREATE MATERIALIZED VIEW */ - else if (Matches("CREATE", "MATERIALIZED")) + else if (Matches("CREATE", "MATERIALIZED") || + Matches("CREATE", "INCREMENTAL", "MATERIALIZED")) COMPLETE_WITH("VIEW"); - /* Complete CREATE MATERIALIZED VIEW <name> with AS */ - else if (Matches("CREATE", "MATERIALIZED", "VIEW", MatchAny)) + /* Complete CREATE MATERIALIZED VIEW <name> with AS */ + else if (Matches("CREATE", "MATERIALIZED", "VIEW", MatchAny) || + Matches("CREATE", "INCREMENTAL", "MATERIALIZED", "VIEW", MatchAny)) COMPLETE_WITH("AS"); /* Complete "CREATE MATERIALIZED VIEW <sth> AS with "SELECT" */ - else if (Matches("CREATE", "MATERIALIZED", "VIEW", MatchAny, "AS")) + else if (Matches("CREATE", "MATERIALIZED", "VIEW", MatchAny, "AS") || + Matches("CREATE", "INCREMENTAL", "MATERIALIZED", "VIEW", MatchAny, "AS")) COMPLETE_WITH("SELECT"); /* CREATE EVENT TRIGGER */ -- 2.25.1 --Multipart=_Fri__29_Mar_2024_23_47_00_+0900_KGpmmDOIs1266Ib1 Content-Type: text/x-diff; name="v31-0006-Add-Incremental-View-Maintenance-support.patch" Content-Disposition: attachment; filename="v31-0006-Add-Incremental-View-Maintenance-support.patch" Content-Transfer-Encoding: 7bit ^ permalink raw reply [nested|flat] 190+ messages in thread
* [PATCH v5] Log a note at program start when running in dry-run mode @ 2025-11-11 08:54 Álvaro Herrera <[email protected]> 0 siblings, 0 replies; 190+ messages in thread From: Álvaro Herrera @ 2025-11-11 08:54 UTC (permalink / raw) Users might get some peace of mind knowing their data is not being destroyed or whatever. Author: Peter Smith <[email protected]> Reviewed-by: Álvaro Herrera <[email protected]> Discussion: https://postgr.es/m/CAHut+PsvQJQnQO0KT0S2oegenkvJ8FUuY-QS5syyqmT24R2xFQ@mail.gmail.com --- src/bin/pg_archivecleanup/pg_archivecleanup.c | 4 ++++ src/bin/pg_basebackup/pg_createsubscriber.c | 5 +++++ src/bin/pg_combinebackup/pg_combinebackup.c | 4 ++++ src/bin/pg_resetwal/pg_resetwal.c | 4 ++++ src/bin/pg_rewind/pg_rewind.c | 10 ++++++---- 5 files changed, 23 insertions(+), 4 deletions(-) diff --git a/src/bin/pg_archivecleanup/pg_archivecleanup.c b/src/bin/pg_archivecleanup/pg_archivecleanup.c index c25348bcb85..ab686b4748c 100644 --- a/src/bin/pg_archivecleanup/pg_archivecleanup.c +++ b/src/bin/pg_archivecleanup/pg_archivecleanup.c @@ -375,6 +375,10 @@ main(int argc, char **argv) exit(2); } + if (dryrun) + pg_log_info("Executing in dry-run mode.\n" + "No files will be removed."); + /* * Check archive exists and other initialization if required. */ diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c index df41836e70f..cc4be5d6ef4 100644 --- a/src/bin/pg_basebackup/pg_createsubscriber.c +++ b/src/bin/pg_basebackup/pg_createsubscriber.c @@ -2305,6 +2305,11 @@ main(int argc, char **argv) pg_log_error_hint("Try \"%s --help\" for more information.", progname); exit(1); } + + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + pg_log_info("validating publisher connection string"); pub_base_conninfo = get_base_conninfo(opt.pub_conninfo_str, &dbname_conninfo); diff --git a/src/bin/pg_combinebackup/pg_combinebackup.c b/src/bin/pg_combinebackup/pg_combinebackup.c index 3a325127209..c9bf0a9e105 100644 --- a/src/bin/pg_combinebackup/pg_combinebackup.c +++ b/src/bin/pg_combinebackup/pg_combinebackup.c @@ -242,6 +242,10 @@ main(int argc, char *argv[]) if (opt.no_manifest) opt.manifest_checksums = CHECKSUM_TYPE_NONE; + if (opt.dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + /* Check that the platform supports the requested copy method. */ if (opt.copy_method == COPY_METHOD_CLONE) { diff --git a/src/bin/pg_resetwal/pg_resetwal.c b/src/bin/pg_resetwal/pg_resetwal.c index a89d72fc5cf..dd5d279521e 100644 --- a/src/bin/pg_resetwal/pg_resetwal.c +++ b/src/bin/pg_resetwal/pg_resetwal.c @@ -397,6 +397,10 @@ main(int argc, char *argv[]) exit(1); } + if (noupdate) + pg_log_info("Executing in dry-run mode.\n" + "Nothing will be modified."); + /* * Attempt to read the existing pg_control file */ diff --git a/src/bin/pg_rewind/pg_rewind.c b/src/bin/pg_rewind/pg_rewind.c index 27c514f934a..e9364d04f76 100644 --- a/src/bin/pg_rewind/pg_rewind.c +++ b/src/bin/pg_rewind/pg_rewind.c @@ -300,10 +300,12 @@ main(int argc, char **argv) atexit(disconnect_atexit); - /* - * Ok, we have all the options and we're ready to start. First, connect to - * remote server. - */ + /* Ok, we have all the options and we're ready to start. */ + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + + /* First, connect to remote server. */ if (connstr_source) { conn = PQconnectdb(connstr_source); -- 2.47.3 --ibfr3ah5qy6tcbhw-- ^ permalink raw reply [nested|flat] 190+ messages in thread
* [PATCH v5] Log a note at program start when running in dry-run mode @ 2025-11-11 08:54 Álvaro Herrera <[email protected]> 0 siblings, 0 replies; 190+ messages in thread From: Álvaro Herrera @ 2025-11-11 08:54 UTC (permalink / raw) Users might get some peace of mind knowing their data is not being destroyed or whatever. Author: Peter Smith <[email protected]> Reviewed-by: Álvaro Herrera <[email protected]> Discussion: https://postgr.es/m/CAHut+PsvQJQnQO0KT0S2oegenkvJ8FUuY-QS5syyqmT24R2xFQ@mail.gmail.com --- src/bin/pg_archivecleanup/pg_archivecleanup.c | 4 ++++ src/bin/pg_basebackup/pg_createsubscriber.c | 5 +++++ src/bin/pg_combinebackup/pg_combinebackup.c | 4 ++++ src/bin/pg_resetwal/pg_resetwal.c | 4 ++++ src/bin/pg_rewind/pg_rewind.c | 10 ++++++---- 5 files changed, 23 insertions(+), 4 deletions(-) diff --git a/src/bin/pg_archivecleanup/pg_archivecleanup.c b/src/bin/pg_archivecleanup/pg_archivecleanup.c index c25348bcb85..ab686b4748c 100644 --- a/src/bin/pg_archivecleanup/pg_archivecleanup.c +++ b/src/bin/pg_archivecleanup/pg_archivecleanup.c @@ -375,6 +375,10 @@ main(int argc, char **argv) exit(2); } + if (dryrun) + pg_log_info("Executing in dry-run mode.\n" + "No files will be removed."); + /* * Check archive exists and other initialization if required. */ diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c index df41836e70f..cc4be5d6ef4 100644 --- a/src/bin/pg_basebackup/pg_createsubscriber.c +++ b/src/bin/pg_basebackup/pg_createsubscriber.c @@ -2305,6 +2305,11 @@ main(int argc, char **argv) pg_log_error_hint("Try \"%s --help\" for more information.", progname); exit(1); } + + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + pg_log_info("validating publisher connection string"); pub_base_conninfo = get_base_conninfo(opt.pub_conninfo_str, &dbname_conninfo); diff --git a/src/bin/pg_combinebackup/pg_combinebackup.c b/src/bin/pg_combinebackup/pg_combinebackup.c index 3a325127209..c9bf0a9e105 100644 --- a/src/bin/pg_combinebackup/pg_combinebackup.c +++ b/src/bin/pg_combinebackup/pg_combinebackup.c @@ -242,6 +242,10 @@ main(int argc, char *argv[]) if (opt.no_manifest) opt.manifest_checksums = CHECKSUM_TYPE_NONE; + if (opt.dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + /* Check that the platform supports the requested copy method. */ if (opt.copy_method == COPY_METHOD_CLONE) { diff --git a/src/bin/pg_resetwal/pg_resetwal.c b/src/bin/pg_resetwal/pg_resetwal.c index a89d72fc5cf..dd5d279521e 100644 --- a/src/bin/pg_resetwal/pg_resetwal.c +++ b/src/bin/pg_resetwal/pg_resetwal.c @@ -397,6 +397,10 @@ main(int argc, char *argv[]) exit(1); } + if (noupdate) + pg_log_info("Executing in dry-run mode.\n" + "Nothing will be modified."); + /* * Attempt to read the existing pg_control file */ diff --git a/src/bin/pg_rewind/pg_rewind.c b/src/bin/pg_rewind/pg_rewind.c index 27c514f934a..e9364d04f76 100644 --- a/src/bin/pg_rewind/pg_rewind.c +++ b/src/bin/pg_rewind/pg_rewind.c @@ -300,10 +300,12 @@ main(int argc, char **argv) atexit(disconnect_atexit); - /* - * Ok, we have all the options and we're ready to start. First, connect to - * remote server. - */ + /* Ok, we have all the options and we're ready to start. */ + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + + /* First, connect to remote server. */ if (connstr_source) { conn = PQconnectdb(connstr_source); -- 2.47.3 --ibfr3ah5qy6tcbhw-- ^ permalink raw reply [nested|flat] 190+ messages in thread
* [PATCH v5] Log a note at program start when running in dry-run mode @ 2025-11-11 08:54 Álvaro Herrera <[email protected]> 0 siblings, 0 replies; 190+ messages in thread From: Álvaro Herrera @ 2025-11-11 08:54 UTC (permalink / raw) Users might get some peace of mind knowing their data is not being destroyed or whatever. Author: Peter Smith <[email protected]> Reviewed-by: Álvaro Herrera <[email protected]> Discussion: https://postgr.es/m/CAHut+PsvQJQnQO0KT0S2oegenkvJ8FUuY-QS5syyqmT24R2xFQ@mail.gmail.com --- src/bin/pg_archivecleanup/pg_archivecleanup.c | 4 ++++ src/bin/pg_basebackup/pg_createsubscriber.c | 5 +++++ src/bin/pg_combinebackup/pg_combinebackup.c | 4 ++++ src/bin/pg_resetwal/pg_resetwal.c | 4 ++++ src/bin/pg_rewind/pg_rewind.c | 10 ++++++---- 5 files changed, 23 insertions(+), 4 deletions(-) diff --git a/src/bin/pg_archivecleanup/pg_archivecleanup.c b/src/bin/pg_archivecleanup/pg_archivecleanup.c index c25348bcb85..ab686b4748c 100644 --- a/src/bin/pg_archivecleanup/pg_archivecleanup.c +++ b/src/bin/pg_archivecleanup/pg_archivecleanup.c @@ -375,6 +375,10 @@ main(int argc, char **argv) exit(2); } + if (dryrun) + pg_log_info("Executing in dry-run mode.\n" + "No files will be removed."); + /* * Check archive exists and other initialization if required. */ diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c index df41836e70f..cc4be5d6ef4 100644 --- a/src/bin/pg_basebackup/pg_createsubscriber.c +++ b/src/bin/pg_basebackup/pg_createsubscriber.c @@ -2305,6 +2305,11 @@ main(int argc, char **argv) pg_log_error_hint("Try \"%s --help\" for more information.", progname); exit(1); } + + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + pg_log_info("validating publisher connection string"); pub_base_conninfo = get_base_conninfo(opt.pub_conninfo_str, &dbname_conninfo); diff --git a/src/bin/pg_combinebackup/pg_combinebackup.c b/src/bin/pg_combinebackup/pg_combinebackup.c index 3a325127209..c9bf0a9e105 100644 --- a/src/bin/pg_combinebackup/pg_combinebackup.c +++ b/src/bin/pg_combinebackup/pg_combinebackup.c @@ -242,6 +242,10 @@ main(int argc, char *argv[]) if (opt.no_manifest) opt.manifest_checksums = CHECKSUM_TYPE_NONE; + if (opt.dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + /* Check that the platform supports the requested copy method. */ if (opt.copy_method == COPY_METHOD_CLONE) { diff --git a/src/bin/pg_resetwal/pg_resetwal.c b/src/bin/pg_resetwal/pg_resetwal.c index a89d72fc5cf..dd5d279521e 100644 --- a/src/bin/pg_resetwal/pg_resetwal.c +++ b/src/bin/pg_resetwal/pg_resetwal.c @@ -397,6 +397,10 @@ main(int argc, char *argv[]) exit(1); } + if (noupdate) + pg_log_info("Executing in dry-run mode.\n" + "Nothing will be modified."); + /* * Attempt to read the existing pg_control file */ diff --git a/src/bin/pg_rewind/pg_rewind.c b/src/bin/pg_rewind/pg_rewind.c index 27c514f934a..e9364d04f76 100644 --- a/src/bin/pg_rewind/pg_rewind.c +++ b/src/bin/pg_rewind/pg_rewind.c @@ -300,10 +300,12 @@ main(int argc, char **argv) atexit(disconnect_atexit); - /* - * Ok, we have all the options and we're ready to start. First, connect to - * remote server. - */ + /* Ok, we have all the options and we're ready to start. */ + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + + /* First, connect to remote server. */ if (connstr_source) { conn = PQconnectdb(connstr_source); -- 2.47.3 --ibfr3ah5qy6tcbhw-- ^ permalink raw reply [nested|flat] 190+ messages in thread
* [PATCH v5] Log a note at program start when running in dry-run mode @ 2025-11-11 08:54 Álvaro Herrera <[email protected]> 0 siblings, 0 replies; 190+ messages in thread From: Álvaro Herrera @ 2025-11-11 08:54 UTC (permalink / raw) Users might get some peace of mind knowing their data is not being destroyed or whatever. Author: Peter Smith <[email protected]> Reviewed-by: Álvaro Herrera <[email protected]> Discussion: https://postgr.es/m/CAHut+PsvQJQnQO0KT0S2oegenkvJ8FUuY-QS5syyqmT24R2xFQ@mail.gmail.com --- src/bin/pg_archivecleanup/pg_archivecleanup.c | 4 ++++ src/bin/pg_basebackup/pg_createsubscriber.c | 5 +++++ src/bin/pg_combinebackup/pg_combinebackup.c | 4 ++++ src/bin/pg_resetwal/pg_resetwal.c | 4 ++++ src/bin/pg_rewind/pg_rewind.c | 10 ++++++---- 5 files changed, 23 insertions(+), 4 deletions(-) diff --git a/src/bin/pg_archivecleanup/pg_archivecleanup.c b/src/bin/pg_archivecleanup/pg_archivecleanup.c index c25348bcb85..ab686b4748c 100644 --- a/src/bin/pg_archivecleanup/pg_archivecleanup.c +++ b/src/bin/pg_archivecleanup/pg_archivecleanup.c @@ -375,6 +375,10 @@ main(int argc, char **argv) exit(2); } + if (dryrun) + pg_log_info("Executing in dry-run mode.\n" + "No files will be removed."); + /* * Check archive exists and other initialization if required. */ diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c index df41836e70f..cc4be5d6ef4 100644 --- a/src/bin/pg_basebackup/pg_createsubscriber.c +++ b/src/bin/pg_basebackup/pg_createsubscriber.c @@ -2305,6 +2305,11 @@ main(int argc, char **argv) pg_log_error_hint("Try \"%s --help\" for more information.", progname); exit(1); } + + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + pg_log_info("validating publisher connection string"); pub_base_conninfo = get_base_conninfo(opt.pub_conninfo_str, &dbname_conninfo); diff --git a/src/bin/pg_combinebackup/pg_combinebackup.c b/src/bin/pg_combinebackup/pg_combinebackup.c index 3a325127209..c9bf0a9e105 100644 --- a/src/bin/pg_combinebackup/pg_combinebackup.c +++ b/src/bin/pg_combinebackup/pg_combinebackup.c @@ -242,6 +242,10 @@ main(int argc, char *argv[]) if (opt.no_manifest) opt.manifest_checksums = CHECKSUM_TYPE_NONE; + if (opt.dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + /* Check that the platform supports the requested copy method. */ if (opt.copy_method == COPY_METHOD_CLONE) { diff --git a/src/bin/pg_resetwal/pg_resetwal.c b/src/bin/pg_resetwal/pg_resetwal.c index a89d72fc5cf..dd5d279521e 100644 --- a/src/bin/pg_resetwal/pg_resetwal.c +++ b/src/bin/pg_resetwal/pg_resetwal.c @@ -397,6 +397,10 @@ main(int argc, char *argv[]) exit(1); } + if (noupdate) + pg_log_info("Executing in dry-run mode.\n" + "Nothing will be modified."); + /* * Attempt to read the existing pg_control file */ diff --git a/src/bin/pg_rewind/pg_rewind.c b/src/bin/pg_rewind/pg_rewind.c index 27c514f934a..e9364d04f76 100644 --- a/src/bin/pg_rewind/pg_rewind.c +++ b/src/bin/pg_rewind/pg_rewind.c @@ -300,10 +300,12 @@ main(int argc, char **argv) atexit(disconnect_atexit); - /* - * Ok, we have all the options and we're ready to start. First, connect to - * remote server. - */ + /* Ok, we have all the options and we're ready to start. */ + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + + /* First, connect to remote server. */ if (connstr_source) { conn = PQconnectdb(connstr_source); -- 2.47.3 --ibfr3ah5qy6tcbhw-- ^ permalink raw reply [nested|flat] 190+ messages in thread
* [PATCH v5] Log a note at program start when running in dry-run mode @ 2025-11-11 08:54 Álvaro Herrera <[email protected]> 0 siblings, 0 replies; 190+ messages in thread From: Álvaro Herrera @ 2025-11-11 08:54 UTC (permalink / raw) Users might get some peace of mind knowing their data is not being destroyed or whatever. Author: Peter Smith <[email protected]> Reviewed-by: Álvaro Herrera <[email protected]> Discussion: https://postgr.es/m/CAHut+PsvQJQnQO0KT0S2oegenkvJ8FUuY-QS5syyqmT24R2xFQ@mail.gmail.com --- src/bin/pg_archivecleanup/pg_archivecleanup.c | 4 ++++ src/bin/pg_basebackup/pg_createsubscriber.c | 5 +++++ src/bin/pg_combinebackup/pg_combinebackup.c | 4 ++++ src/bin/pg_resetwal/pg_resetwal.c | 4 ++++ src/bin/pg_rewind/pg_rewind.c | 10 ++++++---- 5 files changed, 23 insertions(+), 4 deletions(-) diff --git a/src/bin/pg_archivecleanup/pg_archivecleanup.c b/src/bin/pg_archivecleanup/pg_archivecleanup.c index c25348bcb85..ab686b4748c 100644 --- a/src/bin/pg_archivecleanup/pg_archivecleanup.c +++ b/src/bin/pg_archivecleanup/pg_archivecleanup.c @@ -375,6 +375,10 @@ main(int argc, char **argv) exit(2); } + if (dryrun) + pg_log_info("Executing in dry-run mode.\n" + "No files will be removed."); + /* * Check archive exists and other initialization if required. */ diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c index df41836e70f..cc4be5d6ef4 100644 --- a/src/bin/pg_basebackup/pg_createsubscriber.c +++ b/src/bin/pg_basebackup/pg_createsubscriber.c @@ -2305,6 +2305,11 @@ main(int argc, char **argv) pg_log_error_hint("Try \"%s --help\" for more information.", progname); exit(1); } + + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + pg_log_info("validating publisher connection string"); pub_base_conninfo = get_base_conninfo(opt.pub_conninfo_str, &dbname_conninfo); diff --git a/src/bin/pg_combinebackup/pg_combinebackup.c b/src/bin/pg_combinebackup/pg_combinebackup.c index 3a325127209..c9bf0a9e105 100644 --- a/src/bin/pg_combinebackup/pg_combinebackup.c +++ b/src/bin/pg_combinebackup/pg_combinebackup.c @@ -242,6 +242,10 @@ main(int argc, char *argv[]) if (opt.no_manifest) opt.manifest_checksums = CHECKSUM_TYPE_NONE; + if (opt.dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + /* Check that the platform supports the requested copy method. */ if (opt.copy_method == COPY_METHOD_CLONE) { diff --git a/src/bin/pg_resetwal/pg_resetwal.c b/src/bin/pg_resetwal/pg_resetwal.c index a89d72fc5cf..dd5d279521e 100644 --- a/src/bin/pg_resetwal/pg_resetwal.c +++ b/src/bin/pg_resetwal/pg_resetwal.c @@ -397,6 +397,10 @@ main(int argc, char *argv[]) exit(1); } + if (noupdate) + pg_log_info("Executing in dry-run mode.\n" + "Nothing will be modified."); + /* * Attempt to read the existing pg_control file */ diff --git a/src/bin/pg_rewind/pg_rewind.c b/src/bin/pg_rewind/pg_rewind.c index 27c514f934a..e9364d04f76 100644 --- a/src/bin/pg_rewind/pg_rewind.c +++ b/src/bin/pg_rewind/pg_rewind.c @@ -300,10 +300,12 @@ main(int argc, char **argv) atexit(disconnect_atexit); - /* - * Ok, we have all the options and we're ready to start. First, connect to - * remote server. - */ + /* Ok, we have all the options and we're ready to start. */ + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + + /* First, connect to remote server. */ if (connstr_source) { conn = PQconnectdb(connstr_source); -- 2.47.3 --ibfr3ah5qy6tcbhw-- ^ permalink raw reply [nested|flat] 190+ messages in thread
* [PATCH v5] Log a note at program start when running in dry-run mode @ 2025-11-11 08:54 Álvaro Herrera <[email protected]> 0 siblings, 0 replies; 190+ messages in thread From: Álvaro Herrera @ 2025-11-11 08:54 UTC (permalink / raw) Users might get some peace of mind knowing their data is not being destroyed or whatever. Author: Peter Smith <[email protected]> Reviewed-by: Álvaro Herrera <[email protected]> Discussion: https://postgr.es/m/CAHut+PsvQJQnQO0KT0S2oegenkvJ8FUuY-QS5syyqmT24R2xFQ@mail.gmail.com --- src/bin/pg_archivecleanup/pg_archivecleanup.c | 4 ++++ src/bin/pg_basebackup/pg_createsubscriber.c | 5 +++++ src/bin/pg_combinebackup/pg_combinebackup.c | 4 ++++ src/bin/pg_resetwal/pg_resetwal.c | 4 ++++ src/bin/pg_rewind/pg_rewind.c | 10 ++++++---- 5 files changed, 23 insertions(+), 4 deletions(-) diff --git a/src/bin/pg_archivecleanup/pg_archivecleanup.c b/src/bin/pg_archivecleanup/pg_archivecleanup.c index c25348bcb85..ab686b4748c 100644 --- a/src/bin/pg_archivecleanup/pg_archivecleanup.c +++ b/src/bin/pg_archivecleanup/pg_archivecleanup.c @@ -375,6 +375,10 @@ main(int argc, char **argv) exit(2); } + if (dryrun) + pg_log_info("Executing in dry-run mode.\n" + "No files will be removed."); + /* * Check archive exists and other initialization if required. */ diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c index df41836e70f..cc4be5d6ef4 100644 --- a/src/bin/pg_basebackup/pg_createsubscriber.c +++ b/src/bin/pg_basebackup/pg_createsubscriber.c @@ -2305,6 +2305,11 @@ main(int argc, char **argv) pg_log_error_hint("Try \"%s --help\" for more information.", progname); exit(1); } + + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + pg_log_info("validating publisher connection string"); pub_base_conninfo = get_base_conninfo(opt.pub_conninfo_str, &dbname_conninfo); diff --git a/src/bin/pg_combinebackup/pg_combinebackup.c b/src/bin/pg_combinebackup/pg_combinebackup.c index 3a325127209..c9bf0a9e105 100644 --- a/src/bin/pg_combinebackup/pg_combinebackup.c +++ b/src/bin/pg_combinebackup/pg_combinebackup.c @@ -242,6 +242,10 @@ main(int argc, char *argv[]) if (opt.no_manifest) opt.manifest_checksums = CHECKSUM_TYPE_NONE; + if (opt.dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + /* Check that the platform supports the requested copy method. */ if (opt.copy_method == COPY_METHOD_CLONE) { diff --git a/src/bin/pg_resetwal/pg_resetwal.c b/src/bin/pg_resetwal/pg_resetwal.c index a89d72fc5cf..dd5d279521e 100644 --- a/src/bin/pg_resetwal/pg_resetwal.c +++ b/src/bin/pg_resetwal/pg_resetwal.c @@ -397,6 +397,10 @@ main(int argc, char *argv[]) exit(1); } + if (noupdate) + pg_log_info("Executing in dry-run mode.\n" + "Nothing will be modified."); + /* * Attempt to read the existing pg_control file */ diff --git a/src/bin/pg_rewind/pg_rewind.c b/src/bin/pg_rewind/pg_rewind.c index 27c514f934a..e9364d04f76 100644 --- a/src/bin/pg_rewind/pg_rewind.c +++ b/src/bin/pg_rewind/pg_rewind.c @@ -300,10 +300,12 @@ main(int argc, char **argv) atexit(disconnect_atexit); - /* - * Ok, we have all the options and we're ready to start. First, connect to - * remote server. - */ + /* Ok, we have all the options and we're ready to start. */ + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + + /* First, connect to remote server. */ if (connstr_source) { conn = PQconnectdb(connstr_source); -- 2.47.3 --ibfr3ah5qy6tcbhw-- ^ permalink raw reply [nested|flat] 190+ messages in thread
* [PATCH v5] Log a note at program start when running in dry-run mode @ 2025-11-11 08:54 Álvaro Herrera <[email protected]> 0 siblings, 0 replies; 190+ messages in thread From: Álvaro Herrera @ 2025-11-11 08:54 UTC (permalink / raw) Users might get some peace of mind knowing their data is not being destroyed or whatever. Author: Peter Smith <[email protected]> Reviewed-by: Álvaro Herrera <[email protected]> Discussion: https://postgr.es/m/CAHut+PsvQJQnQO0KT0S2oegenkvJ8FUuY-QS5syyqmT24R2xFQ@mail.gmail.com --- src/bin/pg_archivecleanup/pg_archivecleanup.c | 4 ++++ src/bin/pg_basebackup/pg_createsubscriber.c | 5 +++++ src/bin/pg_combinebackup/pg_combinebackup.c | 4 ++++ src/bin/pg_resetwal/pg_resetwal.c | 4 ++++ src/bin/pg_rewind/pg_rewind.c | 10 ++++++---- 5 files changed, 23 insertions(+), 4 deletions(-) diff --git a/src/bin/pg_archivecleanup/pg_archivecleanup.c b/src/bin/pg_archivecleanup/pg_archivecleanup.c index c25348bcb85..ab686b4748c 100644 --- a/src/bin/pg_archivecleanup/pg_archivecleanup.c +++ b/src/bin/pg_archivecleanup/pg_archivecleanup.c @@ -375,6 +375,10 @@ main(int argc, char **argv) exit(2); } + if (dryrun) + pg_log_info("Executing in dry-run mode.\n" + "No files will be removed."); + /* * Check archive exists and other initialization if required. */ diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c index df41836e70f..cc4be5d6ef4 100644 --- a/src/bin/pg_basebackup/pg_createsubscriber.c +++ b/src/bin/pg_basebackup/pg_createsubscriber.c @@ -2305,6 +2305,11 @@ main(int argc, char **argv) pg_log_error_hint("Try \"%s --help\" for more information.", progname); exit(1); } + + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + pg_log_info("validating publisher connection string"); pub_base_conninfo = get_base_conninfo(opt.pub_conninfo_str, &dbname_conninfo); diff --git a/src/bin/pg_combinebackup/pg_combinebackup.c b/src/bin/pg_combinebackup/pg_combinebackup.c index 3a325127209..c9bf0a9e105 100644 --- a/src/bin/pg_combinebackup/pg_combinebackup.c +++ b/src/bin/pg_combinebackup/pg_combinebackup.c @@ -242,6 +242,10 @@ main(int argc, char *argv[]) if (opt.no_manifest) opt.manifest_checksums = CHECKSUM_TYPE_NONE; + if (opt.dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + /* Check that the platform supports the requested copy method. */ if (opt.copy_method == COPY_METHOD_CLONE) { diff --git a/src/bin/pg_resetwal/pg_resetwal.c b/src/bin/pg_resetwal/pg_resetwal.c index a89d72fc5cf..dd5d279521e 100644 --- a/src/bin/pg_resetwal/pg_resetwal.c +++ b/src/bin/pg_resetwal/pg_resetwal.c @@ -397,6 +397,10 @@ main(int argc, char *argv[]) exit(1); } + if (noupdate) + pg_log_info("Executing in dry-run mode.\n" + "Nothing will be modified."); + /* * Attempt to read the existing pg_control file */ diff --git a/src/bin/pg_rewind/pg_rewind.c b/src/bin/pg_rewind/pg_rewind.c index 27c514f934a..e9364d04f76 100644 --- a/src/bin/pg_rewind/pg_rewind.c +++ b/src/bin/pg_rewind/pg_rewind.c @@ -300,10 +300,12 @@ main(int argc, char **argv) atexit(disconnect_atexit); - /* - * Ok, we have all the options and we're ready to start. First, connect to - * remote server. - */ + /* Ok, we have all the options and we're ready to start. */ + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + + /* First, connect to remote server. */ if (connstr_source) { conn = PQconnectdb(connstr_source); -- 2.47.3 --ibfr3ah5qy6tcbhw-- ^ permalink raw reply [nested|flat] 190+ messages in thread
* [PATCH v5] Log a note at program start when running in dry-run mode @ 2025-11-11 08:54 Álvaro Herrera <[email protected]> 0 siblings, 0 replies; 190+ messages in thread From: Álvaro Herrera @ 2025-11-11 08:54 UTC (permalink / raw) Users might get some peace of mind knowing their data is not being destroyed or whatever. Author: Peter Smith <[email protected]> Reviewed-by: Álvaro Herrera <[email protected]> Discussion: https://postgr.es/m/CAHut+PsvQJQnQO0KT0S2oegenkvJ8FUuY-QS5syyqmT24R2xFQ@mail.gmail.com --- src/bin/pg_archivecleanup/pg_archivecleanup.c | 4 ++++ src/bin/pg_basebackup/pg_createsubscriber.c | 5 +++++ src/bin/pg_combinebackup/pg_combinebackup.c | 4 ++++ src/bin/pg_resetwal/pg_resetwal.c | 4 ++++ src/bin/pg_rewind/pg_rewind.c | 10 ++++++---- 5 files changed, 23 insertions(+), 4 deletions(-) diff --git a/src/bin/pg_archivecleanup/pg_archivecleanup.c b/src/bin/pg_archivecleanup/pg_archivecleanup.c index c25348bcb85..ab686b4748c 100644 --- a/src/bin/pg_archivecleanup/pg_archivecleanup.c +++ b/src/bin/pg_archivecleanup/pg_archivecleanup.c @@ -375,6 +375,10 @@ main(int argc, char **argv) exit(2); } + if (dryrun) + pg_log_info("Executing in dry-run mode.\n" + "No files will be removed."); + /* * Check archive exists and other initialization if required. */ diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c index df41836e70f..cc4be5d6ef4 100644 --- a/src/bin/pg_basebackup/pg_createsubscriber.c +++ b/src/bin/pg_basebackup/pg_createsubscriber.c @@ -2305,6 +2305,11 @@ main(int argc, char **argv) pg_log_error_hint("Try \"%s --help\" for more information.", progname); exit(1); } + + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + pg_log_info("validating publisher connection string"); pub_base_conninfo = get_base_conninfo(opt.pub_conninfo_str, &dbname_conninfo); diff --git a/src/bin/pg_combinebackup/pg_combinebackup.c b/src/bin/pg_combinebackup/pg_combinebackup.c index 3a325127209..c9bf0a9e105 100644 --- a/src/bin/pg_combinebackup/pg_combinebackup.c +++ b/src/bin/pg_combinebackup/pg_combinebackup.c @@ -242,6 +242,10 @@ main(int argc, char *argv[]) if (opt.no_manifest) opt.manifest_checksums = CHECKSUM_TYPE_NONE; + if (opt.dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + /* Check that the platform supports the requested copy method. */ if (opt.copy_method == COPY_METHOD_CLONE) { diff --git a/src/bin/pg_resetwal/pg_resetwal.c b/src/bin/pg_resetwal/pg_resetwal.c index a89d72fc5cf..dd5d279521e 100644 --- a/src/bin/pg_resetwal/pg_resetwal.c +++ b/src/bin/pg_resetwal/pg_resetwal.c @@ -397,6 +397,10 @@ main(int argc, char *argv[]) exit(1); } + if (noupdate) + pg_log_info("Executing in dry-run mode.\n" + "Nothing will be modified."); + /* * Attempt to read the existing pg_control file */ diff --git a/src/bin/pg_rewind/pg_rewind.c b/src/bin/pg_rewind/pg_rewind.c index 27c514f934a..e9364d04f76 100644 --- a/src/bin/pg_rewind/pg_rewind.c +++ b/src/bin/pg_rewind/pg_rewind.c @@ -300,10 +300,12 @@ main(int argc, char **argv) atexit(disconnect_atexit); - /* - * Ok, we have all the options and we're ready to start. First, connect to - * remote server. - */ + /* Ok, we have all the options and we're ready to start. */ + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + + /* First, connect to remote server. */ if (connstr_source) { conn = PQconnectdb(connstr_source); -- 2.47.3 --ibfr3ah5qy6tcbhw-- ^ permalink raw reply [nested|flat] 190+ messages in thread
* [PATCH v5] Log a note at program start when running in dry-run mode @ 2025-11-11 08:54 Álvaro Herrera <[email protected]> 0 siblings, 0 replies; 190+ messages in thread From: Álvaro Herrera @ 2025-11-11 08:54 UTC (permalink / raw) Users might get some peace of mind knowing their data is not being destroyed or whatever. Author: Peter Smith <[email protected]> Reviewed-by: Álvaro Herrera <[email protected]> Discussion: https://postgr.es/m/CAHut+PsvQJQnQO0KT0S2oegenkvJ8FUuY-QS5syyqmT24R2xFQ@mail.gmail.com --- src/bin/pg_archivecleanup/pg_archivecleanup.c | 4 ++++ src/bin/pg_basebackup/pg_createsubscriber.c | 5 +++++ src/bin/pg_combinebackup/pg_combinebackup.c | 4 ++++ src/bin/pg_resetwal/pg_resetwal.c | 4 ++++ src/bin/pg_rewind/pg_rewind.c | 10 ++++++---- 5 files changed, 23 insertions(+), 4 deletions(-) diff --git a/src/bin/pg_archivecleanup/pg_archivecleanup.c b/src/bin/pg_archivecleanup/pg_archivecleanup.c index c25348bcb85..ab686b4748c 100644 --- a/src/bin/pg_archivecleanup/pg_archivecleanup.c +++ b/src/bin/pg_archivecleanup/pg_archivecleanup.c @@ -375,6 +375,10 @@ main(int argc, char **argv) exit(2); } + if (dryrun) + pg_log_info("Executing in dry-run mode.\n" + "No files will be removed."); + /* * Check archive exists and other initialization if required. */ diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c index df41836e70f..cc4be5d6ef4 100644 --- a/src/bin/pg_basebackup/pg_createsubscriber.c +++ b/src/bin/pg_basebackup/pg_createsubscriber.c @@ -2305,6 +2305,11 @@ main(int argc, char **argv) pg_log_error_hint("Try \"%s --help\" for more information.", progname); exit(1); } + + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + pg_log_info("validating publisher connection string"); pub_base_conninfo = get_base_conninfo(opt.pub_conninfo_str, &dbname_conninfo); diff --git a/src/bin/pg_combinebackup/pg_combinebackup.c b/src/bin/pg_combinebackup/pg_combinebackup.c index 3a325127209..c9bf0a9e105 100644 --- a/src/bin/pg_combinebackup/pg_combinebackup.c +++ b/src/bin/pg_combinebackup/pg_combinebackup.c @@ -242,6 +242,10 @@ main(int argc, char *argv[]) if (opt.no_manifest) opt.manifest_checksums = CHECKSUM_TYPE_NONE; + if (opt.dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + /* Check that the platform supports the requested copy method. */ if (opt.copy_method == COPY_METHOD_CLONE) { diff --git a/src/bin/pg_resetwal/pg_resetwal.c b/src/bin/pg_resetwal/pg_resetwal.c index a89d72fc5cf..dd5d279521e 100644 --- a/src/bin/pg_resetwal/pg_resetwal.c +++ b/src/bin/pg_resetwal/pg_resetwal.c @@ -397,6 +397,10 @@ main(int argc, char *argv[]) exit(1); } + if (noupdate) + pg_log_info("Executing in dry-run mode.\n" + "Nothing will be modified."); + /* * Attempt to read the existing pg_control file */ diff --git a/src/bin/pg_rewind/pg_rewind.c b/src/bin/pg_rewind/pg_rewind.c index 27c514f934a..e9364d04f76 100644 --- a/src/bin/pg_rewind/pg_rewind.c +++ b/src/bin/pg_rewind/pg_rewind.c @@ -300,10 +300,12 @@ main(int argc, char **argv) atexit(disconnect_atexit); - /* - * Ok, we have all the options and we're ready to start. First, connect to - * remote server. - */ + /* Ok, we have all the options and we're ready to start. */ + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + + /* First, connect to remote server. */ if (connstr_source) { conn = PQconnectdb(connstr_source); -- 2.47.3 --ibfr3ah5qy6tcbhw-- ^ permalink raw reply [nested|flat] 190+ messages in thread
* [PATCH v5] Log a note at program start when running in dry-run mode @ 2025-11-11 08:54 Álvaro Herrera <[email protected]> 0 siblings, 0 replies; 190+ messages in thread From: Álvaro Herrera @ 2025-11-11 08:54 UTC (permalink / raw) Users might get some peace of mind knowing their data is not being destroyed or whatever. Author: Peter Smith <[email protected]> Reviewed-by: Álvaro Herrera <[email protected]> Discussion: https://postgr.es/m/CAHut+PsvQJQnQO0KT0S2oegenkvJ8FUuY-QS5syyqmT24R2xFQ@mail.gmail.com --- src/bin/pg_archivecleanup/pg_archivecleanup.c | 4 ++++ src/bin/pg_basebackup/pg_createsubscriber.c | 5 +++++ src/bin/pg_combinebackup/pg_combinebackup.c | 4 ++++ src/bin/pg_resetwal/pg_resetwal.c | 4 ++++ src/bin/pg_rewind/pg_rewind.c | 10 ++++++---- 5 files changed, 23 insertions(+), 4 deletions(-) diff --git a/src/bin/pg_archivecleanup/pg_archivecleanup.c b/src/bin/pg_archivecleanup/pg_archivecleanup.c index c25348bcb85..ab686b4748c 100644 --- a/src/bin/pg_archivecleanup/pg_archivecleanup.c +++ b/src/bin/pg_archivecleanup/pg_archivecleanup.c @@ -375,6 +375,10 @@ main(int argc, char **argv) exit(2); } + if (dryrun) + pg_log_info("Executing in dry-run mode.\n" + "No files will be removed."); + /* * Check archive exists and other initialization if required. */ diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c index df41836e70f..cc4be5d6ef4 100644 --- a/src/bin/pg_basebackup/pg_createsubscriber.c +++ b/src/bin/pg_basebackup/pg_createsubscriber.c @@ -2305,6 +2305,11 @@ main(int argc, char **argv) pg_log_error_hint("Try \"%s --help\" for more information.", progname); exit(1); } + + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + pg_log_info("validating publisher connection string"); pub_base_conninfo = get_base_conninfo(opt.pub_conninfo_str, &dbname_conninfo); diff --git a/src/bin/pg_combinebackup/pg_combinebackup.c b/src/bin/pg_combinebackup/pg_combinebackup.c index 3a325127209..c9bf0a9e105 100644 --- a/src/bin/pg_combinebackup/pg_combinebackup.c +++ b/src/bin/pg_combinebackup/pg_combinebackup.c @@ -242,6 +242,10 @@ main(int argc, char *argv[]) if (opt.no_manifest) opt.manifest_checksums = CHECKSUM_TYPE_NONE; + if (opt.dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + /* Check that the platform supports the requested copy method. */ if (opt.copy_method == COPY_METHOD_CLONE) { diff --git a/src/bin/pg_resetwal/pg_resetwal.c b/src/bin/pg_resetwal/pg_resetwal.c index a89d72fc5cf..dd5d279521e 100644 --- a/src/bin/pg_resetwal/pg_resetwal.c +++ b/src/bin/pg_resetwal/pg_resetwal.c @@ -397,6 +397,10 @@ main(int argc, char *argv[]) exit(1); } + if (noupdate) + pg_log_info("Executing in dry-run mode.\n" + "Nothing will be modified."); + /* * Attempt to read the existing pg_control file */ diff --git a/src/bin/pg_rewind/pg_rewind.c b/src/bin/pg_rewind/pg_rewind.c index 27c514f934a..e9364d04f76 100644 --- a/src/bin/pg_rewind/pg_rewind.c +++ b/src/bin/pg_rewind/pg_rewind.c @@ -300,10 +300,12 @@ main(int argc, char **argv) atexit(disconnect_atexit); - /* - * Ok, we have all the options and we're ready to start. First, connect to - * remote server. - */ + /* Ok, we have all the options and we're ready to start. */ + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + + /* First, connect to remote server. */ if (connstr_source) { conn = PQconnectdb(connstr_source); -- 2.47.3 --ibfr3ah5qy6tcbhw-- ^ permalink raw reply [nested|flat] 190+ messages in thread
* [PATCH v5] Log a note at program start when running in dry-run mode @ 2025-11-11 08:54 Álvaro Herrera <[email protected]> 0 siblings, 0 replies; 190+ messages in thread From: Álvaro Herrera @ 2025-11-11 08:54 UTC (permalink / raw) Users might get some peace of mind knowing their data is not being destroyed or whatever. Author: Peter Smith <[email protected]> Reviewed-by: Álvaro Herrera <[email protected]> Discussion: https://postgr.es/m/CAHut+PsvQJQnQO0KT0S2oegenkvJ8FUuY-QS5syyqmT24R2xFQ@mail.gmail.com --- src/bin/pg_archivecleanup/pg_archivecleanup.c | 4 ++++ src/bin/pg_basebackup/pg_createsubscriber.c | 5 +++++ src/bin/pg_combinebackup/pg_combinebackup.c | 4 ++++ src/bin/pg_resetwal/pg_resetwal.c | 4 ++++ src/bin/pg_rewind/pg_rewind.c | 10 ++++++---- 5 files changed, 23 insertions(+), 4 deletions(-) diff --git a/src/bin/pg_archivecleanup/pg_archivecleanup.c b/src/bin/pg_archivecleanup/pg_archivecleanup.c index c25348bcb85..ab686b4748c 100644 --- a/src/bin/pg_archivecleanup/pg_archivecleanup.c +++ b/src/bin/pg_archivecleanup/pg_archivecleanup.c @@ -375,6 +375,10 @@ main(int argc, char **argv) exit(2); } + if (dryrun) + pg_log_info("Executing in dry-run mode.\n" + "No files will be removed."); + /* * Check archive exists and other initialization if required. */ diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c index df41836e70f..cc4be5d6ef4 100644 --- a/src/bin/pg_basebackup/pg_createsubscriber.c +++ b/src/bin/pg_basebackup/pg_createsubscriber.c @@ -2305,6 +2305,11 @@ main(int argc, char **argv) pg_log_error_hint("Try \"%s --help\" for more information.", progname); exit(1); } + + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + pg_log_info("validating publisher connection string"); pub_base_conninfo = get_base_conninfo(opt.pub_conninfo_str, &dbname_conninfo); diff --git a/src/bin/pg_combinebackup/pg_combinebackup.c b/src/bin/pg_combinebackup/pg_combinebackup.c index 3a325127209..c9bf0a9e105 100644 --- a/src/bin/pg_combinebackup/pg_combinebackup.c +++ b/src/bin/pg_combinebackup/pg_combinebackup.c @@ -242,6 +242,10 @@ main(int argc, char *argv[]) if (opt.no_manifest) opt.manifest_checksums = CHECKSUM_TYPE_NONE; + if (opt.dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + /* Check that the platform supports the requested copy method. */ if (opt.copy_method == COPY_METHOD_CLONE) { diff --git a/src/bin/pg_resetwal/pg_resetwal.c b/src/bin/pg_resetwal/pg_resetwal.c index a89d72fc5cf..dd5d279521e 100644 --- a/src/bin/pg_resetwal/pg_resetwal.c +++ b/src/bin/pg_resetwal/pg_resetwal.c @@ -397,6 +397,10 @@ main(int argc, char *argv[]) exit(1); } + if (noupdate) + pg_log_info("Executing in dry-run mode.\n" + "Nothing will be modified."); + /* * Attempt to read the existing pg_control file */ diff --git a/src/bin/pg_rewind/pg_rewind.c b/src/bin/pg_rewind/pg_rewind.c index 27c514f934a..e9364d04f76 100644 --- a/src/bin/pg_rewind/pg_rewind.c +++ b/src/bin/pg_rewind/pg_rewind.c @@ -300,10 +300,12 @@ main(int argc, char **argv) atexit(disconnect_atexit); - /* - * Ok, we have all the options and we're ready to start. First, connect to - * remote server. - */ + /* Ok, we have all the options and we're ready to start. */ + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + + /* First, connect to remote server. */ if (connstr_source) { conn = PQconnectdb(connstr_source); -- 2.47.3 --ibfr3ah5qy6tcbhw-- ^ permalink raw reply [nested|flat] 190+ messages in thread
* [PATCH v5] Log a note at program start when running in dry-run mode @ 2025-11-11 08:54 Álvaro Herrera <[email protected]> 0 siblings, 0 replies; 190+ messages in thread From: Álvaro Herrera @ 2025-11-11 08:54 UTC (permalink / raw) Users might get some peace of mind knowing their data is not being destroyed or whatever. Author: Peter Smith <[email protected]> Reviewed-by: Álvaro Herrera <[email protected]> Discussion: https://postgr.es/m/CAHut+PsvQJQnQO0KT0S2oegenkvJ8FUuY-QS5syyqmT24R2xFQ@mail.gmail.com --- src/bin/pg_archivecleanup/pg_archivecleanup.c | 4 ++++ src/bin/pg_basebackup/pg_createsubscriber.c | 5 +++++ src/bin/pg_combinebackup/pg_combinebackup.c | 4 ++++ src/bin/pg_resetwal/pg_resetwal.c | 4 ++++ src/bin/pg_rewind/pg_rewind.c | 10 ++++++---- 5 files changed, 23 insertions(+), 4 deletions(-) diff --git a/src/bin/pg_archivecleanup/pg_archivecleanup.c b/src/bin/pg_archivecleanup/pg_archivecleanup.c index c25348bcb85..ab686b4748c 100644 --- a/src/bin/pg_archivecleanup/pg_archivecleanup.c +++ b/src/bin/pg_archivecleanup/pg_archivecleanup.c @@ -375,6 +375,10 @@ main(int argc, char **argv) exit(2); } + if (dryrun) + pg_log_info("Executing in dry-run mode.\n" + "No files will be removed."); + /* * Check archive exists and other initialization if required. */ diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c index df41836e70f..cc4be5d6ef4 100644 --- a/src/bin/pg_basebackup/pg_createsubscriber.c +++ b/src/bin/pg_basebackup/pg_createsubscriber.c @@ -2305,6 +2305,11 @@ main(int argc, char **argv) pg_log_error_hint("Try \"%s --help\" for more information.", progname); exit(1); } + + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + pg_log_info("validating publisher connection string"); pub_base_conninfo = get_base_conninfo(opt.pub_conninfo_str, &dbname_conninfo); diff --git a/src/bin/pg_combinebackup/pg_combinebackup.c b/src/bin/pg_combinebackup/pg_combinebackup.c index 3a325127209..c9bf0a9e105 100644 --- a/src/bin/pg_combinebackup/pg_combinebackup.c +++ b/src/bin/pg_combinebackup/pg_combinebackup.c @@ -242,6 +242,10 @@ main(int argc, char *argv[]) if (opt.no_manifest) opt.manifest_checksums = CHECKSUM_TYPE_NONE; + if (opt.dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + /* Check that the platform supports the requested copy method. */ if (opt.copy_method == COPY_METHOD_CLONE) { diff --git a/src/bin/pg_resetwal/pg_resetwal.c b/src/bin/pg_resetwal/pg_resetwal.c index a89d72fc5cf..dd5d279521e 100644 --- a/src/bin/pg_resetwal/pg_resetwal.c +++ b/src/bin/pg_resetwal/pg_resetwal.c @@ -397,6 +397,10 @@ main(int argc, char *argv[]) exit(1); } + if (noupdate) + pg_log_info("Executing in dry-run mode.\n" + "Nothing will be modified."); + /* * Attempt to read the existing pg_control file */ diff --git a/src/bin/pg_rewind/pg_rewind.c b/src/bin/pg_rewind/pg_rewind.c index 27c514f934a..e9364d04f76 100644 --- a/src/bin/pg_rewind/pg_rewind.c +++ b/src/bin/pg_rewind/pg_rewind.c @@ -300,10 +300,12 @@ main(int argc, char **argv) atexit(disconnect_atexit); - /* - * Ok, we have all the options and we're ready to start. First, connect to - * remote server. - */ + /* Ok, we have all the options and we're ready to start. */ + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + + /* First, connect to remote server. */ if (connstr_source) { conn = PQconnectdb(connstr_source); -- 2.47.3 --ibfr3ah5qy6tcbhw-- ^ permalink raw reply [nested|flat] 190+ messages in thread
* [PATCH v5] Log a note at program start when running in dry-run mode @ 2025-11-11 08:54 Álvaro Herrera <[email protected]> 0 siblings, 0 replies; 190+ messages in thread From: Álvaro Herrera @ 2025-11-11 08:54 UTC (permalink / raw) Users might get some peace of mind knowing their data is not being destroyed or whatever. Author: Peter Smith <[email protected]> Reviewed-by: Álvaro Herrera <[email protected]> Discussion: https://postgr.es/m/CAHut+PsvQJQnQO0KT0S2oegenkvJ8FUuY-QS5syyqmT24R2xFQ@mail.gmail.com --- src/bin/pg_archivecleanup/pg_archivecleanup.c | 4 ++++ src/bin/pg_basebackup/pg_createsubscriber.c | 5 +++++ src/bin/pg_combinebackup/pg_combinebackup.c | 4 ++++ src/bin/pg_resetwal/pg_resetwal.c | 4 ++++ src/bin/pg_rewind/pg_rewind.c | 10 ++++++---- 5 files changed, 23 insertions(+), 4 deletions(-) diff --git a/src/bin/pg_archivecleanup/pg_archivecleanup.c b/src/bin/pg_archivecleanup/pg_archivecleanup.c index c25348bcb85..ab686b4748c 100644 --- a/src/bin/pg_archivecleanup/pg_archivecleanup.c +++ b/src/bin/pg_archivecleanup/pg_archivecleanup.c @@ -375,6 +375,10 @@ main(int argc, char **argv) exit(2); } + if (dryrun) + pg_log_info("Executing in dry-run mode.\n" + "No files will be removed."); + /* * Check archive exists and other initialization if required. */ diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c index df41836e70f..cc4be5d6ef4 100644 --- a/src/bin/pg_basebackup/pg_createsubscriber.c +++ b/src/bin/pg_basebackup/pg_createsubscriber.c @@ -2305,6 +2305,11 @@ main(int argc, char **argv) pg_log_error_hint("Try \"%s --help\" for more information.", progname); exit(1); } + + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + pg_log_info("validating publisher connection string"); pub_base_conninfo = get_base_conninfo(opt.pub_conninfo_str, &dbname_conninfo); diff --git a/src/bin/pg_combinebackup/pg_combinebackup.c b/src/bin/pg_combinebackup/pg_combinebackup.c index 3a325127209..c9bf0a9e105 100644 --- a/src/bin/pg_combinebackup/pg_combinebackup.c +++ b/src/bin/pg_combinebackup/pg_combinebackup.c @@ -242,6 +242,10 @@ main(int argc, char *argv[]) if (opt.no_manifest) opt.manifest_checksums = CHECKSUM_TYPE_NONE; + if (opt.dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + /* Check that the platform supports the requested copy method. */ if (opt.copy_method == COPY_METHOD_CLONE) { diff --git a/src/bin/pg_resetwal/pg_resetwal.c b/src/bin/pg_resetwal/pg_resetwal.c index a89d72fc5cf..dd5d279521e 100644 --- a/src/bin/pg_resetwal/pg_resetwal.c +++ b/src/bin/pg_resetwal/pg_resetwal.c @@ -397,6 +397,10 @@ main(int argc, char *argv[]) exit(1); } + if (noupdate) + pg_log_info("Executing in dry-run mode.\n" + "Nothing will be modified."); + /* * Attempt to read the existing pg_control file */ diff --git a/src/bin/pg_rewind/pg_rewind.c b/src/bin/pg_rewind/pg_rewind.c index 27c514f934a..e9364d04f76 100644 --- a/src/bin/pg_rewind/pg_rewind.c +++ b/src/bin/pg_rewind/pg_rewind.c @@ -300,10 +300,12 @@ main(int argc, char **argv) atexit(disconnect_atexit); - /* - * Ok, we have all the options and we're ready to start. First, connect to - * remote server. - */ + /* Ok, we have all the options and we're ready to start. */ + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + + /* First, connect to remote server. */ if (connstr_source) { conn = PQconnectdb(connstr_source); -- 2.47.3 --ibfr3ah5qy6tcbhw-- ^ permalink raw reply [nested|flat] 190+ messages in thread
* [PATCH v5] Log a note at program start when running in dry-run mode @ 2025-11-11 08:54 Álvaro Herrera <[email protected]> 0 siblings, 0 replies; 190+ messages in thread From: Álvaro Herrera @ 2025-11-11 08:54 UTC (permalink / raw) Users might get some peace of mind knowing their data is not being destroyed or whatever. Author: Peter Smith <[email protected]> Reviewed-by: Álvaro Herrera <[email protected]> Discussion: https://postgr.es/m/CAHut+PsvQJQnQO0KT0S2oegenkvJ8FUuY-QS5syyqmT24R2xFQ@mail.gmail.com --- src/bin/pg_archivecleanup/pg_archivecleanup.c | 4 ++++ src/bin/pg_basebackup/pg_createsubscriber.c | 5 +++++ src/bin/pg_combinebackup/pg_combinebackup.c | 4 ++++ src/bin/pg_resetwal/pg_resetwal.c | 4 ++++ src/bin/pg_rewind/pg_rewind.c | 10 ++++++---- 5 files changed, 23 insertions(+), 4 deletions(-) diff --git a/src/bin/pg_archivecleanup/pg_archivecleanup.c b/src/bin/pg_archivecleanup/pg_archivecleanup.c index c25348bcb85..ab686b4748c 100644 --- a/src/bin/pg_archivecleanup/pg_archivecleanup.c +++ b/src/bin/pg_archivecleanup/pg_archivecleanup.c @@ -375,6 +375,10 @@ main(int argc, char **argv) exit(2); } + if (dryrun) + pg_log_info("Executing in dry-run mode.\n" + "No files will be removed."); + /* * Check archive exists and other initialization if required. */ diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c index df41836e70f..cc4be5d6ef4 100644 --- a/src/bin/pg_basebackup/pg_createsubscriber.c +++ b/src/bin/pg_basebackup/pg_createsubscriber.c @@ -2305,6 +2305,11 @@ main(int argc, char **argv) pg_log_error_hint("Try \"%s --help\" for more information.", progname); exit(1); } + + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + pg_log_info("validating publisher connection string"); pub_base_conninfo = get_base_conninfo(opt.pub_conninfo_str, &dbname_conninfo); diff --git a/src/bin/pg_combinebackup/pg_combinebackup.c b/src/bin/pg_combinebackup/pg_combinebackup.c index 3a325127209..c9bf0a9e105 100644 --- a/src/bin/pg_combinebackup/pg_combinebackup.c +++ b/src/bin/pg_combinebackup/pg_combinebackup.c @@ -242,6 +242,10 @@ main(int argc, char *argv[]) if (opt.no_manifest) opt.manifest_checksums = CHECKSUM_TYPE_NONE; + if (opt.dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + /* Check that the platform supports the requested copy method. */ if (opt.copy_method == COPY_METHOD_CLONE) { diff --git a/src/bin/pg_resetwal/pg_resetwal.c b/src/bin/pg_resetwal/pg_resetwal.c index a89d72fc5cf..dd5d279521e 100644 --- a/src/bin/pg_resetwal/pg_resetwal.c +++ b/src/bin/pg_resetwal/pg_resetwal.c @@ -397,6 +397,10 @@ main(int argc, char *argv[]) exit(1); } + if (noupdate) + pg_log_info("Executing in dry-run mode.\n" + "Nothing will be modified."); + /* * Attempt to read the existing pg_control file */ diff --git a/src/bin/pg_rewind/pg_rewind.c b/src/bin/pg_rewind/pg_rewind.c index 27c514f934a..e9364d04f76 100644 --- a/src/bin/pg_rewind/pg_rewind.c +++ b/src/bin/pg_rewind/pg_rewind.c @@ -300,10 +300,12 @@ main(int argc, char **argv) atexit(disconnect_atexit); - /* - * Ok, we have all the options and we're ready to start. First, connect to - * remote server. - */ + /* Ok, we have all the options and we're ready to start. */ + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + + /* First, connect to remote server. */ if (connstr_source) { conn = PQconnectdb(connstr_source); -- 2.47.3 --ibfr3ah5qy6tcbhw-- ^ permalink raw reply [nested|flat] 190+ messages in thread
* [PATCH v5] Log a note at program start when running in dry-run mode @ 2025-11-11 08:54 Álvaro Herrera <[email protected]> 0 siblings, 0 replies; 190+ messages in thread From: Álvaro Herrera @ 2025-11-11 08:54 UTC (permalink / raw) Users might get some peace of mind knowing their data is not being destroyed or whatever. Author: Peter Smith <[email protected]> Reviewed-by: Álvaro Herrera <[email protected]> Discussion: https://postgr.es/m/CAHut+PsvQJQnQO0KT0S2oegenkvJ8FUuY-QS5syyqmT24R2xFQ@mail.gmail.com --- src/bin/pg_archivecleanup/pg_archivecleanup.c | 4 ++++ src/bin/pg_basebackup/pg_createsubscriber.c | 5 +++++ src/bin/pg_combinebackup/pg_combinebackup.c | 4 ++++ src/bin/pg_resetwal/pg_resetwal.c | 4 ++++ src/bin/pg_rewind/pg_rewind.c | 10 ++++++---- 5 files changed, 23 insertions(+), 4 deletions(-) diff --git a/src/bin/pg_archivecleanup/pg_archivecleanup.c b/src/bin/pg_archivecleanup/pg_archivecleanup.c index c25348bcb85..ab686b4748c 100644 --- a/src/bin/pg_archivecleanup/pg_archivecleanup.c +++ b/src/bin/pg_archivecleanup/pg_archivecleanup.c @@ -375,6 +375,10 @@ main(int argc, char **argv) exit(2); } + if (dryrun) + pg_log_info("Executing in dry-run mode.\n" + "No files will be removed."); + /* * Check archive exists and other initialization if required. */ diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c index df41836e70f..cc4be5d6ef4 100644 --- a/src/bin/pg_basebackup/pg_createsubscriber.c +++ b/src/bin/pg_basebackup/pg_createsubscriber.c @@ -2305,6 +2305,11 @@ main(int argc, char **argv) pg_log_error_hint("Try \"%s --help\" for more information.", progname); exit(1); } + + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + pg_log_info("validating publisher connection string"); pub_base_conninfo = get_base_conninfo(opt.pub_conninfo_str, &dbname_conninfo); diff --git a/src/bin/pg_combinebackup/pg_combinebackup.c b/src/bin/pg_combinebackup/pg_combinebackup.c index 3a325127209..c9bf0a9e105 100644 --- a/src/bin/pg_combinebackup/pg_combinebackup.c +++ b/src/bin/pg_combinebackup/pg_combinebackup.c @@ -242,6 +242,10 @@ main(int argc, char *argv[]) if (opt.no_manifest) opt.manifest_checksums = CHECKSUM_TYPE_NONE; + if (opt.dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + /* Check that the platform supports the requested copy method. */ if (opt.copy_method == COPY_METHOD_CLONE) { diff --git a/src/bin/pg_resetwal/pg_resetwal.c b/src/bin/pg_resetwal/pg_resetwal.c index a89d72fc5cf..dd5d279521e 100644 --- a/src/bin/pg_resetwal/pg_resetwal.c +++ b/src/bin/pg_resetwal/pg_resetwal.c @@ -397,6 +397,10 @@ main(int argc, char *argv[]) exit(1); } + if (noupdate) + pg_log_info("Executing in dry-run mode.\n" + "Nothing will be modified."); + /* * Attempt to read the existing pg_control file */ diff --git a/src/bin/pg_rewind/pg_rewind.c b/src/bin/pg_rewind/pg_rewind.c index 27c514f934a..e9364d04f76 100644 --- a/src/bin/pg_rewind/pg_rewind.c +++ b/src/bin/pg_rewind/pg_rewind.c @@ -300,10 +300,12 @@ main(int argc, char **argv) atexit(disconnect_atexit); - /* - * Ok, we have all the options and we're ready to start. First, connect to - * remote server. - */ + /* Ok, we have all the options and we're ready to start. */ + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + + /* First, connect to remote server. */ if (connstr_source) { conn = PQconnectdb(connstr_source); -- 2.47.3 --ibfr3ah5qy6tcbhw-- ^ permalink raw reply [nested|flat] 190+ messages in thread
* [PATCH v5] Log a note at program start when running in dry-run mode @ 2025-11-11 08:54 Álvaro Herrera <[email protected]> 0 siblings, 0 replies; 190+ messages in thread From: Álvaro Herrera @ 2025-11-11 08:54 UTC (permalink / raw) Users might get some peace of mind knowing their data is not being destroyed or whatever. Author: Peter Smith <[email protected]> Reviewed-by: Álvaro Herrera <[email protected]> Discussion: https://postgr.es/m/CAHut+PsvQJQnQO0KT0S2oegenkvJ8FUuY-QS5syyqmT24R2xFQ@mail.gmail.com --- src/bin/pg_archivecleanup/pg_archivecleanup.c | 4 ++++ src/bin/pg_basebackup/pg_createsubscriber.c | 5 +++++ src/bin/pg_combinebackup/pg_combinebackup.c | 4 ++++ src/bin/pg_resetwal/pg_resetwal.c | 4 ++++ src/bin/pg_rewind/pg_rewind.c | 10 ++++++---- 5 files changed, 23 insertions(+), 4 deletions(-) diff --git a/src/bin/pg_archivecleanup/pg_archivecleanup.c b/src/bin/pg_archivecleanup/pg_archivecleanup.c index c25348bcb85..ab686b4748c 100644 --- a/src/bin/pg_archivecleanup/pg_archivecleanup.c +++ b/src/bin/pg_archivecleanup/pg_archivecleanup.c @@ -375,6 +375,10 @@ main(int argc, char **argv) exit(2); } + if (dryrun) + pg_log_info("Executing in dry-run mode.\n" + "No files will be removed."); + /* * Check archive exists and other initialization if required. */ diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c index df41836e70f..cc4be5d6ef4 100644 --- a/src/bin/pg_basebackup/pg_createsubscriber.c +++ b/src/bin/pg_basebackup/pg_createsubscriber.c @@ -2305,6 +2305,11 @@ main(int argc, char **argv) pg_log_error_hint("Try \"%s --help\" for more information.", progname); exit(1); } + + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + pg_log_info("validating publisher connection string"); pub_base_conninfo = get_base_conninfo(opt.pub_conninfo_str, &dbname_conninfo); diff --git a/src/bin/pg_combinebackup/pg_combinebackup.c b/src/bin/pg_combinebackup/pg_combinebackup.c index 3a325127209..c9bf0a9e105 100644 --- a/src/bin/pg_combinebackup/pg_combinebackup.c +++ b/src/bin/pg_combinebackup/pg_combinebackup.c @@ -242,6 +242,10 @@ main(int argc, char *argv[]) if (opt.no_manifest) opt.manifest_checksums = CHECKSUM_TYPE_NONE; + if (opt.dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + /* Check that the platform supports the requested copy method. */ if (opt.copy_method == COPY_METHOD_CLONE) { diff --git a/src/bin/pg_resetwal/pg_resetwal.c b/src/bin/pg_resetwal/pg_resetwal.c index a89d72fc5cf..dd5d279521e 100644 --- a/src/bin/pg_resetwal/pg_resetwal.c +++ b/src/bin/pg_resetwal/pg_resetwal.c @@ -397,6 +397,10 @@ main(int argc, char *argv[]) exit(1); } + if (noupdate) + pg_log_info("Executing in dry-run mode.\n" + "Nothing will be modified."); + /* * Attempt to read the existing pg_control file */ diff --git a/src/bin/pg_rewind/pg_rewind.c b/src/bin/pg_rewind/pg_rewind.c index 27c514f934a..e9364d04f76 100644 --- a/src/bin/pg_rewind/pg_rewind.c +++ b/src/bin/pg_rewind/pg_rewind.c @@ -300,10 +300,12 @@ main(int argc, char **argv) atexit(disconnect_atexit); - /* - * Ok, we have all the options and we're ready to start. First, connect to - * remote server. - */ + /* Ok, we have all the options and we're ready to start. */ + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + + /* First, connect to remote server. */ if (connstr_source) { conn = PQconnectdb(connstr_source); -- 2.47.3 --ibfr3ah5qy6tcbhw-- ^ permalink raw reply [nested|flat] 190+ messages in thread
* [PATCH v5] Log a note at program start when running in dry-run mode @ 2025-11-11 08:54 Álvaro Herrera <[email protected]> 0 siblings, 0 replies; 190+ messages in thread From: Álvaro Herrera @ 2025-11-11 08:54 UTC (permalink / raw) Users might get some peace of mind knowing their data is not being destroyed or whatever. Author: Peter Smith <[email protected]> Reviewed-by: Álvaro Herrera <[email protected]> Discussion: https://postgr.es/m/CAHut+PsvQJQnQO0KT0S2oegenkvJ8FUuY-QS5syyqmT24R2xFQ@mail.gmail.com --- src/bin/pg_archivecleanup/pg_archivecleanup.c | 4 ++++ src/bin/pg_basebackup/pg_createsubscriber.c | 5 +++++ src/bin/pg_combinebackup/pg_combinebackup.c | 4 ++++ src/bin/pg_resetwal/pg_resetwal.c | 4 ++++ src/bin/pg_rewind/pg_rewind.c | 10 ++++++---- 5 files changed, 23 insertions(+), 4 deletions(-) diff --git a/src/bin/pg_archivecleanup/pg_archivecleanup.c b/src/bin/pg_archivecleanup/pg_archivecleanup.c index c25348bcb85..ab686b4748c 100644 --- a/src/bin/pg_archivecleanup/pg_archivecleanup.c +++ b/src/bin/pg_archivecleanup/pg_archivecleanup.c @@ -375,6 +375,10 @@ main(int argc, char **argv) exit(2); } + if (dryrun) + pg_log_info("Executing in dry-run mode.\n" + "No files will be removed."); + /* * Check archive exists and other initialization if required. */ diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c index df41836e70f..cc4be5d6ef4 100644 --- a/src/bin/pg_basebackup/pg_createsubscriber.c +++ b/src/bin/pg_basebackup/pg_createsubscriber.c @@ -2305,6 +2305,11 @@ main(int argc, char **argv) pg_log_error_hint("Try \"%s --help\" for more information.", progname); exit(1); } + + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + pg_log_info("validating publisher connection string"); pub_base_conninfo = get_base_conninfo(opt.pub_conninfo_str, &dbname_conninfo); diff --git a/src/bin/pg_combinebackup/pg_combinebackup.c b/src/bin/pg_combinebackup/pg_combinebackup.c index 3a325127209..c9bf0a9e105 100644 --- a/src/bin/pg_combinebackup/pg_combinebackup.c +++ b/src/bin/pg_combinebackup/pg_combinebackup.c @@ -242,6 +242,10 @@ main(int argc, char *argv[]) if (opt.no_manifest) opt.manifest_checksums = CHECKSUM_TYPE_NONE; + if (opt.dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + /* Check that the platform supports the requested copy method. */ if (opt.copy_method == COPY_METHOD_CLONE) { diff --git a/src/bin/pg_resetwal/pg_resetwal.c b/src/bin/pg_resetwal/pg_resetwal.c index a89d72fc5cf..dd5d279521e 100644 --- a/src/bin/pg_resetwal/pg_resetwal.c +++ b/src/bin/pg_resetwal/pg_resetwal.c @@ -397,6 +397,10 @@ main(int argc, char *argv[]) exit(1); } + if (noupdate) + pg_log_info("Executing in dry-run mode.\n" + "Nothing will be modified."); + /* * Attempt to read the existing pg_control file */ diff --git a/src/bin/pg_rewind/pg_rewind.c b/src/bin/pg_rewind/pg_rewind.c index 27c514f934a..e9364d04f76 100644 --- a/src/bin/pg_rewind/pg_rewind.c +++ b/src/bin/pg_rewind/pg_rewind.c @@ -300,10 +300,12 @@ main(int argc, char **argv) atexit(disconnect_atexit); - /* - * Ok, we have all the options and we're ready to start. First, connect to - * remote server. - */ + /* Ok, we have all the options and we're ready to start. */ + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + + /* First, connect to remote server. */ if (connstr_source) { conn = PQconnectdb(connstr_source); -- 2.47.3 --ibfr3ah5qy6tcbhw-- ^ permalink raw reply [nested|flat] 190+ messages in thread
* [PATCH v5] Log a note at program start when running in dry-run mode @ 2025-11-11 08:54 Álvaro Herrera <[email protected]> 0 siblings, 0 replies; 190+ messages in thread From: Álvaro Herrera @ 2025-11-11 08:54 UTC (permalink / raw) Users might get some peace of mind knowing their data is not being destroyed or whatever. Author: Peter Smith <[email protected]> Reviewed-by: Álvaro Herrera <[email protected]> Discussion: https://postgr.es/m/CAHut+PsvQJQnQO0KT0S2oegenkvJ8FUuY-QS5syyqmT24R2xFQ@mail.gmail.com --- src/bin/pg_archivecleanup/pg_archivecleanup.c | 4 ++++ src/bin/pg_basebackup/pg_createsubscriber.c | 5 +++++ src/bin/pg_combinebackup/pg_combinebackup.c | 4 ++++ src/bin/pg_resetwal/pg_resetwal.c | 4 ++++ src/bin/pg_rewind/pg_rewind.c | 10 ++++++---- 5 files changed, 23 insertions(+), 4 deletions(-) diff --git a/src/bin/pg_archivecleanup/pg_archivecleanup.c b/src/bin/pg_archivecleanup/pg_archivecleanup.c index c25348bcb85..ab686b4748c 100644 --- a/src/bin/pg_archivecleanup/pg_archivecleanup.c +++ b/src/bin/pg_archivecleanup/pg_archivecleanup.c @@ -375,6 +375,10 @@ main(int argc, char **argv) exit(2); } + if (dryrun) + pg_log_info("Executing in dry-run mode.\n" + "No files will be removed."); + /* * Check archive exists and other initialization if required. */ diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c index df41836e70f..cc4be5d6ef4 100644 --- a/src/bin/pg_basebackup/pg_createsubscriber.c +++ b/src/bin/pg_basebackup/pg_createsubscriber.c @@ -2305,6 +2305,11 @@ main(int argc, char **argv) pg_log_error_hint("Try \"%s --help\" for more information.", progname); exit(1); } + + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + pg_log_info("validating publisher connection string"); pub_base_conninfo = get_base_conninfo(opt.pub_conninfo_str, &dbname_conninfo); diff --git a/src/bin/pg_combinebackup/pg_combinebackup.c b/src/bin/pg_combinebackup/pg_combinebackup.c index 3a325127209..c9bf0a9e105 100644 --- a/src/bin/pg_combinebackup/pg_combinebackup.c +++ b/src/bin/pg_combinebackup/pg_combinebackup.c @@ -242,6 +242,10 @@ main(int argc, char *argv[]) if (opt.no_manifest) opt.manifest_checksums = CHECKSUM_TYPE_NONE; + if (opt.dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + /* Check that the platform supports the requested copy method. */ if (opt.copy_method == COPY_METHOD_CLONE) { diff --git a/src/bin/pg_resetwal/pg_resetwal.c b/src/bin/pg_resetwal/pg_resetwal.c index a89d72fc5cf..dd5d279521e 100644 --- a/src/bin/pg_resetwal/pg_resetwal.c +++ b/src/bin/pg_resetwal/pg_resetwal.c @@ -397,6 +397,10 @@ main(int argc, char *argv[]) exit(1); } + if (noupdate) + pg_log_info("Executing in dry-run mode.\n" + "Nothing will be modified."); + /* * Attempt to read the existing pg_control file */ diff --git a/src/bin/pg_rewind/pg_rewind.c b/src/bin/pg_rewind/pg_rewind.c index 27c514f934a..e9364d04f76 100644 --- a/src/bin/pg_rewind/pg_rewind.c +++ b/src/bin/pg_rewind/pg_rewind.c @@ -300,10 +300,12 @@ main(int argc, char **argv) atexit(disconnect_atexit); - /* - * Ok, we have all the options and we're ready to start. First, connect to - * remote server. - */ + /* Ok, we have all the options and we're ready to start. */ + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + + /* First, connect to remote server. */ if (connstr_source) { conn = PQconnectdb(connstr_source); -- 2.47.3 --ibfr3ah5qy6tcbhw-- ^ permalink raw reply [nested|flat] 190+ messages in thread
* [PATCH v5] Log a note at program start when running in dry-run mode @ 2025-11-11 08:54 Álvaro Herrera <[email protected]> 0 siblings, 0 replies; 190+ messages in thread From: Álvaro Herrera @ 2025-11-11 08:54 UTC (permalink / raw) Users might get some peace of mind knowing their data is not being destroyed or whatever. Author: Peter Smith <[email protected]> Reviewed-by: Álvaro Herrera <[email protected]> Discussion: https://postgr.es/m/CAHut+PsvQJQnQO0KT0S2oegenkvJ8FUuY-QS5syyqmT24R2xFQ@mail.gmail.com --- src/bin/pg_archivecleanup/pg_archivecleanup.c | 4 ++++ src/bin/pg_basebackup/pg_createsubscriber.c | 5 +++++ src/bin/pg_combinebackup/pg_combinebackup.c | 4 ++++ src/bin/pg_resetwal/pg_resetwal.c | 4 ++++ src/bin/pg_rewind/pg_rewind.c | 10 ++++++---- 5 files changed, 23 insertions(+), 4 deletions(-) diff --git a/src/bin/pg_archivecleanup/pg_archivecleanup.c b/src/bin/pg_archivecleanup/pg_archivecleanup.c index c25348bcb85..ab686b4748c 100644 --- a/src/bin/pg_archivecleanup/pg_archivecleanup.c +++ b/src/bin/pg_archivecleanup/pg_archivecleanup.c @@ -375,6 +375,10 @@ main(int argc, char **argv) exit(2); } + if (dryrun) + pg_log_info("Executing in dry-run mode.\n" + "No files will be removed."); + /* * Check archive exists and other initialization if required. */ diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c index df41836e70f..cc4be5d6ef4 100644 --- a/src/bin/pg_basebackup/pg_createsubscriber.c +++ b/src/bin/pg_basebackup/pg_createsubscriber.c @@ -2305,6 +2305,11 @@ main(int argc, char **argv) pg_log_error_hint("Try \"%s --help\" for more information.", progname); exit(1); } + + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + pg_log_info("validating publisher connection string"); pub_base_conninfo = get_base_conninfo(opt.pub_conninfo_str, &dbname_conninfo); diff --git a/src/bin/pg_combinebackup/pg_combinebackup.c b/src/bin/pg_combinebackup/pg_combinebackup.c index 3a325127209..c9bf0a9e105 100644 --- a/src/bin/pg_combinebackup/pg_combinebackup.c +++ b/src/bin/pg_combinebackup/pg_combinebackup.c @@ -242,6 +242,10 @@ main(int argc, char *argv[]) if (opt.no_manifest) opt.manifest_checksums = CHECKSUM_TYPE_NONE; + if (opt.dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + /* Check that the platform supports the requested copy method. */ if (opt.copy_method == COPY_METHOD_CLONE) { diff --git a/src/bin/pg_resetwal/pg_resetwal.c b/src/bin/pg_resetwal/pg_resetwal.c index a89d72fc5cf..dd5d279521e 100644 --- a/src/bin/pg_resetwal/pg_resetwal.c +++ b/src/bin/pg_resetwal/pg_resetwal.c @@ -397,6 +397,10 @@ main(int argc, char *argv[]) exit(1); } + if (noupdate) + pg_log_info("Executing in dry-run mode.\n" + "Nothing will be modified."); + /* * Attempt to read the existing pg_control file */ diff --git a/src/bin/pg_rewind/pg_rewind.c b/src/bin/pg_rewind/pg_rewind.c index 27c514f934a..e9364d04f76 100644 --- a/src/bin/pg_rewind/pg_rewind.c +++ b/src/bin/pg_rewind/pg_rewind.c @@ -300,10 +300,12 @@ main(int argc, char **argv) atexit(disconnect_atexit); - /* - * Ok, we have all the options and we're ready to start. First, connect to - * remote server. - */ + /* Ok, we have all the options and we're ready to start. */ + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + + /* First, connect to remote server. */ if (connstr_source) { conn = PQconnectdb(connstr_source); -- 2.47.3 --ibfr3ah5qy6tcbhw-- ^ permalink raw reply [nested|flat] 190+ messages in thread
* [PATCH v5] Log a note at program start when running in dry-run mode @ 2025-11-11 08:54 Álvaro Herrera <[email protected]> 0 siblings, 0 replies; 190+ messages in thread From: Álvaro Herrera @ 2025-11-11 08:54 UTC (permalink / raw) Users might get some peace of mind knowing their data is not being destroyed or whatever. Author: Peter Smith <[email protected]> Reviewed-by: Álvaro Herrera <[email protected]> Discussion: https://postgr.es/m/CAHut+PsvQJQnQO0KT0S2oegenkvJ8FUuY-QS5syyqmT24R2xFQ@mail.gmail.com --- src/bin/pg_archivecleanup/pg_archivecleanup.c | 4 ++++ src/bin/pg_basebackup/pg_createsubscriber.c | 5 +++++ src/bin/pg_combinebackup/pg_combinebackup.c | 4 ++++ src/bin/pg_resetwal/pg_resetwal.c | 4 ++++ src/bin/pg_rewind/pg_rewind.c | 10 ++++++---- 5 files changed, 23 insertions(+), 4 deletions(-) diff --git a/src/bin/pg_archivecleanup/pg_archivecleanup.c b/src/bin/pg_archivecleanup/pg_archivecleanup.c index c25348bcb85..ab686b4748c 100644 --- a/src/bin/pg_archivecleanup/pg_archivecleanup.c +++ b/src/bin/pg_archivecleanup/pg_archivecleanup.c @@ -375,6 +375,10 @@ main(int argc, char **argv) exit(2); } + if (dryrun) + pg_log_info("Executing in dry-run mode.\n" + "No files will be removed."); + /* * Check archive exists and other initialization if required. */ diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c index df41836e70f..cc4be5d6ef4 100644 --- a/src/bin/pg_basebackup/pg_createsubscriber.c +++ b/src/bin/pg_basebackup/pg_createsubscriber.c @@ -2305,6 +2305,11 @@ main(int argc, char **argv) pg_log_error_hint("Try \"%s --help\" for more information.", progname); exit(1); } + + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + pg_log_info("validating publisher connection string"); pub_base_conninfo = get_base_conninfo(opt.pub_conninfo_str, &dbname_conninfo); diff --git a/src/bin/pg_combinebackup/pg_combinebackup.c b/src/bin/pg_combinebackup/pg_combinebackup.c index 3a325127209..c9bf0a9e105 100644 --- a/src/bin/pg_combinebackup/pg_combinebackup.c +++ b/src/bin/pg_combinebackup/pg_combinebackup.c @@ -242,6 +242,10 @@ main(int argc, char *argv[]) if (opt.no_manifest) opt.manifest_checksums = CHECKSUM_TYPE_NONE; + if (opt.dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + /* Check that the platform supports the requested copy method. */ if (opt.copy_method == COPY_METHOD_CLONE) { diff --git a/src/bin/pg_resetwal/pg_resetwal.c b/src/bin/pg_resetwal/pg_resetwal.c index a89d72fc5cf..dd5d279521e 100644 --- a/src/bin/pg_resetwal/pg_resetwal.c +++ b/src/bin/pg_resetwal/pg_resetwal.c @@ -397,6 +397,10 @@ main(int argc, char *argv[]) exit(1); } + if (noupdate) + pg_log_info("Executing in dry-run mode.\n" + "Nothing will be modified."); + /* * Attempt to read the existing pg_control file */ diff --git a/src/bin/pg_rewind/pg_rewind.c b/src/bin/pg_rewind/pg_rewind.c index 27c514f934a..e9364d04f76 100644 --- a/src/bin/pg_rewind/pg_rewind.c +++ b/src/bin/pg_rewind/pg_rewind.c @@ -300,10 +300,12 @@ main(int argc, char **argv) atexit(disconnect_atexit); - /* - * Ok, we have all the options and we're ready to start. First, connect to - * remote server. - */ + /* Ok, we have all the options and we're ready to start. */ + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + + /* First, connect to remote server. */ if (connstr_source) { conn = PQconnectdb(connstr_source); -- 2.47.3 --ibfr3ah5qy6tcbhw-- ^ permalink raw reply [nested|flat] 190+ messages in thread
* [PATCH v5] Log a note at program start when running in dry-run mode @ 2025-11-11 08:54 Álvaro Herrera <[email protected]> 0 siblings, 0 replies; 190+ messages in thread From: Álvaro Herrera @ 2025-11-11 08:54 UTC (permalink / raw) Users might get some peace of mind knowing their data is not being destroyed or whatever. Author: Peter Smith <[email protected]> Reviewed-by: Álvaro Herrera <[email protected]> Discussion: https://postgr.es/m/CAHut+PsvQJQnQO0KT0S2oegenkvJ8FUuY-QS5syyqmT24R2xFQ@mail.gmail.com --- src/bin/pg_archivecleanup/pg_archivecleanup.c | 4 ++++ src/bin/pg_basebackup/pg_createsubscriber.c | 5 +++++ src/bin/pg_combinebackup/pg_combinebackup.c | 4 ++++ src/bin/pg_resetwal/pg_resetwal.c | 4 ++++ src/bin/pg_rewind/pg_rewind.c | 10 ++++++---- 5 files changed, 23 insertions(+), 4 deletions(-) diff --git a/src/bin/pg_archivecleanup/pg_archivecleanup.c b/src/bin/pg_archivecleanup/pg_archivecleanup.c index c25348bcb85..ab686b4748c 100644 --- a/src/bin/pg_archivecleanup/pg_archivecleanup.c +++ b/src/bin/pg_archivecleanup/pg_archivecleanup.c @@ -375,6 +375,10 @@ main(int argc, char **argv) exit(2); } + if (dryrun) + pg_log_info("Executing in dry-run mode.\n" + "No files will be removed."); + /* * Check archive exists and other initialization if required. */ diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c index df41836e70f..cc4be5d6ef4 100644 --- a/src/bin/pg_basebackup/pg_createsubscriber.c +++ b/src/bin/pg_basebackup/pg_createsubscriber.c @@ -2305,6 +2305,11 @@ main(int argc, char **argv) pg_log_error_hint("Try \"%s --help\" for more information.", progname); exit(1); } + + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + pg_log_info("validating publisher connection string"); pub_base_conninfo = get_base_conninfo(opt.pub_conninfo_str, &dbname_conninfo); diff --git a/src/bin/pg_combinebackup/pg_combinebackup.c b/src/bin/pg_combinebackup/pg_combinebackup.c index 3a325127209..c9bf0a9e105 100644 --- a/src/bin/pg_combinebackup/pg_combinebackup.c +++ b/src/bin/pg_combinebackup/pg_combinebackup.c @@ -242,6 +242,10 @@ main(int argc, char *argv[]) if (opt.no_manifest) opt.manifest_checksums = CHECKSUM_TYPE_NONE; + if (opt.dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + /* Check that the platform supports the requested copy method. */ if (opt.copy_method == COPY_METHOD_CLONE) { diff --git a/src/bin/pg_resetwal/pg_resetwal.c b/src/bin/pg_resetwal/pg_resetwal.c index a89d72fc5cf..dd5d279521e 100644 --- a/src/bin/pg_resetwal/pg_resetwal.c +++ b/src/bin/pg_resetwal/pg_resetwal.c @@ -397,6 +397,10 @@ main(int argc, char *argv[]) exit(1); } + if (noupdate) + pg_log_info("Executing in dry-run mode.\n" + "Nothing will be modified."); + /* * Attempt to read the existing pg_control file */ diff --git a/src/bin/pg_rewind/pg_rewind.c b/src/bin/pg_rewind/pg_rewind.c index 27c514f934a..e9364d04f76 100644 --- a/src/bin/pg_rewind/pg_rewind.c +++ b/src/bin/pg_rewind/pg_rewind.c @@ -300,10 +300,12 @@ main(int argc, char **argv) atexit(disconnect_atexit); - /* - * Ok, we have all the options and we're ready to start. First, connect to - * remote server. - */ + /* Ok, we have all the options and we're ready to start. */ + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + + /* First, connect to remote server. */ if (connstr_source) { conn = PQconnectdb(connstr_source); -- 2.47.3 --ibfr3ah5qy6tcbhw-- ^ permalink raw reply [nested|flat] 190+ messages in thread
* [PATCH v5] Log a note at program start when running in dry-run mode @ 2025-11-11 08:54 Álvaro Herrera <[email protected]> 0 siblings, 0 replies; 190+ messages in thread From: Álvaro Herrera @ 2025-11-11 08:54 UTC (permalink / raw) Users might get some peace of mind knowing their data is not being destroyed or whatever. Author: Peter Smith <[email protected]> Reviewed-by: Álvaro Herrera <[email protected]> Discussion: https://postgr.es/m/CAHut+PsvQJQnQO0KT0S2oegenkvJ8FUuY-QS5syyqmT24R2xFQ@mail.gmail.com --- src/bin/pg_archivecleanup/pg_archivecleanup.c | 4 ++++ src/bin/pg_basebackup/pg_createsubscriber.c | 5 +++++ src/bin/pg_combinebackup/pg_combinebackup.c | 4 ++++ src/bin/pg_resetwal/pg_resetwal.c | 4 ++++ src/bin/pg_rewind/pg_rewind.c | 10 ++++++---- 5 files changed, 23 insertions(+), 4 deletions(-) diff --git a/src/bin/pg_archivecleanup/pg_archivecleanup.c b/src/bin/pg_archivecleanup/pg_archivecleanup.c index c25348bcb85..ab686b4748c 100644 --- a/src/bin/pg_archivecleanup/pg_archivecleanup.c +++ b/src/bin/pg_archivecleanup/pg_archivecleanup.c @@ -375,6 +375,10 @@ main(int argc, char **argv) exit(2); } + if (dryrun) + pg_log_info("Executing in dry-run mode.\n" + "No files will be removed."); + /* * Check archive exists and other initialization if required. */ diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c index df41836e70f..cc4be5d6ef4 100644 --- a/src/bin/pg_basebackup/pg_createsubscriber.c +++ b/src/bin/pg_basebackup/pg_createsubscriber.c @@ -2305,6 +2305,11 @@ main(int argc, char **argv) pg_log_error_hint("Try \"%s --help\" for more information.", progname); exit(1); } + + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + pg_log_info("validating publisher connection string"); pub_base_conninfo = get_base_conninfo(opt.pub_conninfo_str, &dbname_conninfo); diff --git a/src/bin/pg_combinebackup/pg_combinebackup.c b/src/bin/pg_combinebackup/pg_combinebackup.c index 3a325127209..c9bf0a9e105 100644 --- a/src/bin/pg_combinebackup/pg_combinebackup.c +++ b/src/bin/pg_combinebackup/pg_combinebackup.c @@ -242,6 +242,10 @@ main(int argc, char *argv[]) if (opt.no_manifest) opt.manifest_checksums = CHECKSUM_TYPE_NONE; + if (opt.dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + /* Check that the platform supports the requested copy method. */ if (opt.copy_method == COPY_METHOD_CLONE) { diff --git a/src/bin/pg_resetwal/pg_resetwal.c b/src/bin/pg_resetwal/pg_resetwal.c index a89d72fc5cf..dd5d279521e 100644 --- a/src/bin/pg_resetwal/pg_resetwal.c +++ b/src/bin/pg_resetwal/pg_resetwal.c @@ -397,6 +397,10 @@ main(int argc, char *argv[]) exit(1); } + if (noupdate) + pg_log_info("Executing in dry-run mode.\n" + "Nothing will be modified."); + /* * Attempt to read the existing pg_control file */ diff --git a/src/bin/pg_rewind/pg_rewind.c b/src/bin/pg_rewind/pg_rewind.c index 27c514f934a..e9364d04f76 100644 --- a/src/bin/pg_rewind/pg_rewind.c +++ b/src/bin/pg_rewind/pg_rewind.c @@ -300,10 +300,12 @@ main(int argc, char **argv) atexit(disconnect_atexit); - /* - * Ok, we have all the options and we're ready to start. First, connect to - * remote server. - */ + /* Ok, we have all the options and we're ready to start. */ + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + + /* First, connect to remote server. */ if (connstr_source) { conn = PQconnectdb(connstr_source); -- 2.47.3 --ibfr3ah5qy6tcbhw-- ^ permalink raw reply [nested|flat] 190+ messages in thread
* [PATCH v5] Log a note at program start when running in dry-run mode @ 2025-11-11 08:54 Álvaro Herrera <[email protected]> 0 siblings, 0 replies; 190+ messages in thread From: Álvaro Herrera @ 2025-11-11 08:54 UTC (permalink / raw) Users might get some peace of mind knowing their data is not being destroyed or whatever. Author: Peter Smith <[email protected]> Reviewed-by: Álvaro Herrera <[email protected]> Discussion: https://postgr.es/m/CAHut+PsvQJQnQO0KT0S2oegenkvJ8FUuY-QS5syyqmT24R2xFQ@mail.gmail.com --- src/bin/pg_archivecleanup/pg_archivecleanup.c | 4 ++++ src/bin/pg_basebackup/pg_createsubscriber.c | 5 +++++ src/bin/pg_combinebackup/pg_combinebackup.c | 4 ++++ src/bin/pg_resetwal/pg_resetwal.c | 4 ++++ src/bin/pg_rewind/pg_rewind.c | 10 ++++++---- 5 files changed, 23 insertions(+), 4 deletions(-) diff --git a/src/bin/pg_archivecleanup/pg_archivecleanup.c b/src/bin/pg_archivecleanup/pg_archivecleanup.c index c25348bcb85..ab686b4748c 100644 --- a/src/bin/pg_archivecleanup/pg_archivecleanup.c +++ b/src/bin/pg_archivecleanup/pg_archivecleanup.c @@ -375,6 +375,10 @@ main(int argc, char **argv) exit(2); } + if (dryrun) + pg_log_info("Executing in dry-run mode.\n" + "No files will be removed."); + /* * Check archive exists and other initialization if required. */ diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c index df41836e70f..cc4be5d6ef4 100644 --- a/src/bin/pg_basebackup/pg_createsubscriber.c +++ b/src/bin/pg_basebackup/pg_createsubscriber.c @@ -2305,6 +2305,11 @@ main(int argc, char **argv) pg_log_error_hint("Try \"%s --help\" for more information.", progname); exit(1); } + + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + pg_log_info("validating publisher connection string"); pub_base_conninfo = get_base_conninfo(opt.pub_conninfo_str, &dbname_conninfo); diff --git a/src/bin/pg_combinebackup/pg_combinebackup.c b/src/bin/pg_combinebackup/pg_combinebackup.c index 3a325127209..c9bf0a9e105 100644 --- a/src/bin/pg_combinebackup/pg_combinebackup.c +++ b/src/bin/pg_combinebackup/pg_combinebackup.c @@ -242,6 +242,10 @@ main(int argc, char *argv[]) if (opt.no_manifest) opt.manifest_checksums = CHECKSUM_TYPE_NONE; + if (opt.dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + /* Check that the platform supports the requested copy method. */ if (opt.copy_method == COPY_METHOD_CLONE) { diff --git a/src/bin/pg_resetwal/pg_resetwal.c b/src/bin/pg_resetwal/pg_resetwal.c index a89d72fc5cf..dd5d279521e 100644 --- a/src/bin/pg_resetwal/pg_resetwal.c +++ b/src/bin/pg_resetwal/pg_resetwal.c @@ -397,6 +397,10 @@ main(int argc, char *argv[]) exit(1); } + if (noupdate) + pg_log_info("Executing in dry-run mode.\n" + "Nothing will be modified."); + /* * Attempt to read the existing pg_control file */ diff --git a/src/bin/pg_rewind/pg_rewind.c b/src/bin/pg_rewind/pg_rewind.c index 27c514f934a..e9364d04f76 100644 --- a/src/bin/pg_rewind/pg_rewind.c +++ b/src/bin/pg_rewind/pg_rewind.c @@ -300,10 +300,12 @@ main(int argc, char **argv) atexit(disconnect_atexit); - /* - * Ok, we have all the options and we're ready to start. First, connect to - * remote server. - */ + /* Ok, we have all the options and we're ready to start. */ + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + + /* First, connect to remote server. */ if (connstr_source) { conn = PQconnectdb(connstr_source); -- 2.47.3 --ibfr3ah5qy6tcbhw-- ^ permalink raw reply [nested|flat] 190+ messages in thread
* [PATCH v5] Log a note at program start when running in dry-run mode @ 2025-11-11 08:54 Álvaro Herrera <[email protected]> 0 siblings, 0 replies; 190+ messages in thread From: Álvaro Herrera @ 2025-11-11 08:54 UTC (permalink / raw) Users might get some peace of mind knowing their data is not being destroyed or whatever. Author: Peter Smith <[email protected]> Reviewed-by: Álvaro Herrera <[email protected]> Discussion: https://postgr.es/m/CAHut+PsvQJQnQO0KT0S2oegenkvJ8FUuY-QS5syyqmT24R2xFQ@mail.gmail.com --- src/bin/pg_archivecleanup/pg_archivecleanup.c | 4 ++++ src/bin/pg_basebackup/pg_createsubscriber.c | 5 +++++ src/bin/pg_combinebackup/pg_combinebackup.c | 4 ++++ src/bin/pg_resetwal/pg_resetwal.c | 4 ++++ src/bin/pg_rewind/pg_rewind.c | 10 ++++++---- 5 files changed, 23 insertions(+), 4 deletions(-) diff --git a/src/bin/pg_archivecleanup/pg_archivecleanup.c b/src/bin/pg_archivecleanup/pg_archivecleanup.c index c25348bcb85..ab686b4748c 100644 --- a/src/bin/pg_archivecleanup/pg_archivecleanup.c +++ b/src/bin/pg_archivecleanup/pg_archivecleanup.c @@ -375,6 +375,10 @@ main(int argc, char **argv) exit(2); } + if (dryrun) + pg_log_info("Executing in dry-run mode.\n" + "No files will be removed."); + /* * Check archive exists and other initialization if required. */ diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c index df41836e70f..cc4be5d6ef4 100644 --- a/src/bin/pg_basebackup/pg_createsubscriber.c +++ b/src/bin/pg_basebackup/pg_createsubscriber.c @@ -2305,6 +2305,11 @@ main(int argc, char **argv) pg_log_error_hint("Try \"%s --help\" for more information.", progname); exit(1); } + + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + pg_log_info("validating publisher connection string"); pub_base_conninfo = get_base_conninfo(opt.pub_conninfo_str, &dbname_conninfo); diff --git a/src/bin/pg_combinebackup/pg_combinebackup.c b/src/bin/pg_combinebackup/pg_combinebackup.c index 3a325127209..c9bf0a9e105 100644 --- a/src/bin/pg_combinebackup/pg_combinebackup.c +++ b/src/bin/pg_combinebackup/pg_combinebackup.c @@ -242,6 +242,10 @@ main(int argc, char *argv[]) if (opt.no_manifest) opt.manifest_checksums = CHECKSUM_TYPE_NONE; + if (opt.dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + /* Check that the platform supports the requested copy method. */ if (opt.copy_method == COPY_METHOD_CLONE) { diff --git a/src/bin/pg_resetwal/pg_resetwal.c b/src/bin/pg_resetwal/pg_resetwal.c index a89d72fc5cf..dd5d279521e 100644 --- a/src/bin/pg_resetwal/pg_resetwal.c +++ b/src/bin/pg_resetwal/pg_resetwal.c @@ -397,6 +397,10 @@ main(int argc, char *argv[]) exit(1); } + if (noupdate) + pg_log_info("Executing in dry-run mode.\n" + "Nothing will be modified."); + /* * Attempt to read the existing pg_control file */ diff --git a/src/bin/pg_rewind/pg_rewind.c b/src/bin/pg_rewind/pg_rewind.c index 27c514f934a..e9364d04f76 100644 --- a/src/bin/pg_rewind/pg_rewind.c +++ b/src/bin/pg_rewind/pg_rewind.c @@ -300,10 +300,12 @@ main(int argc, char **argv) atexit(disconnect_atexit); - /* - * Ok, we have all the options and we're ready to start. First, connect to - * remote server. - */ + /* Ok, we have all the options and we're ready to start. */ + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + + /* First, connect to remote server. */ if (connstr_source) { conn = PQconnectdb(connstr_source); -- 2.47.3 --ibfr3ah5qy6tcbhw-- ^ permalink raw reply [nested|flat] 190+ messages in thread
* [PATCH v5] Log a note at program start when running in dry-run mode @ 2025-11-11 08:54 Álvaro Herrera <[email protected]> 0 siblings, 0 replies; 190+ messages in thread From: Álvaro Herrera @ 2025-11-11 08:54 UTC (permalink / raw) Users might get some peace of mind knowing their data is not being destroyed or whatever. Author: Peter Smith <[email protected]> Reviewed-by: Álvaro Herrera <[email protected]> Discussion: https://postgr.es/m/CAHut+PsvQJQnQO0KT0S2oegenkvJ8FUuY-QS5syyqmT24R2xFQ@mail.gmail.com --- src/bin/pg_archivecleanup/pg_archivecleanup.c | 4 ++++ src/bin/pg_basebackup/pg_createsubscriber.c | 5 +++++ src/bin/pg_combinebackup/pg_combinebackup.c | 4 ++++ src/bin/pg_resetwal/pg_resetwal.c | 4 ++++ src/bin/pg_rewind/pg_rewind.c | 10 ++++++---- 5 files changed, 23 insertions(+), 4 deletions(-) diff --git a/src/bin/pg_archivecleanup/pg_archivecleanup.c b/src/bin/pg_archivecleanup/pg_archivecleanup.c index c25348bcb85..ab686b4748c 100644 --- a/src/bin/pg_archivecleanup/pg_archivecleanup.c +++ b/src/bin/pg_archivecleanup/pg_archivecleanup.c @@ -375,6 +375,10 @@ main(int argc, char **argv) exit(2); } + if (dryrun) + pg_log_info("Executing in dry-run mode.\n" + "No files will be removed."); + /* * Check archive exists and other initialization if required. */ diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c index df41836e70f..cc4be5d6ef4 100644 --- a/src/bin/pg_basebackup/pg_createsubscriber.c +++ b/src/bin/pg_basebackup/pg_createsubscriber.c @@ -2305,6 +2305,11 @@ main(int argc, char **argv) pg_log_error_hint("Try \"%s --help\" for more information.", progname); exit(1); } + + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + pg_log_info("validating publisher connection string"); pub_base_conninfo = get_base_conninfo(opt.pub_conninfo_str, &dbname_conninfo); diff --git a/src/bin/pg_combinebackup/pg_combinebackup.c b/src/bin/pg_combinebackup/pg_combinebackup.c index 3a325127209..c9bf0a9e105 100644 --- a/src/bin/pg_combinebackup/pg_combinebackup.c +++ b/src/bin/pg_combinebackup/pg_combinebackup.c @@ -242,6 +242,10 @@ main(int argc, char *argv[]) if (opt.no_manifest) opt.manifest_checksums = CHECKSUM_TYPE_NONE; + if (opt.dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + /* Check that the platform supports the requested copy method. */ if (opt.copy_method == COPY_METHOD_CLONE) { diff --git a/src/bin/pg_resetwal/pg_resetwal.c b/src/bin/pg_resetwal/pg_resetwal.c index a89d72fc5cf..dd5d279521e 100644 --- a/src/bin/pg_resetwal/pg_resetwal.c +++ b/src/bin/pg_resetwal/pg_resetwal.c @@ -397,6 +397,10 @@ main(int argc, char *argv[]) exit(1); } + if (noupdate) + pg_log_info("Executing in dry-run mode.\n" + "Nothing will be modified."); + /* * Attempt to read the existing pg_control file */ diff --git a/src/bin/pg_rewind/pg_rewind.c b/src/bin/pg_rewind/pg_rewind.c index 27c514f934a..e9364d04f76 100644 --- a/src/bin/pg_rewind/pg_rewind.c +++ b/src/bin/pg_rewind/pg_rewind.c @@ -300,10 +300,12 @@ main(int argc, char **argv) atexit(disconnect_atexit); - /* - * Ok, we have all the options and we're ready to start. First, connect to - * remote server. - */ + /* Ok, we have all the options and we're ready to start. */ + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + + /* First, connect to remote server. */ if (connstr_source) { conn = PQconnectdb(connstr_source); -- 2.47.3 --ibfr3ah5qy6tcbhw-- ^ permalink raw reply [nested|flat] 190+ messages in thread
* [PATCH v5] Log a note at program start when running in dry-run mode @ 2025-11-11 08:54 Álvaro Herrera <[email protected]> 0 siblings, 0 replies; 190+ messages in thread From: Álvaro Herrera @ 2025-11-11 08:54 UTC (permalink / raw) Users might get some peace of mind knowing their data is not being destroyed or whatever. Author: Peter Smith <[email protected]> Reviewed-by: Álvaro Herrera <[email protected]> Discussion: https://postgr.es/m/CAHut+PsvQJQnQO0KT0S2oegenkvJ8FUuY-QS5syyqmT24R2xFQ@mail.gmail.com --- src/bin/pg_archivecleanup/pg_archivecleanup.c | 4 ++++ src/bin/pg_basebackup/pg_createsubscriber.c | 5 +++++ src/bin/pg_combinebackup/pg_combinebackup.c | 4 ++++ src/bin/pg_resetwal/pg_resetwal.c | 4 ++++ src/bin/pg_rewind/pg_rewind.c | 10 ++++++---- 5 files changed, 23 insertions(+), 4 deletions(-) diff --git a/src/bin/pg_archivecleanup/pg_archivecleanup.c b/src/bin/pg_archivecleanup/pg_archivecleanup.c index c25348bcb85..ab686b4748c 100644 --- a/src/bin/pg_archivecleanup/pg_archivecleanup.c +++ b/src/bin/pg_archivecleanup/pg_archivecleanup.c @@ -375,6 +375,10 @@ main(int argc, char **argv) exit(2); } + if (dryrun) + pg_log_info("Executing in dry-run mode.\n" + "No files will be removed."); + /* * Check archive exists and other initialization if required. */ diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c index df41836e70f..cc4be5d6ef4 100644 --- a/src/bin/pg_basebackup/pg_createsubscriber.c +++ b/src/bin/pg_basebackup/pg_createsubscriber.c @@ -2305,6 +2305,11 @@ main(int argc, char **argv) pg_log_error_hint("Try \"%s --help\" for more information.", progname); exit(1); } + + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + pg_log_info("validating publisher connection string"); pub_base_conninfo = get_base_conninfo(opt.pub_conninfo_str, &dbname_conninfo); diff --git a/src/bin/pg_combinebackup/pg_combinebackup.c b/src/bin/pg_combinebackup/pg_combinebackup.c index 3a325127209..c9bf0a9e105 100644 --- a/src/bin/pg_combinebackup/pg_combinebackup.c +++ b/src/bin/pg_combinebackup/pg_combinebackup.c @@ -242,6 +242,10 @@ main(int argc, char *argv[]) if (opt.no_manifest) opt.manifest_checksums = CHECKSUM_TYPE_NONE; + if (opt.dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + /* Check that the platform supports the requested copy method. */ if (opt.copy_method == COPY_METHOD_CLONE) { diff --git a/src/bin/pg_resetwal/pg_resetwal.c b/src/bin/pg_resetwal/pg_resetwal.c index a89d72fc5cf..dd5d279521e 100644 --- a/src/bin/pg_resetwal/pg_resetwal.c +++ b/src/bin/pg_resetwal/pg_resetwal.c @@ -397,6 +397,10 @@ main(int argc, char *argv[]) exit(1); } + if (noupdate) + pg_log_info("Executing in dry-run mode.\n" + "Nothing will be modified."); + /* * Attempt to read the existing pg_control file */ diff --git a/src/bin/pg_rewind/pg_rewind.c b/src/bin/pg_rewind/pg_rewind.c index 27c514f934a..e9364d04f76 100644 --- a/src/bin/pg_rewind/pg_rewind.c +++ b/src/bin/pg_rewind/pg_rewind.c @@ -300,10 +300,12 @@ main(int argc, char **argv) atexit(disconnect_atexit); - /* - * Ok, we have all the options and we're ready to start. First, connect to - * remote server. - */ + /* Ok, we have all the options and we're ready to start. */ + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + + /* First, connect to remote server. */ if (connstr_source) { conn = PQconnectdb(connstr_source); -- 2.47.3 --ibfr3ah5qy6tcbhw-- ^ permalink raw reply [nested|flat] 190+ messages in thread
* [PATCH v5] Log a note at program start when running in dry-run mode @ 2025-11-11 08:54 Álvaro Herrera <[email protected]> 0 siblings, 0 replies; 190+ messages in thread From: Álvaro Herrera @ 2025-11-11 08:54 UTC (permalink / raw) Users might get some peace of mind knowing their data is not being destroyed or whatever. Author: Peter Smith <[email protected]> Reviewed-by: Álvaro Herrera <[email protected]> Discussion: https://postgr.es/m/CAHut+PsvQJQnQO0KT0S2oegenkvJ8FUuY-QS5syyqmT24R2xFQ@mail.gmail.com --- src/bin/pg_archivecleanup/pg_archivecleanup.c | 4 ++++ src/bin/pg_basebackup/pg_createsubscriber.c | 5 +++++ src/bin/pg_combinebackup/pg_combinebackup.c | 4 ++++ src/bin/pg_resetwal/pg_resetwal.c | 4 ++++ src/bin/pg_rewind/pg_rewind.c | 10 ++++++---- 5 files changed, 23 insertions(+), 4 deletions(-) diff --git a/src/bin/pg_archivecleanup/pg_archivecleanup.c b/src/bin/pg_archivecleanup/pg_archivecleanup.c index c25348bcb85..ab686b4748c 100644 --- a/src/bin/pg_archivecleanup/pg_archivecleanup.c +++ b/src/bin/pg_archivecleanup/pg_archivecleanup.c @@ -375,6 +375,10 @@ main(int argc, char **argv) exit(2); } + if (dryrun) + pg_log_info("Executing in dry-run mode.\n" + "No files will be removed."); + /* * Check archive exists and other initialization if required. */ diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c index df41836e70f..cc4be5d6ef4 100644 --- a/src/bin/pg_basebackup/pg_createsubscriber.c +++ b/src/bin/pg_basebackup/pg_createsubscriber.c @@ -2305,6 +2305,11 @@ main(int argc, char **argv) pg_log_error_hint("Try \"%s --help\" for more information.", progname); exit(1); } + + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + pg_log_info("validating publisher connection string"); pub_base_conninfo = get_base_conninfo(opt.pub_conninfo_str, &dbname_conninfo); diff --git a/src/bin/pg_combinebackup/pg_combinebackup.c b/src/bin/pg_combinebackup/pg_combinebackup.c index 3a325127209..c9bf0a9e105 100644 --- a/src/bin/pg_combinebackup/pg_combinebackup.c +++ b/src/bin/pg_combinebackup/pg_combinebackup.c @@ -242,6 +242,10 @@ main(int argc, char *argv[]) if (opt.no_manifest) opt.manifest_checksums = CHECKSUM_TYPE_NONE; + if (opt.dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + /* Check that the platform supports the requested copy method. */ if (opt.copy_method == COPY_METHOD_CLONE) { diff --git a/src/bin/pg_resetwal/pg_resetwal.c b/src/bin/pg_resetwal/pg_resetwal.c index a89d72fc5cf..dd5d279521e 100644 --- a/src/bin/pg_resetwal/pg_resetwal.c +++ b/src/bin/pg_resetwal/pg_resetwal.c @@ -397,6 +397,10 @@ main(int argc, char *argv[]) exit(1); } + if (noupdate) + pg_log_info("Executing in dry-run mode.\n" + "Nothing will be modified."); + /* * Attempt to read the existing pg_control file */ diff --git a/src/bin/pg_rewind/pg_rewind.c b/src/bin/pg_rewind/pg_rewind.c index 27c514f934a..e9364d04f76 100644 --- a/src/bin/pg_rewind/pg_rewind.c +++ b/src/bin/pg_rewind/pg_rewind.c @@ -300,10 +300,12 @@ main(int argc, char **argv) atexit(disconnect_atexit); - /* - * Ok, we have all the options and we're ready to start. First, connect to - * remote server. - */ + /* Ok, we have all the options and we're ready to start. */ + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + + /* First, connect to remote server. */ if (connstr_source) { conn = PQconnectdb(connstr_source); -- 2.47.3 --ibfr3ah5qy6tcbhw-- ^ permalink raw reply [nested|flat] 190+ messages in thread
* [PATCH v5] Log a note at program start when running in dry-run mode @ 2025-11-11 08:54 Álvaro Herrera <[email protected]> 0 siblings, 0 replies; 190+ messages in thread From: Álvaro Herrera @ 2025-11-11 08:54 UTC (permalink / raw) Users might get some peace of mind knowing their data is not being destroyed or whatever. Author: Peter Smith <[email protected]> Reviewed-by: Álvaro Herrera <[email protected]> Discussion: https://postgr.es/m/CAHut+PsvQJQnQO0KT0S2oegenkvJ8FUuY-QS5syyqmT24R2xFQ@mail.gmail.com --- src/bin/pg_archivecleanup/pg_archivecleanup.c | 4 ++++ src/bin/pg_basebackup/pg_createsubscriber.c | 5 +++++ src/bin/pg_combinebackup/pg_combinebackup.c | 4 ++++ src/bin/pg_resetwal/pg_resetwal.c | 4 ++++ src/bin/pg_rewind/pg_rewind.c | 10 ++++++---- 5 files changed, 23 insertions(+), 4 deletions(-) diff --git a/src/bin/pg_archivecleanup/pg_archivecleanup.c b/src/bin/pg_archivecleanup/pg_archivecleanup.c index c25348bcb85..ab686b4748c 100644 --- a/src/bin/pg_archivecleanup/pg_archivecleanup.c +++ b/src/bin/pg_archivecleanup/pg_archivecleanup.c @@ -375,6 +375,10 @@ main(int argc, char **argv) exit(2); } + if (dryrun) + pg_log_info("Executing in dry-run mode.\n" + "No files will be removed."); + /* * Check archive exists and other initialization if required. */ diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c index df41836e70f..cc4be5d6ef4 100644 --- a/src/bin/pg_basebackup/pg_createsubscriber.c +++ b/src/bin/pg_basebackup/pg_createsubscriber.c @@ -2305,6 +2305,11 @@ main(int argc, char **argv) pg_log_error_hint("Try \"%s --help\" for more information.", progname); exit(1); } + + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + pg_log_info("validating publisher connection string"); pub_base_conninfo = get_base_conninfo(opt.pub_conninfo_str, &dbname_conninfo); diff --git a/src/bin/pg_combinebackup/pg_combinebackup.c b/src/bin/pg_combinebackup/pg_combinebackup.c index 3a325127209..c9bf0a9e105 100644 --- a/src/bin/pg_combinebackup/pg_combinebackup.c +++ b/src/bin/pg_combinebackup/pg_combinebackup.c @@ -242,6 +242,10 @@ main(int argc, char *argv[]) if (opt.no_manifest) opt.manifest_checksums = CHECKSUM_TYPE_NONE; + if (opt.dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + /* Check that the platform supports the requested copy method. */ if (opt.copy_method == COPY_METHOD_CLONE) { diff --git a/src/bin/pg_resetwal/pg_resetwal.c b/src/bin/pg_resetwal/pg_resetwal.c index a89d72fc5cf..dd5d279521e 100644 --- a/src/bin/pg_resetwal/pg_resetwal.c +++ b/src/bin/pg_resetwal/pg_resetwal.c @@ -397,6 +397,10 @@ main(int argc, char *argv[]) exit(1); } + if (noupdate) + pg_log_info("Executing in dry-run mode.\n" + "Nothing will be modified."); + /* * Attempt to read the existing pg_control file */ diff --git a/src/bin/pg_rewind/pg_rewind.c b/src/bin/pg_rewind/pg_rewind.c index 27c514f934a..e9364d04f76 100644 --- a/src/bin/pg_rewind/pg_rewind.c +++ b/src/bin/pg_rewind/pg_rewind.c @@ -300,10 +300,12 @@ main(int argc, char **argv) atexit(disconnect_atexit); - /* - * Ok, we have all the options and we're ready to start. First, connect to - * remote server. - */ + /* Ok, we have all the options and we're ready to start. */ + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + + /* First, connect to remote server. */ if (connstr_source) { conn = PQconnectdb(connstr_source); -- 2.47.3 --ibfr3ah5qy6tcbhw-- ^ permalink raw reply [nested|flat] 190+ messages in thread
* [PATCH v5] Log a note at program start when running in dry-run mode @ 2025-11-11 08:54 Álvaro Herrera <[email protected]> 0 siblings, 0 replies; 190+ messages in thread From: Álvaro Herrera @ 2025-11-11 08:54 UTC (permalink / raw) Users might get some peace of mind knowing their data is not being destroyed or whatever. Author: Peter Smith <[email protected]> Reviewed-by: Álvaro Herrera <[email protected]> Discussion: https://postgr.es/m/CAHut+PsvQJQnQO0KT0S2oegenkvJ8FUuY-QS5syyqmT24R2xFQ@mail.gmail.com --- src/bin/pg_archivecleanup/pg_archivecleanup.c | 4 ++++ src/bin/pg_basebackup/pg_createsubscriber.c | 5 +++++ src/bin/pg_combinebackup/pg_combinebackup.c | 4 ++++ src/bin/pg_resetwal/pg_resetwal.c | 4 ++++ src/bin/pg_rewind/pg_rewind.c | 10 ++++++---- 5 files changed, 23 insertions(+), 4 deletions(-) diff --git a/src/bin/pg_archivecleanup/pg_archivecleanup.c b/src/bin/pg_archivecleanup/pg_archivecleanup.c index c25348bcb85..ab686b4748c 100644 --- a/src/bin/pg_archivecleanup/pg_archivecleanup.c +++ b/src/bin/pg_archivecleanup/pg_archivecleanup.c @@ -375,6 +375,10 @@ main(int argc, char **argv) exit(2); } + if (dryrun) + pg_log_info("Executing in dry-run mode.\n" + "No files will be removed."); + /* * Check archive exists and other initialization if required. */ diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c index df41836e70f..cc4be5d6ef4 100644 --- a/src/bin/pg_basebackup/pg_createsubscriber.c +++ b/src/bin/pg_basebackup/pg_createsubscriber.c @@ -2305,6 +2305,11 @@ main(int argc, char **argv) pg_log_error_hint("Try \"%s --help\" for more information.", progname); exit(1); } + + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + pg_log_info("validating publisher connection string"); pub_base_conninfo = get_base_conninfo(opt.pub_conninfo_str, &dbname_conninfo); diff --git a/src/bin/pg_combinebackup/pg_combinebackup.c b/src/bin/pg_combinebackup/pg_combinebackup.c index 3a325127209..c9bf0a9e105 100644 --- a/src/bin/pg_combinebackup/pg_combinebackup.c +++ b/src/bin/pg_combinebackup/pg_combinebackup.c @@ -242,6 +242,10 @@ main(int argc, char *argv[]) if (opt.no_manifest) opt.manifest_checksums = CHECKSUM_TYPE_NONE; + if (opt.dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + /* Check that the platform supports the requested copy method. */ if (opt.copy_method == COPY_METHOD_CLONE) { diff --git a/src/bin/pg_resetwal/pg_resetwal.c b/src/bin/pg_resetwal/pg_resetwal.c index a89d72fc5cf..dd5d279521e 100644 --- a/src/bin/pg_resetwal/pg_resetwal.c +++ b/src/bin/pg_resetwal/pg_resetwal.c @@ -397,6 +397,10 @@ main(int argc, char *argv[]) exit(1); } + if (noupdate) + pg_log_info("Executing in dry-run mode.\n" + "Nothing will be modified."); + /* * Attempt to read the existing pg_control file */ diff --git a/src/bin/pg_rewind/pg_rewind.c b/src/bin/pg_rewind/pg_rewind.c index 27c514f934a..e9364d04f76 100644 --- a/src/bin/pg_rewind/pg_rewind.c +++ b/src/bin/pg_rewind/pg_rewind.c @@ -300,10 +300,12 @@ main(int argc, char **argv) atexit(disconnect_atexit); - /* - * Ok, we have all the options and we're ready to start. First, connect to - * remote server. - */ + /* Ok, we have all the options and we're ready to start. */ + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + + /* First, connect to remote server. */ if (connstr_source) { conn = PQconnectdb(connstr_source); -- 2.47.3 --ibfr3ah5qy6tcbhw-- ^ permalink raw reply [nested|flat] 190+ messages in thread
* [PATCH v5] Log a note at program start when running in dry-run mode @ 2025-11-11 08:54 Álvaro Herrera <[email protected]> 0 siblings, 0 replies; 190+ messages in thread From: Álvaro Herrera @ 2025-11-11 08:54 UTC (permalink / raw) Users might get some peace of mind knowing their data is not being destroyed or whatever. Author: Peter Smith <[email protected]> Reviewed-by: Álvaro Herrera <[email protected]> Discussion: https://postgr.es/m/CAHut+PsvQJQnQO0KT0S2oegenkvJ8FUuY-QS5syyqmT24R2xFQ@mail.gmail.com --- src/bin/pg_archivecleanup/pg_archivecleanup.c | 4 ++++ src/bin/pg_basebackup/pg_createsubscriber.c | 5 +++++ src/bin/pg_combinebackup/pg_combinebackup.c | 4 ++++ src/bin/pg_resetwal/pg_resetwal.c | 4 ++++ src/bin/pg_rewind/pg_rewind.c | 10 ++++++---- 5 files changed, 23 insertions(+), 4 deletions(-) diff --git a/src/bin/pg_archivecleanup/pg_archivecleanup.c b/src/bin/pg_archivecleanup/pg_archivecleanup.c index c25348bcb85..ab686b4748c 100644 --- a/src/bin/pg_archivecleanup/pg_archivecleanup.c +++ b/src/bin/pg_archivecleanup/pg_archivecleanup.c @@ -375,6 +375,10 @@ main(int argc, char **argv) exit(2); } + if (dryrun) + pg_log_info("Executing in dry-run mode.\n" + "No files will be removed."); + /* * Check archive exists and other initialization if required. */ diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c index df41836e70f..cc4be5d6ef4 100644 --- a/src/bin/pg_basebackup/pg_createsubscriber.c +++ b/src/bin/pg_basebackup/pg_createsubscriber.c @@ -2305,6 +2305,11 @@ main(int argc, char **argv) pg_log_error_hint("Try \"%s --help\" for more information.", progname); exit(1); } + + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + pg_log_info("validating publisher connection string"); pub_base_conninfo = get_base_conninfo(opt.pub_conninfo_str, &dbname_conninfo); diff --git a/src/bin/pg_combinebackup/pg_combinebackup.c b/src/bin/pg_combinebackup/pg_combinebackup.c index 3a325127209..c9bf0a9e105 100644 --- a/src/bin/pg_combinebackup/pg_combinebackup.c +++ b/src/bin/pg_combinebackup/pg_combinebackup.c @@ -242,6 +242,10 @@ main(int argc, char *argv[]) if (opt.no_manifest) opt.manifest_checksums = CHECKSUM_TYPE_NONE; + if (opt.dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + /* Check that the platform supports the requested copy method. */ if (opt.copy_method == COPY_METHOD_CLONE) { diff --git a/src/bin/pg_resetwal/pg_resetwal.c b/src/bin/pg_resetwal/pg_resetwal.c index a89d72fc5cf..dd5d279521e 100644 --- a/src/bin/pg_resetwal/pg_resetwal.c +++ b/src/bin/pg_resetwal/pg_resetwal.c @@ -397,6 +397,10 @@ main(int argc, char *argv[]) exit(1); } + if (noupdate) + pg_log_info("Executing in dry-run mode.\n" + "Nothing will be modified."); + /* * Attempt to read the existing pg_control file */ diff --git a/src/bin/pg_rewind/pg_rewind.c b/src/bin/pg_rewind/pg_rewind.c index 27c514f934a..e9364d04f76 100644 --- a/src/bin/pg_rewind/pg_rewind.c +++ b/src/bin/pg_rewind/pg_rewind.c @@ -300,10 +300,12 @@ main(int argc, char **argv) atexit(disconnect_atexit); - /* - * Ok, we have all the options and we're ready to start. First, connect to - * remote server. - */ + /* Ok, we have all the options and we're ready to start. */ + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + + /* First, connect to remote server. */ if (connstr_source) { conn = PQconnectdb(connstr_source); -- 2.47.3 --ibfr3ah5qy6tcbhw-- ^ permalink raw reply [nested|flat] 190+ messages in thread
* [PATCH v5] Log a note at program start when running in dry-run mode @ 2025-11-11 08:54 Álvaro Herrera <[email protected]> 0 siblings, 0 replies; 190+ messages in thread From: Álvaro Herrera @ 2025-11-11 08:54 UTC (permalink / raw) Users might get some peace of mind knowing their data is not being destroyed or whatever. Author: Peter Smith <[email protected]> Reviewed-by: Álvaro Herrera <[email protected]> Discussion: https://postgr.es/m/CAHut+PsvQJQnQO0KT0S2oegenkvJ8FUuY-QS5syyqmT24R2xFQ@mail.gmail.com --- src/bin/pg_archivecleanup/pg_archivecleanup.c | 4 ++++ src/bin/pg_basebackup/pg_createsubscriber.c | 5 +++++ src/bin/pg_combinebackup/pg_combinebackup.c | 4 ++++ src/bin/pg_resetwal/pg_resetwal.c | 4 ++++ src/bin/pg_rewind/pg_rewind.c | 10 ++++++---- 5 files changed, 23 insertions(+), 4 deletions(-) diff --git a/src/bin/pg_archivecleanup/pg_archivecleanup.c b/src/bin/pg_archivecleanup/pg_archivecleanup.c index c25348bcb85..ab686b4748c 100644 --- a/src/bin/pg_archivecleanup/pg_archivecleanup.c +++ b/src/bin/pg_archivecleanup/pg_archivecleanup.c @@ -375,6 +375,10 @@ main(int argc, char **argv) exit(2); } + if (dryrun) + pg_log_info("Executing in dry-run mode.\n" + "No files will be removed."); + /* * Check archive exists and other initialization if required. */ diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c index df41836e70f..cc4be5d6ef4 100644 --- a/src/bin/pg_basebackup/pg_createsubscriber.c +++ b/src/bin/pg_basebackup/pg_createsubscriber.c @@ -2305,6 +2305,11 @@ main(int argc, char **argv) pg_log_error_hint("Try \"%s --help\" for more information.", progname); exit(1); } + + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + pg_log_info("validating publisher connection string"); pub_base_conninfo = get_base_conninfo(opt.pub_conninfo_str, &dbname_conninfo); diff --git a/src/bin/pg_combinebackup/pg_combinebackup.c b/src/bin/pg_combinebackup/pg_combinebackup.c index 3a325127209..c9bf0a9e105 100644 --- a/src/bin/pg_combinebackup/pg_combinebackup.c +++ b/src/bin/pg_combinebackup/pg_combinebackup.c @@ -242,6 +242,10 @@ main(int argc, char *argv[]) if (opt.no_manifest) opt.manifest_checksums = CHECKSUM_TYPE_NONE; + if (opt.dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + /* Check that the platform supports the requested copy method. */ if (opt.copy_method == COPY_METHOD_CLONE) { diff --git a/src/bin/pg_resetwal/pg_resetwal.c b/src/bin/pg_resetwal/pg_resetwal.c index a89d72fc5cf..dd5d279521e 100644 --- a/src/bin/pg_resetwal/pg_resetwal.c +++ b/src/bin/pg_resetwal/pg_resetwal.c @@ -397,6 +397,10 @@ main(int argc, char *argv[]) exit(1); } + if (noupdate) + pg_log_info("Executing in dry-run mode.\n" + "Nothing will be modified."); + /* * Attempt to read the existing pg_control file */ diff --git a/src/bin/pg_rewind/pg_rewind.c b/src/bin/pg_rewind/pg_rewind.c index 27c514f934a..e9364d04f76 100644 --- a/src/bin/pg_rewind/pg_rewind.c +++ b/src/bin/pg_rewind/pg_rewind.c @@ -300,10 +300,12 @@ main(int argc, char **argv) atexit(disconnect_atexit); - /* - * Ok, we have all the options and we're ready to start. First, connect to - * remote server. - */ + /* Ok, we have all the options and we're ready to start. */ + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + + /* First, connect to remote server. */ if (connstr_source) { conn = PQconnectdb(connstr_source); -- 2.47.3 --ibfr3ah5qy6tcbhw-- ^ permalink raw reply [nested|flat] 190+ messages in thread
* [PATCH v5] Log a note at program start when running in dry-run mode @ 2025-11-11 08:54 Álvaro Herrera <[email protected]> 0 siblings, 0 replies; 190+ messages in thread From: Álvaro Herrera @ 2025-11-11 08:54 UTC (permalink / raw) Users might get some peace of mind knowing their data is not being destroyed or whatever. Author: Peter Smith <[email protected]> Reviewed-by: Álvaro Herrera <[email protected]> Discussion: https://postgr.es/m/CAHut+PsvQJQnQO0KT0S2oegenkvJ8FUuY-QS5syyqmT24R2xFQ@mail.gmail.com --- src/bin/pg_archivecleanup/pg_archivecleanup.c | 4 ++++ src/bin/pg_basebackup/pg_createsubscriber.c | 5 +++++ src/bin/pg_combinebackup/pg_combinebackup.c | 4 ++++ src/bin/pg_resetwal/pg_resetwal.c | 4 ++++ src/bin/pg_rewind/pg_rewind.c | 10 ++++++---- 5 files changed, 23 insertions(+), 4 deletions(-) diff --git a/src/bin/pg_archivecleanup/pg_archivecleanup.c b/src/bin/pg_archivecleanup/pg_archivecleanup.c index c25348bcb85..ab686b4748c 100644 --- a/src/bin/pg_archivecleanup/pg_archivecleanup.c +++ b/src/bin/pg_archivecleanup/pg_archivecleanup.c @@ -375,6 +375,10 @@ main(int argc, char **argv) exit(2); } + if (dryrun) + pg_log_info("Executing in dry-run mode.\n" + "No files will be removed."); + /* * Check archive exists and other initialization if required. */ diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c index df41836e70f..cc4be5d6ef4 100644 --- a/src/bin/pg_basebackup/pg_createsubscriber.c +++ b/src/bin/pg_basebackup/pg_createsubscriber.c @@ -2305,6 +2305,11 @@ main(int argc, char **argv) pg_log_error_hint("Try \"%s --help\" for more information.", progname); exit(1); } + + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + pg_log_info("validating publisher connection string"); pub_base_conninfo = get_base_conninfo(opt.pub_conninfo_str, &dbname_conninfo); diff --git a/src/bin/pg_combinebackup/pg_combinebackup.c b/src/bin/pg_combinebackup/pg_combinebackup.c index 3a325127209..c9bf0a9e105 100644 --- a/src/bin/pg_combinebackup/pg_combinebackup.c +++ b/src/bin/pg_combinebackup/pg_combinebackup.c @@ -242,6 +242,10 @@ main(int argc, char *argv[]) if (opt.no_manifest) opt.manifest_checksums = CHECKSUM_TYPE_NONE; + if (opt.dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + /* Check that the platform supports the requested copy method. */ if (opt.copy_method == COPY_METHOD_CLONE) { diff --git a/src/bin/pg_resetwal/pg_resetwal.c b/src/bin/pg_resetwal/pg_resetwal.c index a89d72fc5cf..dd5d279521e 100644 --- a/src/bin/pg_resetwal/pg_resetwal.c +++ b/src/bin/pg_resetwal/pg_resetwal.c @@ -397,6 +397,10 @@ main(int argc, char *argv[]) exit(1); } + if (noupdate) + pg_log_info("Executing in dry-run mode.\n" + "Nothing will be modified."); + /* * Attempt to read the existing pg_control file */ diff --git a/src/bin/pg_rewind/pg_rewind.c b/src/bin/pg_rewind/pg_rewind.c index 27c514f934a..e9364d04f76 100644 --- a/src/bin/pg_rewind/pg_rewind.c +++ b/src/bin/pg_rewind/pg_rewind.c @@ -300,10 +300,12 @@ main(int argc, char **argv) atexit(disconnect_atexit); - /* - * Ok, we have all the options and we're ready to start. First, connect to - * remote server. - */ + /* Ok, we have all the options and we're ready to start. */ + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + + /* First, connect to remote server. */ if (connstr_source) { conn = PQconnectdb(connstr_source); -- 2.47.3 --ibfr3ah5qy6tcbhw-- ^ permalink raw reply [nested|flat] 190+ messages in thread
* [PATCH v5] Log a note at program start when running in dry-run mode @ 2025-11-11 08:54 Álvaro Herrera <[email protected]> 0 siblings, 0 replies; 190+ messages in thread From: Álvaro Herrera @ 2025-11-11 08:54 UTC (permalink / raw) Users might get some peace of mind knowing their data is not being destroyed or whatever. Author: Peter Smith <[email protected]> Reviewed-by: Álvaro Herrera <[email protected]> Discussion: https://postgr.es/m/CAHut+PsvQJQnQO0KT0S2oegenkvJ8FUuY-QS5syyqmT24R2xFQ@mail.gmail.com --- src/bin/pg_archivecleanup/pg_archivecleanup.c | 4 ++++ src/bin/pg_basebackup/pg_createsubscriber.c | 5 +++++ src/bin/pg_combinebackup/pg_combinebackup.c | 4 ++++ src/bin/pg_resetwal/pg_resetwal.c | 4 ++++ src/bin/pg_rewind/pg_rewind.c | 10 ++++++---- 5 files changed, 23 insertions(+), 4 deletions(-) diff --git a/src/bin/pg_archivecleanup/pg_archivecleanup.c b/src/bin/pg_archivecleanup/pg_archivecleanup.c index c25348bcb85..ab686b4748c 100644 --- a/src/bin/pg_archivecleanup/pg_archivecleanup.c +++ b/src/bin/pg_archivecleanup/pg_archivecleanup.c @@ -375,6 +375,10 @@ main(int argc, char **argv) exit(2); } + if (dryrun) + pg_log_info("Executing in dry-run mode.\n" + "No files will be removed."); + /* * Check archive exists and other initialization if required. */ diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c index df41836e70f..cc4be5d6ef4 100644 --- a/src/bin/pg_basebackup/pg_createsubscriber.c +++ b/src/bin/pg_basebackup/pg_createsubscriber.c @@ -2305,6 +2305,11 @@ main(int argc, char **argv) pg_log_error_hint("Try \"%s --help\" for more information.", progname); exit(1); } + + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + pg_log_info("validating publisher connection string"); pub_base_conninfo = get_base_conninfo(opt.pub_conninfo_str, &dbname_conninfo); diff --git a/src/bin/pg_combinebackup/pg_combinebackup.c b/src/bin/pg_combinebackup/pg_combinebackup.c index 3a325127209..c9bf0a9e105 100644 --- a/src/bin/pg_combinebackup/pg_combinebackup.c +++ b/src/bin/pg_combinebackup/pg_combinebackup.c @@ -242,6 +242,10 @@ main(int argc, char *argv[]) if (opt.no_manifest) opt.manifest_checksums = CHECKSUM_TYPE_NONE; + if (opt.dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + /* Check that the platform supports the requested copy method. */ if (opt.copy_method == COPY_METHOD_CLONE) { diff --git a/src/bin/pg_resetwal/pg_resetwal.c b/src/bin/pg_resetwal/pg_resetwal.c index a89d72fc5cf..dd5d279521e 100644 --- a/src/bin/pg_resetwal/pg_resetwal.c +++ b/src/bin/pg_resetwal/pg_resetwal.c @@ -397,6 +397,10 @@ main(int argc, char *argv[]) exit(1); } + if (noupdate) + pg_log_info("Executing in dry-run mode.\n" + "Nothing will be modified."); + /* * Attempt to read the existing pg_control file */ diff --git a/src/bin/pg_rewind/pg_rewind.c b/src/bin/pg_rewind/pg_rewind.c index 27c514f934a..e9364d04f76 100644 --- a/src/bin/pg_rewind/pg_rewind.c +++ b/src/bin/pg_rewind/pg_rewind.c @@ -300,10 +300,12 @@ main(int argc, char **argv) atexit(disconnect_atexit); - /* - * Ok, we have all the options and we're ready to start. First, connect to - * remote server. - */ + /* Ok, we have all the options and we're ready to start. */ + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + + /* First, connect to remote server. */ if (connstr_source) { conn = PQconnectdb(connstr_source); -- 2.47.3 --ibfr3ah5qy6tcbhw-- ^ permalink raw reply [nested|flat] 190+ messages in thread
* [PATCH v5] Log a note at program start when running in dry-run mode @ 2025-11-11 08:54 Álvaro Herrera <[email protected]> 0 siblings, 0 replies; 190+ messages in thread From: Álvaro Herrera @ 2025-11-11 08:54 UTC (permalink / raw) Users might get some peace of mind knowing their data is not being destroyed or whatever. Author: Peter Smith <[email protected]> Reviewed-by: Álvaro Herrera <[email protected]> Discussion: https://postgr.es/m/CAHut+PsvQJQnQO0KT0S2oegenkvJ8FUuY-QS5syyqmT24R2xFQ@mail.gmail.com --- src/bin/pg_archivecleanup/pg_archivecleanup.c | 4 ++++ src/bin/pg_basebackup/pg_createsubscriber.c | 5 +++++ src/bin/pg_combinebackup/pg_combinebackup.c | 4 ++++ src/bin/pg_resetwal/pg_resetwal.c | 4 ++++ src/bin/pg_rewind/pg_rewind.c | 10 ++++++---- 5 files changed, 23 insertions(+), 4 deletions(-) diff --git a/src/bin/pg_archivecleanup/pg_archivecleanup.c b/src/bin/pg_archivecleanup/pg_archivecleanup.c index c25348bcb85..ab686b4748c 100644 --- a/src/bin/pg_archivecleanup/pg_archivecleanup.c +++ b/src/bin/pg_archivecleanup/pg_archivecleanup.c @@ -375,6 +375,10 @@ main(int argc, char **argv) exit(2); } + if (dryrun) + pg_log_info("Executing in dry-run mode.\n" + "No files will be removed."); + /* * Check archive exists and other initialization if required. */ diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c index df41836e70f..cc4be5d6ef4 100644 --- a/src/bin/pg_basebackup/pg_createsubscriber.c +++ b/src/bin/pg_basebackup/pg_createsubscriber.c @@ -2305,6 +2305,11 @@ main(int argc, char **argv) pg_log_error_hint("Try \"%s --help\" for more information.", progname); exit(1); } + + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + pg_log_info("validating publisher connection string"); pub_base_conninfo = get_base_conninfo(opt.pub_conninfo_str, &dbname_conninfo); diff --git a/src/bin/pg_combinebackup/pg_combinebackup.c b/src/bin/pg_combinebackup/pg_combinebackup.c index 3a325127209..c9bf0a9e105 100644 --- a/src/bin/pg_combinebackup/pg_combinebackup.c +++ b/src/bin/pg_combinebackup/pg_combinebackup.c @@ -242,6 +242,10 @@ main(int argc, char *argv[]) if (opt.no_manifest) opt.manifest_checksums = CHECKSUM_TYPE_NONE; + if (opt.dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + /* Check that the platform supports the requested copy method. */ if (opt.copy_method == COPY_METHOD_CLONE) { diff --git a/src/bin/pg_resetwal/pg_resetwal.c b/src/bin/pg_resetwal/pg_resetwal.c index a89d72fc5cf..dd5d279521e 100644 --- a/src/bin/pg_resetwal/pg_resetwal.c +++ b/src/bin/pg_resetwal/pg_resetwal.c @@ -397,6 +397,10 @@ main(int argc, char *argv[]) exit(1); } + if (noupdate) + pg_log_info("Executing in dry-run mode.\n" + "Nothing will be modified."); + /* * Attempt to read the existing pg_control file */ diff --git a/src/bin/pg_rewind/pg_rewind.c b/src/bin/pg_rewind/pg_rewind.c index 27c514f934a..e9364d04f76 100644 --- a/src/bin/pg_rewind/pg_rewind.c +++ b/src/bin/pg_rewind/pg_rewind.c @@ -300,10 +300,12 @@ main(int argc, char **argv) atexit(disconnect_atexit); - /* - * Ok, we have all the options and we're ready to start. First, connect to - * remote server. - */ + /* Ok, we have all the options and we're ready to start. */ + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + + /* First, connect to remote server. */ if (connstr_source) { conn = PQconnectdb(connstr_source); -- 2.47.3 --ibfr3ah5qy6tcbhw-- ^ permalink raw reply [nested|flat] 190+ messages in thread
* [PATCH v5] Log a note at program start when running in dry-run mode @ 2025-11-11 08:54 Álvaro Herrera <[email protected]> 0 siblings, 0 replies; 190+ messages in thread From: Álvaro Herrera @ 2025-11-11 08:54 UTC (permalink / raw) Users might get some peace of mind knowing their data is not being destroyed or whatever. Author: Peter Smith <[email protected]> Reviewed-by: Álvaro Herrera <[email protected]> Discussion: https://postgr.es/m/CAHut+PsvQJQnQO0KT0S2oegenkvJ8FUuY-QS5syyqmT24R2xFQ@mail.gmail.com --- src/bin/pg_archivecleanup/pg_archivecleanup.c | 4 ++++ src/bin/pg_basebackup/pg_createsubscriber.c | 5 +++++ src/bin/pg_combinebackup/pg_combinebackup.c | 4 ++++ src/bin/pg_resetwal/pg_resetwal.c | 4 ++++ src/bin/pg_rewind/pg_rewind.c | 10 ++++++---- 5 files changed, 23 insertions(+), 4 deletions(-) diff --git a/src/bin/pg_archivecleanup/pg_archivecleanup.c b/src/bin/pg_archivecleanup/pg_archivecleanup.c index c25348bcb85..ab686b4748c 100644 --- a/src/bin/pg_archivecleanup/pg_archivecleanup.c +++ b/src/bin/pg_archivecleanup/pg_archivecleanup.c @@ -375,6 +375,10 @@ main(int argc, char **argv) exit(2); } + if (dryrun) + pg_log_info("Executing in dry-run mode.\n" + "No files will be removed."); + /* * Check archive exists and other initialization if required. */ diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c index df41836e70f..cc4be5d6ef4 100644 --- a/src/bin/pg_basebackup/pg_createsubscriber.c +++ b/src/bin/pg_basebackup/pg_createsubscriber.c @@ -2305,6 +2305,11 @@ main(int argc, char **argv) pg_log_error_hint("Try \"%s --help\" for more information.", progname); exit(1); } + + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + pg_log_info("validating publisher connection string"); pub_base_conninfo = get_base_conninfo(opt.pub_conninfo_str, &dbname_conninfo); diff --git a/src/bin/pg_combinebackup/pg_combinebackup.c b/src/bin/pg_combinebackup/pg_combinebackup.c index 3a325127209..c9bf0a9e105 100644 --- a/src/bin/pg_combinebackup/pg_combinebackup.c +++ b/src/bin/pg_combinebackup/pg_combinebackup.c @@ -242,6 +242,10 @@ main(int argc, char *argv[]) if (opt.no_manifest) opt.manifest_checksums = CHECKSUM_TYPE_NONE; + if (opt.dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + /* Check that the platform supports the requested copy method. */ if (opt.copy_method == COPY_METHOD_CLONE) { diff --git a/src/bin/pg_resetwal/pg_resetwal.c b/src/bin/pg_resetwal/pg_resetwal.c index a89d72fc5cf..dd5d279521e 100644 --- a/src/bin/pg_resetwal/pg_resetwal.c +++ b/src/bin/pg_resetwal/pg_resetwal.c @@ -397,6 +397,10 @@ main(int argc, char *argv[]) exit(1); } + if (noupdate) + pg_log_info("Executing in dry-run mode.\n" + "Nothing will be modified."); + /* * Attempt to read the existing pg_control file */ diff --git a/src/bin/pg_rewind/pg_rewind.c b/src/bin/pg_rewind/pg_rewind.c index 27c514f934a..e9364d04f76 100644 --- a/src/bin/pg_rewind/pg_rewind.c +++ b/src/bin/pg_rewind/pg_rewind.c @@ -300,10 +300,12 @@ main(int argc, char **argv) atexit(disconnect_atexit); - /* - * Ok, we have all the options and we're ready to start. First, connect to - * remote server. - */ + /* Ok, we have all the options and we're ready to start. */ + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + + /* First, connect to remote server. */ if (connstr_source) { conn = PQconnectdb(connstr_source); -- 2.47.3 --ibfr3ah5qy6tcbhw-- ^ permalink raw reply [nested|flat] 190+ messages in thread
* [PATCH v5] Log a note at program start when running in dry-run mode @ 2025-11-11 08:54 Álvaro Herrera <[email protected]> 0 siblings, 0 replies; 190+ messages in thread From: Álvaro Herrera @ 2025-11-11 08:54 UTC (permalink / raw) Users might get some peace of mind knowing their data is not being destroyed or whatever. Author: Peter Smith <[email protected]> Reviewed-by: Álvaro Herrera <[email protected]> Discussion: https://postgr.es/m/CAHut+PsvQJQnQO0KT0S2oegenkvJ8FUuY-QS5syyqmT24R2xFQ@mail.gmail.com --- src/bin/pg_archivecleanup/pg_archivecleanup.c | 4 ++++ src/bin/pg_basebackup/pg_createsubscriber.c | 5 +++++ src/bin/pg_combinebackup/pg_combinebackup.c | 4 ++++ src/bin/pg_resetwal/pg_resetwal.c | 4 ++++ src/bin/pg_rewind/pg_rewind.c | 10 ++++++---- 5 files changed, 23 insertions(+), 4 deletions(-) diff --git a/src/bin/pg_archivecleanup/pg_archivecleanup.c b/src/bin/pg_archivecleanup/pg_archivecleanup.c index c25348bcb85..ab686b4748c 100644 --- a/src/bin/pg_archivecleanup/pg_archivecleanup.c +++ b/src/bin/pg_archivecleanup/pg_archivecleanup.c @@ -375,6 +375,10 @@ main(int argc, char **argv) exit(2); } + if (dryrun) + pg_log_info("Executing in dry-run mode.\n" + "No files will be removed."); + /* * Check archive exists and other initialization if required. */ diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c index df41836e70f..cc4be5d6ef4 100644 --- a/src/bin/pg_basebackup/pg_createsubscriber.c +++ b/src/bin/pg_basebackup/pg_createsubscriber.c @@ -2305,6 +2305,11 @@ main(int argc, char **argv) pg_log_error_hint("Try \"%s --help\" for more information.", progname); exit(1); } + + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + pg_log_info("validating publisher connection string"); pub_base_conninfo = get_base_conninfo(opt.pub_conninfo_str, &dbname_conninfo); diff --git a/src/bin/pg_combinebackup/pg_combinebackup.c b/src/bin/pg_combinebackup/pg_combinebackup.c index 3a325127209..c9bf0a9e105 100644 --- a/src/bin/pg_combinebackup/pg_combinebackup.c +++ b/src/bin/pg_combinebackup/pg_combinebackup.c @@ -242,6 +242,10 @@ main(int argc, char *argv[]) if (opt.no_manifest) opt.manifest_checksums = CHECKSUM_TYPE_NONE; + if (opt.dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + /* Check that the platform supports the requested copy method. */ if (opt.copy_method == COPY_METHOD_CLONE) { diff --git a/src/bin/pg_resetwal/pg_resetwal.c b/src/bin/pg_resetwal/pg_resetwal.c index a89d72fc5cf..dd5d279521e 100644 --- a/src/bin/pg_resetwal/pg_resetwal.c +++ b/src/bin/pg_resetwal/pg_resetwal.c @@ -397,6 +397,10 @@ main(int argc, char *argv[]) exit(1); } + if (noupdate) + pg_log_info("Executing in dry-run mode.\n" + "Nothing will be modified."); + /* * Attempt to read the existing pg_control file */ diff --git a/src/bin/pg_rewind/pg_rewind.c b/src/bin/pg_rewind/pg_rewind.c index 27c514f934a..e9364d04f76 100644 --- a/src/bin/pg_rewind/pg_rewind.c +++ b/src/bin/pg_rewind/pg_rewind.c @@ -300,10 +300,12 @@ main(int argc, char **argv) atexit(disconnect_atexit); - /* - * Ok, we have all the options and we're ready to start. First, connect to - * remote server. - */ + /* Ok, we have all the options and we're ready to start. */ + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + + /* First, connect to remote server. */ if (connstr_source) { conn = PQconnectdb(connstr_source); -- 2.47.3 --ibfr3ah5qy6tcbhw-- ^ permalink raw reply [nested|flat] 190+ messages in thread
* [PATCH v5] Log a note at program start when running in dry-run mode @ 2025-11-11 08:54 Álvaro Herrera <[email protected]> 0 siblings, 0 replies; 190+ messages in thread From: Álvaro Herrera @ 2025-11-11 08:54 UTC (permalink / raw) Users might get some peace of mind knowing their data is not being destroyed or whatever. Author: Peter Smith <[email protected]> Reviewed-by: Álvaro Herrera <[email protected]> Discussion: https://postgr.es/m/CAHut+PsvQJQnQO0KT0S2oegenkvJ8FUuY-QS5syyqmT24R2xFQ@mail.gmail.com --- src/bin/pg_archivecleanup/pg_archivecleanup.c | 4 ++++ src/bin/pg_basebackup/pg_createsubscriber.c | 5 +++++ src/bin/pg_combinebackup/pg_combinebackup.c | 4 ++++ src/bin/pg_resetwal/pg_resetwal.c | 4 ++++ src/bin/pg_rewind/pg_rewind.c | 10 ++++++---- 5 files changed, 23 insertions(+), 4 deletions(-) diff --git a/src/bin/pg_archivecleanup/pg_archivecleanup.c b/src/bin/pg_archivecleanup/pg_archivecleanup.c index c25348bcb85..ab686b4748c 100644 --- a/src/bin/pg_archivecleanup/pg_archivecleanup.c +++ b/src/bin/pg_archivecleanup/pg_archivecleanup.c @@ -375,6 +375,10 @@ main(int argc, char **argv) exit(2); } + if (dryrun) + pg_log_info("Executing in dry-run mode.\n" + "No files will be removed."); + /* * Check archive exists and other initialization if required. */ diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c index df41836e70f..cc4be5d6ef4 100644 --- a/src/bin/pg_basebackup/pg_createsubscriber.c +++ b/src/bin/pg_basebackup/pg_createsubscriber.c @@ -2305,6 +2305,11 @@ main(int argc, char **argv) pg_log_error_hint("Try \"%s --help\" for more information.", progname); exit(1); } + + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + pg_log_info("validating publisher connection string"); pub_base_conninfo = get_base_conninfo(opt.pub_conninfo_str, &dbname_conninfo); diff --git a/src/bin/pg_combinebackup/pg_combinebackup.c b/src/bin/pg_combinebackup/pg_combinebackup.c index 3a325127209..c9bf0a9e105 100644 --- a/src/bin/pg_combinebackup/pg_combinebackup.c +++ b/src/bin/pg_combinebackup/pg_combinebackup.c @@ -242,6 +242,10 @@ main(int argc, char *argv[]) if (opt.no_manifest) opt.manifest_checksums = CHECKSUM_TYPE_NONE; + if (opt.dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + /* Check that the platform supports the requested copy method. */ if (opt.copy_method == COPY_METHOD_CLONE) { diff --git a/src/bin/pg_resetwal/pg_resetwal.c b/src/bin/pg_resetwal/pg_resetwal.c index a89d72fc5cf..dd5d279521e 100644 --- a/src/bin/pg_resetwal/pg_resetwal.c +++ b/src/bin/pg_resetwal/pg_resetwal.c @@ -397,6 +397,10 @@ main(int argc, char *argv[]) exit(1); } + if (noupdate) + pg_log_info("Executing in dry-run mode.\n" + "Nothing will be modified."); + /* * Attempt to read the existing pg_control file */ diff --git a/src/bin/pg_rewind/pg_rewind.c b/src/bin/pg_rewind/pg_rewind.c index 27c514f934a..e9364d04f76 100644 --- a/src/bin/pg_rewind/pg_rewind.c +++ b/src/bin/pg_rewind/pg_rewind.c @@ -300,10 +300,12 @@ main(int argc, char **argv) atexit(disconnect_atexit); - /* - * Ok, we have all the options and we're ready to start. First, connect to - * remote server. - */ + /* Ok, we have all the options and we're ready to start. */ + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + + /* First, connect to remote server. */ if (connstr_source) { conn = PQconnectdb(connstr_source); -- 2.47.3 --ibfr3ah5qy6tcbhw-- ^ permalink raw reply [nested|flat] 190+ messages in thread
* [PATCH v5] Log a note at program start when running in dry-run mode @ 2025-11-11 08:54 Álvaro Herrera <[email protected]> 0 siblings, 0 replies; 190+ messages in thread From: Álvaro Herrera @ 2025-11-11 08:54 UTC (permalink / raw) Users might get some peace of mind knowing their data is not being destroyed or whatever. Author: Peter Smith <[email protected]> Reviewed-by: Álvaro Herrera <[email protected]> Discussion: https://postgr.es/m/CAHut+PsvQJQnQO0KT0S2oegenkvJ8FUuY-QS5syyqmT24R2xFQ@mail.gmail.com --- src/bin/pg_archivecleanup/pg_archivecleanup.c | 4 ++++ src/bin/pg_basebackup/pg_createsubscriber.c | 5 +++++ src/bin/pg_combinebackup/pg_combinebackup.c | 4 ++++ src/bin/pg_resetwal/pg_resetwal.c | 4 ++++ src/bin/pg_rewind/pg_rewind.c | 10 ++++++---- 5 files changed, 23 insertions(+), 4 deletions(-) diff --git a/src/bin/pg_archivecleanup/pg_archivecleanup.c b/src/bin/pg_archivecleanup/pg_archivecleanup.c index c25348bcb85..ab686b4748c 100644 --- a/src/bin/pg_archivecleanup/pg_archivecleanup.c +++ b/src/bin/pg_archivecleanup/pg_archivecleanup.c @@ -375,6 +375,10 @@ main(int argc, char **argv) exit(2); } + if (dryrun) + pg_log_info("Executing in dry-run mode.\n" + "No files will be removed."); + /* * Check archive exists and other initialization if required. */ diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c index df41836e70f..cc4be5d6ef4 100644 --- a/src/bin/pg_basebackup/pg_createsubscriber.c +++ b/src/bin/pg_basebackup/pg_createsubscriber.c @@ -2305,6 +2305,11 @@ main(int argc, char **argv) pg_log_error_hint("Try \"%s --help\" for more information.", progname); exit(1); } + + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + pg_log_info("validating publisher connection string"); pub_base_conninfo = get_base_conninfo(opt.pub_conninfo_str, &dbname_conninfo); diff --git a/src/bin/pg_combinebackup/pg_combinebackup.c b/src/bin/pg_combinebackup/pg_combinebackup.c index 3a325127209..c9bf0a9e105 100644 --- a/src/bin/pg_combinebackup/pg_combinebackup.c +++ b/src/bin/pg_combinebackup/pg_combinebackup.c @@ -242,6 +242,10 @@ main(int argc, char *argv[]) if (opt.no_manifest) opt.manifest_checksums = CHECKSUM_TYPE_NONE; + if (opt.dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + /* Check that the platform supports the requested copy method. */ if (opt.copy_method == COPY_METHOD_CLONE) { diff --git a/src/bin/pg_resetwal/pg_resetwal.c b/src/bin/pg_resetwal/pg_resetwal.c index a89d72fc5cf..dd5d279521e 100644 --- a/src/bin/pg_resetwal/pg_resetwal.c +++ b/src/bin/pg_resetwal/pg_resetwal.c @@ -397,6 +397,10 @@ main(int argc, char *argv[]) exit(1); } + if (noupdate) + pg_log_info("Executing in dry-run mode.\n" + "Nothing will be modified."); + /* * Attempt to read the existing pg_control file */ diff --git a/src/bin/pg_rewind/pg_rewind.c b/src/bin/pg_rewind/pg_rewind.c index 27c514f934a..e9364d04f76 100644 --- a/src/bin/pg_rewind/pg_rewind.c +++ b/src/bin/pg_rewind/pg_rewind.c @@ -300,10 +300,12 @@ main(int argc, char **argv) atexit(disconnect_atexit); - /* - * Ok, we have all the options and we're ready to start. First, connect to - * remote server. - */ + /* Ok, we have all the options and we're ready to start. */ + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + + /* First, connect to remote server. */ if (connstr_source) { conn = PQconnectdb(connstr_source); -- 2.47.3 --ibfr3ah5qy6tcbhw-- ^ permalink raw reply [nested|flat] 190+ messages in thread
* [PATCH v5] Log a note at program start when running in dry-run mode @ 2025-11-11 08:54 Álvaro Herrera <[email protected]> 0 siblings, 0 replies; 190+ messages in thread From: Álvaro Herrera @ 2025-11-11 08:54 UTC (permalink / raw) Users might get some peace of mind knowing their data is not being destroyed or whatever. Author: Peter Smith <[email protected]> Reviewed-by: Álvaro Herrera <[email protected]> Discussion: https://postgr.es/m/CAHut+PsvQJQnQO0KT0S2oegenkvJ8FUuY-QS5syyqmT24R2xFQ@mail.gmail.com --- src/bin/pg_archivecleanup/pg_archivecleanup.c | 4 ++++ src/bin/pg_basebackup/pg_createsubscriber.c | 5 +++++ src/bin/pg_combinebackup/pg_combinebackup.c | 4 ++++ src/bin/pg_resetwal/pg_resetwal.c | 4 ++++ src/bin/pg_rewind/pg_rewind.c | 10 ++++++---- 5 files changed, 23 insertions(+), 4 deletions(-) diff --git a/src/bin/pg_archivecleanup/pg_archivecleanup.c b/src/bin/pg_archivecleanup/pg_archivecleanup.c index c25348bcb85..ab686b4748c 100644 --- a/src/bin/pg_archivecleanup/pg_archivecleanup.c +++ b/src/bin/pg_archivecleanup/pg_archivecleanup.c @@ -375,6 +375,10 @@ main(int argc, char **argv) exit(2); } + if (dryrun) + pg_log_info("Executing in dry-run mode.\n" + "No files will be removed."); + /* * Check archive exists and other initialization if required. */ diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c index df41836e70f..cc4be5d6ef4 100644 --- a/src/bin/pg_basebackup/pg_createsubscriber.c +++ b/src/bin/pg_basebackup/pg_createsubscriber.c @@ -2305,6 +2305,11 @@ main(int argc, char **argv) pg_log_error_hint("Try \"%s --help\" for more information.", progname); exit(1); } + + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + pg_log_info("validating publisher connection string"); pub_base_conninfo = get_base_conninfo(opt.pub_conninfo_str, &dbname_conninfo); diff --git a/src/bin/pg_combinebackup/pg_combinebackup.c b/src/bin/pg_combinebackup/pg_combinebackup.c index 3a325127209..c9bf0a9e105 100644 --- a/src/bin/pg_combinebackup/pg_combinebackup.c +++ b/src/bin/pg_combinebackup/pg_combinebackup.c @@ -242,6 +242,10 @@ main(int argc, char *argv[]) if (opt.no_manifest) opt.manifest_checksums = CHECKSUM_TYPE_NONE; + if (opt.dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + /* Check that the platform supports the requested copy method. */ if (opt.copy_method == COPY_METHOD_CLONE) { diff --git a/src/bin/pg_resetwal/pg_resetwal.c b/src/bin/pg_resetwal/pg_resetwal.c index a89d72fc5cf..dd5d279521e 100644 --- a/src/bin/pg_resetwal/pg_resetwal.c +++ b/src/bin/pg_resetwal/pg_resetwal.c @@ -397,6 +397,10 @@ main(int argc, char *argv[]) exit(1); } + if (noupdate) + pg_log_info("Executing in dry-run mode.\n" + "Nothing will be modified."); + /* * Attempt to read the existing pg_control file */ diff --git a/src/bin/pg_rewind/pg_rewind.c b/src/bin/pg_rewind/pg_rewind.c index 27c514f934a..e9364d04f76 100644 --- a/src/bin/pg_rewind/pg_rewind.c +++ b/src/bin/pg_rewind/pg_rewind.c @@ -300,10 +300,12 @@ main(int argc, char **argv) atexit(disconnect_atexit); - /* - * Ok, we have all the options and we're ready to start. First, connect to - * remote server. - */ + /* Ok, we have all the options and we're ready to start. */ + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + + /* First, connect to remote server. */ if (connstr_source) { conn = PQconnectdb(connstr_source); -- 2.47.3 --ibfr3ah5qy6tcbhw-- ^ permalink raw reply [nested|flat] 190+ messages in thread
* [PATCH v5] Log a note at program start when running in dry-run mode @ 2025-11-11 08:54 Álvaro Herrera <[email protected]> 0 siblings, 0 replies; 190+ messages in thread From: Álvaro Herrera @ 2025-11-11 08:54 UTC (permalink / raw) Users might get some peace of mind knowing their data is not being destroyed or whatever. Author: Peter Smith <[email protected]> Reviewed-by: Álvaro Herrera <[email protected]> Discussion: https://postgr.es/m/CAHut+PsvQJQnQO0KT0S2oegenkvJ8FUuY-QS5syyqmT24R2xFQ@mail.gmail.com --- src/bin/pg_archivecleanup/pg_archivecleanup.c | 4 ++++ src/bin/pg_basebackup/pg_createsubscriber.c | 5 +++++ src/bin/pg_combinebackup/pg_combinebackup.c | 4 ++++ src/bin/pg_resetwal/pg_resetwal.c | 4 ++++ src/bin/pg_rewind/pg_rewind.c | 10 ++++++---- 5 files changed, 23 insertions(+), 4 deletions(-) diff --git a/src/bin/pg_archivecleanup/pg_archivecleanup.c b/src/bin/pg_archivecleanup/pg_archivecleanup.c index c25348bcb85..ab686b4748c 100644 --- a/src/bin/pg_archivecleanup/pg_archivecleanup.c +++ b/src/bin/pg_archivecleanup/pg_archivecleanup.c @@ -375,6 +375,10 @@ main(int argc, char **argv) exit(2); } + if (dryrun) + pg_log_info("Executing in dry-run mode.\n" + "No files will be removed."); + /* * Check archive exists and other initialization if required. */ diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c index df41836e70f..cc4be5d6ef4 100644 --- a/src/bin/pg_basebackup/pg_createsubscriber.c +++ b/src/bin/pg_basebackup/pg_createsubscriber.c @@ -2305,6 +2305,11 @@ main(int argc, char **argv) pg_log_error_hint("Try \"%s --help\" for more information.", progname); exit(1); } + + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + pg_log_info("validating publisher connection string"); pub_base_conninfo = get_base_conninfo(opt.pub_conninfo_str, &dbname_conninfo); diff --git a/src/bin/pg_combinebackup/pg_combinebackup.c b/src/bin/pg_combinebackup/pg_combinebackup.c index 3a325127209..c9bf0a9e105 100644 --- a/src/bin/pg_combinebackup/pg_combinebackup.c +++ b/src/bin/pg_combinebackup/pg_combinebackup.c @@ -242,6 +242,10 @@ main(int argc, char *argv[]) if (opt.no_manifest) opt.manifest_checksums = CHECKSUM_TYPE_NONE; + if (opt.dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + /* Check that the platform supports the requested copy method. */ if (opt.copy_method == COPY_METHOD_CLONE) { diff --git a/src/bin/pg_resetwal/pg_resetwal.c b/src/bin/pg_resetwal/pg_resetwal.c index a89d72fc5cf..dd5d279521e 100644 --- a/src/bin/pg_resetwal/pg_resetwal.c +++ b/src/bin/pg_resetwal/pg_resetwal.c @@ -397,6 +397,10 @@ main(int argc, char *argv[]) exit(1); } + if (noupdate) + pg_log_info("Executing in dry-run mode.\n" + "Nothing will be modified."); + /* * Attempt to read the existing pg_control file */ diff --git a/src/bin/pg_rewind/pg_rewind.c b/src/bin/pg_rewind/pg_rewind.c index 27c514f934a..e9364d04f76 100644 --- a/src/bin/pg_rewind/pg_rewind.c +++ b/src/bin/pg_rewind/pg_rewind.c @@ -300,10 +300,12 @@ main(int argc, char **argv) atexit(disconnect_atexit); - /* - * Ok, we have all the options and we're ready to start. First, connect to - * remote server. - */ + /* Ok, we have all the options and we're ready to start. */ + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + + /* First, connect to remote server. */ if (connstr_source) { conn = PQconnectdb(connstr_source); -- 2.47.3 --ibfr3ah5qy6tcbhw-- ^ permalink raw reply [nested|flat] 190+ messages in thread
* [PATCH v5] Log a note at program start when running in dry-run mode @ 2025-11-11 08:54 Álvaro Herrera <[email protected]> 0 siblings, 0 replies; 190+ messages in thread From: Álvaro Herrera @ 2025-11-11 08:54 UTC (permalink / raw) Users might get some peace of mind knowing their data is not being destroyed or whatever. Author: Peter Smith <[email protected]> Reviewed-by: Álvaro Herrera <[email protected]> Discussion: https://postgr.es/m/CAHut+PsvQJQnQO0KT0S2oegenkvJ8FUuY-QS5syyqmT24R2xFQ@mail.gmail.com --- src/bin/pg_archivecleanup/pg_archivecleanup.c | 4 ++++ src/bin/pg_basebackup/pg_createsubscriber.c | 5 +++++ src/bin/pg_combinebackup/pg_combinebackup.c | 4 ++++ src/bin/pg_resetwal/pg_resetwal.c | 4 ++++ src/bin/pg_rewind/pg_rewind.c | 10 ++++++---- 5 files changed, 23 insertions(+), 4 deletions(-) diff --git a/src/bin/pg_archivecleanup/pg_archivecleanup.c b/src/bin/pg_archivecleanup/pg_archivecleanup.c index c25348bcb85..ab686b4748c 100644 --- a/src/bin/pg_archivecleanup/pg_archivecleanup.c +++ b/src/bin/pg_archivecleanup/pg_archivecleanup.c @@ -375,6 +375,10 @@ main(int argc, char **argv) exit(2); } + if (dryrun) + pg_log_info("Executing in dry-run mode.\n" + "No files will be removed."); + /* * Check archive exists and other initialization if required. */ diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c index df41836e70f..cc4be5d6ef4 100644 --- a/src/bin/pg_basebackup/pg_createsubscriber.c +++ b/src/bin/pg_basebackup/pg_createsubscriber.c @@ -2305,6 +2305,11 @@ main(int argc, char **argv) pg_log_error_hint("Try \"%s --help\" for more information.", progname); exit(1); } + + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + pg_log_info("validating publisher connection string"); pub_base_conninfo = get_base_conninfo(opt.pub_conninfo_str, &dbname_conninfo); diff --git a/src/bin/pg_combinebackup/pg_combinebackup.c b/src/bin/pg_combinebackup/pg_combinebackup.c index 3a325127209..c9bf0a9e105 100644 --- a/src/bin/pg_combinebackup/pg_combinebackup.c +++ b/src/bin/pg_combinebackup/pg_combinebackup.c @@ -242,6 +242,10 @@ main(int argc, char *argv[]) if (opt.no_manifest) opt.manifest_checksums = CHECKSUM_TYPE_NONE; + if (opt.dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + /* Check that the platform supports the requested copy method. */ if (opt.copy_method == COPY_METHOD_CLONE) { diff --git a/src/bin/pg_resetwal/pg_resetwal.c b/src/bin/pg_resetwal/pg_resetwal.c index a89d72fc5cf..dd5d279521e 100644 --- a/src/bin/pg_resetwal/pg_resetwal.c +++ b/src/bin/pg_resetwal/pg_resetwal.c @@ -397,6 +397,10 @@ main(int argc, char *argv[]) exit(1); } + if (noupdate) + pg_log_info("Executing in dry-run mode.\n" + "Nothing will be modified."); + /* * Attempt to read the existing pg_control file */ diff --git a/src/bin/pg_rewind/pg_rewind.c b/src/bin/pg_rewind/pg_rewind.c index 27c514f934a..e9364d04f76 100644 --- a/src/bin/pg_rewind/pg_rewind.c +++ b/src/bin/pg_rewind/pg_rewind.c @@ -300,10 +300,12 @@ main(int argc, char **argv) atexit(disconnect_atexit); - /* - * Ok, we have all the options and we're ready to start. First, connect to - * remote server. - */ + /* Ok, we have all the options and we're ready to start. */ + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + + /* First, connect to remote server. */ if (connstr_source) { conn = PQconnectdb(connstr_source); -- 2.47.3 --ibfr3ah5qy6tcbhw-- ^ permalink raw reply [nested|flat] 190+ messages in thread
* [PATCH v5] Log a note at program start when running in dry-run mode @ 2025-11-11 08:54 Álvaro Herrera <[email protected]> 0 siblings, 0 replies; 190+ messages in thread From: Álvaro Herrera @ 2025-11-11 08:54 UTC (permalink / raw) Users might get some peace of mind knowing their data is not being destroyed or whatever. Author: Peter Smith <[email protected]> Reviewed-by: Álvaro Herrera <[email protected]> Discussion: https://postgr.es/m/CAHut+PsvQJQnQO0KT0S2oegenkvJ8FUuY-QS5syyqmT24R2xFQ@mail.gmail.com --- src/bin/pg_archivecleanup/pg_archivecleanup.c | 4 ++++ src/bin/pg_basebackup/pg_createsubscriber.c | 5 +++++ src/bin/pg_combinebackup/pg_combinebackup.c | 4 ++++ src/bin/pg_resetwal/pg_resetwal.c | 4 ++++ src/bin/pg_rewind/pg_rewind.c | 10 ++++++---- 5 files changed, 23 insertions(+), 4 deletions(-) diff --git a/src/bin/pg_archivecleanup/pg_archivecleanup.c b/src/bin/pg_archivecleanup/pg_archivecleanup.c index c25348bcb85..ab686b4748c 100644 --- a/src/bin/pg_archivecleanup/pg_archivecleanup.c +++ b/src/bin/pg_archivecleanup/pg_archivecleanup.c @@ -375,6 +375,10 @@ main(int argc, char **argv) exit(2); } + if (dryrun) + pg_log_info("Executing in dry-run mode.\n" + "No files will be removed."); + /* * Check archive exists and other initialization if required. */ diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c index df41836e70f..cc4be5d6ef4 100644 --- a/src/bin/pg_basebackup/pg_createsubscriber.c +++ b/src/bin/pg_basebackup/pg_createsubscriber.c @@ -2305,6 +2305,11 @@ main(int argc, char **argv) pg_log_error_hint("Try \"%s --help\" for more information.", progname); exit(1); } + + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + pg_log_info("validating publisher connection string"); pub_base_conninfo = get_base_conninfo(opt.pub_conninfo_str, &dbname_conninfo); diff --git a/src/bin/pg_combinebackup/pg_combinebackup.c b/src/bin/pg_combinebackup/pg_combinebackup.c index 3a325127209..c9bf0a9e105 100644 --- a/src/bin/pg_combinebackup/pg_combinebackup.c +++ b/src/bin/pg_combinebackup/pg_combinebackup.c @@ -242,6 +242,10 @@ main(int argc, char *argv[]) if (opt.no_manifest) opt.manifest_checksums = CHECKSUM_TYPE_NONE; + if (opt.dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + /* Check that the platform supports the requested copy method. */ if (opt.copy_method == COPY_METHOD_CLONE) { diff --git a/src/bin/pg_resetwal/pg_resetwal.c b/src/bin/pg_resetwal/pg_resetwal.c index a89d72fc5cf..dd5d279521e 100644 --- a/src/bin/pg_resetwal/pg_resetwal.c +++ b/src/bin/pg_resetwal/pg_resetwal.c @@ -397,6 +397,10 @@ main(int argc, char *argv[]) exit(1); } + if (noupdate) + pg_log_info("Executing in dry-run mode.\n" + "Nothing will be modified."); + /* * Attempt to read the existing pg_control file */ diff --git a/src/bin/pg_rewind/pg_rewind.c b/src/bin/pg_rewind/pg_rewind.c index 27c514f934a..e9364d04f76 100644 --- a/src/bin/pg_rewind/pg_rewind.c +++ b/src/bin/pg_rewind/pg_rewind.c @@ -300,10 +300,12 @@ main(int argc, char **argv) atexit(disconnect_atexit); - /* - * Ok, we have all the options and we're ready to start. First, connect to - * remote server. - */ + /* Ok, we have all the options and we're ready to start. */ + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + + /* First, connect to remote server. */ if (connstr_source) { conn = PQconnectdb(connstr_source); -- 2.47.3 --ibfr3ah5qy6tcbhw-- ^ permalink raw reply [nested|flat] 190+ messages in thread
* [PATCH v5] Log a note at program start when running in dry-run mode @ 2025-11-11 08:54 Álvaro Herrera <[email protected]> 0 siblings, 0 replies; 190+ messages in thread From: Álvaro Herrera @ 2025-11-11 08:54 UTC (permalink / raw) Users might get some peace of mind knowing their data is not being destroyed or whatever. Author: Peter Smith <[email protected]> Reviewed-by: Álvaro Herrera <[email protected]> Discussion: https://postgr.es/m/CAHut+PsvQJQnQO0KT0S2oegenkvJ8FUuY-QS5syyqmT24R2xFQ@mail.gmail.com --- src/bin/pg_archivecleanup/pg_archivecleanup.c | 4 ++++ src/bin/pg_basebackup/pg_createsubscriber.c | 5 +++++ src/bin/pg_combinebackup/pg_combinebackup.c | 4 ++++ src/bin/pg_resetwal/pg_resetwal.c | 4 ++++ src/bin/pg_rewind/pg_rewind.c | 10 ++++++---- 5 files changed, 23 insertions(+), 4 deletions(-) diff --git a/src/bin/pg_archivecleanup/pg_archivecleanup.c b/src/bin/pg_archivecleanup/pg_archivecleanup.c index c25348bcb85..ab686b4748c 100644 --- a/src/bin/pg_archivecleanup/pg_archivecleanup.c +++ b/src/bin/pg_archivecleanup/pg_archivecleanup.c @@ -375,6 +375,10 @@ main(int argc, char **argv) exit(2); } + if (dryrun) + pg_log_info("Executing in dry-run mode.\n" + "No files will be removed."); + /* * Check archive exists and other initialization if required. */ diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c index df41836e70f..cc4be5d6ef4 100644 --- a/src/bin/pg_basebackup/pg_createsubscriber.c +++ b/src/bin/pg_basebackup/pg_createsubscriber.c @@ -2305,6 +2305,11 @@ main(int argc, char **argv) pg_log_error_hint("Try \"%s --help\" for more information.", progname); exit(1); } + + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + pg_log_info("validating publisher connection string"); pub_base_conninfo = get_base_conninfo(opt.pub_conninfo_str, &dbname_conninfo); diff --git a/src/bin/pg_combinebackup/pg_combinebackup.c b/src/bin/pg_combinebackup/pg_combinebackup.c index 3a325127209..c9bf0a9e105 100644 --- a/src/bin/pg_combinebackup/pg_combinebackup.c +++ b/src/bin/pg_combinebackup/pg_combinebackup.c @@ -242,6 +242,10 @@ main(int argc, char *argv[]) if (opt.no_manifest) opt.manifest_checksums = CHECKSUM_TYPE_NONE; + if (opt.dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + /* Check that the platform supports the requested copy method. */ if (opt.copy_method == COPY_METHOD_CLONE) { diff --git a/src/bin/pg_resetwal/pg_resetwal.c b/src/bin/pg_resetwal/pg_resetwal.c index a89d72fc5cf..dd5d279521e 100644 --- a/src/bin/pg_resetwal/pg_resetwal.c +++ b/src/bin/pg_resetwal/pg_resetwal.c @@ -397,6 +397,10 @@ main(int argc, char *argv[]) exit(1); } + if (noupdate) + pg_log_info("Executing in dry-run mode.\n" + "Nothing will be modified."); + /* * Attempt to read the existing pg_control file */ diff --git a/src/bin/pg_rewind/pg_rewind.c b/src/bin/pg_rewind/pg_rewind.c index 27c514f934a..e9364d04f76 100644 --- a/src/bin/pg_rewind/pg_rewind.c +++ b/src/bin/pg_rewind/pg_rewind.c @@ -300,10 +300,12 @@ main(int argc, char **argv) atexit(disconnect_atexit); - /* - * Ok, we have all the options and we're ready to start. First, connect to - * remote server. - */ + /* Ok, we have all the options and we're ready to start. */ + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + + /* First, connect to remote server. */ if (connstr_source) { conn = PQconnectdb(connstr_source); -- 2.47.3 --ibfr3ah5qy6tcbhw-- ^ permalink raw reply [nested|flat] 190+ messages in thread
* [PATCH v5] Log a note at program start when running in dry-run mode @ 2025-11-11 08:54 Álvaro Herrera <[email protected]> 0 siblings, 0 replies; 190+ messages in thread From: Álvaro Herrera @ 2025-11-11 08:54 UTC (permalink / raw) Users might get some peace of mind knowing their data is not being destroyed or whatever. Author: Peter Smith <[email protected]> Reviewed-by: Álvaro Herrera <[email protected]> Discussion: https://postgr.es/m/CAHut+PsvQJQnQO0KT0S2oegenkvJ8FUuY-QS5syyqmT24R2xFQ@mail.gmail.com --- src/bin/pg_archivecleanup/pg_archivecleanup.c | 4 ++++ src/bin/pg_basebackup/pg_createsubscriber.c | 5 +++++ src/bin/pg_combinebackup/pg_combinebackup.c | 4 ++++ src/bin/pg_resetwal/pg_resetwal.c | 4 ++++ src/bin/pg_rewind/pg_rewind.c | 10 ++++++---- 5 files changed, 23 insertions(+), 4 deletions(-) diff --git a/src/bin/pg_archivecleanup/pg_archivecleanup.c b/src/bin/pg_archivecleanup/pg_archivecleanup.c index c25348bcb85..ab686b4748c 100644 --- a/src/bin/pg_archivecleanup/pg_archivecleanup.c +++ b/src/bin/pg_archivecleanup/pg_archivecleanup.c @@ -375,6 +375,10 @@ main(int argc, char **argv) exit(2); } + if (dryrun) + pg_log_info("Executing in dry-run mode.\n" + "No files will be removed."); + /* * Check archive exists and other initialization if required. */ diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c index df41836e70f..cc4be5d6ef4 100644 --- a/src/bin/pg_basebackup/pg_createsubscriber.c +++ b/src/bin/pg_basebackup/pg_createsubscriber.c @@ -2305,6 +2305,11 @@ main(int argc, char **argv) pg_log_error_hint("Try \"%s --help\" for more information.", progname); exit(1); } + + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + pg_log_info("validating publisher connection string"); pub_base_conninfo = get_base_conninfo(opt.pub_conninfo_str, &dbname_conninfo); diff --git a/src/bin/pg_combinebackup/pg_combinebackup.c b/src/bin/pg_combinebackup/pg_combinebackup.c index 3a325127209..c9bf0a9e105 100644 --- a/src/bin/pg_combinebackup/pg_combinebackup.c +++ b/src/bin/pg_combinebackup/pg_combinebackup.c @@ -242,6 +242,10 @@ main(int argc, char *argv[]) if (opt.no_manifest) opt.manifest_checksums = CHECKSUM_TYPE_NONE; + if (opt.dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + /* Check that the platform supports the requested copy method. */ if (opt.copy_method == COPY_METHOD_CLONE) { diff --git a/src/bin/pg_resetwal/pg_resetwal.c b/src/bin/pg_resetwal/pg_resetwal.c index a89d72fc5cf..dd5d279521e 100644 --- a/src/bin/pg_resetwal/pg_resetwal.c +++ b/src/bin/pg_resetwal/pg_resetwal.c @@ -397,6 +397,10 @@ main(int argc, char *argv[]) exit(1); } + if (noupdate) + pg_log_info("Executing in dry-run mode.\n" + "Nothing will be modified."); + /* * Attempt to read the existing pg_control file */ diff --git a/src/bin/pg_rewind/pg_rewind.c b/src/bin/pg_rewind/pg_rewind.c index 27c514f934a..e9364d04f76 100644 --- a/src/bin/pg_rewind/pg_rewind.c +++ b/src/bin/pg_rewind/pg_rewind.c @@ -300,10 +300,12 @@ main(int argc, char **argv) atexit(disconnect_atexit); - /* - * Ok, we have all the options and we're ready to start. First, connect to - * remote server. - */ + /* Ok, we have all the options and we're ready to start. */ + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + + /* First, connect to remote server. */ if (connstr_source) { conn = PQconnectdb(connstr_source); -- 2.47.3 --ibfr3ah5qy6tcbhw-- ^ permalink raw reply [nested|flat] 190+ messages in thread
* [PATCH v5] Log a note at program start when running in dry-run mode @ 2025-11-11 08:54 Álvaro Herrera <[email protected]> 0 siblings, 0 replies; 190+ messages in thread From: Álvaro Herrera @ 2025-11-11 08:54 UTC (permalink / raw) Users might get some peace of mind knowing their data is not being destroyed or whatever. Author: Peter Smith <[email protected]> Reviewed-by: Álvaro Herrera <[email protected]> Discussion: https://postgr.es/m/CAHut+PsvQJQnQO0KT0S2oegenkvJ8FUuY-QS5syyqmT24R2xFQ@mail.gmail.com --- src/bin/pg_archivecleanup/pg_archivecleanup.c | 4 ++++ src/bin/pg_basebackup/pg_createsubscriber.c | 5 +++++ src/bin/pg_combinebackup/pg_combinebackup.c | 4 ++++ src/bin/pg_resetwal/pg_resetwal.c | 4 ++++ src/bin/pg_rewind/pg_rewind.c | 10 ++++++---- 5 files changed, 23 insertions(+), 4 deletions(-) diff --git a/src/bin/pg_archivecleanup/pg_archivecleanup.c b/src/bin/pg_archivecleanup/pg_archivecleanup.c index c25348bcb85..ab686b4748c 100644 --- a/src/bin/pg_archivecleanup/pg_archivecleanup.c +++ b/src/bin/pg_archivecleanup/pg_archivecleanup.c @@ -375,6 +375,10 @@ main(int argc, char **argv) exit(2); } + if (dryrun) + pg_log_info("Executing in dry-run mode.\n" + "No files will be removed."); + /* * Check archive exists and other initialization if required. */ diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c index df41836e70f..cc4be5d6ef4 100644 --- a/src/bin/pg_basebackup/pg_createsubscriber.c +++ b/src/bin/pg_basebackup/pg_createsubscriber.c @@ -2305,6 +2305,11 @@ main(int argc, char **argv) pg_log_error_hint("Try \"%s --help\" for more information.", progname); exit(1); } + + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + pg_log_info("validating publisher connection string"); pub_base_conninfo = get_base_conninfo(opt.pub_conninfo_str, &dbname_conninfo); diff --git a/src/bin/pg_combinebackup/pg_combinebackup.c b/src/bin/pg_combinebackup/pg_combinebackup.c index 3a325127209..c9bf0a9e105 100644 --- a/src/bin/pg_combinebackup/pg_combinebackup.c +++ b/src/bin/pg_combinebackup/pg_combinebackup.c @@ -242,6 +242,10 @@ main(int argc, char *argv[]) if (opt.no_manifest) opt.manifest_checksums = CHECKSUM_TYPE_NONE; + if (opt.dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + /* Check that the platform supports the requested copy method. */ if (opt.copy_method == COPY_METHOD_CLONE) { diff --git a/src/bin/pg_resetwal/pg_resetwal.c b/src/bin/pg_resetwal/pg_resetwal.c index a89d72fc5cf..dd5d279521e 100644 --- a/src/bin/pg_resetwal/pg_resetwal.c +++ b/src/bin/pg_resetwal/pg_resetwal.c @@ -397,6 +397,10 @@ main(int argc, char *argv[]) exit(1); } + if (noupdate) + pg_log_info("Executing in dry-run mode.\n" + "Nothing will be modified."); + /* * Attempt to read the existing pg_control file */ diff --git a/src/bin/pg_rewind/pg_rewind.c b/src/bin/pg_rewind/pg_rewind.c index 27c514f934a..e9364d04f76 100644 --- a/src/bin/pg_rewind/pg_rewind.c +++ b/src/bin/pg_rewind/pg_rewind.c @@ -300,10 +300,12 @@ main(int argc, char **argv) atexit(disconnect_atexit); - /* - * Ok, we have all the options and we're ready to start. First, connect to - * remote server. - */ + /* Ok, we have all the options and we're ready to start. */ + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + + /* First, connect to remote server. */ if (connstr_source) { conn = PQconnectdb(connstr_source); -- 2.47.3 --ibfr3ah5qy6tcbhw-- ^ permalink raw reply [nested|flat] 190+ messages in thread
* [PATCH v5] Log a note at program start when running in dry-run mode @ 2025-11-11 08:54 Álvaro Herrera <[email protected]> 0 siblings, 0 replies; 190+ messages in thread From: Álvaro Herrera @ 2025-11-11 08:54 UTC (permalink / raw) Users might get some peace of mind knowing their data is not being destroyed or whatever. Author: Peter Smith <[email protected]> Reviewed-by: Álvaro Herrera <[email protected]> Discussion: https://postgr.es/m/CAHut+PsvQJQnQO0KT0S2oegenkvJ8FUuY-QS5syyqmT24R2xFQ@mail.gmail.com --- src/bin/pg_archivecleanup/pg_archivecleanup.c | 4 ++++ src/bin/pg_basebackup/pg_createsubscriber.c | 5 +++++ src/bin/pg_combinebackup/pg_combinebackup.c | 4 ++++ src/bin/pg_resetwal/pg_resetwal.c | 4 ++++ src/bin/pg_rewind/pg_rewind.c | 10 ++++++---- 5 files changed, 23 insertions(+), 4 deletions(-) diff --git a/src/bin/pg_archivecleanup/pg_archivecleanup.c b/src/bin/pg_archivecleanup/pg_archivecleanup.c index c25348bcb85..ab686b4748c 100644 --- a/src/bin/pg_archivecleanup/pg_archivecleanup.c +++ b/src/bin/pg_archivecleanup/pg_archivecleanup.c @@ -375,6 +375,10 @@ main(int argc, char **argv) exit(2); } + if (dryrun) + pg_log_info("Executing in dry-run mode.\n" + "No files will be removed."); + /* * Check archive exists and other initialization if required. */ diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c index df41836e70f..cc4be5d6ef4 100644 --- a/src/bin/pg_basebackup/pg_createsubscriber.c +++ b/src/bin/pg_basebackup/pg_createsubscriber.c @@ -2305,6 +2305,11 @@ main(int argc, char **argv) pg_log_error_hint("Try \"%s --help\" for more information.", progname); exit(1); } + + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + pg_log_info("validating publisher connection string"); pub_base_conninfo = get_base_conninfo(opt.pub_conninfo_str, &dbname_conninfo); diff --git a/src/bin/pg_combinebackup/pg_combinebackup.c b/src/bin/pg_combinebackup/pg_combinebackup.c index 3a325127209..c9bf0a9e105 100644 --- a/src/bin/pg_combinebackup/pg_combinebackup.c +++ b/src/bin/pg_combinebackup/pg_combinebackup.c @@ -242,6 +242,10 @@ main(int argc, char *argv[]) if (opt.no_manifest) opt.manifest_checksums = CHECKSUM_TYPE_NONE; + if (opt.dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + /* Check that the platform supports the requested copy method. */ if (opt.copy_method == COPY_METHOD_CLONE) { diff --git a/src/bin/pg_resetwal/pg_resetwal.c b/src/bin/pg_resetwal/pg_resetwal.c index a89d72fc5cf..dd5d279521e 100644 --- a/src/bin/pg_resetwal/pg_resetwal.c +++ b/src/bin/pg_resetwal/pg_resetwal.c @@ -397,6 +397,10 @@ main(int argc, char *argv[]) exit(1); } + if (noupdate) + pg_log_info("Executing in dry-run mode.\n" + "Nothing will be modified."); + /* * Attempt to read the existing pg_control file */ diff --git a/src/bin/pg_rewind/pg_rewind.c b/src/bin/pg_rewind/pg_rewind.c index 27c514f934a..e9364d04f76 100644 --- a/src/bin/pg_rewind/pg_rewind.c +++ b/src/bin/pg_rewind/pg_rewind.c @@ -300,10 +300,12 @@ main(int argc, char **argv) atexit(disconnect_atexit); - /* - * Ok, we have all the options and we're ready to start. First, connect to - * remote server. - */ + /* Ok, we have all the options and we're ready to start. */ + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + + /* First, connect to remote server. */ if (connstr_source) { conn = PQconnectdb(connstr_source); -- 2.47.3 --ibfr3ah5qy6tcbhw-- ^ permalink raw reply [nested|flat] 190+ messages in thread
* [PATCH v5] Log a note at program start when running in dry-run mode @ 2025-11-11 08:54 Álvaro Herrera <[email protected]> 0 siblings, 0 replies; 190+ messages in thread From: Álvaro Herrera @ 2025-11-11 08:54 UTC (permalink / raw) Users might get some peace of mind knowing their data is not being destroyed or whatever. Author: Peter Smith <[email protected]> Reviewed-by: Álvaro Herrera <[email protected]> Discussion: https://postgr.es/m/CAHut+PsvQJQnQO0KT0S2oegenkvJ8FUuY-QS5syyqmT24R2xFQ@mail.gmail.com --- src/bin/pg_archivecleanup/pg_archivecleanup.c | 4 ++++ src/bin/pg_basebackup/pg_createsubscriber.c | 5 +++++ src/bin/pg_combinebackup/pg_combinebackup.c | 4 ++++ src/bin/pg_resetwal/pg_resetwal.c | 4 ++++ src/bin/pg_rewind/pg_rewind.c | 10 ++++++---- 5 files changed, 23 insertions(+), 4 deletions(-) diff --git a/src/bin/pg_archivecleanup/pg_archivecleanup.c b/src/bin/pg_archivecleanup/pg_archivecleanup.c index c25348bcb85..ab686b4748c 100644 --- a/src/bin/pg_archivecleanup/pg_archivecleanup.c +++ b/src/bin/pg_archivecleanup/pg_archivecleanup.c @@ -375,6 +375,10 @@ main(int argc, char **argv) exit(2); } + if (dryrun) + pg_log_info("Executing in dry-run mode.\n" + "No files will be removed."); + /* * Check archive exists and other initialization if required. */ diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c index df41836e70f..cc4be5d6ef4 100644 --- a/src/bin/pg_basebackup/pg_createsubscriber.c +++ b/src/bin/pg_basebackup/pg_createsubscriber.c @@ -2305,6 +2305,11 @@ main(int argc, char **argv) pg_log_error_hint("Try \"%s --help\" for more information.", progname); exit(1); } + + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + pg_log_info("validating publisher connection string"); pub_base_conninfo = get_base_conninfo(opt.pub_conninfo_str, &dbname_conninfo); diff --git a/src/bin/pg_combinebackup/pg_combinebackup.c b/src/bin/pg_combinebackup/pg_combinebackup.c index 3a325127209..c9bf0a9e105 100644 --- a/src/bin/pg_combinebackup/pg_combinebackup.c +++ b/src/bin/pg_combinebackup/pg_combinebackup.c @@ -242,6 +242,10 @@ main(int argc, char *argv[]) if (opt.no_manifest) opt.manifest_checksums = CHECKSUM_TYPE_NONE; + if (opt.dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + /* Check that the platform supports the requested copy method. */ if (opt.copy_method == COPY_METHOD_CLONE) { diff --git a/src/bin/pg_resetwal/pg_resetwal.c b/src/bin/pg_resetwal/pg_resetwal.c index a89d72fc5cf..dd5d279521e 100644 --- a/src/bin/pg_resetwal/pg_resetwal.c +++ b/src/bin/pg_resetwal/pg_resetwal.c @@ -397,6 +397,10 @@ main(int argc, char *argv[]) exit(1); } + if (noupdate) + pg_log_info("Executing in dry-run mode.\n" + "Nothing will be modified."); + /* * Attempt to read the existing pg_control file */ diff --git a/src/bin/pg_rewind/pg_rewind.c b/src/bin/pg_rewind/pg_rewind.c index 27c514f934a..e9364d04f76 100644 --- a/src/bin/pg_rewind/pg_rewind.c +++ b/src/bin/pg_rewind/pg_rewind.c @@ -300,10 +300,12 @@ main(int argc, char **argv) atexit(disconnect_atexit); - /* - * Ok, we have all the options and we're ready to start. First, connect to - * remote server. - */ + /* Ok, we have all the options and we're ready to start. */ + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + + /* First, connect to remote server. */ if (connstr_source) { conn = PQconnectdb(connstr_source); -- 2.47.3 --ibfr3ah5qy6tcbhw-- ^ permalink raw reply [nested|flat] 190+ messages in thread
* [PATCH v5] Log a note at program start when running in dry-run mode @ 2025-11-11 08:54 Álvaro Herrera <[email protected]> 0 siblings, 0 replies; 190+ messages in thread From: Álvaro Herrera @ 2025-11-11 08:54 UTC (permalink / raw) Users might get some peace of mind knowing their data is not being destroyed or whatever. Author: Peter Smith <[email protected]> Reviewed-by: Álvaro Herrera <[email protected]> Discussion: https://postgr.es/m/CAHut+PsvQJQnQO0KT0S2oegenkvJ8FUuY-QS5syyqmT24R2xFQ@mail.gmail.com --- src/bin/pg_archivecleanup/pg_archivecleanup.c | 4 ++++ src/bin/pg_basebackup/pg_createsubscriber.c | 5 +++++ src/bin/pg_combinebackup/pg_combinebackup.c | 4 ++++ src/bin/pg_resetwal/pg_resetwal.c | 4 ++++ src/bin/pg_rewind/pg_rewind.c | 10 ++++++---- 5 files changed, 23 insertions(+), 4 deletions(-) diff --git a/src/bin/pg_archivecleanup/pg_archivecleanup.c b/src/bin/pg_archivecleanup/pg_archivecleanup.c index c25348bcb85..ab686b4748c 100644 --- a/src/bin/pg_archivecleanup/pg_archivecleanup.c +++ b/src/bin/pg_archivecleanup/pg_archivecleanup.c @@ -375,6 +375,10 @@ main(int argc, char **argv) exit(2); } + if (dryrun) + pg_log_info("Executing in dry-run mode.\n" + "No files will be removed."); + /* * Check archive exists and other initialization if required. */ diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c index df41836e70f..cc4be5d6ef4 100644 --- a/src/bin/pg_basebackup/pg_createsubscriber.c +++ b/src/bin/pg_basebackup/pg_createsubscriber.c @@ -2305,6 +2305,11 @@ main(int argc, char **argv) pg_log_error_hint("Try \"%s --help\" for more information.", progname); exit(1); } + + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + pg_log_info("validating publisher connection string"); pub_base_conninfo = get_base_conninfo(opt.pub_conninfo_str, &dbname_conninfo); diff --git a/src/bin/pg_combinebackup/pg_combinebackup.c b/src/bin/pg_combinebackup/pg_combinebackup.c index 3a325127209..c9bf0a9e105 100644 --- a/src/bin/pg_combinebackup/pg_combinebackup.c +++ b/src/bin/pg_combinebackup/pg_combinebackup.c @@ -242,6 +242,10 @@ main(int argc, char *argv[]) if (opt.no_manifest) opt.manifest_checksums = CHECKSUM_TYPE_NONE; + if (opt.dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + /* Check that the platform supports the requested copy method. */ if (opt.copy_method == COPY_METHOD_CLONE) { diff --git a/src/bin/pg_resetwal/pg_resetwal.c b/src/bin/pg_resetwal/pg_resetwal.c index a89d72fc5cf..dd5d279521e 100644 --- a/src/bin/pg_resetwal/pg_resetwal.c +++ b/src/bin/pg_resetwal/pg_resetwal.c @@ -397,6 +397,10 @@ main(int argc, char *argv[]) exit(1); } + if (noupdate) + pg_log_info("Executing in dry-run mode.\n" + "Nothing will be modified."); + /* * Attempt to read the existing pg_control file */ diff --git a/src/bin/pg_rewind/pg_rewind.c b/src/bin/pg_rewind/pg_rewind.c index 27c514f934a..e9364d04f76 100644 --- a/src/bin/pg_rewind/pg_rewind.c +++ b/src/bin/pg_rewind/pg_rewind.c @@ -300,10 +300,12 @@ main(int argc, char **argv) atexit(disconnect_atexit); - /* - * Ok, we have all the options and we're ready to start. First, connect to - * remote server. - */ + /* Ok, we have all the options and we're ready to start. */ + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + + /* First, connect to remote server. */ if (connstr_source) { conn = PQconnectdb(connstr_source); -- 2.47.3 --ibfr3ah5qy6tcbhw-- ^ permalink raw reply [nested|flat] 190+ messages in thread
* [PATCH v5] Log a note at program start when running in dry-run mode @ 2025-11-11 08:54 Álvaro Herrera <[email protected]> 0 siblings, 0 replies; 190+ messages in thread From: Álvaro Herrera @ 2025-11-11 08:54 UTC (permalink / raw) Users might get some peace of mind knowing their data is not being destroyed or whatever. Author: Peter Smith <[email protected]> Reviewed-by: Álvaro Herrera <[email protected]> Discussion: https://postgr.es/m/CAHut+PsvQJQnQO0KT0S2oegenkvJ8FUuY-QS5syyqmT24R2xFQ@mail.gmail.com --- src/bin/pg_archivecleanup/pg_archivecleanup.c | 4 ++++ src/bin/pg_basebackup/pg_createsubscriber.c | 5 +++++ src/bin/pg_combinebackup/pg_combinebackup.c | 4 ++++ src/bin/pg_resetwal/pg_resetwal.c | 4 ++++ src/bin/pg_rewind/pg_rewind.c | 10 ++++++---- 5 files changed, 23 insertions(+), 4 deletions(-) diff --git a/src/bin/pg_archivecleanup/pg_archivecleanup.c b/src/bin/pg_archivecleanup/pg_archivecleanup.c index c25348bcb85..ab686b4748c 100644 --- a/src/bin/pg_archivecleanup/pg_archivecleanup.c +++ b/src/bin/pg_archivecleanup/pg_archivecleanup.c @@ -375,6 +375,10 @@ main(int argc, char **argv) exit(2); } + if (dryrun) + pg_log_info("Executing in dry-run mode.\n" + "No files will be removed."); + /* * Check archive exists and other initialization if required. */ diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c index df41836e70f..cc4be5d6ef4 100644 --- a/src/bin/pg_basebackup/pg_createsubscriber.c +++ b/src/bin/pg_basebackup/pg_createsubscriber.c @@ -2305,6 +2305,11 @@ main(int argc, char **argv) pg_log_error_hint("Try \"%s --help\" for more information.", progname); exit(1); } + + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + pg_log_info("validating publisher connection string"); pub_base_conninfo = get_base_conninfo(opt.pub_conninfo_str, &dbname_conninfo); diff --git a/src/bin/pg_combinebackup/pg_combinebackup.c b/src/bin/pg_combinebackup/pg_combinebackup.c index 3a325127209..c9bf0a9e105 100644 --- a/src/bin/pg_combinebackup/pg_combinebackup.c +++ b/src/bin/pg_combinebackup/pg_combinebackup.c @@ -242,6 +242,10 @@ main(int argc, char *argv[]) if (opt.no_manifest) opt.manifest_checksums = CHECKSUM_TYPE_NONE; + if (opt.dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + /* Check that the platform supports the requested copy method. */ if (opt.copy_method == COPY_METHOD_CLONE) { diff --git a/src/bin/pg_resetwal/pg_resetwal.c b/src/bin/pg_resetwal/pg_resetwal.c index a89d72fc5cf..dd5d279521e 100644 --- a/src/bin/pg_resetwal/pg_resetwal.c +++ b/src/bin/pg_resetwal/pg_resetwal.c @@ -397,6 +397,10 @@ main(int argc, char *argv[]) exit(1); } + if (noupdate) + pg_log_info("Executing in dry-run mode.\n" + "Nothing will be modified."); + /* * Attempt to read the existing pg_control file */ diff --git a/src/bin/pg_rewind/pg_rewind.c b/src/bin/pg_rewind/pg_rewind.c index 27c514f934a..e9364d04f76 100644 --- a/src/bin/pg_rewind/pg_rewind.c +++ b/src/bin/pg_rewind/pg_rewind.c @@ -300,10 +300,12 @@ main(int argc, char **argv) atexit(disconnect_atexit); - /* - * Ok, we have all the options and we're ready to start. First, connect to - * remote server. - */ + /* Ok, we have all the options and we're ready to start. */ + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + + /* First, connect to remote server. */ if (connstr_source) { conn = PQconnectdb(connstr_source); -- 2.47.3 --ibfr3ah5qy6tcbhw-- ^ permalink raw reply [nested|flat] 190+ messages in thread
* [PATCH v5] Log a note at program start when running in dry-run mode @ 2025-11-11 08:54 Álvaro Herrera <[email protected]> 0 siblings, 0 replies; 190+ messages in thread From: Álvaro Herrera @ 2025-11-11 08:54 UTC (permalink / raw) Users might get some peace of mind knowing their data is not being destroyed or whatever. Author: Peter Smith <[email protected]> Reviewed-by: Álvaro Herrera <[email protected]> Discussion: https://postgr.es/m/CAHut+PsvQJQnQO0KT0S2oegenkvJ8FUuY-QS5syyqmT24R2xFQ@mail.gmail.com --- src/bin/pg_archivecleanup/pg_archivecleanup.c | 4 ++++ src/bin/pg_basebackup/pg_createsubscriber.c | 5 +++++ src/bin/pg_combinebackup/pg_combinebackup.c | 4 ++++ src/bin/pg_resetwal/pg_resetwal.c | 4 ++++ src/bin/pg_rewind/pg_rewind.c | 10 ++++++---- 5 files changed, 23 insertions(+), 4 deletions(-) diff --git a/src/bin/pg_archivecleanup/pg_archivecleanup.c b/src/bin/pg_archivecleanup/pg_archivecleanup.c index c25348bcb85..ab686b4748c 100644 --- a/src/bin/pg_archivecleanup/pg_archivecleanup.c +++ b/src/bin/pg_archivecleanup/pg_archivecleanup.c @@ -375,6 +375,10 @@ main(int argc, char **argv) exit(2); } + if (dryrun) + pg_log_info("Executing in dry-run mode.\n" + "No files will be removed."); + /* * Check archive exists and other initialization if required. */ diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c index df41836e70f..cc4be5d6ef4 100644 --- a/src/bin/pg_basebackup/pg_createsubscriber.c +++ b/src/bin/pg_basebackup/pg_createsubscriber.c @@ -2305,6 +2305,11 @@ main(int argc, char **argv) pg_log_error_hint("Try \"%s --help\" for more information.", progname); exit(1); } + + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + pg_log_info("validating publisher connection string"); pub_base_conninfo = get_base_conninfo(opt.pub_conninfo_str, &dbname_conninfo); diff --git a/src/bin/pg_combinebackup/pg_combinebackup.c b/src/bin/pg_combinebackup/pg_combinebackup.c index 3a325127209..c9bf0a9e105 100644 --- a/src/bin/pg_combinebackup/pg_combinebackup.c +++ b/src/bin/pg_combinebackup/pg_combinebackup.c @@ -242,6 +242,10 @@ main(int argc, char *argv[]) if (opt.no_manifest) opt.manifest_checksums = CHECKSUM_TYPE_NONE; + if (opt.dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + /* Check that the platform supports the requested copy method. */ if (opt.copy_method == COPY_METHOD_CLONE) { diff --git a/src/bin/pg_resetwal/pg_resetwal.c b/src/bin/pg_resetwal/pg_resetwal.c index a89d72fc5cf..dd5d279521e 100644 --- a/src/bin/pg_resetwal/pg_resetwal.c +++ b/src/bin/pg_resetwal/pg_resetwal.c @@ -397,6 +397,10 @@ main(int argc, char *argv[]) exit(1); } + if (noupdate) + pg_log_info("Executing in dry-run mode.\n" + "Nothing will be modified."); + /* * Attempt to read the existing pg_control file */ diff --git a/src/bin/pg_rewind/pg_rewind.c b/src/bin/pg_rewind/pg_rewind.c index 27c514f934a..e9364d04f76 100644 --- a/src/bin/pg_rewind/pg_rewind.c +++ b/src/bin/pg_rewind/pg_rewind.c @@ -300,10 +300,12 @@ main(int argc, char **argv) atexit(disconnect_atexit); - /* - * Ok, we have all the options and we're ready to start. First, connect to - * remote server. - */ + /* Ok, we have all the options and we're ready to start. */ + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + + /* First, connect to remote server. */ if (connstr_source) { conn = PQconnectdb(connstr_source); -- 2.47.3 --ibfr3ah5qy6tcbhw-- ^ permalink raw reply [nested|flat] 190+ messages in thread
* [PATCH v5] Log a note at program start when running in dry-run mode @ 2025-11-11 08:54 Álvaro Herrera <[email protected]> 0 siblings, 0 replies; 190+ messages in thread From: Álvaro Herrera @ 2025-11-11 08:54 UTC (permalink / raw) Users might get some peace of mind knowing their data is not being destroyed or whatever. Author: Peter Smith <[email protected]> Reviewed-by: Álvaro Herrera <[email protected]> Discussion: https://postgr.es/m/CAHut+PsvQJQnQO0KT0S2oegenkvJ8FUuY-QS5syyqmT24R2xFQ@mail.gmail.com --- src/bin/pg_archivecleanup/pg_archivecleanup.c | 4 ++++ src/bin/pg_basebackup/pg_createsubscriber.c | 5 +++++ src/bin/pg_combinebackup/pg_combinebackup.c | 4 ++++ src/bin/pg_resetwal/pg_resetwal.c | 4 ++++ src/bin/pg_rewind/pg_rewind.c | 10 ++++++---- 5 files changed, 23 insertions(+), 4 deletions(-) diff --git a/src/bin/pg_archivecleanup/pg_archivecleanup.c b/src/bin/pg_archivecleanup/pg_archivecleanup.c index c25348bcb85..ab686b4748c 100644 --- a/src/bin/pg_archivecleanup/pg_archivecleanup.c +++ b/src/bin/pg_archivecleanup/pg_archivecleanup.c @@ -375,6 +375,10 @@ main(int argc, char **argv) exit(2); } + if (dryrun) + pg_log_info("Executing in dry-run mode.\n" + "No files will be removed."); + /* * Check archive exists and other initialization if required. */ diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c index df41836e70f..cc4be5d6ef4 100644 --- a/src/bin/pg_basebackup/pg_createsubscriber.c +++ b/src/bin/pg_basebackup/pg_createsubscriber.c @@ -2305,6 +2305,11 @@ main(int argc, char **argv) pg_log_error_hint("Try \"%s --help\" for more information.", progname); exit(1); } + + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + pg_log_info("validating publisher connection string"); pub_base_conninfo = get_base_conninfo(opt.pub_conninfo_str, &dbname_conninfo); diff --git a/src/bin/pg_combinebackup/pg_combinebackup.c b/src/bin/pg_combinebackup/pg_combinebackup.c index 3a325127209..c9bf0a9e105 100644 --- a/src/bin/pg_combinebackup/pg_combinebackup.c +++ b/src/bin/pg_combinebackup/pg_combinebackup.c @@ -242,6 +242,10 @@ main(int argc, char *argv[]) if (opt.no_manifest) opt.manifest_checksums = CHECKSUM_TYPE_NONE; + if (opt.dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + /* Check that the platform supports the requested copy method. */ if (opt.copy_method == COPY_METHOD_CLONE) { diff --git a/src/bin/pg_resetwal/pg_resetwal.c b/src/bin/pg_resetwal/pg_resetwal.c index a89d72fc5cf..dd5d279521e 100644 --- a/src/bin/pg_resetwal/pg_resetwal.c +++ b/src/bin/pg_resetwal/pg_resetwal.c @@ -397,6 +397,10 @@ main(int argc, char *argv[]) exit(1); } + if (noupdate) + pg_log_info("Executing in dry-run mode.\n" + "Nothing will be modified."); + /* * Attempt to read the existing pg_control file */ diff --git a/src/bin/pg_rewind/pg_rewind.c b/src/bin/pg_rewind/pg_rewind.c index 27c514f934a..e9364d04f76 100644 --- a/src/bin/pg_rewind/pg_rewind.c +++ b/src/bin/pg_rewind/pg_rewind.c @@ -300,10 +300,12 @@ main(int argc, char **argv) atexit(disconnect_atexit); - /* - * Ok, we have all the options and we're ready to start. First, connect to - * remote server. - */ + /* Ok, we have all the options and we're ready to start. */ + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + + /* First, connect to remote server. */ if (connstr_source) { conn = PQconnectdb(connstr_source); -- 2.47.3 --ibfr3ah5qy6tcbhw-- ^ permalink raw reply [nested|flat] 190+ messages in thread
* [PATCH v5] Log a note at program start when running in dry-run mode @ 2025-11-11 08:54 Álvaro Herrera <[email protected]> 0 siblings, 0 replies; 190+ messages in thread From: Álvaro Herrera @ 2025-11-11 08:54 UTC (permalink / raw) Users might get some peace of mind knowing their data is not being destroyed or whatever. Author: Peter Smith <[email protected]> Reviewed-by: Álvaro Herrera <[email protected]> Discussion: https://postgr.es/m/CAHut+PsvQJQnQO0KT0S2oegenkvJ8FUuY-QS5syyqmT24R2xFQ@mail.gmail.com --- src/bin/pg_archivecleanup/pg_archivecleanup.c | 4 ++++ src/bin/pg_basebackup/pg_createsubscriber.c | 5 +++++ src/bin/pg_combinebackup/pg_combinebackup.c | 4 ++++ src/bin/pg_resetwal/pg_resetwal.c | 4 ++++ src/bin/pg_rewind/pg_rewind.c | 10 ++++++---- 5 files changed, 23 insertions(+), 4 deletions(-) diff --git a/src/bin/pg_archivecleanup/pg_archivecleanup.c b/src/bin/pg_archivecleanup/pg_archivecleanup.c index c25348bcb85..ab686b4748c 100644 --- a/src/bin/pg_archivecleanup/pg_archivecleanup.c +++ b/src/bin/pg_archivecleanup/pg_archivecleanup.c @@ -375,6 +375,10 @@ main(int argc, char **argv) exit(2); } + if (dryrun) + pg_log_info("Executing in dry-run mode.\n" + "No files will be removed."); + /* * Check archive exists and other initialization if required. */ diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c index df41836e70f..cc4be5d6ef4 100644 --- a/src/bin/pg_basebackup/pg_createsubscriber.c +++ b/src/bin/pg_basebackup/pg_createsubscriber.c @@ -2305,6 +2305,11 @@ main(int argc, char **argv) pg_log_error_hint("Try \"%s --help\" for more information.", progname); exit(1); } + + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + pg_log_info("validating publisher connection string"); pub_base_conninfo = get_base_conninfo(opt.pub_conninfo_str, &dbname_conninfo); diff --git a/src/bin/pg_combinebackup/pg_combinebackup.c b/src/bin/pg_combinebackup/pg_combinebackup.c index 3a325127209..c9bf0a9e105 100644 --- a/src/bin/pg_combinebackup/pg_combinebackup.c +++ b/src/bin/pg_combinebackup/pg_combinebackup.c @@ -242,6 +242,10 @@ main(int argc, char *argv[]) if (opt.no_manifest) opt.manifest_checksums = CHECKSUM_TYPE_NONE; + if (opt.dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + /* Check that the platform supports the requested copy method. */ if (opt.copy_method == COPY_METHOD_CLONE) { diff --git a/src/bin/pg_resetwal/pg_resetwal.c b/src/bin/pg_resetwal/pg_resetwal.c index a89d72fc5cf..dd5d279521e 100644 --- a/src/bin/pg_resetwal/pg_resetwal.c +++ b/src/bin/pg_resetwal/pg_resetwal.c @@ -397,6 +397,10 @@ main(int argc, char *argv[]) exit(1); } + if (noupdate) + pg_log_info("Executing in dry-run mode.\n" + "Nothing will be modified."); + /* * Attempt to read the existing pg_control file */ diff --git a/src/bin/pg_rewind/pg_rewind.c b/src/bin/pg_rewind/pg_rewind.c index 27c514f934a..e9364d04f76 100644 --- a/src/bin/pg_rewind/pg_rewind.c +++ b/src/bin/pg_rewind/pg_rewind.c @@ -300,10 +300,12 @@ main(int argc, char **argv) atexit(disconnect_atexit); - /* - * Ok, we have all the options and we're ready to start. First, connect to - * remote server. - */ + /* Ok, we have all the options and we're ready to start. */ + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + + /* First, connect to remote server. */ if (connstr_source) { conn = PQconnectdb(connstr_source); -- 2.47.3 --ibfr3ah5qy6tcbhw-- ^ permalink raw reply [nested|flat] 190+ messages in thread
* [PATCH v5] Log a note at program start when running in dry-run mode @ 2025-11-11 08:54 Álvaro Herrera <[email protected]> 0 siblings, 0 replies; 190+ messages in thread From: Álvaro Herrera @ 2025-11-11 08:54 UTC (permalink / raw) Users might get some peace of mind knowing their data is not being destroyed or whatever. Author: Peter Smith <[email protected]> Reviewed-by: Álvaro Herrera <[email protected]> Discussion: https://postgr.es/m/CAHut+PsvQJQnQO0KT0S2oegenkvJ8FUuY-QS5syyqmT24R2xFQ@mail.gmail.com --- src/bin/pg_archivecleanup/pg_archivecleanup.c | 4 ++++ src/bin/pg_basebackup/pg_createsubscriber.c | 5 +++++ src/bin/pg_combinebackup/pg_combinebackup.c | 4 ++++ src/bin/pg_resetwal/pg_resetwal.c | 4 ++++ src/bin/pg_rewind/pg_rewind.c | 10 ++++++---- 5 files changed, 23 insertions(+), 4 deletions(-) diff --git a/src/bin/pg_archivecleanup/pg_archivecleanup.c b/src/bin/pg_archivecleanup/pg_archivecleanup.c index c25348bcb85..ab686b4748c 100644 --- a/src/bin/pg_archivecleanup/pg_archivecleanup.c +++ b/src/bin/pg_archivecleanup/pg_archivecleanup.c @@ -375,6 +375,10 @@ main(int argc, char **argv) exit(2); } + if (dryrun) + pg_log_info("Executing in dry-run mode.\n" + "No files will be removed."); + /* * Check archive exists and other initialization if required. */ diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c index df41836e70f..cc4be5d6ef4 100644 --- a/src/bin/pg_basebackup/pg_createsubscriber.c +++ b/src/bin/pg_basebackup/pg_createsubscriber.c @@ -2305,6 +2305,11 @@ main(int argc, char **argv) pg_log_error_hint("Try \"%s --help\" for more information.", progname); exit(1); } + + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + pg_log_info("validating publisher connection string"); pub_base_conninfo = get_base_conninfo(opt.pub_conninfo_str, &dbname_conninfo); diff --git a/src/bin/pg_combinebackup/pg_combinebackup.c b/src/bin/pg_combinebackup/pg_combinebackup.c index 3a325127209..c9bf0a9e105 100644 --- a/src/bin/pg_combinebackup/pg_combinebackup.c +++ b/src/bin/pg_combinebackup/pg_combinebackup.c @@ -242,6 +242,10 @@ main(int argc, char *argv[]) if (opt.no_manifest) opt.manifest_checksums = CHECKSUM_TYPE_NONE; + if (opt.dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + /* Check that the platform supports the requested copy method. */ if (opt.copy_method == COPY_METHOD_CLONE) { diff --git a/src/bin/pg_resetwal/pg_resetwal.c b/src/bin/pg_resetwal/pg_resetwal.c index a89d72fc5cf..dd5d279521e 100644 --- a/src/bin/pg_resetwal/pg_resetwal.c +++ b/src/bin/pg_resetwal/pg_resetwal.c @@ -397,6 +397,10 @@ main(int argc, char *argv[]) exit(1); } + if (noupdate) + pg_log_info("Executing in dry-run mode.\n" + "Nothing will be modified."); + /* * Attempt to read the existing pg_control file */ diff --git a/src/bin/pg_rewind/pg_rewind.c b/src/bin/pg_rewind/pg_rewind.c index 27c514f934a..e9364d04f76 100644 --- a/src/bin/pg_rewind/pg_rewind.c +++ b/src/bin/pg_rewind/pg_rewind.c @@ -300,10 +300,12 @@ main(int argc, char **argv) atexit(disconnect_atexit); - /* - * Ok, we have all the options and we're ready to start. First, connect to - * remote server. - */ + /* Ok, we have all the options and we're ready to start. */ + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + + /* First, connect to remote server. */ if (connstr_source) { conn = PQconnectdb(connstr_source); -- 2.47.3 --ibfr3ah5qy6tcbhw-- ^ permalink raw reply [nested|flat] 190+ messages in thread
* [PATCH v5] Log a note at program start when running in dry-run mode @ 2025-11-11 08:54 Álvaro Herrera <[email protected]> 0 siblings, 0 replies; 190+ messages in thread From: Álvaro Herrera @ 2025-11-11 08:54 UTC (permalink / raw) Users might get some peace of mind knowing their data is not being destroyed or whatever. Author: Peter Smith <[email protected]> Reviewed-by: Álvaro Herrera <[email protected]> Discussion: https://postgr.es/m/CAHut+PsvQJQnQO0KT0S2oegenkvJ8FUuY-QS5syyqmT24R2xFQ@mail.gmail.com --- src/bin/pg_archivecleanup/pg_archivecleanup.c | 4 ++++ src/bin/pg_basebackup/pg_createsubscriber.c | 5 +++++ src/bin/pg_combinebackup/pg_combinebackup.c | 4 ++++ src/bin/pg_resetwal/pg_resetwal.c | 4 ++++ src/bin/pg_rewind/pg_rewind.c | 10 ++++++---- 5 files changed, 23 insertions(+), 4 deletions(-) diff --git a/src/bin/pg_archivecleanup/pg_archivecleanup.c b/src/bin/pg_archivecleanup/pg_archivecleanup.c index c25348bcb85..ab686b4748c 100644 --- a/src/bin/pg_archivecleanup/pg_archivecleanup.c +++ b/src/bin/pg_archivecleanup/pg_archivecleanup.c @@ -375,6 +375,10 @@ main(int argc, char **argv) exit(2); } + if (dryrun) + pg_log_info("Executing in dry-run mode.\n" + "No files will be removed."); + /* * Check archive exists and other initialization if required. */ diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c index df41836e70f..cc4be5d6ef4 100644 --- a/src/bin/pg_basebackup/pg_createsubscriber.c +++ b/src/bin/pg_basebackup/pg_createsubscriber.c @@ -2305,6 +2305,11 @@ main(int argc, char **argv) pg_log_error_hint("Try \"%s --help\" for more information.", progname); exit(1); } + + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + pg_log_info("validating publisher connection string"); pub_base_conninfo = get_base_conninfo(opt.pub_conninfo_str, &dbname_conninfo); diff --git a/src/bin/pg_combinebackup/pg_combinebackup.c b/src/bin/pg_combinebackup/pg_combinebackup.c index 3a325127209..c9bf0a9e105 100644 --- a/src/bin/pg_combinebackup/pg_combinebackup.c +++ b/src/bin/pg_combinebackup/pg_combinebackup.c @@ -242,6 +242,10 @@ main(int argc, char *argv[]) if (opt.no_manifest) opt.manifest_checksums = CHECKSUM_TYPE_NONE; + if (opt.dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + /* Check that the platform supports the requested copy method. */ if (opt.copy_method == COPY_METHOD_CLONE) { diff --git a/src/bin/pg_resetwal/pg_resetwal.c b/src/bin/pg_resetwal/pg_resetwal.c index a89d72fc5cf..dd5d279521e 100644 --- a/src/bin/pg_resetwal/pg_resetwal.c +++ b/src/bin/pg_resetwal/pg_resetwal.c @@ -397,6 +397,10 @@ main(int argc, char *argv[]) exit(1); } + if (noupdate) + pg_log_info("Executing in dry-run mode.\n" + "Nothing will be modified."); + /* * Attempt to read the existing pg_control file */ diff --git a/src/bin/pg_rewind/pg_rewind.c b/src/bin/pg_rewind/pg_rewind.c index 27c514f934a..e9364d04f76 100644 --- a/src/bin/pg_rewind/pg_rewind.c +++ b/src/bin/pg_rewind/pg_rewind.c @@ -300,10 +300,12 @@ main(int argc, char **argv) atexit(disconnect_atexit); - /* - * Ok, we have all the options and we're ready to start. First, connect to - * remote server. - */ + /* Ok, we have all the options and we're ready to start. */ + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + + /* First, connect to remote server. */ if (connstr_source) { conn = PQconnectdb(connstr_source); -- 2.47.3 --ibfr3ah5qy6tcbhw-- ^ permalink raw reply [nested|flat] 190+ messages in thread
* [PATCH v5] Log a note at program start when running in dry-run mode @ 2025-11-11 08:54 Álvaro Herrera <[email protected]> 0 siblings, 0 replies; 190+ messages in thread From: Álvaro Herrera @ 2025-11-11 08:54 UTC (permalink / raw) Users might get some peace of mind knowing their data is not being destroyed or whatever. Author: Peter Smith <[email protected]> Reviewed-by: Álvaro Herrera <[email protected]> Discussion: https://postgr.es/m/CAHut+PsvQJQnQO0KT0S2oegenkvJ8FUuY-QS5syyqmT24R2xFQ@mail.gmail.com --- src/bin/pg_archivecleanup/pg_archivecleanup.c | 4 ++++ src/bin/pg_basebackup/pg_createsubscriber.c | 5 +++++ src/bin/pg_combinebackup/pg_combinebackup.c | 4 ++++ src/bin/pg_resetwal/pg_resetwal.c | 4 ++++ src/bin/pg_rewind/pg_rewind.c | 10 ++++++---- 5 files changed, 23 insertions(+), 4 deletions(-) diff --git a/src/bin/pg_archivecleanup/pg_archivecleanup.c b/src/bin/pg_archivecleanup/pg_archivecleanup.c index c25348bcb85..ab686b4748c 100644 --- a/src/bin/pg_archivecleanup/pg_archivecleanup.c +++ b/src/bin/pg_archivecleanup/pg_archivecleanup.c @@ -375,6 +375,10 @@ main(int argc, char **argv) exit(2); } + if (dryrun) + pg_log_info("Executing in dry-run mode.\n" + "No files will be removed."); + /* * Check archive exists and other initialization if required. */ diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c index df41836e70f..cc4be5d6ef4 100644 --- a/src/bin/pg_basebackup/pg_createsubscriber.c +++ b/src/bin/pg_basebackup/pg_createsubscriber.c @@ -2305,6 +2305,11 @@ main(int argc, char **argv) pg_log_error_hint("Try \"%s --help\" for more information.", progname); exit(1); } + + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + pg_log_info("validating publisher connection string"); pub_base_conninfo = get_base_conninfo(opt.pub_conninfo_str, &dbname_conninfo); diff --git a/src/bin/pg_combinebackup/pg_combinebackup.c b/src/bin/pg_combinebackup/pg_combinebackup.c index 3a325127209..c9bf0a9e105 100644 --- a/src/bin/pg_combinebackup/pg_combinebackup.c +++ b/src/bin/pg_combinebackup/pg_combinebackup.c @@ -242,6 +242,10 @@ main(int argc, char *argv[]) if (opt.no_manifest) opt.manifest_checksums = CHECKSUM_TYPE_NONE; + if (opt.dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + /* Check that the platform supports the requested copy method. */ if (opt.copy_method == COPY_METHOD_CLONE) { diff --git a/src/bin/pg_resetwal/pg_resetwal.c b/src/bin/pg_resetwal/pg_resetwal.c index a89d72fc5cf..dd5d279521e 100644 --- a/src/bin/pg_resetwal/pg_resetwal.c +++ b/src/bin/pg_resetwal/pg_resetwal.c @@ -397,6 +397,10 @@ main(int argc, char *argv[]) exit(1); } + if (noupdate) + pg_log_info("Executing in dry-run mode.\n" + "Nothing will be modified."); + /* * Attempt to read the existing pg_control file */ diff --git a/src/bin/pg_rewind/pg_rewind.c b/src/bin/pg_rewind/pg_rewind.c index 27c514f934a..e9364d04f76 100644 --- a/src/bin/pg_rewind/pg_rewind.c +++ b/src/bin/pg_rewind/pg_rewind.c @@ -300,10 +300,12 @@ main(int argc, char **argv) atexit(disconnect_atexit); - /* - * Ok, we have all the options and we're ready to start. First, connect to - * remote server. - */ + /* Ok, we have all the options and we're ready to start. */ + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + + /* First, connect to remote server. */ if (connstr_source) { conn = PQconnectdb(connstr_source); -- 2.47.3 --ibfr3ah5qy6tcbhw-- ^ permalink raw reply [nested|flat] 190+ messages in thread
* [PATCH v5] Log a note at program start when running in dry-run mode @ 2025-11-11 08:54 Álvaro Herrera <[email protected]> 0 siblings, 0 replies; 190+ messages in thread From: Álvaro Herrera @ 2025-11-11 08:54 UTC (permalink / raw) Users might get some peace of mind knowing their data is not being destroyed or whatever. Author: Peter Smith <[email protected]> Reviewed-by: Álvaro Herrera <[email protected]> Discussion: https://postgr.es/m/CAHut+PsvQJQnQO0KT0S2oegenkvJ8FUuY-QS5syyqmT24R2xFQ@mail.gmail.com --- src/bin/pg_archivecleanup/pg_archivecleanup.c | 4 ++++ src/bin/pg_basebackup/pg_createsubscriber.c | 5 +++++ src/bin/pg_combinebackup/pg_combinebackup.c | 4 ++++ src/bin/pg_resetwal/pg_resetwal.c | 4 ++++ src/bin/pg_rewind/pg_rewind.c | 10 ++++++---- 5 files changed, 23 insertions(+), 4 deletions(-) diff --git a/src/bin/pg_archivecleanup/pg_archivecleanup.c b/src/bin/pg_archivecleanup/pg_archivecleanup.c index c25348bcb85..ab686b4748c 100644 --- a/src/bin/pg_archivecleanup/pg_archivecleanup.c +++ b/src/bin/pg_archivecleanup/pg_archivecleanup.c @@ -375,6 +375,10 @@ main(int argc, char **argv) exit(2); } + if (dryrun) + pg_log_info("Executing in dry-run mode.\n" + "No files will be removed."); + /* * Check archive exists and other initialization if required. */ diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c index df41836e70f..cc4be5d6ef4 100644 --- a/src/bin/pg_basebackup/pg_createsubscriber.c +++ b/src/bin/pg_basebackup/pg_createsubscriber.c @@ -2305,6 +2305,11 @@ main(int argc, char **argv) pg_log_error_hint("Try \"%s --help\" for more information.", progname); exit(1); } + + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + pg_log_info("validating publisher connection string"); pub_base_conninfo = get_base_conninfo(opt.pub_conninfo_str, &dbname_conninfo); diff --git a/src/bin/pg_combinebackup/pg_combinebackup.c b/src/bin/pg_combinebackup/pg_combinebackup.c index 3a325127209..c9bf0a9e105 100644 --- a/src/bin/pg_combinebackup/pg_combinebackup.c +++ b/src/bin/pg_combinebackup/pg_combinebackup.c @@ -242,6 +242,10 @@ main(int argc, char *argv[]) if (opt.no_manifest) opt.manifest_checksums = CHECKSUM_TYPE_NONE; + if (opt.dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + /* Check that the platform supports the requested copy method. */ if (opt.copy_method == COPY_METHOD_CLONE) { diff --git a/src/bin/pg_resetwal/pg_resetwal.c b/src/bin/pg_resetwal/pg_resetwal.c index a89d72fc5cf..dd5d279521e 100644 --- a/src/bin/pg_resetwal/pg_resetwal.c +++ b/src/bin/pg_resetwal/pg_resetwal.c @@ -397,6 +397,10 @@ main(int argc, char *argv[]) exit(1); } + if (noupdate) + pg_log_info("Executing in dry-run mode.\n" + "Nothing will be modified."); + /* * Attempt to read the existing pg_control file */ diff --git a/src/bin/pg_rewind/pg_rewind.c b/src/bin/pg_rewind/pg_rewind.c index 27c514f934a..e9364d04f76 100644 --- a/src/bin/pg_rewind/pg_rewind.c +++ b/src/bin/pg_rewind/pg_rewind.c @@ -300,10 +300,12 @@ main(int argc, char **argv) atexit(disconnect_atexit); - /* - * Ok, we have all the options and we're ready to start. First, connect to - * remote server. - */ + /* Ok, we have all the options and we're ready to start. */ + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + + /* First, connect to remote server. */ if (connstr_source) { conn = PQconnectdb(connstr_source); -- 2.47.3 --ibfr3ah5qy6tcbhw-- ^ permalink raw reply [nested|flat] 190+ messages in thread
* [PATCH v5] Log a note at program start when running in dry-run mode @ 2025-11-11 08:54 Álvaro Herrera <[email protected]> 0 siblings, 0 replies; 190+ messages in thread From: Álvaro Herrera @ 2025-11-11 08:54 UTC (permalink / raw) Users might get some peace of mind knowing their data is not being destroyed or whatever. Author: Peter Smith <[email protected]> Reviewed-by: Álvaro Herrera <[email protected]> Discussion: https://postgr.es/m/CAHut+PsvQJQnQO0KT0S2oegenkvJ8FUuY-QS5syyqmT24R2xFQ@mail.gmail.com --- src/bin/pg_archivecleanup/pg_archivecleanup.c | 4 ++++ src/bin/pg_basebackup/pg_createsubscriber.c | 5 +++++ src/bin/pg_combinebackup/pg_combinebackup.c | 4 ++++ src/bin/pg_resetwal/pg_resetwal.c | 4 ++++ src/bin/pg_rewind/pg_rewind.c | 10 ++++++---- 5 files changed, 23 insertions(+), 4 deletions(-) diff --git a/src/bin/pg_archivecleanup/pg_archivecleanup.c b/src/bin/pg_archivecleanup/pg_archivecleanup.c index c25348bcb85..ab686b4748c 100644 --- a/src/bin/pg_archivecleanup/pg_archivecleanup.c +++ b/src/bin/pg_archivecleanup/pg_archivecleanup.c @@ -375,6 +375,10 @@ main(int argc, char **argv) exit(2); } + if (dryrun) + pg_log_info("Executing in dry-run mode.\n" + "No files will be removed."); + /* * Check archive exists and other initialization if required. */ diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c index df41836e70f..cc4be5d6ef4 100644 --- a/src/bin/pg_basebackup/pg_createsubscriber.c +++ b/src/bin/pg_basebackup/pg_createsubscriber.c @@ -2305,6 +2305,11 @@ main(int argc, char **argv) pg_log_error_hint("Try \"%s --help\" for more information.", progname); exit(1); } + + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + pg_log_info("validating publisher connection string"); pub_base_conninfo = get_base_conninfo(opt.pub_conninfo_str, &dbname_conninfo); diff --git a/src/bin/pg_combinebackup/pg_combinebackup.c b/src/bin/pg_combinebackup/pg_combinebackup.c index 3a325127209..c9bf0a9e105 100644 --- a/src/bin/pg_combinebackup/pg_combinebackup.c +++ b/src/bin/pg_combinebackup/pg_combinebackup.c @@ -242,6 +242,10 @@ main(int argc, char *argv[]) if (opt.no_manifest) opt.manifest_checksums = CHECKSUM_TYPE_NONE; + if (opt.dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + /* Check that the platform supports the requested copy method. */ if (opt.copy_method == COPY_METHOD_CLONE) { diff --git a/src/bin/pg_resetwal/pg_resetwal.c b/src/bin/pg_resetwal/pg_resetwal.c index a89d72fc5cf..dd5d279521e 100644 --- a/src/bin/pg_resetwal/pg_resetwal.c +++ b/src/bin/pg_resetwal/pg_resetwal.c @@ -397,6 +397,10 @@ main(int argc, char *argv[]) exit(1); } + if (noupdate) + pg_log_info("Executing in dry-run mode.\n" + "Nothing will be modified."); + /* * Attempt to read the existing pg_control file */ diff --git a/src/bin/pg_rewind/pg_rewind.c b/src/bin/pg_rewind/pg_rewind.c index 27c514f934a..e9364d04f76 100644 --- a/src/bin/pg_rewind/pg_rewind.c +++ b/src/bin/pg_rewind/pg_rewind.c @@ -300,10 +300,12 @@ main(int argc, char **argv) atexit(disconnect_atexit); - /* - * Ok, we have all the options and we're ready to start. First, connect to - * remote server. - */ + /* Ok, we have all the options and we're ready to start. */ + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + + /* First, connect to remote server. */ if (connstr_source) { conn = PQconnectdb(connstr_source); -- 2.47.3 --ibfr3ah5qy6tcbhw-- ^ permalink raw reply [nested|flat] 190+ messages in thread
* [PATCH v5] Log a note at program start when running in dry-run mode @ 2025-11-11 08:54 Álvaro Herrera <[email protected]> 0 siblings, 0 replies; 190+ messages in thread From: Álvaro Herrera @ 2025-11-11 08:54 UTC (permalink / raw) Users might get some peace of mind knowing their data is not being destroyed or whatever. Author: Peter Smith <[email protected]> Reviewed-by: Álvaro Herrera <[email protected]> Discussion: https://postgr.es/m/CAHut+PsvQJQnQO0KT0S2oegenkvJ8FUuY-QS5syyqmT24R2xFQ@mail.gmail.com --- src/bin/pg_archivecleanup/pg_archivecleanup.c | 4 ++++ src/bin/pg_basebackup/pg_createsubscriber.c | 5 +++++ src/bin/pg_combinebackup/pg_combinebackup.c | 4 ++++ src/bin/pg_resetwal/pg_resetwal.c | 4 ++++ src/bin/pg_rewind/pg_rewind.c | 10 ++++++---- 5 files changed, 23 insertions(+), 4 deletions(-) diff --git a/src/bin/pg_archivecleanup/pg_archivecleanup.c b/src/bin/pg_archivecleanup/pg_archivecleanup.c index c25348bcb85..ab686b4748c 100644 --- a/src/bin/pg_archivecleanup/pg_archivecleanup.c +++ b/src/bin/pg_archivecleanup/pg_archivecleanup.c @@ -375,6 +375,10 @@ main(int argc, char **argv) exit(2); } + if (dryrun) + pg_log_info("Executing in dry-run mode.\n" + "No files will be removed."); + /* * Check archive exists and other initialization if required. */ diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c index df41836e70f..cc4be5d6ef4 100644 --- a/src/bin/pg_basebackup/pg_createsubscriber.c +++ b/src/bin/pg_basebackup/pg_createsubscriber.c @@ -2305,6 +2305,11 @@ main(int argc, char **argv) pg_log_error_hint("Try \"%s --help\" for more information.", progname); exit(1); } + + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + pg_log_info("validating publisher connection string"); pub_base_conninfo = get_base_conninfo(opt.pub_conninfo_str, &dbname_conninfo); diff --git a/src/bin/pg_combinebackup/pg_combinebackup.c b/src/bin/pg_combinebackup/pg_combinebackup.c index 3a325127209..c9bf0a9e105 100644 --- a/src/bin/pg_combinebackup/pg_combinebackup.c +++ b/src/bin/pg_combinebackup/pg_combinebackup.c @@ -242,6 +242,10 @@ main(int argc, char *argv[]) if (opt.no_manifest) opt.manifest_checksums = CHECKSUM_TYPE_NONE; + if (opt.dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + /* Check that the platform supports the requested copy method. */ if (opt.copy_method == COPY_METHOD_CLONE) { diff --git a/src/bin/pg_resetwal/pg_resetwal.c b/src/bin/pg_resetwal/pg_resetwal.c index a89d72fc5cf..dd5d279521e 100644 --- a/src/bin/pg_resetwal/pg_resetwal.c +++ b/src/bin/pg_resetwal/pg_resetwal.c @@ -397,6 +397,10 @@ main(int argc, char *argv[]) exit(1); } + if (noupdate) + pg_log_info("Executing in dry-run mode.\n" + "Nothing will be modified."); + /* * Attempt to read the existing pg_control file */ diff --git a/src/bin/pg_rewind/pg_rewind.c b/src/bin/pg_rewind/pg_rewind.c index 27c514f934a..e9364d04f76 100644 --- a/src/bin/pg_rewind/pg_rewind.c +++ b/src/bin/pg_rewind/pg_rewind.c @@ -300,10 +300,12 @@ main(int argc, char **argv) atexit(disconnect_atexit); - /* - * Ok, we have all the options and we're ready to start. First, connect to - * remote server. - */ + /* Ok, we have all the options and we're ready to start. */ + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + + /* First, connect to remote server. */ if (connstr_source) { conn = PQconnectdb(connstr_source); -- 2.47.3 --ibfr3ah5qy6tcbhw-- ^ permalink raw reply [nested|flat] 190+ messages in thread
* [PATCH v5] Log a note at program start when running in dry-run mode @ 2025-11-11 08:54 Álvaro Herrera <[email protected]> 0 siblings, 0 replies; 190+ messages in thread From: Álvaro Herrera @ 2025-11-11 08:54 UTC (permalink / raw) Users might get some peace of mind knowing their data is not being destroyed or whatever. Author: Peter Smith <[email protected]> Reviewed-by: Álvaro Herrera <[email protected]> Discussion: https://postgr.es/m/CAHut+PsvQJQnQO0KT0S2oegenkvJ8FUuY-QS5syyqmT24R2xFQ@mail.gmail.com --- src/bin/pg_archivecleanup/pg_archivecleanup.c | 4 ++++ src/bin/pg_basebackup/pg_createsubscriber.c | 5 +++++ src/bin/pg_combinebackup/pg_combinebackup.c | 4 ++++ src/bin/pg_resetwal/pg_resetwal.c | 4 ++++ src/bin/pg_rewind/pg_rewind.c | 10 ++++++---- 5 files changed, 23 insertions(+), 4 deletions(-) diff --git a/src/bin/pg_archivecleanup/pg_archivecleanup.c b/src/bin/pg_archivecleanup/pg_archivecleanup.c index c25348bcb85..ab686b4748c 100644 --- a/src/bin/pg_archivecleanup/pg_archivecleanup.c +++ b/src/bin/pg_archivecleanup/pg_archivecleanup.c @@ -375,6 +375,10 @@ main(int argc, char **argv) exit(2); } + if (dryrun) + pg_log_info("Executing in dry-run mode.\n" + "No files will be removed."); + /* * Check archive exists and other initialization if required. */ diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c index df41836e70f..cc4be5d6ef4 100644 --- a/src/bin/pg_basebackup/pg_createsubscriber.c +++ b/src/bin/pg_basebackup/pg_createsubscriber.c @@ -2305,6 +2305,11 @@ main(int argc, char **argv) pg_log_error_hint("Try \"%s --help\" for more information.", progname); exit(1); } + + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + pg_log_info("validating publisher connection string"); pub_base_conninfo = get_base_conninfo(opt.pub_conninfo_str, &dbname_conninfo); diff --git a/src/bin/pg_combinebackup/pg_combinebackup.c b/src/bin/pg_combinebackup/pg_combinebackup.c index 3a325127209..c9bf0a9e105 100644 --- a/src/bin/pg_combinebackup/pg_combinebackup.c +++ b/src/bin/pg_combinebackup/pg_combinebackup.c @@ -242,6 +242,10 @@ main(int argc, char *argv[]) if (opt.no_manifest) opt.manifest_checksums = CHECKSUM_TYPE_NONE; + if (opt.dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + /* Check that the platform supports the requested copy method. */ if (opt.copy_method == COPY_METHOD_CLONE) { diff --git a/src/bin/pg_resetwal/pg_resetwal.c b/src/bin/pg_resetwal/pg_resetwal.c index a89d72fc5cf..dd5d279521e 100644 --- a/src/bin/pg_resetwal/pg_resetwal.c +++ b/src/bin/pg_resetwal/pg_resetwal.c @@ -397,6 +397,10 @@ main(int argc, char *argv[]) exit(1); } + if (noupdate) + pg_log_info("Executing in dry-run mode.\n" + "Nothing will be modified."); + /* * Attempt to read the existing pg_control file */ diff --git a/src/bin/pg_rewind/pg_rewind.c b/src/bin/pg_rewind/pg_rewind.c index 27c514f934a..e9364d04f76 100644 --- a/src/bin/pg_rewind/pg_rewind.c +++ b/src/bin/pg_rewind/pg_rewind.c @@ -300,10 +300,12 @@ main(int argc, char **argv) atexit(disconnect_atexit); - /* - * Ok, we have all the options and we're ready to start. First, connect to - * remote server. - */ + /* Ok, we have all the options and we're ready to start. */ + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + + /* First, connect to remote server. */ if (connstr_source) { conn = PQconnectdb(connstr_source); -- 2.47.3 --ibfr3ah5qy6tcbhw-- ^ permalink raw reply [nested|flat] 190+ messages in thread
* [PATCH v5] Log a note at program start when running in dry-run mode @ 2025-11-11 08:54 Álvaro Herrera <[email protected]> 0 siblings, 0 replies; 190+ messages in thread From: Álvaro Herrera @ 2025-11-11 08:54 UTC (permalink / raw) Users might get some peace of mind knowing their data is not being destroyed or whatever. Author: Peter Smith <[email protected]> Reviewed-by: Álvaro Herrera <[email protected]> Discussion: https://postgr.es/m/CAHut+PsvQJQnQO0KT0S2oegenkvJ8FUuY-QS5syyqmT24R2xFQ@mail.gmail.com --- src/bin/pg_archivecleanup/pg_archivecleanup.c | 4 ++++ src/bin/pg_basebackup/pg_createsubscriber.c | 5 +++++ src/bin/pg_combinebackup/pg_combinebackup.c | 4 ++++ src/bin/pg_resetwal/pg_resetwal.c | 4 ++++ src/bin/pg_rewind/pg_rewind.c | 10 ++++++---- 5 files changed, 23 insertions(+), 4 deletions(-) diff --git a/src/bin/pg_archivecleanup/pg_archivecleanup.c b/src/bin/pg_archivecleanup/pg_archivecleanup.c index c25348bcb85..ab686b4748c 100644 --- a/src/bin/pg_archivecleanup/pg_archivecleanup.c +++ b/src/bin/pg_archivecleanup/pg_archivecleanup.c @@ -375,6 +375,10 @@ main(int argc, char **argv) exit(2); } + if (dryrun) + pg_log_info("Executing in dry-run mode.\n" + "No files will be removed."); + /* * Check archive exists and other initialization if required. */ diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c index df41836e70f..cc4be5d6ef4 100644 --- a/src/bin/pg_basebackup/pg_createsubscriber.c +++ b/src/bin/pg_basebackup/pg_createsubscriber.c @@ -2305,6 +2305,11 @@ main(int argc, char **argv) pg_log_error_hint("Try \"%s --help\" for more information.", progname); exit(1); } + + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + pg_log_info("validating publisher connection string"); pub_base_conninfo = get_base_conninfo(opt.pub_conninfo_str, &dbname_conninfo); diff --git a/src/bin/pg_combinebackup/pg_combinebackup.c b/src/bin/pg_combinebackup/pg_combinebackup.c index 3a325127209..c9bf0a9e105 100644 --- a/src/bin/pg_combinebackup/pg_combinebackup.c +++ b/src/bin/pg_combinebackup/pg_combinebackup.c @@ -242,6 +242,10 @@ main(int argc, char *argv[]) if (opt.no_manifest) opt.manifest_checksums = CHECKSUM_TYPE_NONE; + if (opt.dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + /* Check that the platform supports the requested copy method. */ if (opt.copy_method == COPY_METHOD_CLONE) { diff --git a/src/bin/pg_resetwal/pg_resetwal.c b/src/bin/pg_resetwal/pg_resetwal.c index a89d72fc5cf..dd5d279521e 100644 --- a/src/bin/pg_resetwal/pg_resetwal.c +++ b/src/bin/pg_resetwal/pg_resetwal.c @@ -397,6 +397,10 @@ main(int argc, char *argv[]) exit(1); } + if (noupdate) + pg_log_info("Executing in dry-run mode.\n" + "Nothing will be modified."); + /* * Attempt to read the existing pg_control file */ diff --git a/src/bin/pg_rewind/pg_rewind.c b/src/bin/pg_rewind/pg_rewind.c index 27c514f934a..e9364d04f76 100644 --- a/src/bin/pg_rewind/pg_rewind.c +++ b/src/bin/pg_rewind/pg_rewind.c @@ -300,10 +300,12 @@ main(int argc, char **argv) atexit(disconnect_atexit); - /* - * Ok, we have all the options and we're ready to start. First, connect to - * remote server. - */ + /* Ok, we have all the options and we're ready to start. */ + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + + /* First, connect to remote server. */ if (connstr_source) { conn = PQconnectdb(connstr_source); -- 2.47.3 --ibfr3ah5qy6tcbhw-- ^ permalink raw reply [nested|flat] 190+ messages in thread
* [PATCH v5] Log a note at program start when running in dry-run mode @ 2025-11-11 08:54 Álvaro Herrera <[email protected]> 0 siblings, 0 replies; 190+ messages in thread From: Álvaro Herrera @ 2025-11-11 08:54 UTC (permalink / raw) Users might get some peace of mind knowing their data is not being destroyed or whatever. Author: Peter Smith <[email protected]> Reviewed-by: Álvaro Herrera <[email protected]> Discussion: https://postgr.es/m/CAHut+PsvQJQnQO0KT0S2oegenkvJ8FUuY-QS5syyqmT24R2xFQ@mail.gmail.com --- src/bin/pg_archivecleanup/pg_archivecleanup.c | 4 ++++ src/bin/pg_basebackup/pg_createsubscriber.c | 5 +++++ src/bin/pg_combinebackup/pg_combinebackup.c | 4 ++++ src/bin/pg_resetwal/pg_resetwal.c | 4 ++++ src/bin/pg_rewind/pg_rewind.c | 10 ++++++---- 5 files changed, 23 insertions(+), 4 deletions(-) diff --git a/src/bin/pg_archivecleanup/pg_archivecleanup.c b/src/bin/pg_archivecleanup/pg_archivecleanup.c index c25348bcb85..ab686b4748c 100644 --- a/src/bin/pg_archivecleanup/pg_archivecleanup.c +++ b/src/bin/pg_archivecleanup/pg_archivecleanup.c @@ -375,6 +375,10 @@ main(int argc, char **argv) exit(2); } + if (dryrun) + pg_log_info("Executing in dry-run mode.\n" + "No files will be removed."); + /* * Check archive exists and other initialization if required. */ diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c index df41836e70f..cc4be5d6ef4 100644 --- a/src/bin/pg_basebackup/pg_createsubscriber.c +++ b/src/bin/pg_basebackup/pg_createsubscriber.c @@ -2305,6 +2305,11 @@ main(int argc, char **argv) pg_log_error_hint("Try \"%s --help\" for more information.", progname); exit(1); } + + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + pg_log_info("validating publisher connection string"); pub_base_conninfo = get_base_conninfo(opt.pub_conninfo_str, &dbname_conninfo); diff --git a/src/bin/pg_combinebackup/pg_combinebackup.c b/src/bin/pg_combinebackup/pg_combinebackup.c index 3a325127209..c9bf0a9e105 100644 --- a/src/bin/pg_combinebackup/pg_combinebackup.c +++ b/src/bin/pg_combinebackup/pg_combinebackup.c @@ -242,6 +242,10 @@ main(int argc, char *argv[]) if (opt.no_manifest) opt.manifest_checksums = CHECKSUM_TYPE_NONE; + if (opt.dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + /* Check that the platform supports the requested copy method. */ if (opt.copy_method == COPY_METHOD_CLONE) { diff --git a/src/bin/pg_resetwal/pg_resetwal.c b/src/bin/pg_resetwal/pg_resetwal.c index a89d72fc5cf..dd5d279521e 100644 --- a/src/bin/pg_resetwal/pg_resetwal.c +++ b/src/bin/pg_resetwal/pg_resetwal.c @@ -397,6 +397,10 @@ main(int argc, char *argv[]) exit(1); } + if (noupdate) + pg_log_info("Executing in dry-run mode.\n" + "Nothing will be modified."); + /* * Attempt to read the existing pg_control file */ diff --git a/src/bin/pg_rewind/pg_rewind.c b/src/bin/pg_rewind/pg_rewind.c index 27c514f934a..e9364d04f76 100644 --- a/src/bin/pg_rewind/pg_rewind.c +++ b/src/bin/pg_rewind/pg_rewind.c @@ -300,10 +300,12 @@ main(int argc, char **argv) atexit(disconnect_atexit); - /* - * Ok, we have all the options and we're ready to start. First, connect to - * remote server. - */ + /* Ok, we have all the options and we're ready to start. */ + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + + /* First, connect to remote server. */ if (connstr_source) { conn = PQconnectdb(connstr_source); -- 2.47.3 --ibfr3ah5qy6tcbhw-- ^ permalink raw reply [nested|flat] 190+ messages in thread
* [PATCH v5] Log a note at program start when running in dry-run mode @ 2025-11-11 08:54 Álvaro Herrera <[email protected]> 0 siblings, 0 replies; 190+ messages in thread From: Álvaro Herrera @ 2025-11-11 08:54 UTC (permalink / raw) Users might get some peace of mind knowing their data is not being destroyed or whatever. Author: Peter Smith <[email protected]> Reviewed-by: Álvaro Herrera <[email protected]> Discussion: https://postgr.es/m/CAHut+PsvQJQnQO0KT0S2oegenkvJ8FUuY-QS5syyqmT24R2xFQ@mail.gmail.com --- src/bin/pg_archivecleanup/pg_archivecleanup.c | 4 ++++ src/bin/pg_basebackup/pg_createsubscriber.c | 5 +++++ src/bin/pg_combinebackup/pg_combinebackup.c | 4 ++++ src/bin/pg_resetwal/pg_resetwal.c | 4 ++++ src/bin/pg_rewind/pg_rewind.c | 10 ++++++---- 5 files changed, 23 insertions(+), 4 deletions(-) diff --git a/src/bin/pg_archivecleanup/pg_archivecleanup.c b/src/bin/pg_archivecleanup/pg_archivecleanup.c index c25348bcb85..ab686b4748c 100644 --- a/src/bin/pg_archivecleanup/pg_archivecleanup.c +++ b/src/bin/pg_archivecleanup/pg_archivecleanup.c @@ -375,6 +375,10 @@ main(int argc, char **argv) exit(2); } + if (dryrun) + pg_log_info("Executing in dry-run mode.\n" + "No files will be removed."); + /* * Check archive exists and other initialization if required. */ diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c index df41836e70f..cc4be5d6ef4 100644 --- a/src/bin/pg_basebackup/pg_createsubscriber.c +++ b/src/bin/pg_basebackup/pg_createsubscriber.c @@ -2305,6 +2305,11 @@ main(int argc, char **argv) pg_log_error_hint("Try \"%s --help\" for more information.", progname); exit(1); } + + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + pg_log_info("validating publisher connection string"); pub_base_conninfo = get_base_conninfo(opt.pub_conninfo_str, &dbname_conninfo); diff --git a/src/bin/pg_combinebackup/pg_combinebackup.c b/src/bin/pg_combinebackup/pg_combinebackup.c index 3a325127209..c9bf0a9e105 100644 --- a/src/bin/pg_combinebackup/pg_combinebackup.c +++ b/src/bin/pg_combinebackup/pg_combinebackup.c @@ -242,6 +242,10 @@ main(int argc, char *argv[]) if (opt.no_manifest) opt.manifest_checksums = CHECKSUM_TYPE_NONE; + if (opt.dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + /* Check that the platform supports the requested copy method. */ if (opt.copy_method == COPY_METHOD_CLONE) { diff --git a/src/bin/pg_resetwal/pg_resetwal.c b/src/bin/pg_resetwal/pg_resetwal.c index a89d72fc5cf..dd5d279521e 100644 --- a/src/bin/pg_resetwal/pg_resetwal.c +++ b/src/bin/pg_resetwal/pg_resetwal.c @@ -397,6 +397,10 @@ main(int argc, char *argv[]) exit(1); } + if (noupdate) + pg_log_info("Executing in dry-run mode.\n" + "Nothing will be modified."); + /* * Attempt to read the existing pg_control file */ diff --git a/src/bin/pg_rewind/pg_rewind.c b/src/bin/pg_rewind/pg_rewind.c index 27c514f934a..e9364d04f76 100644 --- a/src/bin/pg_rewind/pg_rewind.c +++ b/src/bin/pg_rewind/pg_rewind.c @@ -300,10 +300,12 @@ main(int argc, char **argv) atexit(disconnect_atexit); - /* - * Ok, we have all the options and we're ready to start. First, connect to - * remote server. - */ + /* Ok, we have all the options and we're ready to start. */ + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + + /* First, connect to remote server. */ if (connstr_source) { conn = PQconnectdb(connstr_source); -- 2.47.3 --ibfr3ah5qy6tcbhw-- ^ permalink raw reply [nested|flat] 190+ messages in thread
* [PATCH v5] Log a note at program start when running in dry-run mode @ 2025-11-11 08:54 Álvaro Herrera <[email protected]> 0 siblings, 0 replies; 190+ messages in thread From: Álvaro Herrera @ 2025-11-11 08:54 UTC (permalink / raw) Users might get some peace of mind knowing their data is not being destroyed or whatever. Author: Peter Smith <[email protected]> Reviewed-by: Álvaro Herrera <[email protected]> Discussion: https://postgr.es/m/CAHut+PsvQJQnQO0KT0S2oegenkvJ8FUuY-QS5syyqmT24R2xFQ@mail.gmail.com --- src/bin/pg_archivecleanup/pg_archivecleanup.c | 4 ++++ src/bin/pg_basebackup/pg_createsubscriber.c | 5 +++++ src/bin/pg_combinebackup/pg_combinebackup.c | 4 ++++ src/bin/pg_resetwal/pg_resetwal.c | 4 ++++ src/bin/pg_rewind/pg_rewind.c | 10 ++++++---- 5 files changed, 23 insertions(+), 4 deletions(-) diff --git a/src/bin/pg_archivecleanup/pg_archivecleanup.c b/src/bin/pg_archivecleanup/pg_archivecleanup.c index c25348bcb85..ab686b4748c 100644 --- a/src/bin/pg_archivecleanup/pg_archivecleanup.c +++ b/src/bin/pg_archivecleanup/pg_archivecleanup.c @@ -375,6 +375,10 @@ main(int argc, char **argv) exit(2); } + if (dryrun) + pg_log_info("Executing in dry-run mode.\n" + "No files will be removed."); + /* * Check archive exists and other initialization if required. */ diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c index df41836e70f..cc4be5d6ef4 100644 --- a/src/bin/pg_basebackup/pg_createsubscriber.c +++ b/src/bin/pg_basebackup/pg_createsubscriber.c @@ -2305,6 +2305,11 @@ main(int argc, char **argv) pg_log_error_hint("Try \"%s --help\" for more information.", progname); exit(1); } + + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + pg_log_info("validating publisher connection string"); pub_base_conninfo = get_base_conninfo(opt.pub_conninfo_str, &dbname_conninfo); diff --git a/src/bin/pg_combinebackup/pg_combinebackup.c b/src/bin/pg_combinebackup/pg_combinebackup.c index 3a325127209..c9bf0a9e105 100644 --- a/src/bin/pg_combinebackup/pg_combinebackup.c +++ b/src/bin/pg_combinebackup/pg_combinebackup.c @@ -242,6 +242,10 @@ main(int argc, char *argv[]) if (opt.no_manifest) opt.manifest_checksums = CHECKSUM_TYPE_NONE; + if (opt.dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + /* Check that the platform supports the requested copy method. */ if (opt.copy_method == COPY_METHOD_CLONE) { diff --git a/src/bin/pg_resetwal/pg_resetwal.c b/src/bin/pg_resetwal/pg_resetwal.c index a89d72fc5cf..dd5d279521e 100644 --- a/src/bin/pg_resetwal/pg_resetwal.c +++ b/src/bin/pg_resetwal/pg_resetwal.c @@ -397,6 +397,10 @@ main(int argc, char *argv[]) exit(1); } + if (noupdate) + pg_log_info("Executing in dry-run mode.\n" + "Nothing will be modified."); + /* * Attempt to read the existing pg_control file */ diff --git a/src/bin/pg_rewind/pg_rewind.c b/src/bin/pg_rewind/pg_rewind.c index 27c514f934a..e9364d04f76 100644 --- a/src/bin/pg_rewind/pg_rewind.c +++ b/src/bin/pg_rewind/pg_rewind.c @@ -300,10 +300,12 @@ main(int argc, char **argv) atexit(disconnect_atexit); - /* - * Ok, we have all the options and we're ready to start. First, connect to - * remote server. - */ + /* Ok, we have all the options and we're ready to start. */ + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + + /* First, connect to remote server. */ if (connstr_source) { conn = PQconnectdb(connstr_source); -- 2.47.3 --ibfr3ah5qy6tcbhw-- ^ permalink raw reply [nested|flat] 190+ messages in thread
* [PATCH v5] Log a note at program start when running in dry-run mode @ 2025-11-11 08:54 Álvaro Herrera <[email protected]> 0 siblings, 0 replies; 190+ messages in thread From: Álvaro Herrera @ 2025-11-11 08:54 UTC (permalink / raw) Users might get some peace of mind knowing their data is not being destroyed or whatever. Author: Peter Smith <[email protected]> Reviewed-by: Álvaro Herrera <[email protected]> Discussion: https://postgr.es/m/CAHut+PsvQJQnQO0KT0S2oegenkvJ8FUuY-QS5syyqmT24R2xFQ@mail.gmail.com --- src/bin/pg_archivecleanup/pg_archivecleanup.c | 4 ++++ src/bin/pg_basebackup/pg_createsubscriber.c | 5 +++++ src/bin/pg_combinebackup/pg_combinebackup.c | 4 ++++ src/bin/pg_resetwal/pg_resetwal.c | 4 ++++ src/bin/pg_rewind/pg_rewind.c | 10 ++++++---- 5 files changed, 23 insertions(+), 4 deletions(-) diff --git a/src/bin/pg_archivecleanup/pg_archivecleanup.c b/src/bin/pg_archivecleanup/pg_archivecleanup.c index c25348bcb85..ab686b4748c 100644 --- a/src/bin/pg_archivecleanup/pg_archivecleanup.c +++ b/src/bin/pg_archivecleanup/pg_archivecleanup.c @@ -375,6 +375,10 @@ main(int argc, char **argv) exit(2); } + if (dryrun) + pg_log_info("Executing in dry-run mode.\n" + "No files will be removed."); + /* * Check archive exists and other initialization if required. */ diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c index df41836e70f..cc4be5d6ef4 100644 --- a/src/bin/pg_basebackup/pg_createsubscriber.c +++ b/src/bin/pg_basebackup/pg_createsubscriber.c @@ -2305,6 +2305,11 @@ main(int argc, char **argv) pg_log_error_hint("Try \"%s --help\" for more information.", progname); exit(1); } + + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + pg_log_info("validating publisher connection string"); pub_base_conninfo = get_base_conninfo(opt.pub_conninfo_str, &dbname_conninfo); diff --git a/src/bin/pg_combinebackup/pg_combinebackup.c b/src/bin/pg_combinebackup/pg_combinebackup.c index 3a325127209..c9bf0a9e105 100644 --- a/src/bin/pg_combinebackup/pg_combinebackup.c +++ b/src/bin/pg_combinebackup/pg_combinebackup.c @@ -242,6 +242,10 @@ main(int argc, char *argv[]) if (opt.no_manifest) opt.manifest_checksums = CHECKSUM_TYPE_NONE; + if (opt.dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + /* Check that the platform supports the requested copy method. */ if (opt.copy_method == COPY_METHOD_CLONE) { diff --git a/src/bin/pg_resetwal/pg_resetwal.c b/src/bin/pg_resetwal/pg_resetwal.c index a89d72fc5cf..dd5d279521e 100644 --- a/src/bin/pg_resetwal/pg_resetwal.c +++ b/src/bin/pg_resetwal/pg_resetwal.c @@ -397,6 +397,10 @@ main(int argc, char *argv[]) exit(1); } + if (noupdate) + pg_log_info("Executing in dry-run mode.\n" + "Nothing will be modified."); + /* * Attempt to read the existing pg_control file */ diff --git a/src/bin/pg_rewind/pg_rewind.c b/src/bin/pg_rewind/pg_rewind.c index 27c514f934a..e9364d04f76 100644 --- a/src/bin/pg_rewind/pg_rewind.c +++ b/src/bin/pg_rewind/pg_rewind.c @@ -300,10 +300,12 @@ main(int argc, char **argv) atexit(disconnect_atexit); - /* - * Ok, we have all the options and we're ready to start. First, connect to - * remote server. - */ + /* Ok, we have all the options and we're ready to start. */ + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + + /* First, connect to remote server. */ if (connstr_source) { conn = PQconnectdb(connstr_source); -- 2.47.3 --ibfr3ah5qy6tcbhw-- ^ permalink raw reply [nested|flat] 190+ messages in thread
* [PATCH v5] Log a note at program start when running in dry-run mode @ 2025-11-11 08:54 Álvaro Herrera <[email protected]> 0 siblings, 0 replies; 190+ messages in thread From: Álvaro Herrera @ 2025-11-11 08:54 UTC (permalink / raw) Users might get some peace of mind knowing their data is not being destroyed or whatever. Author: Peter Smith <[email protected]> Reviewed-by: Álvaro Herrera <[email protected]> Discussion: https://postgr.es/m/CAHut+PsvQJQnQO0KT0S2oegenkvJ8FUuY-QS5syyqmT24R2xFQ@mail.gmail.com --- src/bin/pg_archivecleanup/pg_archivecleanup.c | 4 ++++ src/bin/pg_basebackup/pg_createsubscriber.c | 5 +++++ src/bin/pg_combinebackup/pg_combinebackup.c | 4 ++++ src/bin/pg_resetwal/pg_resetwal.c | 4 ++++ src/bin/pg_rewind/pg_rewind.c | 10 ++++++---- 5 files changed, 23 insertions(+), 4 deletions(-) diff --git a/src/bin/pg_archivecleanup/pg_archivecleanup.c b/src/bin/pg_archivecleanup/pg_archivecleanup.c index c25348bcb85..ab686b4748c 100644 --- a/src/bin/pg_archivecleanup/pg_archivecleanup.c +++ b/src/bin/pg_archivecleanup/pg_archivecleanup.c @@ -375,6 +375,10 @@ main(int argc, char **argv) exit(2); } + if (dryrun) + pg_log_info("Executing in dry-run mode.\n" + "No files will be removed."); + /* * Check archive exists and other initialization if required. */ diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c index df41836e70f..cc4be5d6ef4 100644 --- a/src/bin/pg_basebackup/pg_createsubscriber.c +++ b/src/bin/pg_basebackup/pg_createsubscriber.c @@ -2305,6 +2305,11 @@ main(int argc, char **argv) pg_log_error_hint("Try \"%s --help\" for more information.", progname); exit(1); } + + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + pg_log_info("validating publisher connection string"); pub_base_conninfo = get_base_conninfo(opt.pub_conninfo_str, &dbname_conninfo); diff --git a/src/bin/pg_combinebackup/pg_combinebackup.c b/src/bin/pg_combinebackup/pg_combinebackup.c index 3a325127209..c9bf0a9e105 100644 --- a/src/bin/pg_combinebackup/pg_combinebackup.c +++ b/src/bin/pg_combinebackup/pg_combinebackup.c @@ -242,6 +242,10 @@ main(int argc, char *argv[]) if (opt.no_manifest) opt.manifest_checksums = CHECKSUM_TYPE_NONE; + if (opt.dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + /* Check that the platform supports the requested copy method. */ if (opt.copy_method == COPY_METHOD_CLONE) { diff --git a/src/bin/pg_resetwal/pg_resetwal.c b/src/bin/pg_resetwal/pg_resetwal.c index a89d72fc5cf..dd5d279521e 100644 --- a/src/bin/pg_resetwal/pg_resetwal.c +++ b/src/bin/pg_resetwal/pg_resetwal.c @@ -397,6 +397,10 @@ main(int argc, char *argv[]) exit(1); } + if (noupdate) + pg_log_info("Executing in dry-run mode.\n" + "Nothing will be modified."); + /* * Attempt to read the existing pg_control file */ diff --git a/src/bin/pg_rewind/pg_rewind.c b/src/bin/pg_rewind/pg_rewind.c index 27c514f934a..e9364d04f76 100644 --- a/src/bin/pg_rewind/pg_rewind.c +++ b/src/bin/pg_rewind/pg_rewind.c @@ -300,10 +300,12 @@ main(int argc, char **argv) atexit(disconnect_atexit); - /* - * Ok, we have all the options and we're ready to start. First, connect to - * remote server. - */ + /* Ok, we have all the options and we're ready to start. */ + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + + /* First, connect to remote server. */ if (connstr_source) { conn = PQconnectdb(connstr_source); -- 2.47.3 --ibfr3ah5qy6tcbhw-- ^ permalink raw reply [nested|flat] 190+ messages in thread
* [PATCH v5] Log a note at program start when running in dry-run mode @ 2025-11-11 08:54 Álvaro Herrera <[email protected]> 0 siblings, 0 replies; 190+ messages in thread From: Álvaro Herrera @ 2025-11-11 08:54 UTC (permalink / raw) Users might get some peace of mind knowing their data is not being destroyed or whatever. Author: Peter Smith <[email protected]> Reviewed-by: Álvaro Herrera <[email protected]> Discussion: https://postgr.es/m/CAHut+PsvQJQnQO0KT0S2oegenkvJ8FUuY-QS5syyqmT24R2xFQ@mail.gmail.com --- src/bin/pg_archivecleanup/pg_archivecleanup.c | 4 ++++ src/bin/pg_basebackup/pg_createsubscriber.c | 5 +++++ src/bin/pg_combinebackup/pg_combinebackup.c | 4 ++++ src/bin/pg_resetwal/pg_resetwal.c | 4 ++++ src/bin/pg_rewind/pg_rewind.c | 10 ++++++---- 5 files changed, 23 insertions(+), 4 deletions(-) diff --git a/src/bin/pg_archivecleanup/pg_archivecleanup.c b/src/bin/pg_archivecleanup/pg_archivecleanup.c index c25348bcb85..ab686b4748c 100644 --- a/src/bin/pg_archivecleanup/pg_archivecleanup.c +++ b/src/bin/pg_archivecleanup/pg_archivecleanup.c @@ -375,6 +375,10 @@ main(int argc, char **argv) exit(2); } + if (dryrun) + pg_log_info("Executing in dry-run mode.\n" + "No files will be removed."); + /* * Check archive exists and other initialization if required. */ diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c index df41836e70f..cc4be5d6ef4 100644 --- a/src/bin/pg_basebackup/pg_createsubscriber.c +++ b/src/bin/pg_basebackup/pg_createsubscriber.c @@ -2305,6 +2305,11 @@ main(int argc, char **argv) pg_log_error_hint("Try \"%s --help\" for more information.", progname); exit(1); } + + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + pg_log_info("validating publisher connection string"); pub_base_conninfo = get_base_conninfo(opt.pub_conninfo_str, &dbname_conninfo); diff --git a/src/bin/pg_combinebackup/pg_combinebackup.c b/src/bin/pg_combinebackup/pg_combinebackup.c index 3a325127209..c9bf0a9e105 100644 --- a/src/bin/pg_combinebackup/pg_combinebackup.c +++ b/src/bin/pg_combinebackup/pg_combinebackup.c @@ -242,6 +242,10 @@ main(int argc, char *argv[]) if (opt.no_manifest) opt.manifest_checksums = CHECKSUM_TYPE_NONE; + if (opt.dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + /* Check that the platform supports the requested copy method. */ if (opt.copy_method == COPY_METHOD_CLONE) { diff --git a/src/bin/pg_resetwal/pg_resetwal.c b/src/bin/pg_resetwal/pg_resetwal.c index a89d72fc5cf..dd5d279521e 100644 --- a/src/bin/pg_resetwal/pg_resetwal.c +++ b/src/bin/pg_resetwal/pg_resetwal.c @@ -397,6 +397,10 @@ main(int argc, char *argv[]) exit(1); } + if (noupdate) + pg_log_info("Executing in dry-run mode.\n" + "Nothing will be modified."); + /* * Attempt to read the existing pg_control file */ diff --git a/src/bin/pg_rewind/pg_rewind.c b/src/bin/pg_rewind/pg_rewind.c index 27c514f934a..e9364d04f76 100644 --- a/src/bin/pg_rewind/pg_rewind.c +++ b/src/bin/pg_rewind/pg_rewind.c @@ -300,10 +300,12 @@ main(int argc, char **argv) atexit(disconnect_atexit); - /* - * Ok, we have all the options and we're ready to start. First, connect to - * remote server. - */ + /* Ok, we have all the options and we're ready to start. */ + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + + /* First, connect to remote server. */ if (connstr_source) { conn = PQconnectdb(connstr_source); -- 2.47.3 --ibfr3ah5qy6tcbhw-- ^ permalink raw reply [nested|flat] 190+ messages in thread
* [PATCH v5] Log a note at program start when running in dry-run mode @ 2025-11-11 08:54 Álvaro Herrera <[email protected]> 0 siblings, 0 replies; 190+ messages in thread From: Álvaro Herrera @ 2025-11-11 08:54 UTC (permalink / raw) Users might get some peace of mind knowing their data is not being destroyed or whatever. Author: Peter Smith <[email protected]> Reviewed-by: Álvaro Herrera <[email protected]> Discussion: https://postgr.es/m/CAHut+PsvQJQnQO0KT0S2oegenkvJ8FUuY-QS5syyqmT24R2xFQ@mail.gmail.com --- src/bin/pg_archivecleanup/pg_archivecleanup.c | 4 ++++ src/bin/pg_basebackup/pg_createsubscriber.c | 5 +++++ src/bin/pg_combinebackup/pg_combinebackup.c | 4 ++++ src/bin/pg_resetwal/pg_resetwal.c | 4 ++++ src/bin/pg_rewind/pg_rewind.c | 10 ++++++---- 5 files changed, 23 insertions(+), 4 deletions(-) diff --git a/src/bin/pg_archivecleanup/pg_archivecleanup.c b/src/bin/pg_archivecleanup/pg_archivecleanup.c index c25348bcb85..ab686b4748c 100644 --- a/src/bin/pg_archivecleanup/pg_archivecleanup.c +++ b/src/bin/pg_archivecleanup/pg_archivecleanup.c @@ -375,6 +375,10 @@ main(int argc, char **argv) exit(2); } + if (dryrun) + pg_log_info("Executing in dry-run mode.\n" + "No files will be removed."); + /* * Check archive exists and other initialization if required. */ diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c index df41836e70f..cc4be5d6ef4 100644 --- a/src/bin/pg_basebackup/pg_createsubscriber.c +++ b/src/bin/pg_basebackup/pg_createsubscriber.c @@ -2305,6 +2305,11 @@ main(int argc, char **argv) pg_log_error_hint("Try \"%s --help\" for more information.", progname); exit(1); } + + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + pg_log_info("validating publisher connection string"); pub_base_conninfo = get_base_conninfo(opt.pub_conninfo_str, &dbname_conninfo); diff --git a/src/bin/pg_combinebackup/pg_combinebackup.c b/src/bin/pg_combinebackup/pg_combinebackup.c index 3a325127209..c9bf0a9e105 100644 --- a/src/bin/pg_combinebackup/pg_combinebackup.c +++ b/src/bin/pg_combinebackup/pg_combinebackup.c @@ -242,6 +242,10 @@ main(int argc, char *argv[]) if (opt.no_manifest) opt.manifest_checksums = CHECKSUM_TYPE_NONE; + if (opt.dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + /* Check that the platform supports the requested copy method. */ if (opt.copy_method == COPY_METHOD_CLONE) { diff --git a/src/bin/pg_resetwal/pg_resetwal.c b/src/bin/pg_resetwal/pg_resetwal.c index a89d72fc5cf..dd5d279521e 100644 --- a/src/bin/pg_resetwal/pg_resetwal.c +++ b/src/bin/pg_resetwal/pg_resetwal.c @@ -397,6 +397,10 @@ main(int argc, char *argv[]) exit(1); } + if (noupdate) + pg_log_info("Executing in dry-run mode.\n" + "Nothing will be modified."); + /* * Attempt to read the existing pg_control file */ diff --git a/src/bin/pg_rewind/pg_rewind.c b/src/bin/pg_rewind/pg_rewind.c index 27c514f934a..e9364d04f76 100644 --- a/src/bin/pg_rewind/pg_rewind.c +++ b/src/bin/pg_rewind/pg_rewind.c @@ -300,10 +300,12 @@ main(int argc, char **argv) atexit(disconnect_atexit); - /* - * Ok, we have all the options and we're ready to start. First, connect to - * remote server. - */ + /* Ok, we have all the options and we're ready to start. */ + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + + /* First, connect to remote server. */ if (connstr_source) { conn = PQconnectdb(connstr_source); -- 2.47.3 --ibfr3ah5qy6tcbhw-- ^ permalink raw reply [nested|flat] 190+ messages in thread
* [PATCH v5] Log a note at program start when running in dry-run mode @ 2025-11-11 08:54 Álvaro Herrera <[email protected]> 0 siblings, 0 replies; 190+ messages in thread From: Álvaro Herrera @ 2025-11-11 08:54 UTC (permalink / raw) Users might get some peace of mind knowing their data is not being destroyed or whatever. Author: Peter Smith <[email protected]> Reviewed-by: Álvaro Herrera <[email protected]> Discussion: https://postgr.es/m/CAHut+PsvQJQnQO0KT0S2oegenkvJ8FUuY-QS5syyqmT24R2xFQ@mail.gmail.com --- src/bin/pg_archivecleanup/pg_archivecleanup.c | 4 ++++ src/bin/pg_basebackup/pg_createsubscriber.c | 5 +++++ src/bin/pg_combinebackup/pg_combinebackup.c | 4 ++++ src/bin/pg_resetwal/pg_resetwal.c | 4 ++++ src/bin/pg_rewind/pg_rewind.c | 10 ++++++---- 5 files changed, 23 insertions(+), 4 deletions(-) diff --git a/src/bin/pg_archivecleanup/pg_archivecleanup.c b/src/bin/pg_archivecleanup/pg_archivecleanup.c index c25348bcb85..ab686b4748c 100644 --- a/src/bin/pg_archivecleanup/pg_archivecleanup.c +++ b/src/bin/pg_archivecleanup/pg_archivecleanup.c @@ -375,6 +375,10 @@ main(int argc, char **argv) exit(2); } + if (dryrun) + pg_log_info("Executing in dry-run mode.\n" + "No files will be removed."); + /* * Check archive exists and other initialization if required. */ diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c index df41836e70f..cc4be5d6ef4 100644 --- a/src/bin/pg_basebackup/pg_createsubscriber.c +++ b/src/bin/pg_basebackup/pg_createsubscriber.c @@ -2305,6 +2305,11 @@ main(int argc, char **argv) pg_log_error_hint("Try \"%s --help\" for more information.", progname); exit(1); } + + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + pg_log_info("validating publisher connection string"); pub_base_conninfo = get_base_conninfo(opt.pub_conninfo_str, &dbname_conninfo); diff --git a/src/bin/pg_combinebackup/pg_combinebackup.c b/src/bin/pg_combinebackup/pg_combinebackup.c index 3a325127209..c9bf0a9e105 100644 --- a/src/bin/pg_combinebackup/pg_combinebackup.c +++ b/src/bin/pg_combinebackup/pg_combinebackup.c @@ -242,6 +242,10 @@ main(int argc, char *argv[]) if (opt.no_manifest) opt.manifest_checksums = CHECKSUM_TYPE_NONE; + if (opt.dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + /* Check that the platform supports the requested copy method. */ if (opt.copy_method == COPY_METHOD_CLONE) { diff --git a/src/bin/pg_resetwal/pg_resetwal.c b/src/bin/pg_resetwal/pg_resetwal.c index a89d72fc5cf..dd5d279521e 100644 --- a/src/bin/pg_resetwal/pg_resetwal.c +++ b/src/bin/pg_resetwal/pg_resetwal.c @@ -397,6 +397,10 @@ main(int argc, char *argv[]) exit(1); } + if (noupdate) + pg_log_info("Executing in dry-run mode.\n" + "Nothing will be modified."); + /* * Attempt to read the existing pg_control file */ diff --git a/src/bin/pg_rewind/pg_rewind.c b/src/bin/pg_rewind/pg_rewind.c index 27c514f934a..e9364d04f76 100644 --- a/src/bin/pg_rewind/pg_rewind.c +++ b/src/bin/pg_rewind/pg_rewind.c @@ -300,10 +300,12 @@ main(int argc, char **argv) atexit(disconnect_atexit); - /* - * Ok, we have all the options and we're ready to start. First, connect to - * remote server. - */ + /* Ok, we have all the options and we're ready to start. */ + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + + /* First, connect to remote server. */ if (connstr_source) { conn = PQconnectdb(connstr_source); -- 2.47.3 --ibfr3ah5qy6tcbhw-- ^ permalink raw reply [nested|flat] 190+ messages in thread
* [PATCH v5] Log a note at program start when running in dry-run mode @ 2025-11-11 08:54 Álvaro Herrera <[email protected]> 0 siblings, 0 replies; 190+ messages in thread From: Álvaro Herrera @ 2025-11-11 08:54 UTC (permalink / raw) Users might get some peace of mind knowing their data is not being destroyed or whatever. Author: Peter Smith <[email protected]> Reviewed-by: Álvaro Herrera <[email protected]> Discussion: https://postgr.es/m/CAHut+PsvQJQnQO0KT0S2oegenkvJ8FUuY-QS5syyqmT24R2xFQ@mail.gmail.com --- src/bin/pg_archivecleanup/pg_archivecleanup.c | 4 ++++ src/bin/pg_basebackup/pg_createsubscriber.c | 5 +++++ src/bin/pg_combinebackup/pg_combinebackup.c | 4 ++++ src/bin/pg_resetwal/pg_resetwal.c | 4 ++++ src/bin/pg_rewind/pg_rewind.c | 10 ++++++---- 5 files changed, 23 insertions(+), 4 deletions(-) diff --git a/src/bin/pg_archivecleanup/pg_archivecleanup.c b/src/bin/pg_archivecleanup/pg_archivecleanup.c index c25348bcb85..ab686b4748c 100644 --- a/src/bin/pg_archivecleanup/pg_archivecleanup.c +++ b/src/bin/pg_archivecleanup/pg_archivecleanup.c @@ -375,6 +375,10 @@ main(int argc, char **argv) exit(2); } + if (dryrun) + pg_log_info("Executing in dry-run mode.\n" + "No files will be removed."); + /* * Check archive exists and other initialization if required. */ diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c index df41836e70f..cc4be5d6ef4 100644 --- a/src/bin/pg_basebackup/pg_createsubscriber.c +++ b/src/bin/pg_basebackup/pg_createsubscriber.c @@ -2305,6 +2305,11 @@ main(int argc, char **argv) pg_log_error_hint("Try \"%s --help\" for more information.", progname); exit(1); } + + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + pg_log_info("validating publisher connection string"); pub_base_conninfo = get_base_conninfo(opt.pub_conninfo_str, &dbname_conninfo); diff --git a/src/bin/pg_combinebackup/pg_combinebackup.c b/src/bin/pg_combinebackup/pg_combinebackup.c index 3a325127209..c9bf0a9e105 100644 --- a/src/bin/pg_combinebackup/pg_combinebackup.c +++ b/src/bin/pg_combinebackup/pg_combinebackup.c @@ -242,6 +242,10 @@ main(int argc, char *argv[]) if (opt.no_manifest) opt.manifest_checksums = CHECKSUM_TYPE_NONE; + if (opt.dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + /* Check that the platform supports the requested copy method. */ if (opt.copy_method == COPY_METHOD_CLONE) { diff --git a/src/bin/pg_resetwal/pg_resetwal.c b/src/bin/pg_resetwal/pg_resetwal.c index a89d72fc5cf..dd5d279521e 100644 --- a/src/bin/pg_resetwal/pg_resetwal.c +++ b/src/bin/pg_resetwal/pg_resetwal.c @@ -397,6 +397,10 @@ main(int argc, char *argv[]) exit(1); } + if (noupdate) + pg_log_info("Executing in dry-run mode.\n" + "Nothing will be modified."); + /* * Attempt to read the existing pg_control file */ diff --git a/src/bin/pg_rewind/pg_rewind.c b/src/bin/pg_rewind/pg_rewind.c index 27c514f934a..e9364d04f76 100644 --- a/src/bin/pg_rewind/pg_rewind.c +++ b/src/bin/pg_rewind/pg_rewind.c @@ -300,10 +300,12 @@ main(int argc, char **argv) atexit(disconnect_atexit); - /* - * Ok, we have all the options and we're ready to start. First, connect to - * remote server. - */ + /* Ok, we have all the options and we're ready to start. */ + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + + /* First, connect to remote server. */ if (connstr_source) { conn = PQconnectdb(connstr_source); -- 2.47.3 --ibfr3ah5qy6tcbhw-- ^ permalink raw reply [nested|flat] 190+ messages in thread
* [PATCH v5] Log a note at program start when running in dry-run mode @ 2025-11-11 08:54 Álvaro Herrera <[email protected]> 0 siblings, 0 replies; 190+ messages in thread From: Álvaro Herrera @ 2025-11-11 08:54 UTC (permalink / raw) Users might get some peace of mind knowing their data is not being destroyed or whatever. Author: Peter Smith <[email protected]> Reviewed-by: Álvaro Herrera <[email protected]> Discussion: https://postgr.es/m/CAHut+PsvQJQnQO0KT0S2oegenkvJ8FUuY-QS5syyqmT24R2xFQ@mail.gmail.com --- src/bin/pg_archivecleanup/pg_archivecleanup.c | 4 ++++ src/bin/pg_basebackup/pg_createsubscriber.c | 5 +++++ src/bin/pg_combinebackup/pg_combinebackup.c | 4 ++++ src/bin/pg_resetwal/pg_resetwal.c | 4 ++++ src/bin/pg_rewind/pg_rewind.c | 10 ++++++---- 5 files changed, 23 insertions(+), 4 deletions(-) diff --git a/src/bin/pg_archivecleanup/pg_archivecleanup.c b/src/bin/pg_archivecleanup/pg_archivecleanup.c index c25348bcb85..ab686b4748c 100644 --- a/src/bin/pg_archivecleanup/pg_archivecleanup.c +++ b/src/bin/pg_archivecleanup/pg_archivecleanup.c @@ -375,6 +375,10 @@ main(int argc, char **argv) exit(2); } + if (dryrun) + pg_log_info("Executing in dry-run mode.\n" + "No files will be removed."); + /* * Check archive exists and other initialization if required. */ diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c index df41836e70f..cc4be5d6ef4 100644 --- a/src/bin/pg_basebackup/pg_createsubscriber.c +++ b/src/bin/pg_basebackup/pg_createsubscriber.c @@ -2305,6 +2305,11 @@ main(int argc, char **argv) pg_log_error_hint("Try \"%s --help\" for more information.", progname); exit(1); } + + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + pg_log_info("validating publisher connection string"); pub_base_conninfo = get_base_conninfo(opt.pub_conninfo_str, &dbname_conninfo); diff --git a/src/bin/pg_combinebackup/pg_combinebackup.c b/src/bin/pg_combinebackup/pg_combinebackup.c index 3a325127209..c9bf0a9e105 100644 --- a/src/bin/pg_combinebackup/pg_combinebackup.c +++ b/src/bin/pg_combinebackup/pg_combinebackup.c @@ -242,6 +242,10 @@ main(int argc, char *argv[]) if (opt.no_manifest) opt.manifest_checksums = CHECKSUM_TYPE_NONE; + if (opt.dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + /* Check that the platform supports the requested copy method. */ if (opt.copy_method == COPY_METHOD_CLONE) { diff --git a/src/bin/pg_resetwal/pg_resetwal.c b/src/bin/pg_resetwal/pg_resetwal.c index a89d72fc5cf..dd5d279521e 100644 --- a/src/bin/pg_resetwal/pg_resetwal.c +++ b/src/bin/pg_resetwal/pg_resetwal.c @@ -397,6 +397,10 @@ main(int argc, char *argv[]) exit(1); } + if (noupdate) + pg_log_info("Executing in dry-run mode.\n" + "Nothing will be modified."); + /* * Attempt to read the existing pg_control file */ diff --git a/src/bin/pg_rewind/pg_rewind.c b/src/bin/pg_rewind/pg_rewind.c index 27c514f934a..e9364d04f76 100644 --- a/src/bin/pg_rewind/pg_rewind.c +++ b/src/bin/pg_rewind/pg_rewind.c @@ -300,10 +300,12 @@ main(int argc, char **argv) atexit(disconnect_atexit); - /* - * Ok, we have all the options and we're ready to start. First, connect to - * remote server. - */ + /* Ok, we have all the options and we're ready to start. */ + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + + /* First, connect to remote server. */ if (connstr_source) { conn = PQconnectdb(connstr_source); -- 2.47.3 --ibfr3ah5qy6tcbhw-- ^ permalink raw reply [nested|flat] 190+ messages in thread
* [PATCH v5] Log a note at program start when running in dry-run mode @ 2025-11-11 08:54 Álvaro Herrera <[email protected]> 0 siblings, 0 replies; 190+ messages in thread From: Álvaro Herrera @ 2025-11-11 08:54 UTC (permalink / raw) Users might get some peace of mind knowing their data is not being destroyed or whatever. Author: Peter Smith <[email protected]> Reviewed-by: Álvaro Herrera <[email protected]> Discussion: https://postgr.es/m/CAHut+PsvQJQnQO0KT0S2oegenkvJ8FUuY-QS5syyqmT24R2xFQ@mail.gmail.com --- src/bin/pg_archivecleanup/pg_archivecleanup.c | 4 ++++ src/bin/pg_basebackup/pg_createsubscriber.c | 5 +++++ src/bin/pg_combinebackup/pg_combinebackup.c | 4 ++++ src/bin/pg_resetwal/pg_resetwal.c | 4 ++++ src/bin/pg_rewind/pg_rewind.c | 10 ++++++---- 5 files changed, 23 insertions(+), 4 deletions(-) diff --git a/src/bin/pg_archivecleanup/pg_archivecleanup.c b/src/bin/pg_archivecleanup/pg_archivecleanup.c index c25348bcb85..ab686b4748c 100644 --- a/src/bin/pg_archivecleanup/pg_archivecleanup.c +++ b/src/bin/pg_archivecleanup/pg_archivecleanup.c @@ -375,6 +375,10 @@ main(int argc, char **argv) exit(2); } + if (dryrun) + pg_log_info("Executing in dry-run mode.\n" + "No files will be removed."); + /* * Check archive exists and other initialization if required. */ diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c index df41836e70f..cc4be5d6ef4 100644 --- a/src/bin/pg_basebackup/pg_createsubscriber.c +++ b/src/bin/pg_basebackup/pg_createsubscriber.c @@ -2305,6 +2305,11 @@ main(int argc, char **argv) pg_log_error_hint("Try \"%s --help\" for more information.", progname); exit(1); } + + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + pg_log_info("validating publisher connection string"); pub_base_conninfo = get_base_conninfo(opt.pub_conninfo_str, &dbname_conninfo); diff --git a/src/bin/pg_combinebackup/pg_combinebackup.c b/src/bin/pg_combinebackup/pg_combinebackup.c index 3a325127209..c9bf0a9e105 100644 --- a/src/bin/pg_combinebackup/pg_combinebackup.c +++ b/src/bin/pg_combinebackup/pg_combinebackup.c @@ -242,6 +242,10 @@ main(int argc, char *argv[]) if (opt.no_manifest) opt.manifest_checksums = CHECKSUM_TYPE_NONE; + if (opt.dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + /* Check that the platform supports the requested copy method. */ if (opt.copy_method == COPY_METHOD_CLONE) { diff --git a/src/bin/pg_resetwal/pg_resetwal.c b/src/bin/pg_resetwal/pg_resetwal.c index a89d72fc5cf..dd5d279521e 100644 --- a/src/bin/pg_resetwal/pg_resetwal.c +++ b/src/bin/pg_resetwal/pg_resetwal.c @@ -397,6 +397,10 @@ main(int argc, char *argv[]) exit(1); } + if (noupdate) + pg_log_info("Executing in dry-run mode.\n" + "Nothing will be modified."); + /* * Attempt to read the existing pg_control file */ diff --git a/src/bin/pg_rewind/pg_rewind.c b/src/bin/pg_rewind/pg_rewind.c index 27c514f934a..e9364d04f76 100644 --- a/src/bin/pg_rewind/pg_rewind.c +++ b/src/bin/pg_rewind/pg_rewind.c @@ -300,10 +300,12 @@ main(int argc, char **argv) atexit(disconnect_atexit); - /* - * Ok, we have all the options and we're ready to start. First, connect to - * remote server. - */ + /* Ok, we have all the options and we're ready to start. */ + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + + /* First, connect to remote server. */ if (connstr_source) { conn = PQconnectdb(connstr_source); -- 2.47.3 --ibfr3ah5qy6tcbhw-- ^ permalink raw reply [nested|flat] 190+ messages in thread
* [PATCH v5] Log a note at program start when running in dry-run mode @ 2025-11-11 08:54 Álvaro Herrera <[email protected]> 0 siblings, 0 replies; 190+ messages in thread From: Álvaro Herrera @ 2025-11-11 08:54 UTC (permalink / raw) Users might get some peace of mind knowing their data is not being destroyed or whatever. Author: Peter Smith <[email protected]> Reviewed-by: Álvaro Herrera <[email protected]> Discussion: https://postgr.es/m/CAHut+PsvQJQnQO0KT0S2oegenkvJ8FUuY-QS5syyqmT24R2xFQ@mail.gmail.com --- src/bin/pg_archivecleanup/pg_archivecleanup.c | 4 ++++ src/bin/pg_basebackup/pg_createsubscriber.c | 5 +++++ src/bin/pg_combinebackup/pg_combinebackup.c | 4 ++++ src/bin/pg_resetwal/pg_resetwal.c | 4 ++++ src/bin/pg_rewind/pg_rewind.c | 10 ++++++---- 5 files changed, 23 insertions(+), 4 deletions(-) diff --git a/src/bin/pg_archivecleanup/pg_archivecleanup.c b/src/bin/pg_archivecleanup/pg_archivecleanup.c index c25348bcb85..ab686b4748c 100644 --- a/src/bin/pg_archivecleanup/pg_archivecleanup.c +++ b/src/bin/pg_archivecleanup/pg_archivecleanup.c @@ -375,6 +375,10 @@ main(int argc, char **argv) exit(2); } + if (dryrun) + pg_log_info("Executing in dry-run mode.\n" + "No files will be removed."); + /* * Check archive exists and other initialization if required. */ diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c index df41836e70f..cc4be5d6ef4 100644 --- a/src/bin/pg_basebackup/pg_createsubscriber.c +++ b/src/bin/pg_basebackup/pg_createsubscriber.c @@ -2305,6 +2305,11 @@ main(int argc, char **argv) pg_log_error_hint("Try \"%s --help\" for more information.", progname); exit(1); } + + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + pg_log_info("validating publisher connection string"); pub_base_conninfo = get_base_conninfo(opt.pub_conninfo_str, &dbname_conninfo); diff --git a/src/bin/pg_combinebackup/pg_combinebackup.c b/src/bin/pg_combinebackup/pg_combinebackup.c index 3a325127209..c9bf0a9e105 100644 --- a/src/bin/pg_combinebackup/pg_combinebackup.c +++ b/src/bin/pg_combinebackup/pg_combinebackup.c @@ -242,6 +242,10 @@ main(int argc, char *argv[]) if (opt.no_manifest) opt.manifest_checksums = CHECKSUM_TYPE_NONE; + if (opt.dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + /* Check that the platform supports the requested copy method. */ if (opt.copy_method == COPY_METHOD_CLONE) { diff --git a/src/bin/pg_resetwal/pg_resetwal.c b/src/bin/pg_resetwal/pg_resetwal.c index a89d72fc5cf..dd5d279521e 100644 --- a/src/bin/pg_resetwal/pg_resetwal.c +++ b/src/bin/pg_resetwal/pg_resetwal.c @@ -397,6 +397,10 @@ main(int argc, char *argv[]) exit(1); } + if (noupdate) + pg_log_info("Executing in dry-run mode.\n" + "Nothing will be modified."); + /* * Attempt to read the existing pg_control file */ diff --git a/src/bin/pg_rewind/pg_rewind.c b/src/bin/pg_rewind/pg_rewind.c index 27c514f934a..e9364d04f76 100644 --- a/src/bin/pg_rewind/pg_rewind.c +++ b/src/bin/pg_rewind/pg_rewind.c @@ -300,10 +300,12 @@ main(int argc, char **argv) atexit(disconnect_atexit); - /* - * Ok, we have all the options and we're ready to start. First, connect to - * remote server. - */ + /* Ok, we have all the options and we're ready to start. */ + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + + /* First, connect to remote server. */ if (connstr_source) { conn = PQconnectdb(connstr_source); -- 2.47.3 --ibfr3ah5qy6tcbhw-- ^ permalink raw reply [nested|flat] 190+ messages in thread
* [PATCH v5] Log a note at program start when running in dry-run mode @ 2025-11-11 08:54 Álvaro Herrera <[email protected]> 0 siblings, 0 replies; 190+ messages in thread From: Álvaro Herrera @ 2025-11-11 08:54 UTC (permalink / raw) Users might get some peace of mind knowing their data is not being destroyed or whatever. Author: Peter Smith <[email protected]> Reviewed-by: Álvaro Herrera <[email protected]> Discussion: https://postgr.es/m/CAHut+PsvQJQnQO0KT0S2oegenkvJ8FUuY-QS5syyqmT24R2xFQ@mail.gmail.com --- src/bin/pg_archivecleanup/pg_archivecleanup.c | 4 ++++ src/bin/pg_basebackup/pg_createsubscriber.c | 5 +++++ src/bin/pg_combinebackup/pg_combinebackup.c | 4 ++++ src/bin/pg_resetwal/pg_resetwal.c | 4 ++++ src/bin/pg_rewind/pg_rewind.c | 10 ++++++---- 5 files changed, 23 insertions(+), 4 deletions(-) diff --git a/src/bin/pg_archivecleanup/pg_archivecleanup.c b/src/bin/pg_archivecleanup/pg_archivecleanup.c index c25348bcb85..ab686b4748c 100644 --- a/src/bin/pg_archivecleanup/pg_archivecleanup.c +++ b/src/bin/pg_archivecleanup/pg_archivecleanup.c @@ -375,6 +375,10 @@ main(int argc, char **argv) exit(2); } + if (dryrun) + pg_log_info("Executing in dry-run mode.\n" + "No files will be removed."); + /* * Check archive exists and other initialization if required. */ diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c index df41836e70f..cc4be5d6ef4 100644 --- a/src/bin/pg_basebackup/pg_createsubscriber.c +++ b/src/bin/pg_basebackup/pg_createsubscriber.c @@ -2305,6 +2305,11 @@ main(int argc, char **argv) pg_log_error_hint("Try \"%s --help\" for more information.", progname); exit(1); } + + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + pg_log_info("validating publisher connection string"); pub_base_conninfo = get_base_conninfo(opt.pub_conninfo_str, &dbname_conninfo); diff --git a/src/bin/pg_combinebackup/pg_combinebackup.c b/src/bin/pg_combinebackup/pg_combinebackup.c index 3a325127209..c9bf0a9e105 100644 --- a/src/bin/pg_combinebackup/pg_combinebackup.c +++ b/src/bin/pg_combinebackup/pg_combinebackup.c @@ -242,6 +242,10 @@ main(int argc, char *argv[]) if (opt.no_manifest) opt.manifest_checksums = CHECKSUM_TYPE_NONE; + if (opt.dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + /* Check that the platform supports the requested copy method. */ if (opt.copy_method == COPY_METHOD_CLONE) { diff --git a/src/bin/pg_resetwal/pg_resetwal.c b/src/bin/pg_resetwal/pg_resetwal.c index a89d72fc5cf..dd5d279521e 100644 --- a/src/bin/pg_resetwal/pg_resetwal.c +++ b/src/bin/pg_resetwal/pg_resetwal.c @@ -397,6 +397,10 @@ main(int argc, char *argv[]) exit(1); } + if (noupdate) + pg_log_info("Executing in dry-run mode.\n" + "Nothing will be modified."); + /* * Attempt to read the existing pg_control file */ diff --git a/src/bin/pg_rewind/pg_rewind.c b/src/bin/pg_rewind/pg_rewind.c index 27c514f934a..e9364d04f76 100644 --- a/src/bin/pg_rewind/pg_rewind.c +++ b/src/bin/pg_rewind/pg_rewind.c @@ -300,10 +300,12 @@ main(int argc, char **argv) atexit(disconnect_atexit); - /* - * Ok, we have all the options and we're ready to start. First, connect to - * remote server. - */ + /* Ok, we have all the options and we're ready to start. */ + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + + /* First, connect to remote server. */ if (connstr_source) { conn = PQconnectdb(connstr_source); -- 2.47.3 --ibfr3ah5qy6tcbhw-- ^ permalink raw reply [nested|flat] 190+ messages in thread
* [PATCH v5] Log a note at program start when running in dry-run mode @ 2025-11-11 08:54 Álvaro Herrera <[email protected]> 0 siblings, 0 replies; 190+ messages in thread From: Álvaro Herrera @ 2025-11-11 08:54 UTC (permalink / raw) Users might get some peace of mind knowing their data is not being destroyed or whatever. Author: Peter Smith <[email protected]> Reviewed-by: Álvaro Herrera <[email protected]> Discussion: https://postgr.es/m/CAHut+PsvQJQnQO0KT0S2oegenkvJ8FUuY-QS5syyqmT24R2xFQ@mail.gmail.com --- src/bin/pg_archivecleanup/pg_archivecleanup.c | 4 ++++ src/bin/pg_basebackup/pg_createsubscriber.c | 5 +++++ src/bin/pg_combinebackup/pg_combinebackup.c | 4 ++++ src/bin/pg_resetwal/pg_resetwal.c | 4 ++++ src/bin/pg_rewind/pg_rewind.c | 10 ++++++---- 5 files changed, 23 insertions(+), 4 deletions(-) diff --git a/src/bin/pg_archivecleanup/pg_archivecleanup.c b/src/bin/pg_archivecleanup/pg_archivecleanup.c index c25348bcb85..ab686b4748c 100644 --- a/src/bin/pg_archivecleanup/pg_archivecleanup.c +++ b/src/bin/pg_archivecleanup/pg_archivecleanup.c @@ -375,6 +375,10 @@ main(int argc, char **argv) exit(2); } + if (dryrun) + pg_log_info("Executing in dry-run mode.\n" + "No files will be removed."); + /* * Check archive exists and other initialization if required. */ diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c index df41836e70f..cc4be5d6ef4 100644 --- a/src/bin/pg_basebackup/pg_createsubscriber.c +++ b/src/bin/pg_basebackup/pg_createsubscriber.c @@ -2305,6 +2305,11 @@ main(int argc, char **argv) pg_log_error_hint("Try \"%s --help\" for more information.", progname); exit(1); } + + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + pg_log_info("validating publisher connection string"); pub_base_conninfo = get_base_conninfo(opt.pub_conninfo_str, &dbname_conninfo); diff --git a/src/bin/pg_combinebackup/pg_combinebackup.c b/src/bin/pg_combinebackup/pg_combinebackup.c index 3a325127209..c9bf0a9e105 100644 --- a/src/bin/pg_combinebackup/pg_combinebackup.c +++ b/src/bin/pg_combinebackup/pg_combinebackup.c @@ -242,6 +242,10 @@ main(int argc, char *argv[]) if (opt.no_manifest) opt.manifest_checksums = CHECKSUM_TYPE_NONE; + if (opt.dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + /* Check that the platform supports the requested copy method. */ if (opt.copy_method == COPY_METHOD_CLONE) { diff --git a/src/bin/pg_resetwal/pg_resetwal.c b/src/bin/pg_resetwal/pg_resetwal.c index a89d72fc5cf..dd5d279521e 100644 --- a/src/bin/pg_resetwal/pg_resetwal.c +++ b/src/bin/pg_resetwal/pg_resetwal.c @@ -397,6 +397,10 @@ main(int argc, char *argv[]) exit(1); } + if (noupdate) + pg_log_info("Executing in dry-run mode.\n" + "Nothing will be modified."); + /* * Attempt to read the existing pg_control file */ diff --git a/src/bin/pg_rewind/pg_rewind.c b/src/bin/pg_rewind/pg_rewind.c index 27c514f934a..e9364d04f76 100644 --- a/src/bin/pg_rewind/pg_rewind.c +++ b/src/bin/pg_rewind/pg_rewind.c @@ -300,10 +300,12 @@ main(int argc, char **argv) atexit(disconnect_atexit); - /* - * Ok, we have all the options and we're ready to start. First, connect to - * remote server. - */ + /* Ok, we have all the options and we're ready to start. */ + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + + /* First, connect to remote server. */ if (connstr_source) { conn = PQconnectdb(connstr_source); -- 2.47.3 --ibfr3ah5qy6tcbhw-- ^ permalink raw reply [nested|flat] 190+ messages in thread
* [PATCH v5] Log a note at program start when running in dry-run mode @ 2025-11-11 08:54 Álvaro Herrera <[email protected]> 0 siblings, 0 replies; 190+ messages in thread From: Álvaro Herrera @ 2025-11-11 08:54 UTC (permalink / raw) Users might get some peace of mind knowing their data is not being destroyed or whatever. Author: Peter Smith <[email protected]> Reviewed-by: Álvaro Herrera <[email protected]> Discussion: https://postgr.es/m/CAHut+PsvQJQnQO0KT0S2oegenkvJ8FUuY-QS5syyqmT24R2xFQ@mail.gmail.com --- src/bin/pg_archivecleanup/pg_archivecleanup.c | 4 ++++ src/bin/pg_basebackup/pg_createsubscriber.c | 5 +++++ src/bin/pg_combinebackup/pg_combinebackup.c | 4 ++++ src/bin/pg_resetwal/pg_resetwal.c | 4 ++++ src/bin/pg_rewind/pg_rewind.c | 10 ++++++---- 5 files changed, 23 insertions(+), 4 deletions(-) diff --git a/src/bin/pg_archivecleanup/pg_archivecleanup.c b/src/bin/pg_archivecleanup/pg_archivecleanup.c index c25348bcb85..ab686b4748c 100644 --- a/src/bin/pg_archivecleanup/pg_archivecleanup.c +++ b/src/bin/pg_archivecleanup/pg_archivecleanup.c @@ -375,6 +375,10 @@ main(int argc, char **argv) exit(2); } + if (dryrun) + pg_log_info("Executing in dry-run mode.\n" + "No files will be removed."); + /* * Check archive exists and other initialization if required. */ diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c index df41836e70f..cc4be5d6ef4 100644 --- a/src/bin/pg_basebackup/pg_createsubscriber.c +++ b/src/bin/pg_basebackup/pg_createsubscriber.c @@ -2305,6 +2305,11 @@ main(int argc, char **argv) pg_log_error_hint("Try \"%s --help\" for more information.", progname); exit(1); } + + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + pg_log_info("validating publisher connection string"); pub_base_conninfo = get_base_conninfo(opt.pub_conninfo_str, &dbname_conninfo); diff --git a/src/bin/pg_combinebackup/pg_combinebackup.c b/src/bin/pg_combinebackup/pg_combinebackup.c index 3a325127209..c9bf0a9e105 100644 --- a/src/bin/pg_combinebackup/pg_combinebackup.c +++ b/src/bin/pg_combinebackup/pg_combinebackup.c @@ -242,6 +242,10 @@ main(int argc, char *argv[]) if (opt.no_manifest) opt.manifest_checksums = CHECKSUM_TYPE_NONE; + if (opt.dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + /* Check that the platform supports the requested copy method. */ if (opt.copy_method == COPY_METHOD_CLONE) { diff --git a/src/bin/pg_resetwal/pg_resetwal.c b/src/bin/pg_resetwal/pg_resetwal.c index a89d72fc5cf..dd5d279521e 100644 --- a/src/bin/pg_resetwal/pg_resetwal.c +++ b/src/bin/pg_resetwal/pg_resetwal.c @@ -397,6 +397,10 @@ main(int argc, char *argv[]) exit(1); } + if (noupdate) + pg_log_info("Executing in dry-run mode.\n" + "Nothing will be modified."); + /* * Attempt to read the existing pg_control file */ diff --git a/src/bin/pg_rewind/pg_rewind.c b/src/bin/pg_rewind/pg_rewind.c index 27c514f934a..e9364d04f76 100644 --- a/src/bin/pg_rewind/pg_rewind.c +++ b/src/bin/pg_rewind/pg_rewind.c @@ -300,10 +300,12 @@ main(int argc, char **argv) atexit(disconnect_atexit); - /* - * Ok, we have all the options and we're ready to start. First, connect to - * remote server. - */ + /* Ok, we have all the options and we're ready to start. */ + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + + /* First, connect to remote server. */ if (connstr_source) { conn = PQconnectdb(connstr_source); -- 2.47.3 --ibfr3ah5qy6tcbhw-- ^ permalink raw reply [nested|flat] 190+ messages in thread
* [PATCH v5] Log a note at program start when running in dry-run mode @ 2025-11-11 08:54 Álvaro Herrera <[email protected]> 0 siblings, 0 replies; 190+ messages in thread From: Álvaro Herrera @ 2025-11-11 08:54 UTC (permalink / raw) Users might get some peace of mind knowing their data is not being destroyed or whatever. Author: Peter Smith <[email protected]> Reviewed-by: Álvaro Herrera <[email protected]> Discussion: https://postgr.es/m/CAHut+PsvQJQnQO0KT0S2oegenkvJ8FUuY-QS5syyqmT24R2xFQ@mail.gmail.com --- src/bin/pg_archivecleanup/pg_archivecleanup.c | 4 ++++ src/bin/pg_basebackup/pg_createsubscriber.c | 5 +++++ src/bin/pg_combinebackup/pg_combinebackup.c | 4 ++++ src/bin/pg_resetwal/pg_resetwal.c | 4 ++++ src/bin/pg_rewind/pg_rewind.c | 10 ++++++---- 5 files changed, 23 insertions(+), 4 deletions(-) diff --git a/src/bin/pg_archivecleanup/pg_archivecleanup.c b/src/bin/pg_archivecleanup/pg_archivecleanup.c index c25348bcb85..ab686b4748c 100644 --- a/src/bin/pg_archivecleanup/pg_archivecleanup.c +++ b/src/bin/pg_archivecleanup/pg_archivecleanup.c @@ -375,6 +375,10 @@ main(int argc, char **argv) exit(2); } + if (dryrun) + pg_log_info("Executing in dry-run mode.\n" + "No files will be removed."); + /* * Check archive exists and other initialization if required. */ diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c index df41836e70f..cc4be5d6ef4 100644 --- a/src/bin/pg_basebackup/pg_createsubscriber.c +++ b/src/bin/pg_basebackup/pg_createsubscriber.c @@ -2305,6 +2305,11 @@ main(int argc, char **argv) pg_log_error_hint("Try \"%s --help\" for more information.", progname); exit(1); } + + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + pg_log_info("validating publisher connection string"); pub_base_conninfo = get_base_conninfo(opt.pub_conninfo_str, &dbname_conninfo); diff --git a/src/bin/pg_combinebackup/pg_combinebackup.c b/src/bin/pg_combinebackup/pg_combinebackup.c index 3a325127209..c9bf0a9e105 100644 --- a/src/bin/pg_combinebackup/pg_combinebackup.c +++ b/src/bin/pg_combinebackup/pg_combinebackup.c @@ -242,6 +242,10 @@ main(int argc, char *argv[]) if (opt.no_manifest) opt.manifest_checksums = CHECKSUM_TYPE_NONE; + if (opt.dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + /* Check that the platform supports the requested copy method. */ if (opt.copy_method == COPY_METHOD_CLONE) { diff --git a/src/bin/pg_resetwal/pg_resetwal.c b/src/bin/pg_resetwal/pg_resetwal.c index a89d72fc5cf..dd5d279521e 100644 --- a/src/bin/pg_resetwal/pg_resetwal.c +++ b/src/bin/pg_resetwal/pg_resetwal.c @@ -397,6 +397,10 @@ main(int argc, char *argv[]) exit(1); } + if (noupdate) + pg_log_info("Executing in dry-run mode.\n" + "Nothing will be modified."); + /* * Attempt to read the existing pg_control file */ diff --git a/src/bin/pg_rewind/pg_rewind.c b/src/bin/pg_rewind/pg_rewind.c index 27c514f934a..e9364d04f76 100644 --- a/src/bin/pg_rewind/pg_rewind.c +++ b/src/bin/pg_rewind/pg_rewind.c @@ -300,10 +300,12 @@ main(int argc, char **argv) atexit(disconnect_atexit); - /* - * Ok, we have all the options and we're ready to start. First, connect to - * remote server. - */ + /* Ok, we have all the options and we're ready to start. */ + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + + /* First, connect to remote server. */ if (connstr_source) { conn = PQconnectdb(connstr_source); -- 2.47.3 --ibfr3ah5qy6tcbhw-- ^ permalink raw reply [nested|flat] 190+ messages in thread
* [PATCH v5] Log a note at program start when running in dry-run mode @ 2025-11-11 08:54 Álvaro Herrera <[email protected]> 0 siblings, 0 replies; 190+ messages in thread From: Álvaro Herrera @ 2025-11-11 08:54 UTC (permalink / raw) Users might get some peace of mind knowing their data is not being destroyed or whatever. Author: Peter Smith <[email protected]> Reviewed-by: Álvaro Herrera <[email protected]> Discussion: https://postgr.es/m/CAHut+PsvQJQnQO0KT0S2oegenkvJ8FUuY-QS5syyqmT24R2xFQ@mail.gmail.com --- src/bin/pg_archivecleanup/pg_archivecleanup.c | 4 ++++ src/bin/pg_basebackup/pg_createsubscriber.c | 5 +++++ src/bin/pg_combinebackup/pg_combinebackup.c | 4 ++++ src/bin/pg_resetwal/pg_resetwal.c | 4 ++++ src/bin/pg_rewind/pg_rewind.c | 10 ++++++---- 5 files changed, 23 insertions(+), 4 deletions(-) diff --git a/src/bin/pg_archivecleanup/pg_archivecleanup.c b/src/bin/pg_archivecleanup/pg_archivecleanup.c index c25348bcb85..ab686b4748c 100644 --- a/src/bin/pg_archivecleanup/pg_archivecleanup.c +++ b/src/bin/pg_archivecleanup/pg_archivecleanup.c @@ -375,6 +375,10 @@ main(int argc, char **argv) exit(2); } + if (dryrun) + pg_log_info("Executing in dry-run mode.\n" + "No files will be removed."); + /* * Check archive exists and other initialization if required. */ diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c index df41836e70f..cc4be5d6ef4 100644 --- a/src/bin/pg_basebackup/pg_createsubscriber.c +++ b/src/bin/pg_basebackup/pg_createsubscriber.c @@ -2305,6 +2305,11 @@ main(int argc, char **argv) pg_log_error_hint("Try \"%s --help\" for more information.", progname); exit(1); } + + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + pg_log_info("validating publisher connection string"); pub_base_conninfo = get_base_conninfo(opt.pub_conninfo_str, &dbname_conninfo); diff --git a/src/bin/pg_combinebackup/pg_combinebackup.c b/src/bin/pg_combinebackup/pg_combinebackup.c index 3a325127209..c9bf0a9e105 100644 --- a/src/bin/pg_combinebackup/pg_combinebackup.c +++ b/src/bin/pg_combinebackup/pg_combinebackup.c @@ -242,6 +242,10 @@ main(int argc, char *argv[]) if (opt.no_manifest) opt.manifest_checksums = CHECKSUM_TYPE_NONE; + if (opt.dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + /* Check that the platform supports the requested copy method. */ if (opt.copy_method == COPY_METHOD_CLONE) { diff --git a/src/bin/pg_resetwal/pg_resetwal.c b/src/bin/pg_resetwal/pg_resetwal.c index a89d72fc5cf..dd5d279521e 100644 --- a/src/bin/pg_resetwal/pg_resetwal.c +++ b/src/bin/pg_resetwal/pg_resetwal.c @@ -397,6 +397,10 @@ main(int argc, char *argv[]) exit(1); } + if (noupdate) + pg_log_info("Executing in dry-run mode.\n" + "Nothing will be modified."); + /* * Attempt to read the existing pg_control file */ diff --git a/src/bin/pg_rewind/pg_rewind.c b/src/bin/pg_rewind/pg_rewind.c index 27c514f934a..e9364d04f76 100644 --- a/src/bin/pg_rewind/pg_rewind.c +++ b/src/bin/pg_rewind/pg_rewind.c @@ -300,10 +300,12 @@ main(int argc, char **argv) atexit(disconnect_atexit); - /* - * Ok, we have all the options and we're ready to start. First, connect to - * remote server. - */ + /* Ok, we have all the options and we're ready to start. */ + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + + /* First, connect to remote server. */ if (connstr_source) { conn = PQconnectdb(connstr_source); -- 2.47.3 --ibfr3ah5qy6tcbhw-- ^ permalink raw reply [nested|flat] 190+ messages in thread
* [PATCH v5] Log a note at program start when running in dry-run mode @ 2025-11-11 08:54 Álvaro Herrera <[email protected]> 0 siblings, 0 replies; 190+ messages in thread From: Álvaro Herrera @ 2025-11-11 08:54 UTC (permalink / raw) Users might get some peace of mind knowing their data is not being destroyed or whatever. Author: Peter Smith <[email protected]> Reviewed-by: Álvaro Herrera <[email protected]> Discussion: https://postgr.es/m/CAHut+PsvQJQnQO0KT0S2oegenkvJ8FUuY-QS5syyqmT24R2xFQ@mail.gmail.com --- src/bin/pg_archivecleanup/pg_archivecleanup.c | 4 ++++ src/bin/pg_basebackup/pg_createsubscriber.c | 5 +++++ src/bin/pg_combinebackup/pg_combinebackup.c | 4 ++++ src/bin/pg_resetwal/pg_resetwal.c | 4 ++++ src/bin/pg_rewind/pg_rewind.c | 10 ++++++---- 5 files changed, 23 insertions(+), 4 deletions(-) diff --git a/src/bin/pg_archivecleanup/pg_archivecleanup.c b/src/bin/pg_archivecleanup/pg_archivecleanup.c index c25348bcb85..ab686b4748c 100644 --- a/src/bin/pg_archivecleanup/pg_archivecleanup.c +++ b/src/bin/pg_archivecleanup/pg_archivecleanup.c @@ -375,6 +375,10 @@ main(int argc, char **argv) exit(2); } + if (dryrun) + pg_log_info("Executing in dry-run mode.\n" + "No files will be removed."); + /* * Check archive exists and other initialization if required. */ diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c index df41836e70f..cc4be5d6ef4 100644 --- a/src/bin/pg_basebackup/pg_createsubscriber.c +++ b/src/bin/pg_basebackup/pg_createsubscriber.c @@ -2305,6 +2305,11 @@ main(int argc, char **argv) pg_log_error_hint("Try \"%s --help\" for more information.", progname); exit(1); } + + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + pg_log_info("validating publisher connection string"); pub_base_conninfo = get_base_conninfo(opt.pub_conninfo_str, &dbname_conninfo); diff --git a/src/bin/pg_combinebackup/pg_combinebackup.c b/src/bin/pg_combinebackup/pg_combinebackup.c index 3a325127209..c9bf0a9e105 100644 --- a/src/bin/pg_combinebackup/pg_combinebackup.c +++ b/src/bin/pg_combinebackup/pg_combinebackup.c @@ -242,6 +242,10 @@ main(int argc, char *argv[]) if (opt.no_manifest) opt.manifest_checksums = CHECKSUM_TYPE_NONE; + if (opt.dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + /* Check that the platform supports the requested copy method. */ if (opt.copy_method == COPY_METHOD_CLONE) { diff --git a/src/bin/pg_resetwal/pg_resetwal.c b/src/bin/pg_resetwal/pg_resetwal.c index a89d72fc5cf..dd5d279521e 100644 --- a/src/bin/pg_resetwal/pg_resetwal.c +++ b/src/bin/pg_resetwal/pg_resetwal.c @@ -397,6 +397,10 @@ main(int argc, char *argv[]) exit(1); } + if (noupdate) + pg_log_info("Executing in dry-run mode.\n" + "Nothing will be modified."); + /* * Attempt to read the existing pg_control file */ diff --git a/src/bin/pg_rewind/pg_rewind.c b/src/bin/pg_rewind/pg_rewind.c index 27c514f934a..e9364d04f76 100644 --- a/src/bin/pg_rewind/pg_rewind.c +++ b/src/bin/pg_rewind/pg_rewind.c @@ -300,10 +300,12 @@ main(int argc, char **argv) atexit(disconnect_atexit); - /* - * Ok, we have all the options and we're ready to start. First, connect to - * remote server. - */ + /* Ok, we have all the options and we're ready to start. */ + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + + /* First, connect to remote server. */ if (connstr_source) { conn = PQconnectdb(connstr_source); -- 2.47.3 --ibfr3ah5qy6tcbhw-- ^ permalink raw reply [nested|flat] 190+ messages in thread
* [PATCH v5] Log a note at program start when running in dry-run mode @ 2025-11-11 08:54 Álvaro Herrera <[email protected]> 0 siblings, 0 replies; 190+ messages in thread From: Álvaro Herrera @ 2025-11-11 08:54 UTC (permalink / raw) Users might get some peace of mind knowing their data is not being destroyed or whatever. Author: Peter Smith <[email protected]> Reviewed-by: Álvaro Herrera <[email protected]> Discussion: https://postgr.es/m/CAHut+PsvQJQnQO0KT0S2oegenkvJ8FUuY-QS5syyqmT24R2xFQ@mail.gmail.com --- src/bin/pg_archivecleanup/pg_archivecleanup.c | 4 ++++ src/bin/pg_basebackup/pg_createsubscriber.c | 5 +++++ src/bin/pg_combinebackup/pg_combinebackup.c | 4 ++++ src/bin/pg_resetwal/pg_resetwal.c | 4 ++++ src/bin/pg_rewind/pg_rewind.c | 10 ++++++---- 5 files changed, 23 insertions(+), 4 deletions(-) diff --git a/src/bin/pg_archivecleanup/pg_archivecleanup.c b/src/bin/pg_archivecleanup/pg_archivecleanup.c index c25348bcb85..ab686b4748c 100644 --- a/src/bin/pg_archivecleanup/pg_archivecleanup.c +++ b/src/bin/pg_archivecleanup/pg_archivecleanup.c @@ -375,6 +375,10 @@ main(int argc, char **argv) exit(2); } + if (dryrun) + pg_log_info("Executing in dry-run mode.\n" + "No files will be removed."); + /* * Check archive exists and other initialization if required. */ diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c index df41836e70f..cc4be5d6ef4 100644 --- a/src/bin/pg_basebackup/pg_createsubscriber.c +++ b/src/bin/pg_basebackup/pg_createsubscriber.c @@ -2305,6 +2305,11 @@ main(int argc, char **argv) pg_log_error_hint("Try \"%s --help\" for more information.", progname); exit(1); } + + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + pg_log_info("validating publisher connection string"); pub_base_conninfo = get_base_conninfo(opt.pub_conninfo_str, &dbname_conninfo); diff --git a/src/bin/pg_combinebackup/pg_combinebackup.c b/src/bin/pg_combinebackup/pg_combinebackup.c index 3a325127209..c9bf0a9e105 100644 --- a/src/bin/pg_combinebackup/pg_combinebackup.c +++ b/src/bin/pg_combinebackup/pg_combinebackup.c @@ -242,6 +242,10 @@ main(int argc, char *argv[]) if (opt.no_manifest) opt.manifest_checksums = CHECKSUM_TYPE_NONE; + if (opt.dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + /* Check that the platform supports the requested copy method. */ if (opt.copy_method == COPY_METHOD_CLONE) { diff --git a/src/bin/pg_resetwal/pg_resetwal.c b/src/bin/pg_resetwal/pg_resetwal.c index a89d72fc5cf..dd5d279521e 100644 --- a/src/bin/pg_resetwal/pg_resetwal.c +++ b/src/bin/pg_resetwal/pg_resetwal.c @@ -397,6 +397,10 @@ main(int argc, char *argv[]) exit(1); } + if (noupdate) + pg_log_info("Executing in dry-run mode.\n" + "Nothing will be modified."); + /* * Attempt to read the existing pg_control file */ diff --git a/src/bin/pg_rewind/pg_rewind.c b/src/bin/pg_rewind/pg_rewind.c index 27c514f934a..e9364d04f76 100644 --- a/src/bin/pg_rewind/pg_rewind.c +++ b/src/bin/pg_rewind/pg_rewind.c @@ -300,10 +300,12 @@ main(int argc, char **argv) atexit(disconnect_atexit); - /* - * Ok, we have all the options and we're ready to start. First, connect to - * remote server. - */ + /* Ok, we have all the options and we're ready to start. */ + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + + /* First, connect to remote server. */ if (connstr_source) { conn = PQconnectdb(connstr_source); -- 2.47.3 --ibfr3ah5qy6tcbhw-- ^ permalink raw reply [nested|flat] 190+ messages in thread
* [PATCH v5] Log a note at program start when running in dry-run mode @ 2025-11-11 08:54 Álvaro Herrera <[email protected]> 0 siblings, 0 replies; 190+ messages in thread From: Álvaro Herrera @ 2025-11-11 08:54 UTC (permalink / raw) Users might get some peace of mind knowing their data is not being destroyed or whatever. Author: Peter Smith <[email protected]> Reviewed-by: Álvaro Herrera <[email protected]> Discussion: https://postgr.es/m/CAHut+PsvQJQnQO0KT0S2oegenkvJ8FUuY-QS5syyqmT24R2xFQ@mail.gmail.com --- src/bin/pg_archivecleanup/pg_archivecleanup.c | 4 ++++ src/bin/pg_basebackup/pg_createsubscriber.c | 5 +++++ src/bin/pg_combinebackup/pg_combinebackup.c | 4 ++++ src/bin/pg_resetwal/pg_resetwal.c | 4 ++++ src/bin/pg_rewind/pg_rewind.c | 10 ++++++---- 5 files changed, 23 insertions(+), 4 deletions(-) diff --git a/src/bin/pg_archivecleanup/pg_archivecleanup.c b/src/bin/pg_archivecleanup/pg_archivecleanup.c index c25348bcb85..ab686b4748c 100644 --- a/src/bin/pg_archivecleanup/pg_archivecleanup.c +++ b/src/bin/pg_archivecleanup/pg_archivecleanup.c @@ -375,6 +375,10 @@ main(int argc, char **argv) exit(2); } + if (dryrun) + pg_log_info("Executing in dry-run mode.\n" + "No files will be removed."); + /* * Check archive exists and other initialization if required. */ diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c index df41836e70f..cc4be5d6ef4 100644 --- a/src/bin/pg_basebackup/pg_createsubscriber.c +++ b/src/bin/pg_basebackup/pg_createsubscriber.c @@ -2305,6 +2305,11 @@ main(int argc, char **argv) pg_log_error_hint("Try \"%s --help\" for more information.", progname); exit(1); } + + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + pg_log_info("validating publisher connection string"); pub_base_conninfo = get_base_conninfo(opt.pub_conninfo_str, &dbname_conninfo); diff --git a/src/bin/pg_combinebackup/pg_combinebackup.c b/src/bin/pg_combinebackup/pg_combinebackup.c index 3a325127209..c9bf0a9e105 100644 --- a/src/bin/pg_combinebackup/pg_combinebackup.c +++ b/src/bin/pg_combinebackup/pg_combinebackup.c @@ -242,6 +242,10 @@ main(int argc, char *argv[]) if (opt.no_manifest) opt.manifest_checksums = CHECKSUM_TYPE_NONE; + if (opt.dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + /* Check that the platform supports the requested copy method. */ if (opt.copy_method == COPY_METHOD_CLONE) { diff --git a/src/bin/pg_resetwal/pg_resetwal.c b/src/bin/pg_resetwal/pg_resetwal.c index a89d72fc5cf..dd5d279521e 100644 --- a/src/bin/pg_resetwal/pg_resetwal.c +++ b/src/bin/pg_resetwal/pg_resetwal.c @@ -397,6 +397,10 @@ main(int argc, char *argv[]) exit(1); } + if (noupdate) + pg_log_info("Executing in dry-run mode.\n" + "Nothing will be modified."); + /* * Attempt to read the existing pg_control file */ diff --git a/src/bin/pg_rewind/pg_rewind.c b/src/bin/pg_rewind/pg_rewind.c index 27c514f934a..e9364d04f76 100644 --- a/src/bin/pg_rewind/pg_rewind.c +++ b/src/bin/pg_rewind/pg_rewind.c @@ -300,10 +300,12 @@ main(int argc, char **argv) atexit(disconnect_atexit); - /* - * Ok, we have all the options and we're ready to start. First, connect to - * remote server. - */ + /* Ok, we have all the options and we're ready to start. */ + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + + /* First, connect to remote server. */ if (connstr_source) { conn = PQconnectdb(connstr_source); -- 2.47.3 --ibfr3ah5qy6tcbhw-- ^ permalink raw reply [nested|flat] 190+ messages in thread
* [PATCH v5] Log a note at program start when running in dry-run mode @ 2025-11-11 08:54 Álvaro Herrera <[email protected]> 0 siblings, 0 replies; 190+ messages in thread From: Álvaro Herrera @ 2025-11-11 08:54 UTC (permalink / raw) Users might get some peace of mind knowing their data is not being destroyed or whatever. Author: Peter Smith <[email protected]> Reviewed-by: Álvaro Herrera <[email protected]> Discussion: https://postgr.es/m/CAHut+PsvQJQnQO0KT0S2oegenkvJ8FUuY-QS5syyqmT24R2xFQ@mail.gmail.com --- src/bin/pg_archivecleanup/pg_archivecleanup.c | 4 ++++ src/bin/pg_basebackup/pg_createsubscriber.c | 5 +++++ src/bin/pg_combinebackup/pg_combinebackup.c | 4 ++++ src/bin/pg_resetwal/pg_resetwal.c | 4 ++++ src/bin/pg_rewind/pg_rewind.c | 10 ++++++---- 5 files changed, 23 insertions(+), 4 deletions(-) diff --git a/src/bin/pg_archivecleanup/pg_archivecleanup.c b/src/bin/pg_archivecleanup/pg_archivecleanup.c index c25348bcb85..ab686b4748c 100644 --- a/src/bin/pg_archivecleanup/pg_archivecleanup.c +++ b/src/bin/pg_archivecleanup/pg_archivecleanup.c @@ -375,6 +375,10 @@ main(int argc, char **argv) exit(2); } + if (dryrun) + pg_log_info("Executing in dry-run mode.\n" + "No files will be removed."); + /* * Check archive exists and other initialization if required. */ diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c index df41836e70f..cc4be5d6ef4 100644 --- a/src/bin/pg_basebackup/pg_createsubscriber.c +++ b/src/bin/pg_basebackup/pg_createsubscriber.c @@ -2305,6 +2305,11 @@ main(int argc, char **argv) pg_log_error_hint("Try \"%s --help\" for more information.", progname); exit(1); } + + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + pg_log_info("validating publisher connection string"); pub_base_conninfo = get_base_conninfo(opt.pub_conninfo_str, &dbname_conninfo); diff --git a/src/bin/pg_combinebackup/pg_combinebackup.c b/src/bin/pg_combinebackup/pg_combinebackup.c index 3a325127209..c9bf0a9e105 100644 --- a/src/bin/pg_combinebackup/pg_combinebackup.c +++ b/src/bin/pg_combinebackup/pg_combinebackup.c @@ -242,6 +242,10 @@ main(int argc, char *argv[]) if (opt.no_manifest) opt.manifest_checksums = CHECKSUM_TYPE_NONE; + if (opt.dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + /* Check that the platform supports the requested copy method. */ if (opt.copy_method == COPY_METHOD_CLONE) { diff --git a/src/bin/pg_resetwal/pg_resetwal.c b/src/bin/pg_resetwal/pg_resetwal.c index a89d72fc5cf..dd5d279521e 100644 --- a/src/bin/pg_resetwal/pg_resetwal.c +++ b/src/bin/pg_resetwal/pg_resetwal.c @@ -397,6 +397,10 @@ main(int argc, char *argv[]) exit(1); } + if (noupdate) + pg_log_info("Executing in dry-run mode.\n" + "Nothing will be modified."); + /* * Attempt to read the existing pg_control file */ diff --git a/src/bin/pg_rewind/pg_rewind.c b/src/bin/pg_rewind/pg_rewind.c index 27c514f934a..e9364d04f76 100644 --- a/src/bin/pg_rewind/pg_rewind.c +++ b/src/bin/pg_rewind/pg_rewind.c @@ -300,10 +300,12 @@ main(int argc, char **argv) atexit(disconnect_atexit); - /* - * Ok, we have all the options and we're ready to start. First, connect to - * remote server. - */ + /* Ok, we have all the options and we're ready to start. */ + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + + /* First, connect to remote server. */ if (connstr_source) { conn = PQconnectdb(connstr_source); -- 2.47.3 --ibfr3ah5qy6tcbhw-- ^ permalink raw reply [nested|flat] 190+ messages in thread
* [PATCH v5] Log a note at program start when running in dry-run mode @ 2025-11-11 08:54 Álvaro Herrera <[email protected]> 0 siblings, 0 replies; 190+ messages in thread From: Álvaro Herrera @ 2025-11-11 08:54 UTC (permalink / raw) Users might get some peace of mind knowing their data is not being destroyed or whatever. Author: Peter Smith <[email protected]> Reviewed-by: Álvaro Herrera <[email protected]> Discussion: https://postgr.es/m/CAHut+PsvQJQnQO0KT0S2oegenkvJ8FUuY-QS5syyqmT24R2xFQ@mail.gmail.com --- src/bin/pg_archivecleanup/pg_archivecleanup.c | 4 ++++ src/bin/pg_basebackup/pg_createsubscriber.c | 5 +++++ src/bin/pg_combinebackup/pg_combinebackup.c | 4 ++++ src/bin/pg_resetwal/pg_resetwal.c | 4 ++++ src/bin/pg_rewind/pg_rewind.c | 10 ++++++---- 5 files changed, 23 insertions(+), 4 deletions(-) diff --git a/src/bin/pg_archivecleanup/pg_archivecleanup.c b/src/bin/pg_archivecleanup/pg_archivecleanup.c index c25348bcb85..ab686b4748c 100644 --- a/src/bin/pg_archivecleanup/pg_archivecleanup.c +++ b/src/bin/pg_archivecleanup/pg_archivecleanup.c @@ -375,6 +375,10 @@ main(int argc, char **argv) exit(2); } + if (dryrun) + pg_log_info("Executing in dry-run mode.\n" + "No files will be removed."); + /* * Check archive exists and other initialization if required. */ diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c index df41836e70f..cc4be5d6ef4 100644 --- a/src/bin/pg_basebackup/pg_createsubscriber.c +++ b/src/bin/pg_basebackup/pg_createsubscriber.c @@ -2305,6 +2305,11 @@ main(int argc, char **argv) pg_log_error_hint("Try \"%s --help\" for more information.", progname); exit(1); } + + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + pg_log_info("validating publisher connection string"); pub_base_conninfo = get_base_conninfo(opt.pub_conninfo_str, &dbname_conninfo); diff --git a/src/bin/pg_combinebackup/pg_combinebackup.c b/src/bin/pg_combinebackup/pg_combinebackup.c index 3a325127209..c9bf0a9e105 100644 --- a/src/bin/pg_combinebackup/pg_combinebackup.c +++ b/src/bin/pg_combinebackup/pg_combinebackup.c @@ -242,6 +242,10 @@ main(int argc, char *argv[]) if (opt.no_manifest) opt.manifest_checksums = CHECKSUM_TYPE_NONE; + if (opt.dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + /* Check that the platform supports the requested copy method. */ if (opt.copy_method == COPY_METHOD_CLONE) { diff --git a/src/bin/pg_resetwal/pg_resetwal.c b/src/bin/pg_resetwal/pg_resetwal.c index a89d72fc5cf..dd5d279521e 100644 --- a/src/bin/pg_resetwal/pg_resetwal.c +++ b/src/bin/pg_resetwal/pg_resetwal.c @@ -397,6 +397,10 @@ main(int argc, char *argv[]) exit(1); } + if (noupdate) + pg_log_info("Executing in dry-run mode.\n" + "Nothing will be modified."); + /* * Attempt to read the existing pg_control file */ diff --git a/src/bin/pg_rewind/pg_rewind.c b/src/bin/pg_rewind/pg_rewind.c index 27c514f934a..e9364d04f76 100644 --- a/src/bin/pg_rewind/pg_rewind.c +++ b/src/bin/pg_rewind/pg_rewind.c @@ -300,10 +300,12 @@ main(int argc, char **argv) atexit(disconnect_atexit); - /* - * Ok, we have all the options and we're ready to start. First, connect to - * remote server. - */ + /* Ok, we have all the options and we're ready to start. */ + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + + /* First, connect to remote server. */ if (connstr_source) { conn = PQconnectdb(connstr_source); -- 2.47.3 --ibfr3ah5qy6tcbhw-- ^ permalink raw reply [nested|flat] 190+ messages in thread
* [PATCH v5] Log a note at program start when running in dry-run mode @ 2025-11-11 08:54 Álvaro Herrera <[email protected]> 0 siblings, 0 replies; 190+ messages in thread From: Álvaro Herrera @ 2025-11-11 08:54 UTC (permalink / raw) Users might get some peace of mind knowing their data is not being destroyed or whatever. Author: Peter Smith <[email protected]> Reviewed-by: Álvaro Herrera <[email protected]> Discussion: https://postgr.es/m/CAHut+PsvQJQnQO0KT0S2oegenkvJ8FUuY-QS5syyqmT24R2xFQ@mail.gmail.com --- src/bin/pg_archivecleanup/pg_archivecleanup.c | 4 ++++ src/bin/pg_basebackup/pg_createsubscriber.c | 5 +++++ src/bin/pg_combinebackup/pg_combinebackup.c | 4 ++++ src/bin/pg_resetwal/pg_resetwal.c | 4 ++++ src/bin/pg_rewind/pg_rewind.c | 10 ++++++---- 5 files changed, 23 insertions(+), 4 deletions(-) diff --git a/src/bin/pg_archivecleanup/pg_archivecleanup.c b/src/bin/pg_archivecleanup/pg_archivecleanup.c index c25348bcb85..ab686b4748c 100644 --- a/src/bin/pg_archivecleanup/pg_archivecleanup.c +++ b/src/bin/pg_archivecleanup/pg_archivecleanup.c @@ -375,6 +375,10 @@ main(int argc, char **argv) exit(2); } + if (dryrun) + pg_log_info("Executing in dry-run mode.\n" + "No files will be removed."); + /* * Check archive exists and other initialization if required. */ diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c index df41836e70f..cc4be5d6ef4 100644 --- a/src/bin/pg_basebackup/pg_createsubscriber.c +++ b/src/bin/pg_basebackup/pg_createsubscriber.c @@ -2305,6 +2305,11 @@ main(int argc, char **argv) pg_log_error_hint("Try \"%s --help\" for more information.", progname); exit(1); } + + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + pg_log_info("validating publisher connection string"); pub_base_conninfo = get_base_conninfo(opt.pub_conninfo_str, &dbname_conninfo); diff --git a/src/bin/pg_combinebackup/pg_combinebackup.c b/src/bin/pg_combinebackup/pg_combinebackup.c index 3a325127209..c9bf0a9e105 100644 --- a/src/bin/pg_combinebackup/pg_combinebackup.c +++ b/src/bin/pg_combinebackup/pg_combinebackup.c @@ -242,6 +242,10 @@ main(int argc, char *argv[]) if (opt.no_manifest) opt.manifest_checksums = CHECKSUM_TYPE_NONE; + if (opt.dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + /* Check that the platform supports the requested copy method. */ if (opt.copy_method == COPY_METHOD_CLONE) { diff --git a/src/bin/pg_resetwal/pg_resetwal.c b/src/bin/pg_resetwal/pg_resetwal.c index a89d72fc5cf..dd5d279521e 100644 --- a/src/bin/pg_resetwal/pg_resetwal.c +++ b/src/bin/pg_resetwal/pg_resetwal.c @@ -397,6 +397,10 @@ main(int argc, char *argv[]) exit(1); } + if (noupdate) + pg_log_info("Executing in dry-run mode.\n" + "Nothing will be modified."); + /* * Attempt to read the existing pg_control file */ diff --git a/src/bin/pg_rewind/pg_rewind.c b/src/bin/pg_rewind/pg_rewind.c index 27c514f934a..e9364d04f76 100644 --- a/src/bin/pg_rewind/pg_rewind.c +++ b/src/bin/pg_rewind/pg_rewind.c @@ -300,10 +300,12 @@ main(int argc, char **argv) atexit(disconnect_atexit); - /* - * Ok, we have all the options and we're ready to start. First, connect to - * remote server. - */ + /* Ok, we have all the options and we're ready to start. */ + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + + /* First, connect to remote server. */ if (connstr_source) { conn = PQconnectdb(connstr_source); -- 2.47.3 --ibfr3ah5qy6tcbhw-- ^ permalink raw reply [nested|flat] 190+ messages in thread
* [PATCH v5] Log a note at program start when running in dry-run mode @ 2025-11-11 08:54 Álvaro Herrera <[email protected]> 0 siblings, 0 replies; 190+ messages in thread From: Álvaro Herrera @ 2025-11-11 08:54 UTC (permalink / raw) Users might get some peace of mind knowing their data is not being destroyed or whatever. Author: Peter Smith <[email protected]> Reviewed-by: Álvaro Herrera <[email protected]> Discussion: https://postgr.es/m/CAHut+PsvQJQnQO0KT0S2oegenkvJ8FUuY-QS5syyqmT24R2xFQ@mail.gmail.com --- src/bin/pg_archivecleanup/pg_archivecleanup.c | 4 ++++ src/bin/pg_basebackup/pg_createsubscriber.c | 5 +++++ src/bin/pg_combinebackup/pg_combinebackup.c | 4 ++++ src/bin/pg_resetwal/pg_resetwal.c | 4 ++++ src/bin/pg_rewind/pg_rewind.c | 10 ++++++---- 5 files changed, 23 insertions(+), 4 deletions(-) diff --git a/src/bin/pg_archivecleanup/pg_archivecleanup.c b/src/bin/pg_archivecleanup/pg_archivecleanup.c index c25348bcb85..ab686b4748c 100644 --- a/src/bin/pg_archivecleanup/pg_archivecleanup.c +++ b/src/bin/pg_archivecleanup/pg_archivecleanup.c @@ -375,6 +375,10 @@ main(int argc, char **argv) exit(2); } + if (dryrun) + pg_log_info("Executing in dry-run mode.\n" + "No files will be removed."); + /* * Check archive exists and other initialization if required. */ diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c index df41836e70f..cc4be5d6ef4 100644 --- a/src/bin/pg_basebackup/pg_createsubscriber.c +++ b/src/bin/pg_basebackup/pg_createsubscriber.c @@ -2305,6 +2305,11 @@ main(int argc, char **argv) pg_log_error_hint("Try \"%s --help\" for more information.", progname); exit(1); } + + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + pg_log_info("validating publisher connection string"); pub_base_conninfo = get_base_conninfo(opt.pub_conninfo_str, &dbname_conninfo); diff --git a/src/bin/pg_combinebackup/pg_combinebackup.c b/src/bin/pg_combinebackup/pg_combinebackup.c index 3a325127209..c9bf0a9e105 100644 --- a/src/bin/pg_combinebackup/pg_combinebackup.c +++ b/src/bin/pg_combinebackup/pg_combinebackup.c @@ -242,6 +242,10 @@ main(int argc, char *argv[]) if (opt.no_manifest) opt.manifest_checksums = CHECKSUM_TYPE_NONE; + if (opt.dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + /* Check that the platform supports the requested copy method. */ if (opt.copy_method == COPY_METHOD_CLONE) { diff --git a/src/bin/pg_resetwal/pg_resetwal.c b/src/bin/pg_resetwal/pg_resetwal.c index a89d72fc5cf..dd5d279521e 100644 --- a/src/bin/pg_resetwal/pg_resetwal.c +++ b/src/bin/pg_resetwal/pg_resetwal.c @@ -397,6 +397,10 @@ main(int argc, char *argv[]) exit(1); } + if (noupdate) + pg_log_info("Executing in dry-run mode.\n" + "Nothing will be modified."); + /* * Attempt to read the existing pg_control file */ diff --git a/src/bin/pg_rewind/pg_rewind.c b/src/bin/pg_rewind/pg_rewind.c index 27c514f934a..e9364d04f76 100644 --- a/src/bin/pg_rewind/pg_rewind.c +++ b/src/bin/pg_rewind/pg_rewind.c @@ -300,10 +300,12 @@ main(int argc, char **argv) atexit(disconnect_atexit); - /* - * Ok, we have all the options and we're ready to start. First, connect to - * remote server. - */ + /* Ok, we have all the options and we're ready to start. */ + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + + /* First, connect to remote server. */ if (connstr_source) { conn = PQconnectdb(connstr_source); -- 2.47.3 --ibfr3ah5qy6tcbhw-- ^ permalink raw reply [nested|flat] 190+ messages in thread
* [PATCH v5] Log a note at program start when running in dry-run mode @ 2025-11-11 08:54 Álvaro Herrera <[email protected]> 0 siblings, 0 replies; 190+ messages in thread From: Álvaro Herrera @ 2025-11-11 08:54 UTC (permalink / raw) Users might get some peace of mind knowing their data is not being destroyed or whatever. Author: Peter Smith <[email protected]> Reviewed-by: Álvaro Herrera <[email protected]> Discussion: https://postgr.es/m/CAHut+PsvQJQnQO0KT0S2oegenkvJ8FUuY-QS5syyqmT24R2xFQ@mail.gmail.com --- src/bin/pg_archivecleanup/pg_archivecleanup.c | 4 ++++ src/bin/pg_basebackup/pg_createsubscriber.c | 5 +++++ src/bin/pg_combinebackup/pg_combinebackup.c | 4 ++++ src/bin/pg_resetwal/pg_resetwal.c | 4 ++++ src/bin/pg_rewind/pg_rewind.c | 10 ++++++---- 5 files changed, 23 insertions(+), 4 deletions(-) diff --git a/src/bin/pg_archivecleanup/pg_archivecleanup.c b/src/bin/pg_archivecleanup/pg_archivecleanup.c index c25348bcb85..ab686b4748c 100644 --- a/src/bin/pg_archivecleanup/pg_archivecleanup.c +++ b/src/bin/pg_archivecleanup/pg_archivecleanup.c @@ -375,6 +375,10 @@ main(int argc, char **argv) exit(2); } + if (dryrun) + pg_log_info("Executing in dry-run mode.\n" + "No files will be removed."); + /* * Check archive exists and other initialization if required. */ diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c index df41836e70f..cc4be5d6ef4 100644 --- a/src/bin/pg_basebackup/pg_createsubscriber.c +++ b/src/bin/pg_basebackup/pg_createsubscriber.c @@ -2305,6 +2305,11 @@ main(int argc, char **argv) pg_log_error_hint("Try \"%s --help\" for more information.", progname); exit(1); } + + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + pg_log_info("validating publisher connection string"); pub_base_conninfo = get_base_conninfo(opt.pub_conninfo_str, &dbname_conninfo); diff --git a/src/bin/pg_combinebackup/pg_combinebackup.c b/src/bin/pg_combinebackup/pg_combinebackup.c index 3a325127209..c9bf0a9e105 100644 --- a/src/bin/pg_combinebackup/pg_combinebackup.c +++ b/src/bin/pg_combinebackup/pg_combinebackup.c @@ -242,6 +242,10 @@ main(int argc, char *argv[]) if (opt.no_manifest) opt.manifest_checksums = CHECKSUM_TYPE_NONE; + if (opt.dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + /* Check that the platform supports the requested copy method. */ if (opt.copy_method == COPY_METHOD_CLONE) { diff --git a/src/bin/pg_resetwal/pg_resetwal.c b/src/bin/pg_resetwal/pg_resetwal.c index a89d72fc5cf..dd5d279521e 100644 --- a/src/bin/pg_resetwal/pg_resetwal.c +++ b/src/bin/pg_resetwal/pg_resetwal.c @@ -397,6 +397,10 @@ main(int argc, char *argv[]) exit(1); } + if (noupdate) + pg_log_info("Executing in dry-run mode.\n" + "Nothing will be modified."); + /* * Attempt to read the existing pg_control file */ diff --git a/src/bin/pg_rewind/pg_rewind.c b/src/bin/pg_rewind/pg_rewind.c index 27c514f934a..e9364d04f76 100644 --- a/src/bin/pg_rewind/pg_rewind.c +++ b/src/bin/pg_rewind/pg_rewind.c @@ -300,10 +300,12 @@ main(int argc, char **argv) atexit(disconnect_atexit); - /* - * Ok, we have all the options and we're ready to start. First, connect to - * remote server. - */ + /* Ok, we have all the options and we're ready to start. */ + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + + /* First, connect to remote server. */ if (connstr_source) { conn = PQconnectdb(connstr_source); -- 2.47.3 --ibfr3ah5qy6tcbhw-- ^ permalink raw reply [nested|flat] 190+ messages in thread
* [PATCH v5] Log a note at program start when running in dry-run mode @ 2025-11-11 08:54 Álvaro Herrera <[email protected]> 0 siblings, 0 replies; 190+ messages in thread From: Álvaro Herrera @ 2025-11-11 08:54 UTC (permalink / raw) Users might get some peace of mind knowing their data is not being destroyed or whatever. Author: Peter Smith <[email protected]> Reviewed-by: Álvaro Herrera <[email protected]> Discussion: https://postgr.es/m/CAHut+PsvQJQnQO0KT0S2oegenkvJ8FUuY-QS5syyqmT24R2xFQ@mail.gmail.com --- src/bin/pg_archivecleanup/pg_archivecleanup.c | 4 ++++ src/bin/pg_basebackup/pg_createsubscriber.c | 5 +++++ src/bin/pg_combinebackup/pg_combinebackup.c | 4 ++++ src/bin/pg_resetwal/pg_resetwal.c | 4 ++++ src/bin/pg_rewind/pg_rewind.c | 10 ++++++---- 5 files changed, 23 insertions(+), 4 deletions(-) diff --git a/src/bin/pg_archivecleanup/pg_archivecleanup.c b/src/bin/pg_archivecleanup/pg_archivecleanup.c index c25348bcb85..ab686b4748c 100644 --- a/src/bin/pg_archivecleanup/pg_archivecleanup.c +++ b/src/bin/pg_archivecleanup/pg_archivecleanup.c @@ -375,6 +375,10 @@ main(int argc, char **argv) exit(2); } + if (dryrun) + pg_log_info("Executing in dry-run mode.\n" + "No files will be removed."); + /* * Check archive exists and other initialization if required. */ diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c index df41836e70f..cc4be5d6ef4 100644 --- a/src/bin/pg_basebackup/pg_createsubscriber.c +++ b/src/bin/pg_basebackup/pg_createsubscriber.c @@ -2305,6 +2305,11 @@ main(int argc, char **argv) pg_log_error_hint("Try \"%s --help\" for more information.", progname); exit(1); } + + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + pg_log_info("validating publisher connection string"); pub_base_conninfo = get_base_conninfo(opt.pub_conninfo_str, &dbname_conninfo); diff --git a/src/bin/pg_combinebackup/pg_combinebackup.c b/src/bin/pg_combinebackup/pg_combinebackup.c index 3a325127209..c9bf0a9e105 100644 --- a/src/bin/pg_combinebackup/pg_combinebackup.c +++ b/src/bin/pg_combinebackup/pg_combinebackup.c @@ -242,6 +242,10 @@ main(int argc, char *argv[]) if (opt.no_manifest) opt.manifest_checksums = CHECKSUM_TYPE_NONE; + if (opt.dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + /* Check that the platform supports the requested copy method. */ if (opt.copy_method == COPY_METHOD_CLONE) { diff --git a/src/bin/pg_resetwal/pg_resetwal.c b/src/bin/pg_resetwal/pg_resetwal.c index a89d72fc5cf..dd5d279521e 100644 --- a/src/bin/pg_resetwal/pg_resetwal.c +++ b/src/bin/pg_resetwal/pg_resetwal.c @@ -397,6 +397,10 @@ main(int argc, char *argv[]) exit(1); } + if (noupdate) + pg_log_info("Executing in dry-run mode.\n" + "Nothing will be modified."); + /* * Attempt to read the existing pg_control file */ diff --git a/src/bin/pg_rewind/pg_rewind.c b/src/bin/pg_rewind/pg_rewind.c index 27c514f934a..e9364d04f76 100644 --- a/src/bin/pg_rewind/pg_rewind.c +++ b/src/bin/pg_rewind/pg_rewind.c @@ -300,10 +300,12 @@ main(int argc, char **argv) atexit(disconnect_atexit); - /* - * Ok, we have all the options and we're ready to start. First, connect to - * remote server. - */ + /* Ok, we have all the options and we're ready to start. */ + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + + /* First, connect to remote server. */ if (connstr_source) { conn = PQconnectdb(connstr_source); -- 2.47.3 --ibfr3ah5qy6tcbhw-- ^ permalink raw reply [nested|flat] 190+ messages in thread
* [PATCH v5] Log a note at program start when running in dry-run mode @ 2025-11-11 08:54 Álvaro Herrera <[email protected]> 0 siblings, 0 replies; 190+ messages in thread From: Álvaro Herrera @ 2025-11-11 08:54 UTC (permalink / raw) Users might get some peace of mind knowing their data is not being destroyed or whatever. Author: Peter Smith <[email protected]> Reviewed-by: Álvaro Herrera <[email protected]> Discussion: https://postgr.es/m/CAHut+PsvQJQnQO0KT0S2oegenkvJ8FUuY-QS5syyqmT24R2xFQ@mail.gmail.com --- src/bin/pg_archivecleanup/pg_archivecleanup.c | 4 ++++ src/bin/pg_basebackup/pg_createsubscriber.c | 5 +++++ src/bin/pg_combinebackup/pg_combinebackup.c | 4 ++++ src/bin/pg_resetwal/pg_resetwal.c | 4 ++++ src/bin/pg_rewind/pg_rewind.c | 10 ++++++---- 5 files changed, 23 insertions(+), 4 deletions(-) diff --git a/src/bin/pg_archivecleanup/pg_archivecleanup.c b/src/bin/pg_archivecleanup/pg_archivecleanup.c index c25348bcb85..ab686b4748c 100644 --- a/src/bin/pg_archivecleanup/pg_archivecleanup.c +++ b/src/bin/pg_archivecleanup/pg_archivecleanup.c @@ -375,6 +375,10 @@ main(int argc, char **argv) exit(2); } + if (dryrun) + pg_log_info("Executing in dry-run mode.\n" + "No files will be removed."); + /* * Check archive exists and other initialization if required. */ diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c index df41836e70f..cc4be5d6ef4 100644 --- a/src/bin/pg_basebackup/pg_createsubscriber.c +++ b/src/bin/pg_basebackup/pg_createsubscriber.c @@ -2305,6 +2305,11 @@ main(int argc, char **argv) pg_log_error_hint("Try \"%s --help\" for more information.", progname); exit(1); } + + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + pg_log_info("validating publisher connection string"); pub_base_conninfo = get_base_conninfo(opt.pub_conninfo_str, &dbname_conninfo); diff --git a/src/bin/pg_combinebackup/pg_combinebackup.c b/src/bin/pg_combinebackup/pg_combinebackup.c index 3a325127209..c9bf0a9e105 100644 --- a/src/bin/pg_combinebackup/pg_combinebackup.c +++ b/src/bin/pg_combinebackup/pg_combinebackup.c @@ -242,6 +242,10 @@ main(int argc, char *argv[]) if (opt.no_manifest) opt.manifest_checksums = CHECKSUM_TYPE_NONE; + if (opt.dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + /* Check that the platform supports the requested copy method. */ if (opt.copy_method == COPY_METHOD_CLONE) { diff --git a/src/bin/pg_resetwal/pg_resetwal.c b/src/bin/pg_resetwal/pg_resetwal.c index a89d72fc5cf..dd5d279521e 100644 --- a/src/bin/pg_resetwal/pg_resetwal.c +++ b/src/bin/pg_resetwal/pg_resetwal.c @@ -397,6 +397,10 @@ main(int argc, char *argv[]) exit(1); } + if (noupdate) + pg_log_info("Executing in dry-run mode.\n" + "Nothing will be modified."); + /* * Attempt to read the existing pg_control file */ diff --git a/src/bin/pg_rewind/pg_rewind.c b/src/bin/pg_rewind/pg_rewind.c index 27c514f934a..e9364d04f76 100644 --- a/src/bin/pg_rewind/pg_rewind.c +++ b/src/bin/pg_rewind/pg_rewind.c @@ -300,10 +300,12 @@ main(int argc, char **argv) atexit(disconnect_atexit); - /* - * Ok, we have all the options and we're ready to start. First, connect to - * remote server. - */ + /* Ok, we have all the options and we're ready to start. */ + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + + /* First, connect to remote server. */ if (connstr_source) { conn = PQconnectdb(connstr_source); -- 2.47.3 --ibfr3ah5qy6tcbhw-- ^ permalink raw reply [nested|flat] 190+ messages in thread
* [PATCH v5] Log a note at program start when running in dry-run mode @ 2025-11-11 08:54 Álvaro Herrera <[email protected]> 0 siblings, 0 replies; 190+ messages in thread From: Álvaro Herrera @ 2025-11-11 08:54 UTC (permalink / raw) Users might get some peace of mind knowing their data is not being destroyed or whatever. Author: Peter Smith <[email protected]> Reviewed-by: Álvaro Herrera <[email protected]> Discussion: https://postgr.es/m/CAHut+PsvQJQnQO0KT0S2oegenkvJ8FUuY-QS5syyqmT24R2xFQ@mail.gmail.com --- src/bin/pg_archivecleanup/pg_archivecleanup.c | 4 ++++ src/bin/pg_basebackup/pg_createsubscriber.c | 5 +++++ src/bin/pg_combinebackup/pg_combinebackup.c | 4 ++++ src/bin/pg_resetwal/pg_resetwal.c | 4 ++++ src/bin/pg_rewind/pg_rewind.c | 10 ++++++---- 5 files changed, 23 insertions(+), 4 deletions(-) diff --git a/src/bin/pg_archivecleanup/pg_archivecleanup.c b/src/bin/pg_archivecleanup/pg_archivecleanup.c index c25348bcb85..ab686b4748c 100644 --- a/src/bin/pg_archivecleanup/pg_archivecleanup.c +++ b/src/bin/pg_archivecleanup/pg_archivecleanup.c @@ -375,6 +375,10 @@ main(int argc, char **argv) exit(2); } + if (dryrun) + pg_log_info("Executing in dry-run mode.\n" + "No files will be removed."); + /* * Check archive exists and other initialization if required. */ diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c index df41836e70f..cc4be5d6ef4 100644 --- a/src/bin/pg_basebackup/pg_createsubscriber.c +++ b/src/bin/pg_basebackup/pg_createsubscriber.c @@ -2305,6 +2305,11 @@ main(int argc, char **argv) pg_log_error_hint("Try \"%s --help\" for more information.", progname); exit(1); } + + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + pg_log_info("validating publisher connection string"); pub_base_conninfo = get_base_conninfo(opt.pub_conninfo_str, &dbname_conninfo); diff --git a/src/bin/pg_combinebackup/pg_combinebackup.c b/src/bin/pg_combinebackup/pg_combinebackup.c index 3a325127209..c9bf0a9e105 100644 --- a/src/bin/pg_combinebackup/pg_combinebackup.c +++ b/src/bin/pg_combinebackup/pg_combinebackup.c @@ -242,6 +242,10 @@ main(int argc, char *argv[]) if (opt.no_manifest) opt.manifest_checksums = CHECKSUM_TYPE_NONE; + if (opt.dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + /* Check that the platform supports the requested copy method. */ if (opt.copy_method == COPY_METHOD_CLONE) { diff --git a/src/bin/pg_resetwal/pg_resetwal.c b/src/bin/pg_resetwal/pg_resetwal.c index a89d72fc5cf..dd5d279521e 100644 --- a/src/bin/pg_resetwal/pg_resetwal.c +++ b/src/bin/pg_resetwal/pg_resetwal.c @@ -397,6 +397,10 @@ main(int argc, char *argv[]) exit(1); } + if (noupdate) + pg_log_info("Executing in dry-run mode.\n" + "Nothing will be modified."); + /* * Attempt to read the existing pg_control file */ diff --git a/src/bin/pg_rewind/pg_rewind.c b/src/bin/pg_rewind/pg_rewind.c index 27c514f934a..e9364d04f76 100644 --- a/src/bin/pg_rewind/pg_rewind.c +++ b/src/bin/pg_rewind/pg_rewind.c @@ -300,10 +300,12 @@ main(int argc, char **argv) atexit(disconnect_atexit); - /* - * Ok, we have all the options and we're ready to start. First, connect to - * remote server. - */ + /* Ok, we have all the options and we're ready to start. */ + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + + /* First, connect to remote server. */ if (connstr_source) { conn = PQconnectdb(connstr_source); -- 2.47.3 --ibfr3ah5qy6tcbhw-- ^ permalink raw reply [nested|flat] 190+ messages in thread
* [PATCH v5] Log a note at program start when running in dry-run mode @ 2025-11-11 08:54 Álvaro Herrera <[email protected]> 0 siblings, 0 replies; 190+ messages in thread From: Álvaro Herrera @ 2025-11-11 08:54 UTC (permalink / raw) Users might get some peace of mind knowing their data is not being destroyed or whatever. Author: Peter Smith <[email protected]> Reviewed-by: Álvaro Herrera <[email protected]> Discussion: https://postgr.es/m/CAHut+PsvQJQnQO0KT0S2oegenkvJ8FUuY-QS5syyqmT24R2xFQ@mail.gmail.com --- src/bin/pg_archivecleanup/pg_archivecleanup.c | 4 ++++ src/bin/pg_basebackup/pg_createsubscriber.c | 5 +++++ src/bin/pg_combinebackup/pg_combinebackup.c | 4 ++++ src/bin/pg_resetwal/pg_resetwal.c | 4 ++++ src/bin/pg_rewind/pg_rewind.c | 10 ++++++---- 5 files changed, 23 insertions(+), 4 deletions(-) diff --git a/src/bin/pg_archivecleanup/pg_archivecleanup.c b/src/bin/pg_archivecleanup/pg_archivecleanup.c index c25348bcb85..ab686b4748c 100644 --- a/src/bin/pg_archivecleanup/pg_archivecleanup.c +++ b/src/bin/pg_archivecleanup/pg_archivecleanup.c @@ -375,6 +375,10 @@ main(int argc, char **argv) exit(2); } + if (dryrun) + pg_log_info("Executing in dry-run mode.\n" + "No files will be removed."); + /* * Check archive exists and other initialization if required. */ diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c index df41836e70f..cc4be5d6ef4 100644 --- a/src/bin/pg_basebackup/pg_createsubscriber.c +++ b/src/bin/pg_basebackup/pg_createsubscriber.c @@ -2305,6 +2305,11 @@ main(int argc, char **argv) pg_log_error_hint("Try \"%s --help\" for more information.", progname); exit(1); } + + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + pg_log_info("validating publisher connection string"); pub_base_conninfo = get_base_conninfo(opt.pub_conninfo_str, &dbname_conninfo); diff --git a/src/bin/pg_combinebackup/pg_combinebackup.c b/src/bin/pg_combinebackup/pg_combinebackup.c index 3a325127209..c9bf0a9e105 100644 --- a/src/bin/pg_combinebackup/pg_combinebackup.c +++ b/src/bin/pg_combinebackup/pg_combinebackup.c @@ -242,6 +242,10 @@ main(int argc, char *argv[]) if (opt.no_manifest) opt.manifest_checksums = CHECKSUM_TYPE_NONE; + if (opt.dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + /* Check that the platform supports the requested copy method. */ if (opt.copy_method == COPY_METHOD_CLONE) { diff --git a/src/bin/pg_resetwal/pg_resetwal.c b/src/bin/pg_resetwal/pg_resetwal.c index a89d72fc5cf..dd5d279521e 100644 --- a/src/bin/pg_resetwal/pg_resetwal.c +++ b/src/bin/pg_resetwal/pg_resetwal.c @@ -397,6 +397,10 @@ main(int argc, char *argv[]) exit(1); } + if (noupdate) + pg_log_info("Executing in dry-run mode.\n" + "Nothing will be modified."); + /* * Attempt to read the existing pg_control file */ diff --git a/src/bin/pg_rewind/pg_rewind.c b/src/bin/pg_rewind/pg_rewind.c index 27c514f934a..e9364d04f76 100644 --- a/src/bin/pg_rewind/pg_rewind.c +++ b/src/bin/pg_rewind/pg_rewind.c @@ -300,10 +300,12 @@ main(int argc, char **argv) atexit(disconnect_atexit); - /* - * Ok, we have all the options and we're ready to start. First, connect to - * remote server. - */ + /* Ok, we have all the options and we're ready to start. */ + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + + /* First, connect to remote server. */ if (connstr_source) { conn = PQconnectdb(connstr_source); -- 2.47.3 --ibfr3ah5qy6tcbhw-- ^ permalink raw reply [nested|flat] 190+ messages in thread
* [PATCH v5] Log a note at program start when running in dry-run mode @ 2025-11-11 08:54 Álvaro Herrera <[email protected]> 0 siblings, 0 replies; 190+ messages in thread From: Álvaro Herrera @ 2025-11-11 08:54 UTC (permalink / raw) Users might get some peace of mind knowing their data is not being destroyed or whatever. Author: Peter Smith <[email protected]> Reviewed-by: Álvaro Herrera <[email protected]> Discussion: https://postgr.es/m/CAHut+PsvQJQnQO0KT0S2oegenkvJ8FUuY-QS5syyqmT24R2xFQ@mail.gmail.com --- src/bin/pg_archivecleanup/pg_archivecleanup.c | 4 ++++ src/bin/pg_basebackup/pg_createsubscriber.c | 5 +++++ src/bin/pg_combinebackup/pg_combinebackup.c | 4 ++++ src/bin/pg_resetwal/pg_resetwal.c | 4 ++++ src/bin/pg_rewind/pg_rewind.c | 10 ++++++---- 5 files changed, 23 insertions(+), 4 deletions(-) diff --git a/src/bin/pg_archivecleanup/pg_archivecleanup.c b/src/bin/pg_archivecleanup/pg_archivecleanup.c index c25348bcb85..ab686b4748c 100644 --- a/src/bin/pg_archivecleanup/pg_archivecleanup.c +++ b/src/bin/pg_archivecleanup/pg_archivecleanup.c @@ -375,6 +375,10 @@ main(int argc, char **argv) exit(2); } + if (dryrun) + pg_log_info("Executing in dry-run mode.\n" + "No files will be removed."); + /* * Check archive exists and other initialization if required. */ diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c index df41836e70f..cc4be5d6ef4 100644 --- a/src/bin/pg_basebackup/pg_createsubscriber.c +++ b/src/bin/pg_basebackup/pg_createsubscriber.c @@ -2305,6 +2305,11 @@ main(int argc, char **argv) pg_log_error_hint("Try \"%s --help\" for more information.", progname); exit(1); } + + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + pg_log_info("validating publisher connection string"); pub_base_conninfo = get_base_conninfo(opt.pub_conninfo_str, &dbname_conninfo); diff --git a/src/bin/pg_combinebackup/pg_combinebackup.c b/src/bin/pg_combinebackup/pg_combinebackup.c index 3a325127209..c9bf0a9e105 100644 --- a/src/bin/pg_combinebackup/pg_combinebackup.c +++ b/src/bin/pg_combinebackup/pg_combinebackup.c @@ -242,6 +242,10 @@ main(int argc, char *argv[]) if (opt.no_manifest) opt.manifest_checksums = CHECKSUM_TYPE_NONE; + if (opt.dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + /* Check that the platform supports the requested copy method. */ if (opt.copy_method == COPY_METHOD_CLONE) { diff --git a/src/bin/pg_resetwal/pg_resetwal.c b/src/bin/pg_resetwal/pg_resetwal.c index a89d72fc5cf..dd5d279521e 100644 --- a/src/bin/pg_resetwal/pg_resetwal.c +++ b/src/bin/pg_resetwal/pg_resetwal.c @@ -397,6 +397,10 @@ main(int argc, char *argv[]) exit(1); } + if (noupdate) + pg_log_info("Executing in dry-run mode.\n" + "Nothing will be modified."); + /* * Attempt to read the existing pg_control file */ diff --git a/src/bin/pg_rewind/pg_rewind.c b/src/bin/pg_rewind/pg_rewind.c index 27c514f934a..e9364d04f76 100644 --- a/src/bin/pg_rewind/pg_rewind.c +++ b/src/bin/pg_rewind/pg_rewind.c @@ -300,10 +300,12 @@ main(int argc, char **argv) atexit(disconnect_atexit); - /* - * Ok, we have all the options and we're ready to start. First, connect to - * remote server. - */ + /* Ok, we have all the options and we're ready to start. */ + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + + /* First, connect to remote server. */ if (connstr_source) { conn = PQconnectdb(connstr_source); -- 2.47.3 --ibfr3ah5qy6tcbhw-- ^ permalink raw reply [nested|flat] 190+ messages in thread
* [PATCH v5] Log a note at program start when running in dry-run mode @ 2025-11-11 08:54 Álvaro Herrera <[email protected]> 0 siblings, 0 replies; 190+ messages in thread From: Álvaro Herrera @ 2025-11-11 08:54 UTC (permalink / raw) Users might get some peace of mind knowing their data is not being destroyed or whatever. Author: Peter Smith <[email protected]> Reviewed-by: Álvaro Herrera <[email protected]> Discussion: https://postgr.es/m/CAHut+PsvQJQnQO0KT0S2oegenkvJ8FUuY-QS5syyqmT24R2xFQ@mail.gmail.com --- src/bin/pg_archivecleanup/pg_archivecleanup.c | 4 ++++ src/bin/pg_basebackup/pg_createsubscriber.c | 5 +++++ src/bin/pg_combinebackup/pg_combinebackup.c | 4 ++++ src/bin/pg_resetwal/pg_resetwal.c | 4 ++++ src/bin/pg_rewind/pg_rewind.c | 10 ++++++---- 5 files changed, 23 insertions(+), 4 deletions(-) diff --git a/src/bin/pg_archivecleanup/pg_archivecleanup.c b/src/bin/pg_archivecleanup/pg_archivecleanup.c index c25348bcb85..ab686b4748c 100644 --- a/src/bin/pg_archivecleanup/pg_archivecleanup.c +++ b/src/bin/pg_archivecleanup/pg_archivecleanup.c @@ -375,6 +375,10 @@ main(int argc, char **argv) exit(2); } + if (dryrun) + pg_log_info("Executing in dry-run mode.\n" + "No files will be removed."); + /* * Check archive exists and other initialization if required. */ diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c index df41836e70f..cc4be5d6ef4 100644 --- a/src/bin/pg_basebackup/pg_createsubscriber.c +++ b/src/bin/pg_basebackup/pg_createsubscriber.c @@ -2305,6 +2305,11 @@ main(int argc, char **argv) pg_log_error_hint("Try \"%s --help\" for more information.", progname); exit(1); } + + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + pg_log_info("validating publisher connection string"); pub_base_conninfo = get_base_conninfo(opt.pub_conninfo_str, &dbname_conninfo); diff --git a/src/bin/pg_combinebackup/pg_combinebackup.c b/src/bin/pg_combinebackup/pg_combinebackup.c index 3a325127209..c9bf0a9e105 100644 --- a/src/bin/pg_combinebackup/pg_combinebackup.c +++ b/src/bin/pg_combinebackup/pg_combinebackup.c @@ -242,6 +242,10 @@ main(int argc, char *argv[]) if (opt.no_manifest) opt.manifest_checksums = CHECKSUM_TYPE_NONE; + if (opt.dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + /* Check that the platform supports the requested copy method. */ if (opt.copy_method == COPY_METHOD_CLONE) { diff --git a/src/bin/pg_resetwal/pg_resetwal.c b/src/bin/pg_resetwal/pg_resetwal.c index a89d72fc5cf..dd5d279521e 100644 --- a/src/bin/pg_resetwal/pg_resetwal.c +++ b/src/bin/pg_resetwal/pg_resetwal.c @@ -397,6 +397,10 @@ main(int argc, char *argv[]) exit(1); } + if (noupdate) + pg_log_info("Executing in dry-run mode.\n" + "Nothing will be modified."); + /* * Attempt to read the existing pg_control file */ diff --git a/src/bin/pg_rewind/pg_rewind.c b/src/bin/pg_rewind/pg_rewind.c index 27c514f934a..e9364d04f76 100644 --- a/src/bin/pg_rewind/pg_rewind.c +++ b/src/bin/pg_rewind/pg_rewind.c @@ -300,10 +300,12 @@ main(int argc, char **argv) atexit(disconnect_atexit); - /* - * Ok, we have all the options and we're ready to start. First, connect to - * remote server. - */ + /* Ok, we have all the options and we're ready to start. */ + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + + /* First, connect to remote server. */ if (connstr_source) { conn = PQconnectdb(connstr_source); -- 2.47.3 --ibfr3ah5qy6tcbhw-- ^ permalink raw reply [nested|flat] 190+ messages in thread
* [PATCH v5] Log a note at program start when running in dry-run mode @ 2025-11-11 08:54 Álvaro Herrera <[email protected]> 0 siblings, 0 replies; 190+ messages in thread From: Álvaro Herrera @ 2025-11-11 08:54 UTC (permalink / raw) Users might get some peace of mind knowing their data is not being destroyed or whatever. Author: Peter Smith <[email protected]> Reviewed-by: Álvaro Herrera <[email protected]> Discussion: https://postgr.es/m/CAHut+PsvQJQnQO0KT0S2oegenkvJ8FUuY-QS5syyqmT24R2xFQ@mail.gmail.com --- src/bin/pg_archivecleanup/pg_archivecleanup.c | 4 ++++ src/bin/pg_basebackup/pg_createsubscriber.c | 5 +++++ src/bin/pg_combinebackup/pg_combinebackup.c | 4 ++++ src/bin/pg_resetwal/pg_resetwal.c | 4 ++++ src/bin/pg_rewind/pg_rewind.c | 10 ++++++---- 5 files changed, 23 insertions(+), 4 deletions(-) diff --git a/src/bin/pg_archivecleanup/pg_archivecleanup.c b/src/bin/pg_archivecleanup/pg_archivecleanup.c index c25348bcb85..ab686b4748c 100644 --- a/src/bin/pg_archivecleanup/pg_archivecleanup.c +++ b/src/bin/pg_archivecleanup/pg_archivecleanup.c @@ -375,6 +375,10 @@ main(int argc, char **argv) exit(2); } + if (dryrun) + pg_log_info("Executing in dry-run mode.\n" + "No files will be removed."); + /* * Check archive exists and other initialization if required. */ diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c index df41836e70f..cc4be5d6ef4 100644 --- a/src/bin/pg_basebackup/pg_createsubscriber.c +++ b/src/bin/pg_basebackup/pg_createsubscriber.c @@ -2305,6 +2305,11 @@ main(int argc, char **argv) pg_log_error_hint("Try \"%s --help\" for more information.", progname); exit(1); } + + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + pg_log_info("validating publisher connection string"); pub_base_conninfo = get_base_conninfo(opt.pub_conninfo_str, &dbname_conninfo); diff --git a/src/bin/pg_combinebackup/pg_combinebackup.c b/src/bin/pg_combinebackup/pg_combinebackup.c index 3a325127209..c9bf0a9e105 100644 --- a/src/bin/pg_combinebackup/pg_combinebackup.c +++ b/src/bin/pg_combinebackup/pg_combinebackup.c @@ -242,6 +242,10 @@ main(int argc, char *argv[]) if (opt.no_manifest) opt.manifest_checksums = CHECKSUM_TYPE_NONE; + if (opt.dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + /* Check that the platform supports the requested copy method. */ if (opt.copy_method == COPY_METHOD_CLONE) { diff --git a/src/bin/pg_resetwal/pg_resetwal.c b/src/bin/pg_resetwal/pg_resetwal.c index a89d72fc5cf..dd5d279521e 100644 --- a/src/bin/pg_resetwal/pg_resetwal.c +++ b/src/bin/pg_resetwal/pg_resetwal.c @@ -397,6 +397,10 @@ main(int argc, char *argv[]) exit(1); } + if (noupdate) + pg_log_info("Executing in dry-run mode.\n" + "Nothing will be modified."); + /* * Attempt to read the existing pg_control file */ diff --git a/src/bin/pg_rewind/pg_rewind.c b/src/bin/pg_rewind/pg_rewind.c index 27c514f934a..e9364d04f76 100644 --- a/src/bin/pg_rewind/pg_rewind.c +++ b/src/bin/pg_rewind/pg_rewind.c @@ -300,10 +300,12 @@ main(int argc, char **argv) atexit(disconnect_atexit); - /* - * Ok, we have all the options and we're ready to start. First, connect to - * remote server. - */ + /* Ok, we have all the options and we're ready to start. */ + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + + /* First, connect to remote server. */ if (connstr_source) { conn = PQconnectdb(connstr_source); -- 2.47.3 --ibfr3ah5qy6tcbhw-- ^ permalink raw reply [nested|flat] 190+ messages in thread
* [PATCH v5] Log a note at program start when running in dry-run mode @ 2025-11-11 08:54 Álvaro Herrera <[email protected]> 0 siblings, 0 replies; 190+ messages in thread From: Álvaro Herrera @ 2025-11-11 08:54 UTC (permalink / raw) Users might get some peace of mind knowing their data is not being destroyed or whatever. Author: Peter Smith <[email protected]> Reviewed-by: Álvaro Herrera <[email protected]> Discussion: https://postgr.es/m/CAHut+PsvQJQnQO0KT0S2oegenkvJ8FUuY-QS5syyqmT24R2xFQ@mail.gmail.com --- src/bin/pg_archivecleanup/pg_archivecleanup.c | 4 ++++ src/bin/pg_basebackup/pg_createsubscriber.c | 5 +++++ src/bin/pg_combinebackup/pg_combinebackup.c | 4 ++++ src/bin/pg_resetwal/pg_resetwal.c | 4 ++++ src/bin/pg_rewind/pg_rewind.c | 10 ++++++---- 5 files changed, 23 insertions(+), 4 deletions(-) diff --git a/src/bin/pg_archivecleanup/pg_archivecleanup.c b/src/bin/pg_archivecleanup/pg_archivecleanup.c index c25348bcb85..ab686b4748c 100644 --- a/src/bin/pg_archivecleanup/pg_archivecleanup.c +++ b/src/bin/pg_archivecleanup/pg_archivecleanup.c @@ -375,6 +375,10 @@ main(int argc, char **argv) exit(2); } + if (dryrun) + pg_log_info("Executing in dry-run mode.\n" + "No files will be removed."); + /* * Check archive exists and other initialization if required. */ diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c index df41836e70f..cc4be5d6ef4 100644 --- a/src/bin/pg_basebackup/pg_createsubscriber.c +++ b/src/bin/pg_basebackup/pg_createsubscriber.c @@ -2305,6 +2305,11 @@ main(int argc, char **argv) pg_log_error_hint("Try \"%s --help\" for more information.", progname); exit(1); } + + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + pg_log_info("validating publisher connection string"); pub_base_conninfo = get_base_conninfo(opt.pub_conninfo_str, &dbname_conninfo); diff --git a/src/bin/pg_combinebackup/pg_combinebackup.c b/src/bin/pg_combinebackup/pg_combinebackup.c index 3a325127209..c9bf0a9e105 100644 --- a/src/bin/pg_combinebackup/pg_combinebackup.c +++ b/src/bin/pg_combinebackup/pg_combinebackup.c @@ -242,6 +242,10 @@ main(int argc, char *argv[]) if (opt.no_manifest) opt.manifest_checksums = CHECKSUM_TYPE_NONE; + if (opt.dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + /* Check that the platform supports the requested copy method. */ if (opt.copy_method == COPY_METHOD_CLONE) { diff --git a/src/bin/pg_resetwal/pg_resetwal.c b/src/bin/pg_resetwal/pg_resetwal.c index a89d72fc5cf..dd5d279521e 100644 --- a/src/bin/pg_resetwal/pg_resetwal.c +++ b/src/bin/pg_resetwal/pg_resetwal.c @@ -397,6 +397,10 @@ main(int argc, char *argv[]) exit(1); } + if (noupdate) + pg_log_info("Executing in dry-run mode.\n" + "Nothing will be modified."); + /* * Attempt to read the existing pg_control file */ diff --git a/src/bin/pg_rewind/pg_rewind.c b/src/bin/pg_rewind/pg_rewind.c index 27c514f934a..e9364d04f76 100644 --- a/src/bin/pg_rewind/pg_rewind.c +++ b/src/bin/pg_rewind/pg_rewind.c @@ -300,10 +300,12 @@ main(int argc, char **argv) atexit(disconnect_atexit); - /* - * Ok, we have all the options and we're ready to start. First, connect to - * remote server. - */ + /* Ok, we have all the options and we're ready to start. */ + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + + /* First, connect to remote server. */ if (connstr_source) { conn = PQconnectdb(connstr_source); -- 2.47.3 --ibfr3ah5qy6tcbhw-- ^ permalink raw reply [nested|flat] 190+ messages in thread
* [PATCH v5] Log a note at program start when running in dry-run mode @ 2025-11-11 08:54 Álvaro Herrera <[email protected]> 0 siblings, 0 replies; 190+ messages in thread From: Álvaro Herrera @ 2025-11-11 08:54 UTC (permalink / raw) Users might get some peace of mind knowing their data is not being destroyed or whatever. Author: Peter Smith <[email protected]> Reviewed-by: Álvaro Herrera <[email protected]> Discussion: https://postgr.es/m/CAHut+PsvQJQnQO0KT0S2oegenkvJ8FUuY-QS5syyqmT24R2xFQ@mail.gmail.com --- src/bin/pg_archivecleanup/pg_archivecleanup.c | 4 ++++ src/bin/pg_basebackup/pg_createsubscriber.c | 5 +++++ src/bin/pg_combinebackup/pg_combinebackup.c | 4 ++++ src/bin/pg_resetwal/pg_resetwal.c | 4 ++++ src/bin/pg_rewind/pg_rewind.c | 10 ++++++---- 5 files changed, 23 insertions(+), 4 deletions(-) diff --git a/src/bin/pg_archivecleanup/pg_archivecleanup.c b/src/bin/pg_archivecleanup/pg_archivecleanup.c index c25348bcb85..ab686b4748c 100644 --- a/src/bin/pg_archivecleanup/pg_archivecleanup.c +++ b/src/bin/pg_archivecleanup/pg_archivecleanup.c @@ -375,6 +375,10 @@ main(int argc, char **argv) exit(2); } + if (dryrun) + pg_log_info("Executing in dry-run mode.\n" + "No files will be removed."); + /* * Check archive exists and other initialization if required. */ diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c index df41836e70f..cc4be5d6ef4 100644 --- a/src/bin/pg_basebackup/pg_createsubscriber.c +++ b/src/bin/pg_basebackup/pg_createsubscriber.c @@ -2305,6 +2305,11 @@ main(int argc, char **argv) pg_log_error_hint("Try \"%s --help\" for more information.", progname); exit(1); } + + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + pg_log_info("validating publisher connection string"); pub_base_conninfo = get_base_conninfo(opt.pub_conninfo_str, &dbname_conninfo); diff --git a/src/bin/pg_combinebackup/pg_combinebackup.c b/src/bin/pg_combinebackup/pg_combinebackup.c index 3a325127209..c9bf0a9e105 100644 --- a/src/bin/pg_combinebackup/pg_combinebackup.c +++ b/src/bin/pg_combinebackup/pg_combinebackup.c @@ -242,6 +242,10 @@ main(int argc, char *argv[]) if (opt.no_manifest) opt.manifest_checksums = CHECKSUM_TYPE_NONE; + if (opt.dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + /* Check that the platform supports the requested copy method. */ if (opt.copy_method == COPY_METHOD_CLONE) { diff --git a/src/bin/pg_resetwal/pg_resetwal.c b/src/bin/pg_resetwal/pg_resetwal.c index a89d72fc5cf..dd5d279521e 100644 --- a/src/bin/pg_resetwal/pg_resetwal.c +++ b/src/bin/pg_resetwal/pg_resetwal.c @@ -397,6 +397,10 @@ main(int argc, char *argv[]) exit(1); } + if (noupdate) + pg_log_info("Executing in dry-run mode.\n" + "Nothing will be modified."); + /* * Attempt to read the existing pg_control file */ diff --git a/src/bin/pg_rewind/pg_rewind.c b/src/bin/pg_rewind/pg_rewind.c index 27c514f934a..e9364d04f76 100644 --- a/src/bin/pg_rewind/pg_rewind.c +++ b/src/bin/pg_rewind/pg_rewind.c @@ -300,10 +300,12 @@ main(int argc, char **argv) atexit(disconnect_atexit); - /* - * Ok, we have all the options and we're ready to start. First, connect to - * remote server. - */ + /* Ok, we have all the options and we're ready to start. */ + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + + /* First, connect to remote server. */ if (connstr_source) { conn = PQconnectdb(connstr_source); -- 2.47.3 --ibfr3ah5qy6tcbhw-- ^ permalink raw reply [nested|flat] 190+ messages in thread
* [PATCH v5] Log a note at program start when running in dry-run mode @ 2025-11-11 08:54 Álvaro Herrera <[email protected]> 0 siblings, 0 replies; 190+ messages in thread From: Álvaro Herrera @ 2025-11-11 08:54 UTC (permalink / raw) Users might get some peace of mind knowing their data is not being destroyed or whatever. Author: Peter Smith <[email protected]> Reviewed-by: Álvaro Herrera <[email protected]> Discussion: https://postgr.es/m/CAHut+PsvQJQnQO0KT0S2oegenkvJ8FUuY-QS5syyqmT24R2xFQ@mail.gmail.com --- src/bin/pg_archivecleanup/pg_archivecleanup.c | 4 ++++ src/bin/pg_basebackup/pg_createsubscriber.c | 5 +++++ src/bin/pg_combinebackup/pg_combinebackup.c | 4 ++++ src/bin/pg_resetwal/pg_resetwal.c | 4 ++++ src/bin/pg_rewind/pg_rewind.c | 10 ++++++---- 5 files changed, 23 insertions(+), 4 deletions(-) diff --git a/src/bin/pg_archivecleanup/pg_archivecleanup.c b/src/bin/pg_archivecleanup/pg_archivecleanup.c index c25348bcb85..ab686b4748c 100644 --- a/src/bin/pg_archivecleanup/pg_archivecleanup.c +++ b/src/bin/pg_archivecleanup/pg_archivecleanup.c @@ -375,6 +375,10 @@ main(int argc, char **argv) exit(2); } + if (dryrun) + pg_log_info("Executing in dry-run mode.\n" + "No files will be removed."); + /* * Check archive exists and other initialization if required. */ diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c index df41836e70f..cc4be5d6ef4 100644 --- a/src/bin/pg_basebackup/pg_createsubscriber.c +++ b/src/bin/pg_basebackup/pg_createsubscriber.c @@ -2305,6 +2305,11 @@ main(int argc, char **argv) pg_log_error_hint("Try \"%s --help\" for more information.", progname); exit(1); } + + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + pg_log_info("validating publisher connection string"); pub_base_conninfo = get_base_conninfo(opt.pub_conninfo_str, &dbname_conninfo); diff --git a/src/bin/pg_combinebackup/pg_combinebackup.c b/src/bin/pg_combinebackup/pg_combinebackup.c index 3a325127209..c9bf0a9e105 100644 --- a/src/bin/pg_combinebackup/pg_combinebackup.c +++ b/src/bin/pg_combinebackup/pg_combinebackup.c @@ -242,6 +242,10 @@ main(int argc, char *argv[]) if (opt.no_manifest) opt.manifest_checksums = CHECKSUM_TYPE_NONE; + if (opt.dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + /* Check that the platform supports the requested copy method. */ if (opt.copy_method == COPY_METHOD_CLONE) { diff --git a/src/bin/pg_resetwal/pg_resetwal.c b/src/bin/pg_resetwal/pg_resetwal.c index a89d72fc5cf..dd5d279521e 100644 --- a/src/bin/pg_resetwal/pg_resetwal.c +++ b/src/bin/pg_resetwal/pg_resetwal.c @@ -397,6 +397,10 @@ main(int argc, char *argv[]) exit(1); } + if (noupdate) + pg_log_info("Executing in dry-run mode.\n" + "Nothing will be modified."); + /* * Attempt to read the existing pg_control file */ diff --git a/src/bin/pg_rewind/pg_rewind.c b/src/bin/pg_rewind/pg_rewind.c index 27c514f934a..e9364d04f76 100644 --- a/src/bin/pg_rewind/pg_rewind.c +++ b/src/bin/pg_rewind/pg_rewind.c @@ -300,10 +300,12 @@ main(int argc, char **argv) atexit(disconnect_atexit); - /* - * Ok, we have all the options and we're ready to start. First, connect to - * remote server. - */ + /* Ok, we have all the options and we're ready to start. */ + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + + /* First, connect to remote server. */ if (connstr_source) { conn = PQconnectdb(connstr_source); -- 2.47.3 --ibfr3ah5qy6tcbhw-- ^ permalink raw reply [nested|flat] 190+ messages in thread
* [PATCH v5] Log a note at program start when running in dry-run mode @ 2025-11-11 08:54 Álvaro Herrera <[email protected]> 0 siblings, 0 replies; 190+ messages in thread From: Álvaro Herrera @ 2025-11-11 08:54 UTC (permalink / raw) Users might get some peace of mind knowing their data is not being destroyed or whatever. Author: Peter Smith <[email protected]> Reviewed-by: Álvaro Herrera <[email protected]> Discussion: https://postgr.es/m/CAHut+PsvQJQnQO0KT0S2oegenkvJ8FUuY-QS5syyqmT24R2xFQ@mail.gmail.com --- src/bin/pg_archivecleanup/pg_archivecleanup.c | 4 ++++ src/bin/pg_basebackup/pg_createsubscriber.c | 5 +++++ src/bin/pg_combinebackup/pg_combinebackup.c | 4 ++++ src/bin/pg_resetwal/pg_resetwal.c | 4 ++++ src/bin/pg_rewind/pg_rewind.c | 10 ++++++---- 5 files changed, 23 insertions(+), 4 deletions(-) diff --git a/src/bin/pg_archivecleanup/pg_archivecleanup.c b/src/bin/pg_archivecleanup/pg_archivecleanup.c index c25348bcb85..ab686b4748c 100644 --- a/src/bin/pg_archivecleanup/pg_archivecleanup.c +++ b/src/bin/pg_archivecleanup/pg_archivecleanup.c @@ -375,6 +375,10 @@ main(int argc, char **argv) exit(2); } + if (dryrun) + pg_log_info("Executing in dry-run mode.\n" + "No files will be removed."); + /* * Check archive exists and other initialization if required. */ diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c index df41836e70f..cc4be5d6ef4 100644 --- a/src/bin/pg_basebackup/pg_createsubscriber.c +++ b/src/bin/pg_basebackup/pg_createsubscriber.c @@ -2305,6 +2305,11 @@ main(int argc, char **argv) pg_log_error_hint("Try \"%s --help\" for more information.", progname); exit(1); } + + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + pg_log_info("validating publisher connection string"); pub_base_conninfo = get_base_conninfo(opt.pub_conninfo_str, &dbname_conninfo); diff --git a/src/bin/pg_combinebackup/pg_combinebackup.c b/src/bin/pg_combinebackup/pg_combinebackup.c index 3a325127209..c9bf0a9e105 100644 --- a/src/bin/pg_combinebackup/pg_combinebackup.c +++ b/src/bin/pg_combinebackup/pg_combinebackup.c @@ -242,6 +242,10 @@ main(int argc, char *argv[]) if (opt.no_manifest) opt.manifest_checksums = CHECKSUM_TYPE_NONE; + if (opt.dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + /* Check that the platform supports the requested copy method. */ if (opt.copy_method == COPY_METHOD_CLONE) { diff --git a/src/bin/pg_resetwal/pg_resetwal.c b/src/bin/pg_resetwal/pg_resetwal.c index a89d72fc5cf..dd5d279521e 100644 --- a/src/bin/pg_resetwal/pg_resetwal.c +++ b/src/bin/pg_resetwal/pg_resetwal.c @@ -397,6 +397,10 @@ main(int argc, char *argv[]) exit(1); } + if (noupdate) + pg_log_info("Executing in dry-run mode.\n" + "Nothing will be modified."); + /* * Attempt to read the existing pg_control file */ diff --git a/src/bin/pg_rewind/pg_rewind.c b/src/bin/pg_rewind/pg_rewind.c index 27c514f934a..e9364d04f76 100644 --- a/src/bin/pg_rewind/pg_rewind.c +++ b/src/bin/pg_rewind/pg_rewind.c @@ -300,10 +300,12 @@ main(int argc, char **argv) atexit(disconnect_atexit); - /* - * Ok, we have all the options and we're ready to start. First, connect to - * remote server. - */ + /* Ok, we have all the options and we're ready to start. */ + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + + /* First, connect to remote server. */ if (connstr_source) { conn = PQconnectdb(connstr_source); -- 2.47.3 --ibfr3ah5qy6tcbhw-- ^ permalink raw reply [nested|flat] 190+ messages in thread
* [PATCH v5] Log a note at program start when running in dry-run mode @ 2025-11-11 08:54 Álvaro Herrera <[email protected]> 0 siblings, 0 replies; 190+ messages in thread From: Álvaro Herrera @ 2025-11-11 08:54 UTC (permalink / raw) Users might get some peace of mind knowing their data is not being destroyed or whatever. Author: Peter Smith <[email protected]> Reviewed-by: Álvaro Herrera <[email protected]> Discussion: https://postgr.es/m/CAHut+PsvQJQnQO0KT0S2oegenkvJ8FUuY-QS5syyqmT24R2xFQ@mail.gmail.com --- src/bin/pg_archivecleanup/pg_archivecleanup.c | 4 ++++ src/bin/pg_basebackup/pg_createsubscriber.c | 5 +++++ src/bin/pg_combinebackup/pg_combinebackup.c | 4 ++++ src/bin/pg_resetwal/pg_resetwal.c | 4 ++++ src/bin/pg_rewind/pg_rewind.c | 10 ++++++---- 5 files changed, 23 insertions(+), 4 deletions(-) diff --git a/src/bin/pg_archivecleanup/pg_archivecleanup.c b/src/bin/pg_archivecleanup/pg_archivecleanup.c index c25348bcb85..ab686b4748c 100644 --- a/src/bin/pg_archivecleanup/pg_archivecleanup.c +++ b/src/bin/pg_archivecleanup/pg_archivecleanup.c @@ -375,6 +375,10 @@ main(int argc, char **argv) exit(2); } + if (dryrun) + pg_log_info("Executing in dry-run mode.\n" + "No files will be removed."); + /* * Check archive exists and other initialization if required. */ diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c index df41836e70f..cc4be5d6ef4 100644 --- a/src/bin/pg_basebackup/pg_createsubscriber.c +++ b/src/bin/pg_basebackup/pg_createsubscriber.c @@ -2305,6 +2305,11 @@ main(int argc, char **argv) pg_log_error_hint("Try \"%s --help\" for more information.", progname); exit(1); } + + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + pg_log_info("validating publisher connection string"); pub_base_conninfo = get_base_conninfo(opt.pub_conninfo_str, &dbname_conninfo); diff --git a/src/bin/pg_combinebackup/pg_combinebackup.c b/src/bin/pg_combinebackup/pg_combinebackup.c index 3a325127209..c9bf0a9e105 100644 --- a/src/bin/pg_combinebackup/pg_combinebackup.c +++ b/src/bin/pg_combinebackup/pg_combinebackup.c @@ -242,6 +242,10 @@ main(int argc, char *argv[]) if (opt.no_manifest) opt.manifest_checksums = CHECKSUM_TYPE_NONE; + if (opt.dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + /* Check that the platform supports the requested copy method. */ if (opt.copy_method == COPY_METHOD_CLONE) { diff --git a/src/bin/pg_resetwal/pg_resetwal.c b/src/bin/pg_resetwal/pg_resetwal.c index a89d72fc5cf..dd5d279521e 100644 --- a/src/bin/pg_resetwal/pg_resetwal.c +++ b/src/bin/pg_resetwal/pg_resetwal.c @@ -397,6 +397,10 @@ main(int argc, char *argv[]) exit(1); } + if (noupdate) + pg_log_info("Executing in dry-run mode.\n" + "Nothing will be modified."); + /* * Attempt to read the existing pg_control file */ diff --git a/src/bin/pg_rewind/pg_rewind.c b/src/bin/pg_rewind/pg_rewind.c index 27c514f934a..e9364d04f76 100644 --- a/src/bin/pg_rewind/pg_rewind.c +++ b/src/bin/pg_rewind/pg_rewind.c @@ -300,10 +300,12 @@ main(int argc, char **argv) atexit(disconnect_atexit); - /* - * Ok, we have all the options and we're ready to start. First, connect to - * remote server. - */ + /* Ok, we have all the options and we're ready to start. */ + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + + /* First, connect to remote server. */ if (connstr_source) { conn = PQconnectdb(connstr_source); -- 2.47.3 --ibfr3ah5qy6tcbhw-- ^ permalink raw reply [nested|flat] 190+ messages in thread
* [PATCH v5] Log a note at program start when running in dry-run mode @ 2025-11-11 08:54 Álvaro Herrera <[email protected]> 0 siblings, 0 replies; 190+ messages in thread From: Álvaro Herrera @ 2025-11-11 08:54 UTC (permalink / raw) Users might get some peace of mind knowing their data is not being destroyed or whatever. Author: Peter Smith <[email protected]> Reviewed-by: Álvaro Herrera <[email protected]> Discussion: https://postgr.es/m/CAHut+PsvQJQnQO0KT0S2oegenkvJ8FUuY-QS5syyqmT24R2xFQ@mail.gmail.com --- src/bin/pg_archivecleanup/pg_archivecleanup.c | 4 ++++ src/bin/pg_basebackup/pg_createsubscriber.c | 5 +++++ src/bin/pg_combinebackup/pg_combinebackup.c | 4 ++++ src/bin/pg_resetwal/pg_resetwal.c | 4 ++++ src/bin/pg_rewind/pg_rewind.c | 10 ++++++---- 5 files changed, 23 insertions(+), 4 deletions(-) diff --git a/src/bin/pg_archivecleanup/pg_archivecleanup.c b/src/bin/pg_archivecleanup/pg_archivecleanup.c index c25348bcb85..ab686b4748c 100644 --- a/src/bin/pg_archivecleanup/pg_archivecleanup.c +++ b/src/bin/pg_archivecleanup/pg_archivecleanup.c @@ -375,6 +375,10 @@ main(int argc, char **argv) exit(2); } + if (dryrun) + pg_log_info("Executing in dry-run mode.\n" + "No files will be removed."); + /* * Check archive exists and other initialization if required. */ diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c index df41836e70f..cc4be5d6ef4 100644 --- a/src/bin/pg_basebackup/pg_createsubscriber.c +++ b/src/bin/pg_basebackup/pg_createsubscriber.c @@ -2305,6 +2305,11 @@ main(int argc, char **argv) pg_log_error_hint("Try \"%s --help\" for more information.", progname); exit(1); } + + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + pg_log_info("validating publisher connection string"); pub_base_conninfo = get_base_conninfo(opt.pub_conninfo_str, &dbname_conninfo); diff --git a/src/bin/pg_combinebackup/pg_combinebackup.c b/src/bin/pg_combinebackup/pg_combinebackup.c index 3a325127209..c9bf0a9e105 100644 --- a/src/bin/pg_combinebackup/pg_combinebackup.c +++ b/src/bin/pg_combinebackup/pg_combinebackup.c @@ -242,6 +242,10 @@ main(int argc, char *argv[]) if (opt.no_manifest) opt.manifest_checksums = CHECKSUM_TYPE_NONE; + if (opt.dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + /* Check that the platform supports the requested copy method. */ if (opt.copy_method == COPY_METHOD_CLONE) { diff --git a/src/bin/pg_resetwal/pg_resetwal.c b/src/bin/pg_resetwal/pg_resetwal.c index a89d72fc5cf..dd5d279521e 100644 --- a/src/bin/pg_resetwal/pg_resetwal.c +++ b/src/bin/pg_resetwal/pg_resetwal.c @@ -397,6 +397,10 @@ main(int argc, char *argv[]) exit(1); } + if (noupdate) + pg_log_info("Executing in dry-run mode.\n" + "Nothing will be modified."); + /* * Attempt to read the existing pg_control file */ diff --git a/src/bin/pg_rewind/pg_rewind.c b/src/bin/pg_rewind/pg_rewind.c index 27c514f934a..e9364d04f76 100644 --- a/src/bin/pg_rewind/pg_rewind.c +++ b/src/bin/pg_rewind/pg_rewind.c @@ -300,10 +300,12 @@ main(int argc, char **argv) atexit(disconnect_atexit); - /* - * Ok, we have all the options and we're ready to start. First, connect to - * remote server. - */ + /* Ok, we have all the options and we're ready to start. */ + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + + /* First, connect to remote server. */ if (connstr_source) { conn = PQconnectdb(connstr_source); -- 2.47.3 --ibfr3ah5qy6tcbhw-- ^ permalink raw reply [nested|flat] 190+ messages in thread
* [PATCH v5] Log a note at program start when running in dry-run mode @ 2025-11-11 08:54 Álvaro Herrera <[email protected]> 0 siblings, 0 replies; 190+ messages in thread From: Álvaro Herrera @ 2025-11-11 08:54 UTC (permalink / raw) Users might get some peace of mind knowing their data is not being destroyed or whatever. Author: Peter Smith <[email protected]> Reviewed-by: Álvaro Herrera <[email protected]> Discussion: https://postgr.es/m/CAHut+PsvQJQnQO0KT0S2oegenkvJ8FUuY-QS5syyqmT24R2xFQ@mail.gmail.com --- src/bin/pg_archivecleanup/pg_archivecleanup.c | 4 ++++ src/bin/pg_basebackup/pg_createsubscriber.c | 5 +++++ src/bin/pg_combinebackup/pg_combinebackup.c | 4 ++++ src/bin/pg_resetwal/pg_resetwal.c | 4 ++++ src/bin/pg_rewind/pg_rewind.c | 10 ++++++---- 5 files changed, 23 insertions(+), 4 deletions(-) diff --git a/src/bin/pg_archivecleanup/pg_archivecleanup.c b/src/bin/pg_archivecleanup/pg_archivecleanup.c index c25348bcb85..ab686b4748c 100644 --- a/src/bin/pg_archivecleanup/pg_archivecleanup.c +++ b/src/bin/pg_archivecleanup/pg_archivecleanup.c @@ -375,6 +375,10 @@ main(int argc, char **argv) exit(2); } + if (dryrun) + pg_log_info("Executing in dry-run mode.\n" + "No files will be removed."); + /* * Check archive exists and other initialization if required. */ diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c index df41836e70f..cc4be5d6ef4 100644 --- a/src/bin/pg_basebackup/pg_createsubscriber.c +++ b/src/bin/pg_basebackup/pg_createsubscriber.c @@ -2305,6 +2305,11 @@ main(int argc, char **argv) pg_log_error_hint("Try \"%s --help\" for more information.", progname); exit(1); } + + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + pg_log_info("validating publisher connection string"); pub_base_conninfo = get_base_conninfo(opt.pub_conninfo_str, &dbname_conninfo); diff --git a/src/bin/pg_combinebackup/pg_combinebackup.c b/src/bin/pg_combinebackup/pg_combinebackup.c index 3a325127209..c9bf0a9e105 100644 --- a/src/bin/pg_combinebackup/pg_combinebackup.c +++ b/src/bin/pg_combinebackup/pg_combinebackup.c @@ -242,6 +242,10 @@ main(int argc, char *argv[]) if (opt.no_manifest) opt.manifest_checksums = CHECKSUM_TYPE_NONE; + if (opt.dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + /* Check that the platform supports the requested copy method. */ if (opt.copy_method == COPY_METHOD_CLONE) { diff --git a/src/bin/pg_resetwal/pg_resetwal.c b/src/bin/pg_resetwal/pg_resetwal.c index a89d72fc5cf..dd5d279521e 100644 --- a/src/bin/pg_resetwal/pg_resetwal.c +++ b/src/bin/pg_resetwal/pg_resetwal.c @@ -397,6 +397,10 @@ main(int argc, char *argv[]) exit(1); } + if (noupdate) + pg_log_info("Executing in dry-run mode.\n" + "Nothing will be modified."); + /* * Attempt to read the existing pg_control file */ diff --git a/src/bin/pg_rewind/pg_rewind.c b/src/bin/pg_rewind/pg_rewind.c index 27c514f934a..e9364d04f76 100644 --- a/src/bin/pg_rewind/pg_rewind.c +++ b/src/bin/pg_rewind/pg_rewind.c @@ -300,10 +300,12 @@ main(int argc, char **argv) atexit(disconnect_atexit); - /* - * Ok, we have all the options and we're ready to start. First, connect to - * remote server. - */ + /* Ok, we have all the options and we're ready to start. */ + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + + /* First, connect to remote server. */ if (connstr_source) { conn = PQconnectdb(connstr_source); -- 2.47.3 --ibfr3ah5qy6tcbhw-- ^ permalink raw reply [nested|flat] 190+ messages in thread
* [PATCH v5] Log a note at program start when running in dry-run mode @ 2025-11-11 08:54 Álvaro Herrera <[email protected]> 0 siblings, 0 replies; 190+ messages in thread From: Álvaro Herrera @ 2025-11-11 08:54 UTC (permalink / raw) Users might get some peace of mind knowing their data is not being destroyed or whatever. Author: Peter Smith <[email protected]> Reviewed-by: Álvaro Herrera <[email protected]> Discussion: https://postgr.es/m/CAHut+PsvQJQnQO0KT0S2oegenkvJ8FUuY-QS5syyqmT24R2xFQ@mail.gmail.com --- src/bin/pg_archivecleanup/pg_archivecleanup.c | 4 ++++ src/bin/pg_basebackup/pg_createsubscriber.c | 5 +++++ src/bin/pg_combinebackup/pg_combinebackup.c | 4 ++++ src/bin/pg_resetwal/pg_resetwal.c | 4 ++++ src/bin/pg_rewind/pg_rewind.c | 10 ++++++---- 5 files changed, 23 insertions(+), 4 deletions(-) diff --git a/src/bin/pg_archivecleanup/pg_archivecleanup.c b/src/bin/pg_archivecleanup/pg_archivecleanup.c index c25348bcb85..ab686b4748c 100644 --- a/src/bin/pg_archivecleanup/pg_archivecleanup.c +++ b/src/bin/pg_archivecleanup/pg_archivecleanup.c @@ -375,6 +375,10 @@ main(int argc, char **argv) exit(2); } + if (dryrun) + pg_log_info("Executing in dry-run mode.\n" + "No files will be removed."); + /* * Check archive exists and other initialization if required. */ diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c index df41836e70f..cc4be5d6ef4 100644 --- a/src/bin/pg_basebackup/pg_createsubscriber.c +++ b/src/bin/pg_basebackup/pg_createsubscriber.c @@ -2305,6 +2305,11 @@ main(int argc, char **argv) pg_log_error_hint("Try \"%s --help\" for more information.", progname); exit(1); } + + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + pg_log_info("validating publisher connection string"); pub_base_conninfo = get_base_conninfo(opt.pub_conninfo_str, &dbname_conninfo); diff --git a/src/bin/pg_combinebackup/pg_combinebackup.c b/src/bin/pg_combinebackup/pg_combinebackup.c index 3a325127209..c9bf0a9e105 100644 --- a/src/bin/pg_combinebackup/pg_combinebackup.c +++ b/src/bin/pg_combinebackup/pg_combinebackup.c @@ -242,6 +242,10 @@ main(int argc, char *argv[]) if (opt.no_manifest) opt.manifest_checksums = CHECKSUM_TYPE_NONE; + if (opt.dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + /* Check that the platform supports the requested copy method. */ if (opt.copy_method == COPY_METHOD_CLONE) { diff --git a/src/bin/pg_resetwal/pg_resetwal.c b/src/bin/pg_resetwal/pg_resetwal.c index a89d72fc5cf..dd5d279521e 100644 --- a/src/bin/pg_resetwal/pg_resetwal.c +++ b/src/bin/pg_resetwal/pg_resetwal.c @@ -397,6 +397,10 @@ main(int argc, char *argv[]) exit(1); } + if (noupdate) + pg_log_info("Executing in dry-run mode.\n" + "Nothing will be modified."); + /* * Attempt to read the existing pg_control file */ diff --git a/src/bin/pg_rewind/pg_rewind.c b/src/bin/pg_rewind/pg_rewind.c index 27c514f934a..e9364d04f76 100644 --- a/src/bin/pg_rewind/pg_rewind.c +++ b/src/bin/pg_rewind/pg_rewind.c @@ -300,10 +300,12 @@ main(int argc, char **argv) atexit(disconnect_atexit); - /* - * Ok, we have all the options and we're ready to start. First, connect to - * remote server. - */ + /* Ok, we have all the options and we're ready to start. */ + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + + /* First, connect to remote server. */ if (connstr_source) { conn = PQconnectdb(connstr_source); -- 2.47.3 --ibfr3ah5qy6tcbhw-- ^ permalink raw reply [nested|flat] 190+ messages in thread
* [PATCH v5] Log a note at program start when running in dry-run mode @ 2025-11-11 08:54 Álvaro Herrera <[email protected]> 0 siblings, 0 replies; 190+ messages in thread From: Álvaro Herrera @ 2025-11-11 08:54 UTC (permalink / raw) Users might get some peace of mind knowing their data is not being destroyed or whatever. Author: Peter Smith <[email protected]> Reviewed-by: Álvaro Herrera <[email protected]> Discussion: https://postgr.es/m/CAHut+PsvQJQnQO0KT0S2oegenkvJ8FUuY-QS5syyqmT24R2xFQ@mail.gmail.com --- src/bin/pg_archivecleanup/pg_archivecleanup.c | 4 ++++ src/bin/pg_basebackup/pg_createsubscriber.c | 5 +++++ src/bin/pg_combinebackup/pg_combinebackup.c | 4 ++++ src/bin/pg_resetwal/pg_resetwal.c | 4 ++++ src/bin/pg_rewind/pg_rewind.c | 10 ++++++---- 5 files changed, 23 insertions(+), 4 deletions(-) diff --git a/src/bin/pg_archivecleanup/pg_archivecleanup.c b/src/bin/pg_archivecleanup/pg_archivecleanup.c index c25348bcb85..ab686b4748c 100644 --- a/src/bin/pg_archivecleanup/pg_archivecleanup.c +++ b/src/bin/pg_archivecleanup/pg_archivecleanup.c @@ -375,6 +375,10 @@ main(int argc, char **argv) exit(2); } + if (dryrun) + pg_log_info("Executing in dry-run mode.\n" + "No files will be removed."); + /* * Check archive exists and other initialization if required. */ diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c index df41836e70f..cc4be5d6ef4 100644 --- a/src/bin/pg_basebackup/pg_createsubscriber.c +++ b/src/bin/pg_basebackup/pg_createsubscriber.c @@ -2305,6 +2305,11 @@ main(int argc, char **argv) pg_log_error_hint("Try \"%s --help\" for more information.", progname); exit(1); } + + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + pg_log_info("validating publisher connection string"); pub_base_conninfo = get_base_conninfo(opt.pub_conninfo_str, &dbname_conninfo); diff --git a/src/bin/pg_combinebackup/pg_combinebackup.c b/src/bin/pg_combinebackup/pg_combinebackup.c index 3a325127209..c9bf0a9e105 100644 --- a/src/bin/pg_combinebackup/pg_combinebackup.c +++ b/src/bin/pg_combinebackup/pg_combinebackup.c @@ -242,6 +242,10 @@ main(int argc, char *argv[]) if (opt.no_manifest) opt.manifest_checksums = CHECKSUM_TYPE_NONE; + if (opt.dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + /* Check that the platform supports the requested copy method. */ if (opt.copy_method == COPY_METHOD_CLONE) { diff --git a/src/bin/pg_resetwal/pg_resetwal.c b/src/bin/pg_resetwal/pg_resetwal.c index a89d72fc5cf..dd5d279521e 100644 --- a/src/bin/pg_resetwal/pg_resetwal.c +++ b/src/bin/pg_resetwal/pg_resetwal.c @@ -397,6 +397,10 @@ main(int argc, char *argv[]) exit(1); } + if (noupdate) + pg_log_info("Executing in dry-run mode.\n" + "Nothing will be modified."); + /* * Attempt to read the existing pg_control file */ diff --git a/src/bin/pg_rewind/pg_rewind.c b/src/bin/pg_rewind/pg_rewind.c index 27c514f934a..e9364d04f76 100644 --- a/src/bin/pg_rewind/pg_rewind.c +++ b/src/bin/pg_rewind/pg_rewind.c @@ -300,10 +300,12 @@ main(int argc, char **argv) atexit(disconnect_atexit); - /* - * Ok, we have all the options and we're ready to start. First, connect to - * remote server. - */ + /* Ok, we have all the options and we're ready to start. */ + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + + /* First, connect to remote server. */ if (connstr_source) { conn = PQconnectdb(connstr_source); -- 2.47.3 --ibfr3ah5qy6tcbhw-- ^ permalink raw reply [nested|flat] 190+ messages in thread
* [PATCH v5] Log a note at program start when running in dry-run mode @ 2025-11-11 08:54 Álvaro Herrera <[email protected]> 0 siblings, 0 replies; 190+ messages in thread From: Álvaro Herrera @ 2025-11-11 08:54 UTC (permalink / raw) Users might get some peace of mind knowing their data is not being destroyed or whatever. Author: Peter Smith <[email protected]> Reviewed-by: Álvaro Herrera <[email protected]> Discussion: https://postgr.es/m/CAHut+PsvQJQnQO0KT0S2oegenkvJ8FUuY-QS5syyqmT24R2xFQ@mail.gmail.com --- src/bin/pg_archivecleanup/pg_archivecleanup.c | 4 ++++ src/bin/pg_basebackup/pg_createsubscriber.c | 5 +++++ src/bin/pg_combinebackup/pg_combinebackup.c | 4 ++++ src/bin/pg_resetwal/pg_resetwal.c | 4 ++++ src/bin/pg_rewind/pg_rewind.c | 10 ++++++---- 5 files changed, 23 insertions(+), 4 deletions(-) diff --git a/src/bin/pg_archivecleanup/pg_archivecleanup.c b/src/bin/pg_archivecleanup/pg_archivecleanup.c index c25348bcb85..ab686b4748c 100644 --- a/src/bin/pg_archivecleanup/pg_archivecleanup.c +++ b/src/bin/pg_archivecleanup/pg_archivecleanup.c @@ -375,6 +375,10 @@ main(int argc, char **argv) exit(2); } + if (dryrun) + pg_log_info("Executing in dry-run mode.\n" + "No files will be removed."); + /* * Check archive exists and other initialization if required. */ diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c index df41836e70f..cc4be5d6ef4 100644 --- a/src/bin/pg_basebackup/pg_createsubscriber.c +++ b/src/bin/pg_basebackup/pg_createsubscriber.c @@ -2305,6 +2305,11 @@ main(int argc, char **argv) pg_log_error_hint("Try \"%s --help\" for more information.", progname); exit(1); } + + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + pg_log_info("validating publisher connection string"); pub_base_conninfo = get_base_conninfo(opt.pub_conninfo_str, &dbname_conninfo); diff --git a/src/bin/pg_combinebackup/pg_combinebackup.c b/src/bin/pg_combinebackup/pg_combinebackup.c index 3a325127209..c9bf0a9e105 100644 --- a/src/bin/pg_combinebackup/pg_combinebackup.c +++ b/src/bin/pg_combinebackup/pg_combinebackup.c @@ -242,6 +242,10 @@ main(int argc, char *argv[]) if (opt.no_manifest) opt.manifest_checksums = CHECKSUM_TYPE_NONE; + if (opt.dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + /* Check that the platform supports the requested copy method. */ if (opt.copy_method == COPY_METHOD_CLONE) { diff --git a/src/bin/pg_resetwal/pg_resetwal.c b/src/bin/pg_resetwal/pg_resetwal.c index a89d72fc5cf..dd5d279521e 100644 --- a/src/bin/pg_resetwal/pg_resetwal.c +++ b/src/bin/pg_resetwal/pg_resetwal.c @@ -397,6 +397,10 @@ main(int argc, char *argv[]) exit(1); } + if (noupdate) + pg_log_info("Executing in dry-run mode.\n" + "Nothing will be modified."); + /* * Attempt to read the existing pg_control file */ diff --git a/src/bin/pg_rewind/pg_rewind.c b/src/bin/pg_rewind/pg_rewind.c index 27c514f934a..e9364d04f76 100644 --- a/src/bin/pg_rewind/pg_rewind.c +++ b/src/bin/pg_rewind/pg_rewind.c @@ -300,10 +300,12 @@ main(int argc, char **argv) atexit(disconnect_atexit); - /* - * Ok, we have all the options and we're ready to start. First, connect to - * remote server. - */ + /* Ok, we have all the options and we're ready to start. */ + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + + /* First, connect to remote server. */ if (connstr_source) { conn = PQconnectdb(connstr_source); -- 2.47.3 --ibfr3ah5qy6tcbhw-- ^ permalink raw reply [nested|flat] 190+ messages in thread
* [PATCH v5] Log a note at program start when running in dry-run mode @ 2025-11-11 08:54 Álvaro Herrera <[email protected]> 0 siblings, 0 replies; 190+ messages in thread From: Álvaro Herrera @ 2025-11-11 08:54 UTC (permalink / raw) Users might get some peace of mind knowing their data is not being destroyed or whatever. Author: Peter Smith <[email protected]> Reviewed-by: Álvaro Herrera <[email protected]> Discussion: https://postgr.es/m/CAHut+PsvQJQnQO0KT0S2oegenkvJ8FUuY-QS5syyqmT24R2xFQ@mail.gmail.com --- src/bin/pg_archivecleanup/pg_archivecleanup.c | 4 ++++ src/bin/pg_basebackup/pg_createsubscriber.c | 5 +++++ src/bin/pg_combinebackup/pg_combinebackup.c | 4 ++++ src/bin/pg_resetwal/pg_resetwal.c | 4 ++++ src/bin/pg_rewind/pg_rewind.c | 10 ++++++---- 5 files changed, 23 insertions(+), 4 deletions(-) diff --git a/src/bin/pg_archivecleanup/pg_archivecleanup.c b/src/bin/pg_archivecleanup/pg_archivecleanup.c index c25348bcb85..ab686b4748c 100644 --- a/src/bin/pg_archivecleanup/pg_archivecleanup.c +++ b/src/bin/pg_archivecleanup/pg_archivecleanup.c @@ -375,6 +375,10 @@ main(int argc, char **argv) exit(2); } + if (dryrun) + pg_log_info("Executing in dry-run mode.\n" + "No files will be removed."); + /* * Check archive exists and other initialization if required. */ diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c index df41836e70f..cc4be5d6ef4 100644 --- a/src/bin/pg_basebackup/pg_createsubscriber.c +++ b/src/bin/pg_basebackup/pg_createsubscriber.c @@ -2305,6 +2305,11 @@ main(int argc, char **argv) pg_log_error_hint("Try \"%s --help\" for more information.", progname); exit(1); } + + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + pg_log_info("validating publisher connection string"); pub_base_conninfo = get_base_conninfo(opt.pub_conninfo_str, &dbname_conninfo); diff --git a/src/bin/pg_combinebackup/pg_combinebackup.c b/src/bin/pg_combinebackup/pg_combinebackup.c index 3a325127209..c9bf0a9e105 100644 --- a/src/bin/pg_combinebackup/pg_combinebackup.c +++ b/src/bin/pg_combinebackup/pg_combinebackup.c @@ -242,6 +242,10 @@ main(int argc, char *argv[]) if (opt.no_manifest) opt.manifest_checksums = CHECKSUM_TYPE_NONE; + if (opt.dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + /* Check that the platform supports the requested copy method. */ if (opt.copy_method == COPY_METHOD_CLONE) { diff --git a/src/bin/pg_resetwal/pg_resetwal.c b/src/bin/pg_resetwal/pg_resetwal.c index a89d72fc5cf..dd5d279521e 100644 --- a/src/bin/pg_resetwal/pg_resetwal.c +++ b/src/bin/pg_resetwal/pg_resetwal.c @@ -397,6 +397,10 @@ main(int argc, char *argv[]) exit(1); } + if (noupdate) + pg_log_info("Executing in dry-run mode.\n" + "Nothing will be modified."); + /* * Attempt to read the existing pg_control file */ diff --git a/src/bin/pg_rewind/pg_rewind.c b/src/bin/pg_rewind/pg_rewind.c index 27c514f934a..e9364d04f76 100644 --- a/src/bin/pg_rewind/pg_rewind.c +++ b/src/bin/pg_rewind/pg_rewind.c @@ -300,10 +300,12 @@ main(int argc, char **argv) atexit(disconnect_atexit); - /* - * Ok, we have all the options and we're ready to start. First, connect to - * remote server. - */ + /* Ok, we have all the options and we're ready to start. */ + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + + /* First, connect to remote server. */ if (connstr_source) { conn = PQconnectdb(connstr_source); -- 2.47.3 --ibfr3ah5qy6tcbhw-- ^ permalink raw reply [nested|flat] 190+ messages in thread
* [PATCH v5] Log a note at program start when running in dry-run mode @ 2025-11-11 08:54 Álvaro Herrera <[email protected]> 0 siblings, 0 replies; 190+ messages in thread From: Álvaro Herrera @ 2025-11-11 08:54 UTC (permalink / raw) Users might get some peace of mind knowing their data is not being destroyed or whatever. Author: Peter Smith <[email protected]> Reviewed-by: Álvaro Herrera <[email protected]> Discussion: https://postgr.es/m/CAHut+PsvQJQnQO0KT0S2oegenkvJ8FUuY-QS5syyqmT24R2xFQ@mail.gmail.com --- src/bin/pg_archivecleanup/pg_archivecleanup.c | 4 ++++ src/bin/pg_basebackup/pg_createsubscriber.c | 5 +++++ src/bin/pg_combinebackup/pg_combinebackup.c | 4 ++++ src/bin/pg_resetwal/pg_resetwal.c | 4 ++++ src/bin/pg_rewind/pg_rewind.c | 10 ++++++---- 5 files changed, 23 insertions(+), 4 deletions(-) diff --git a/src/bin/pg_archivecleanup/pg_archivecleanup.c b/src/bin/pg_archivecleanup/pg_archivecleanup.c index c25348bcb85..ab686b4748c 100644 --- a/src/bin/pg_archivecleanup/pg_archivecleanup.c +++ b/src/bin/pg_archivecleanup/pg_archivecleanup.c @@ -375,6 +375,10 @@ main(int argc, char **argv) exit(2); } + if (dryrun) + pg_log_info("Executing in dry-run mode.\n" + "No files will be removed."); + /* * Check archive exists and other initialization if required. */ diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c index df41836e70f..cc4be5d6ef4 100644 --- a/src/bin/pg_basebackup/pg_createsubscriber.c +++ b/src/bin/pg_basebackup/pg_createsubscriber.c @@ -2305,6 +2305,11 @@ main(int argc, char **argv) pg_log_error_hint("Try \"%s --help\" for more information.", progname); exit(1); } + + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + pg_log_info("validating publisher connection string"); pub_base_conninfo = get_base_conninfo(opt.pub_conninfo_str, &dbname_conninfo); diff --git a/src/bin/pg_combinebackup/pg_combinebackup.c b/src/bin/pg_combinebackup/pg_combinebackup.c index 3a325127209..c9bf0a9e105 100644 --- a/src/bin/pg_combinebackup/pg_combinebackup.c +++ b/src/bin/pg_combinebackup/pg_combinebackup.c @@ -242,6 +242,10 @@ main(int argc, char *argv[]) if (opt.no_manifest) opt.manifest_checksums = CHECKSUM_TYPE_NONE; + if (opt.dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + /* Check that the platform supports the requested copy method. */ if (opt.copy_method == COPY_METHOD_CLONE) { diff --git a/src/bin/pg_resetwal/pg_resetwal.c b/src/bin/pg_resetwal/pg_resetwal.c index a89d72fc5cf..dd5d279521e 100644 --- a/src/bin/pg_resetwal/pg_resetwal.c +++ b/src/bin/pg_resetwal/pg_resetwal.c @@ -397,6 +397,10 @@ main(int argc, char *argv[]) exit(1); } + if (noupdate) + pg_log_info("Executing in dry-run mode.\n" + "Nothing will be modified."); + /* * Attempt to read the existing pg_control file */ diff --git a/src/bin/pg_rewind/pg_rewind.c b/src/bin/pg_rewind/pg_rewind.c index 27c514f934a..e9364d04f76 100644 --- a/src/bin/pg_rewind/pg_rewind.c +++ b/src/bin/pg_rewind/pg_rewind.c @@ -300,10 +300,12 @@ main(int argc, char **argv) atexit(disconnect_atexit); - /* - * Ok, we have all the options and we're ready to start. First, connect to - * remote server. - */ + /* Ok, we have all the options and we're ready to start. */ + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + + /* First, connect to remote server. */ if (connstr_source) { conn = PQconnectdb(connstr_source); -- 2.47.3 --ibfr3ah5qy6tcbhw-- ^ permalink raw reply [nested|flat] 190+ messages in thread
* [PATCH v5] Log a note at program start when running in dry-run mode @ 2025-11-11 08:54 Álvaro Herrera <[email protected]> 0 siblings, 0 replies; 190+ messages in thread From: Álvaro Herrera @ 2025-11-11 08:54 UTC (permalink / raw) Users might get some peace of mind knowing their data is not being destroyed or whatever. Author: Peter Smith <[email protected]> Reviewed-by: Álvaro Herrera <[email protected]> Discussion: https://postgr.es/m/CAHut+PsvQJQnQO0KT0S2oegenkvJ8FUuY-QS5syyqmT24R2xFQ@mail.gmail.com --- src/bin/pg_archivecleanup/pg_archivecleanup.c | 4 ++++ src/bin/pg_basebackup/pg_createsubscriber.c | 5 +++++ src/bin/pg_combinebackup/pg_combinebackup.c | 4 ++++ src/bin/pg_resetwal/pg_resetwal.c | 4 ++++ src/bin/pg_rewind/pg_rewind.c | 10 ++++++---- 5 files changed, 23 insertions(+), 4 deletions(-) diff --git a/src/bin/pg_archivecleanup/pg_archivecleanup.c b/src/bin/pg_archivecleanup/pg_archivecleanup.c index c25348bcb85..ab686b4748c 100644 --- a/src/bin/pg_archivecleanup/pg_archivecleanup.c +++ b/src/bin/pg_archivecleanup/pg_archivecleanup.c @@ -375,6 +375,10 @@ main(int argc, char **argv) exit(2); } + if (dryrun) + pg_log_info("Executing in dry-run mode.\n" + "No files will be removed."); + /* * Check archive exists and other initialization if required. */ diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c index df41836e70f..cc4be5d6ef4 100644 --- a/src/bin/pg_basebackup/pg_createsubscriber.c +++ b/src/bin/pg_basebackup/pg_createsubscriber.c @@ -2305,6 +2305,11 @@ main(int argc, char **argv) pg_log_error_hint("Try \"%s --help\" for more information.", progname); exit(1); } + + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + pg_log_info("validating publisher connection string"); pub_base_conninfo = get_base_conninfo(opt.pub_conninfo_str, &dbname_conninfo); diff --git a/src/bin/pg_combinebackup/pg_combinebackup.c b/src/bin/pg_combinebackup/pg_combinebackup.c index 3a325127209..c9bf0a9e105 100644 --- a/src/bin/pg_combinebackup/pg_combinebackup.c +++ b/src/bin/pg_combinebackup/pg_combinebackup.c @@ -242,6 +242,10 @@ main(int argc, char *argv[]) if (opt.no_manifest) opt.manifest_checksums = CHECKSUM_TYPE_NONE; + if (opt.dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + /* Check that the platform supports the requested copy method. */ if (opt.copy_method == COPY_METHOD_CLONE) { diff --git a/src/bin/pg_resetwal/pg_resetwal.c b/src/bin/pg_resetwal/pg_resetwal.c index a89d72fc5cf..dd5d279521e 100644 --- a/src/bin/pg_resetwal/pg_resetwal.c +++ b/src/bin/pg_resetwal/pg_resetwal.c @@ -397,6 +397,10 @@ main(int argc, char *argv[]) exit(1); } + if (noupdate) + pg_log_info("Executing in dry-run mode.\n" + "Nothing will be modified."); + /* * Attempt to read the existing pg_control file */ diff --git a/src/bin/pg_rewind/pg_rewind.c b/src/bin/pg_rewind/pg_rewind.c index 27c514f934a..e9364d04f76 100644 --- a/src/bin/pg_rewind/pg_rewind.c +++ b/src/bin/pg_rewind/pg_rewind.c @@ -300,10 +300,12 @@ main(int argc, char **argv) atexit(disconnect_atexit); - /* - * Ok, we have all the options and we're ready to start. First, connect to - * remote server. - */ + /* Ok, we have all the options and we're ready to start. */ + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + + /* First, connect to remote server. */ if (connstr_source) { conn = PQconnectdb(connstr_source); -- 2.47.3 --ibfr3ah5qy6tcbhw-- ^ permalink raw reply [nested|flat] 190+ messages in thread
* [PATCH v5] Log a note at program start when running in dry-run mode @ 2025-11-11 08:54 Álvaro Herrera <[email protected]> 0 siblings, 0 replies; 190+ messages in thread From: Álvaro Herrera @ 2025-11-11 08:54 UTC (permalink / raw) Users might get some peace of mind knowing their data is not being destroyed or whatever. Author: Peter Smith <[email protected]> Reviewed-by: Álvaro Herrera <[email protected]> Discussion: https://postgr.es/m/CAHut+PsvQJQnQO0KT0S2oegenkvJ8FUuY-QS5syyqmT24R2xFQ@mail.gmail.com --- src/bin/pg_archivecleanup/pg_archivecleanup.c | 4 ++++ src/bin/pg_basebackup/pg_createsubscriber.c | 5 +++++ src/bin/pg_combinebackup/pg_combinebackup.c | 4 ++++ src/bin/pg_resetwal/pg_resetwal.c | 4 ++++ src/bin/pg_rewind/pg_rewind.c | 10 ++++++---- 5 files changed, 23 insertions(+), 4 deletions(-) diff --git a/src/bin/pg_archivecleanup/pg_archivecleanup.c b/src/bin/pg_archivecleanup/pg_archivecleanup.c index c25348bcb85..ab686b4748c 100644 --- a/src/bin/pg_archivecleanup/pg_archivecleanup.c +++ b/src/bin/pg_archivecleanup/pg_archivecleanup.c @@ -375,6 +375,10 @@ main(int argc, char **argv) exit(2); } + if (dryrun) + pg_log_info("Executing in dry-run mode.\n" + "No files will be removed."); + /* * Check archive exists and other initialization if required. */ diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c index df41836e70f..cc4be5d6ef4 100644 --- a/src/bin/pg_basebackup/pg_createsubscriber.c +++ b/src/bin/pg_basebackup/pg_createsubscriber.c @@ -2305,6 +2305,11 @@ main(int argc, char **argv) pg_log_error_hint("Try \"%s --help\" for more information.", progname); exit(1); } + + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + pg_log_info("validating publisher connection string"); pub_base_conninfo = get_base_conninfo(opt.pub_conninfo_str, &dbname_conninfo); diff --git a/src/bin/pg_combinebackup/pg_combinebackup.c b/src/bin/pg_combinebackup/pg_combinebackup.c index 3a325127209..c9bf0a9e105 100644 --- a/src/bin/pg_combinebackup/pg_combinebackup.c +++ b/src/bin/pg_combinebackup/pg_combinebackup.c @@ -242,6 +242,10 @@ main(int argc, char *argv[]) if (opt.no_manifest) opt.manifest_checksums = CHECKSUM_TYPE_NONE; + if (opt.dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + /* Check that the platform supports the requested copy method. */ if (opt.copy_method == COPY_METHOD_CLONE) { diff --git a/src/bin/pg_resetwal/pg_resetwal.c b/src/bin/pg_resetwal/pg_resetwal.c index a89d72fc5cf..dd5d279521e 100644 --- a/src/bin/pg_resetwal/pg_resetwal.c +++ b/src/bin/pg_resetwal/pg_resetwal.c @@ -397,6 +397,10 @@ main(int argc, char *argv[]) exit(1); } + if (noupdate) + pg_log_info("Executing in dry-run mode.\n" + "Nothing will be modified."); + /* * Attempt to read the existing pg_control file */ diff --git a/src/bin/pg_rewind/pg_rewind.c b/src/bin/pg_rewind/pg_rewind.c index 27c514f934a..e9364d04f76 100644 --- a/src/bin/pg_rewind/pg_rewind.c +++ b/src/bin/pg_rewind/pg_rewind.c @@ -300,10 +300,12 @@ main(int argc, char **argv) atexit(disconnect_atexit); - /* - * Ok, we have all the options and we're ready to start. First, connect to - * remote server. - */ + /* Ok, we have all the options and we're ready to start. */ + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + + /* First, connect to remote server. */ if (connstr_source) { conn = PQconnectdb(connstr_source); -- 2.47.3 --ibfr3ah5qy6tcbhw-- ^ permalink raw reply [nested|flat] 190+ messages in thread
* [PATCH v5] Log a note at program start when running in dry-run mode @ 2025-11-11 08:54 Álvaro Herrera <[email protected]> 0 siblings, 0 replies; 190+ messages in thread From: Álvaro Herrera @ 2025-11-11 08:54 UTC (permalink / raw) Users might get some peace of mind knowing their data is not being destroyed or whatever. Author: Peter Smith <[email protected]> Reviewed-by: Álvaro Herrera <[email protected]> Discussion: https://postgr.es/m/CAHut+PsvQJQnQO0KT0S2oegenkvJ8FUuY-QS5syyqmT24R2xFQ@mail.gmail.com --- src/bin/pg_archivecleanup/pg_archivecleanup.c | 4 ++++ src/bin/pg_basebackup/pg_createsubscriber.c | 5 +++++ src/bin/pg_combinebackup/pg_combinebackup.c | 4 ++++ src/bin/pg_resetwal/pg_resetwal.c | 4 ++++ src/bin/pg_rewind/pg_rewind.c | 10 ++++++---- 5 files changed, 23 insertions(+), 4 deletions(-) diff --git a/src/bin/pg_archivecleanup/pg_archivecleanup.c b/src/bin/pg_archivecleanup/pg_archivecleanup.c index c25348bcb85..ab686b4748c 100644 --- a/src/bin/pg_archivecleanup/pg_archivecleanup.c +++ b/src/bin/pg_archivecleanup/pg_archivecleanup.c @@ -375,6 +375,10 @@ main(int argc, char **argv) exit(2); } + if (dryrun) + pg_log_info("Executing in dry-run mode.\n" + "No files will be removed."); + /* * Check archive exists and other initialization if required. */ diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c index df41836e70f..cc4be5d6ef4 100644 --- a/src/bin/pg_basebackup/pg_createsubscriber.c +++ b/src/bin/pg_basebackup/pg_createsubscriber.c @@ -2305,6 +2305,11 @@ main(int argc, char **argv) pg_log_error_hint("Try \"%s --help\" for more information.", progname); exit(1); } + + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + pg_log_info("validating publisher connection string"); pub_base_conninfo = get_base_conninfo(opt.pub_conninfo_str, &dbname_conninfo); diff --git a/src/bin/pg_combinebackup/pg_combinebackup.c b/src/bin/pg_combinebackup/pg_combinebackup.c index 3a325127209..c9bf0a9e105 100644 --- a/src/bin/pg_combinebackup/pg_combinebackup.c +++ b/src/bin/pg_combinebackup/pg_combinebackup.c @@ -242,6 +242,10 @@ main(int argc, char *argv[]) if (opt.no_manifest) opt.manifest_checksums = CHECKSUM_TYPE_NONE; + if (opt.dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + /* Check that the platform supports the requested copy method. */ if (opt.copy_method == COPY_METHOD_CLONE) { diff --git a/src/bin/pg_resetwal/pg_resetwal.c b/src/bin/pg_resetwal/pg_resetwal.c index a89d72fc5cf..dd5d279521e 100644 --- a/src/bin/pg_resetwal/pg_resetwal.c +++ b/src/bin/pg_resetwal/pg_resetwal.c @@ -397,6 +397,10 @@ main(int argc, char *argv[]) exit(1); } + if (noupdate) + pg_log_info("Executing in dry-run mode.\n" + "Nothing will be modified."); + /* * Attempt to read the existing pg_control file */ diff --git a/src/bin/pg_rewind/pg_rewind.c b/src/bin/pg_rewind/pg_rewind.c index 27c514f934a..e9364d04f76 100644 --- a/src/bin/pg_rewind/pg_rewind.c +++ b/src/bin/pg_rewind/pg_rewind.c @@ -300,10 +300,12 @@ main(int argc, char **argv) atexit(disconnect_atexit); - /* - * Ok, we have all the options and we're ready to start. First, connect to - * remote server. - */ + /* Ok, we have all the options and we're ready to start. */ + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + + /* First, connect to remote server. */ if (connstr_source) { conn = PQconnectdb(connstr_source); -- 2.47.3 --ibfr3ah5qy6tcbhw-- ^ permalink raw reply [nested|flat] 190+ messages in thread
* [PATCH v5] Log a note at program start when running in dry-run mode @ 2025-11-11 08:54 Álvaro Herrera <[email protected]> 0 siblings, 0 replies; 190+ messages in thread From: Álvaro Herrera @ 2025-11-11 08:54 UTC (permalink / raw) Users might get some peace of mind knowing their data is not being destroyed or whatever. Author: Peter Smith <[email protected]> Reviewed-by: Álvaro Herrera <[email protected]> Discussion: https://postgr.es/m/CAHut+PsvQJQnQO0KT0S2oegenkvJ8FUuY-QS5syyqmT24R2xFQ@mail.gmail.com --- src/bin/pg_archivecleanup/pg_archivecleanup.c | 4 ++++ src/bin/pg_basebackup/pg_createsubscriber.c | 5 +++++ src/bin/pg_combinebackup/pg_combinebackup.c | 4 ++++ src/bin/pg_resetwal/pg_resetwal.c | 4 ++++ src/bin/pg_rewind/pg_rewind.c | 10 ++++++---- 5 files changed, 23 insertions(+), 4 deletions(-) diff --git a/src/bin/pg_archivecleanup/pg_archivecleanup.c b/src/bin/pg_archivecleanup/pg_archivecleanup.c index c25348bcb85..ab686b4748c 100644 --- a/src/bin/pg_archivecleanup/pg_archivecleanup.c +++ b/src/bin/pg_archivecleanup/pg_archivecleanup.c @@ -375,6 +375,10 @@ main(int argc, char **argv) exit(2); } + if (dryrun) + pg_log_info("Executing in dry-run mode.\n" + "No files will be removed."); + /* * Check archive exists and other initialization if required. */ diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c index df41836e70f..cc4be5d6ef4 100644 --- a/src/bin/pg_basebackup/pg_createsubscriber.c +++ b/src/bin/pg_basebackup/pg_createsubscriber.c @@ -2305,6 +2305,11 @@ main(int argc, char **argv) pg_log_error_hint("Try \"%s --help\" for more information.", progname); exit(1); } + + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + pg_log_info("validating publisher connection string"); pub_base_conninfo = get_base_conninfo(opt.pub_conninfo_str, &dbname_conninfo); diff --git a/src/bin/pg_combinebackup/pg_combinebackup.c b/src/bin/pg_combinebackup/pg_combinebackup.c index 3a325127209..c9bf0a9e105 100644 --- a/src/bin/pg_combinebackup/pg_combinebackup.c +++ b/src/bin/pg_combinebackup/pg_combinebackup.c @@ -242,6 +242,10 @@ main(int argc, char *argv[]) if (opt.no_manifest) opt.manifest_checksums = CHECKSUM_TYPE_NONE; + if (opt.dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + /* Check that the platform supports the requested copy method. */ if (opt.copy_method == COPY_METHOD_CLONE) { diff --git a/src/bin/pg_resetwal/pg_resetwal.c b/src/bin/pg_resetwal/pg_resetwal.c index a89d72fc5cf..dd5d279521e 100644 --- a/src/bin/pg_resetwal/pg_resetwal.c +++ b/src/bin/pg_resetwal/pg_resetwal.c @@ -397,6 +397,10 @@ main(int argc, char *argv[]) exit(1); } + if (noupdate) + pg_log_info("Executing in dry-run mode.\n" + "Nothing will be modified."); + /* * Attempt to read the existing pg_control file */ diff --git a/src/bin/pg_rewind/pg_rewind.c b/src/bin/pg_rewind/pg_rewind.c index 27c514f934a..e9364d04f76 100644 --- a/src/bin/pg_rewind/pg_rewind.c +++ b/src/bin/pg_rewind/pg_rewind.c @@ -300,10 +300,12 @@ main(int argc, char **argv) atexit(disconnect_atexit); - /* - * Ok, we have all the options and we're ready to start. First, connect to - * remote server. - */ + /* Ok, we have all the options and we're ready to start. */ + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + + /* First, connect to remote server. */ if (connstr_source) { conn = PQconnectdb(connstr_source); -- 2.47.3 --ibfr3ah5qy6tcbhw-- ^ permalink raw reply [nested|flat] 190+ messages in thread
* [PATCH v5] Log a note at program start when running in dry-run mode @ 2025-11-11 08:54 Álvaro Herrera <[email protected]> 0 siblings, 0 replies; 190+ messages in thread From: Álvaro Herrera @ 2025-11-11 08:54 UTC (permalink / raw) Users might get some peace of mind knowing their data is not being destroyed or whatever. Author: Peter Smith <[email protected]> Reviewed-by: Álvaro Herrera <[email protected]> Discussion: https://postgr.es/m/CAHut+PsvQJQnQO0KT0S2oegenkvJ8FUuY-QS5syyqmT24R2xFQ@mail.gmail.com --- src/bin/pg_archivecleanup/pg_archivecleanup.c | 4 ++++ src/bin/pg_basebackup/pg_createsubscriber.c | 5 +++++ src/bin/pg_combinebackup/pg_combinebackup.c | 4 ++++ src/bin/pg_resetwal/pg_resetwal.c | 4 ++++ src/bin/pg_rewind/pg_rewind.c | 10 ++++++---- 5 files changed, 23 insertions(+), 4 deletions(-) diff --git a/src/bin/pg_archivecleanup/pg_archivecleanup.c b/src/bin/pg_archivecleanup/pg_archivecleanup.c index c25348bcb85..ab686b4748c 100644 --- a/src/bin/pg_archivecleanup/pg_archivecleanup.c +++ b/src/bin/pg_archivecleanup/pg_archivecleanup.c @@ -375,6 +375,10 @@ main(int argc, char **argv) exit(2); } + if (dryrun) + pg_log_info("Executing in dry-run mode.\n" + "No files will be removed."); + /* * Check archive exists and other initialization if required. */ diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c index df41836e70f..cc4be5d6ef4 100644 --- a/src/bin/pg_basebackup/pg_createsubscriber.c +++ b/src/bin/pg_basebackup/pg_createsubscriber.c @@ -2305,6 +2305,11 @@ main(int argc, char **argv) pg_log_error_hint("Try \"%s --help\" for more information.", progname); exit(1); } + + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + pg_log_info("validating publisher connection string"); pub_base_conninfo = get_base_conninfo(opt.pub_conninfo_str, &dbname_conninfo); diff --git a/src/bin/pg_combinebackup/pg_combinebackup.c b/src/bin/pg_combinebackup/pg_combinebackup.c index 3a325127209..c9bf0a9e105 100644 --- a/src/bin/pg_combinebackup/pg_combinebackup.c +++ b/src/bin/pg_combinebackup/pg_combinebackup.c @@ -242,6 +242,10 @@ main(int argc, char *argv[]) if (opt.no_manifest) opt.manifest_checksums = CHECKSUM_TYPE_NONE; + if (opt.dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + /* Check that the platform supports the requested copy method. */ if (opt.copy_method == COPY_METHOD_CLONE) { diff --git a/src/bin/pg_resetwal/pg_resetwal.c b/src/bin/pg_resetwal/pg_resetwal.c index a89d72fc5cf..dd5d279521e 100644 --- a/src/bin/pg_resetwal/pg_resetwal.c +++ b/src/bin/pg_resetwal/pg_resetwal.c @@ -397,6 +397,10 @@ main(int argc, char *argv[]) exit(1); } + if (noupdate) + pg_log_info("Executing in dry-run mode.\n" + "Nothing will be modified."); + /* * Attempt to read the existing pg_control file */ diff --git a/src/bin/pg_rewind/pg_rewind.c b/src/bin/pg_rewind/pg_rewind.c index 27c514f934a..e9364d04f76 100644 --- a/src/bin/pg_rewind/pg_rewind.c +++ b/src/bin/pg_rewind/pg_rewind.c @@ -300,10 +300,12 @@ main(int argc, char **argv) atexit(disconnect_atexit); - /* - * Ok, we have all the options and we're ready to start. First, connect to - * remote server. - */ + /* Ok, we have all the options and we're ready to start. */ + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + + /* First, connect to remote server. */ if (connstr_source) { conn = PQconnectdb(connstr_source); -- 2.47.3 --ibfr3ah5qy6tcbhw-- ^ permalink raw reply [nested|flat] 190+ messages in thread
* [PATCH v5] Log a note at program start when running in dry-run mode @ 2025-11-11 08:54 Álvaro Herrera <[email protected]> 0 siblings, 0 replies; 190+ messages in thread From: Álvaro Herrera @ 2025-11-11 08:54 UTC (permalink / raw) Users might get some peace of mind knowing their data is not being destroyed or whatever. Author: Peter Smith <[email protected]> Reviewed-by: Álvaro Herrera <[email protected]> Discussion: https://postgr.es/m/CAHut+PsvQJQnQO0KT0S2oegenkvJ8FUuY-QS5syyqmT24R2xFQ@mail.gmail.com --- src/bin/pg_archivecleanup/pg_archivecleanup.c | 4 ++++ src/bin/pg_basebackup/pg_createsubscriber.c | 5 +++++ src/bin/pg_combinebackup/pg_combinebackup.c | 4 ++++ src/bin/pg_resetwal/pg_resetwal.c | 4 ++++ src/bin/pg_rewind/pg_rewind.c | 10 ++++++---- 5 files changed, 23 insertions(+), 4 deletions(-) diff --git a/src/bin/pg_archivecleanup/pg_archivecleanup.c b/src/bin/pg_archivecleanup/pg_archivecleanup.c index c25348bcb85..ab686b4748c 100644 --- a/src/bin/pg_archivecleanup/pg_archivecleanup.c +++ b/src/bin/pg_archivecleanup/pg_archivecleanup.c @@ -375,6 +375,10 @@ main(int argc, char **argv) exit(2); } + if (dryrun) + pg_log_info("Executing in dry-run mode.\n" + "No files will be removed."); + /* * Check archive exists and other initialization if required. */ diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c index df41836e70f..cc4be5d6ef4 100644 --- a/src/bin/pg_basebackup/pg_createsubscriber.c +++ b/src/bin/pg_basebackup/pg_createsubscriber.c @@ -2305,6 +2305,11 @@ main(int argc, char **argv) pg_log_error_hint("Try \"%s --help\" for more information.", progname); exit(1); } + + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + pg_log_info("validating publisher connection string"); pub_base_conninfo = get_base_conninfo(opt.pub_conninfo_str, &dbname_conninfo); diff --git a/src/bin/pg_combinebackup/pg_combinebackup.c b/src/bin/pg_combinebackup/pg_combinebackup.c index 3a325127209..c9bf0a9e105 100644 --- a/src/bin/pg_combinebackup/pg_combinebackup.c +++ b/src/bin/pg_combinebackup/pg_combinebackup.c @@ -242,6 +242,10 @@ main(int argc, char *argv[]) if (opt.no_manifest) opt.manifest_checksums = CHECKSUM_TYPE_NONE; + if (opt.dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + /* Check that the platform supports the requested copy method. */ if (opt.copy_method == COPY_METHOD_CLONE) { diff --git a/src/bin/pg_resetwal/pg_resetwal.c b/src/bin/pg_resetwal/pg_resetwal.c index a89d72fc5cf..dd5d279521e 100644 --- a/src/bin/pg_resetwal/pg_resetwal.c +++ b/src/bin/pg_resetwal/pg_resetwal.c @@ -397,6 +397,10 @@ main(int argc, char *argv[]) exit(1); } + if (noupdate) + pg_log_info("Executing in dry-run mode.\n" + "Nothing will be modified."); + /* * Attempt to read the existing pg_control file */ diff --git a/src/bin/pg_rewind/pg_rewind.c b/src/bin/pg_rewind/pg_rewind.c index 27c514f934a..e9364d04f76 100644 --- a/src/bin/pg_rewind/pg_rewind.c +++ b/src/bin/pg_rewind/pg_rewind.c @@ -300,10 +300,12 @@ main(int argc, char **argv) atexit(disconnect_atexit); - /* - * Ok, we have all the options and we're ready to start. First, connect to - * remote server. - */ + /* Ok, we have all the options and we're ready to start. */ + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + + /* First, connect to remote server. */ if (connstr_source) { conn = PQconnectdb(connstr_source); -- 2.47.3 --ibfr3ah5qy6tcbhw-- ^ permalink raw reply [nested|flat] 190+ messages in thread
* [PATCH v5] Log a note at program start when running in dry-run mode @ 2025-11-11 08:54 Álvaro Herrera <[email protected]> 0 siblings, 0 replies; 190+ messages in thread From: Álvaro Herrera @ 2025-11-11 08:54 UTC (permalink / raw) Users might get some peace of mind knowing their data is not being destroyed or whatever. Author: Peter Smith <[email protected]> Reviewed-by: Álvaro Herrera <[email protected]> Discussion: https://postgr.es/m/CAHut+PsvQJQnQO0KT0S2oegenkvJ8FUuY-QS5syyqmT24R2xFQ@mail.gmail.com --- src/bin/pg_archivecleanup/pg_archivecleanup.c | 4 ++++ src/bin/pg_basebackup/pg_createsubscriber.c | 5 +++++ src/bin/pg_combinebackup/pg_combinebackup.c | 4 ++++ src/bin/pg_resetwal/pg_resetwal.c | 4 ++++ src/bin/pg_rewind/pg_rewind.c | 10 ++++++---- 5 files changed, 23 insertions(+), 4 deletions(-) diff --git a/src/bin/pg_archivecleanup/pg_archivecleanup.c b/src/bin/pg_archivecleanup/pg_archivecleanup.c index c25348bcb85..ab686b4748c 100644 --- a/src/bin/pg_archivecleanup/pg_archivecleanup.c +++ b/src/bin/pg_archivecleanup/pg_archivecleanup.c @@ -375,6 +375,10 @@ main(int argc, char **argv) exit(2); } + if (dryrun) + pg_log_info("Executing in dry-run mode.\n" + "No files will be removed."); + /* * Check archive exists and other initialization if required. */ diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c index df41836e70f..cc4be5d6ef4 100644 --- a/src/bin/pg_basebackup/pg_createsubscriber.c +++ b/src/bin/pg_basebackup/pg_createsubscriber.c @@ -2305,6 +2305,11 @@ main(int argc, char **argv) pg_log_error_hint("Try \"%s --help\" for more information.", progname); exit(1); } + + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + pg_log_info("validating publisher connection string"); pub_base_conninfo = get_base_conninfo(opt.pub_conninfo_str, &dbname_conninfo); diff --git a/src/bin/pg_combinebackup/pg_combinebackup.c b/src/bin/pg_combinebackup/pg_combinebackup.c index 3a325127209..c9bf0a9e105 100644 --- a/src/bin/pg_combinebackup/pg_combinebackup.c +++ b/src/bin/pg_combinebackup/pg_combinebackup.c @@ -242,6 +242,10 @@ main(int argc, char *argv[]) if (opt.no_manifest) opt.manifest_checksums = CHECKSUM_TYPE_NONE; + if (opt.dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + /* Check that the platform supports the requested copy method. */ if (opt.copy_method == COPY_METHOD_CLONE) { diff --git a/src/bin/pg_resetwal/pg_resetwal.c b/src/bin/pg_resetwal/pg_resetwal.c index a89d72fc5cf..dd5d279521e 100644 --- a/src/bin/pg_resetwal/pg_resetwal.c +++ b/src/bin/pg_resetwal/pg_resetwal.c @@ -397,6 +397,10 @@ main(int argc, char *argv[]) exit(1); } + if (noupdate) + pg_log_info("Executing in dry-run mode.\n" + "Nothing will be modified."); + /* * Attempt to read the existing pg_control file */ diff --git a/src/bin/pg_rewind/pg_rewind.c b/src/bin/pg_rewind/pg_rewind.c index 27c514f934a..e9364d04f76 100644 --- a/src/bin/pg_rewind/pg_rewind.c +++ b/src/bin/pg_rewind/pg_rewind.c @@ -300,10 +300,12 @@ main(int argc, char **argv) atexit(disconnect_atexit); - /* - * Ok, we have all the options and we're ready to start. First, connect to - * remote server. - */ + /* Ok, we have all the options and we're ready to start. */ + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + + /* First, connect to remote server. */ if (connstr_source) { conn = PQconnectdb(connstr_source); -- 2.47.3 --ibfr3ah5qy6tcbhw-- ^ permalink raw reply [nested|flat] 190+ messages in thread
* [PATCH v5] Log a note at program start when running in dry-run mode @ 2025-11-11 08:54 Álvaro Herrera <[email protected]> 0 siblings, 0 replies; 190+ messages in thread From: Álvaro Herrera @ 2025-11-11 08:54 UTC (permalink / raw) Users might get some peace of mind knowing their data is not being destroyed or whatever. Author: Peter Smith <[email protected]> Reviewed-by: Álvaro Herrera <[email protected]> Discussion: https://postgr.es/m/CAHut+PsvQJQnQO0KT0S2oegenkvJ8FUuY-QS5syyqmT24R2xFQ@mail.gmail.com --- src/bin/pg_archivecleanup/pg_archivecleanup.c | 4 ++++ src/bin/pg_basebackup/pg_createsubscriber.c | 5 +++++ src/bin/pg_combinebackup/pg_combinebackup.c | 4 ++++ src/bin/pg_resetwal/pg_resetwal.c | 4 ++++ src/bin/pg_rewind/pg_rewind.c | 10 ++++++---- 5 files changed, 23 insertions(+), 4 deletions(-) diff --git a/src/bin/pg_archivecleanup/pg_archivecleanup.c b/src/bin/pg_archivecleanup/pg_archivecleanup.c index c25348bcb85..ab686b4748c 100644 --- a/src/bin/pg_archivecleanup/pg_archivecleanup.c +++ b/src/bin/pg_archivecleanup/pg_archivecleanup.c @@ -375,6 +375,10 @@ main(int argc, char **argv) exit(2); } + if (dryrun) + pg_log_info("Executing in dry-run mode.\n" + "No files will be removed."); + /* * Check archive exists and other initialization if required. */ diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c index df41836e70f..cc4be5d6ef4 100644 --- a/src/bin/pg_basebackup/pg_createsubscriber.c +++ b/src/bin/pg_basebackup/pg_createsubscriber.c @@ -2305,6 +2305,11 @@ main(int argc, char **argv) pg_log_error_hint("Try \"%s --help\" for more information.", progname); exit(1); } + + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + pg_log_info("validating publisher connection string"); pub_base_conninfo = get_base_conninfo(opt.pub_conninfo_str, &dbname_conninfo); diff --git a/src/bin/pg_combinebackup/pg_combinebackup.c b/src/bin/pg_combinebackup/pg_combinebackup.c index 3a325127209..c9bf0a9e105 100644 --- a/src/bin/pg_combinebackup/pg_combinebackup.c +++ b/src/bin/pg_combinebackup/pg_combinebackup.c @@ -242,6 +242,10 @@ main(int argc, char *argv[]) if (opt.no_manifest) opt.manifest_checksums = CHECKSUM_TYPE_NONE; + if (opt.dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + /* Check that the platform supports the requested copy method. */ if (opt.copy_method == COPY_METHOD_CLONE) { diff --git a/src/bin/pg_resetwal/pg_resetwal.c b/src/bin/pg_resetwal/pg_resetwal.c index a89d72fc5cf..dd5d279521e 100644 --- a/src/bin/pg_resetwal/pg_resetwal.c +++ b/src/bin/pg_resetwal/pg_resetwal.c @@ -397,6 +397,10 @@ main(int argc, char *argv[]) exit(1); } + if (noupdate) + pg_log_info("Executing in dry-run mode.\n" + "Nothing will be modified."); + /* * Attempt to read the existing pg_control file */ diff --git a/src/bin/pg_rewind/pg_rewind.c b/src/bin/pg_rewind/pg_rewind.c index 27c514f934a..e9364d04f76 100644 --- a/src/bin/pg_rewind/pg_rewind.c +++ b/src/bin/pg_rewind/pg_rewind.c @@ -300,10 +300,12 @@ main(int argc, char **argv) atexit(disconnect_atexit); - /* - * Ok, we have all the options and we're ready to start. First, connect to - * remote server. - */ + /* Ok, we have all the options and we're ready to start. */ + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + + /* First, connect to remote server. */ if (connstr_source) { conn = PQconnectdb(connstr_source); -- 2.47.3 --ibfr3ah5qy6tcbhw-- ^ permalink raw reply [nested|flat] 190+ messages in thread
* [PATCH v5] Log a note at program start when running in dry-run mode @ 2025-11-11 08:54 Álvaro Herrera <[email protected]> 0 siblings, 0 replies; 190+ messages in thread From: Álvaro Herrera @ 2025-11-11 08:54 UTC (permalink / raw) Users might get some peace of mind knowing their data is not being destroyed or whatever. Author: Peter Smith <[email protected]> Reviewed-by: Álvaro Herrera <[email protected]> Discussion: https://postgr.es/m/CAHut+PsvQJQnQO0KT0S2oegenkvJ8FUuY-QS5syyqmT24R2xFQ@mail.gmail.com --- src/bin/pg_archivecleanup/pg_archivecleanup.c | 4 ++++ src/bin/pg_basebackup/pg_createsubscriber.c | 5 +++++ src/bin/pg_combinebackup/pg_combinebackup.c | 4 ++++ src/bin/pg_resetwal/pg_resetwal.c | 4 ++++ src/bin/pg_rewind/pg_rewind.c | 10 ++++++---- 5 files changed, 23 insertions(+), 4 deletions(-) diff --git a/src/bin/pg_archivecleanup/pg_archivecleanup.c b/src/bin/pg_archivecleanup/pg_archivecleanup.c index c25348bcb85..ab686b4748c 100644 --- a/src/bin/pg_archivecleanup/pg_archivecleanup.c +++ b/src/bin/pg_archivecleanup/pg_archivecleanup.c @@ -375,6 +375,10 @@ main(int argc, char **argv) exit(2); } + if (dryrun) + pg_log_info("Executing in dry-run mode.\n" + "No files will be removed."); + /* * Check archive exists and other initialization if required. */ diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c index df41836e70f..cc4be5d6ef4 100644 --- a/src/bin/pg_basebackup/pg_createsubscriber.c +++ b/src/bin/pg_basebackup/pg_createsubscriber.c @@ -2305,6 +2305,11 @@ main(int argc, char **argv) pg_log_error_hint("Try \"%s --help\" for more information.", progname); exit(1); } + + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + pg_log_info("validating publisher connection string"); pub_base_conninfo = get_base_conninfo(opt.pub_conninfo_str, &dbname_conninfo); diff --git a/src/bin/pg_combinebackup/pg_combinebackup.c b/src/bin/pg_combinebackup/pg_combinebackup.c index 3a325127209..c9bf0a9e105 100644 --- a/src/bin/pg_combinebackup/pg_combinebackup.c +++ b/src/bin/pg_combinebackup/pg_combinebackup.c @@ -242,6 +242,10 @@ main(int argc, char *argv[]) if (opt.no_manifest) opt.manifest_checksums = CHECKSUM_TYPE_NONE; + if (opt.dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + /* Check that the platform supports the requested copy method. */ if (opt.copy_method == COPY_METHOD_CLONE) { diff --git a/src/bin/pg_resetwal/pg_resetwal.c b/src/bin/pg_resetwal/pg_resetwal.c index a89d72fc5cf..dd5d279521e 100644 --- a/src/bin/pg_resetwal/pg_resetwal.c +++ b/src/bin/pg_resetwal/pg_resetwal.c @@ -397,6 +397,10 @@ main(int argc, char *argv[]) exit(1); } + if (noupdate) + pg_log_info("Executing in dry-run mode.\n" + "Nothing will be modified."); + /* * Attempt to read the existing pg_control file */ diff --git a/src/bin/pg_rewind/pg_rewind.c b/src/bin/pg_rewind/pg_rewind.c index 27c514f934a..e9364d04f76 100644 --- a/src/bin/pg_rewind/pg_rewind.c +++ b/src/bin/pg_rewind/pg_rewind.c @@ -300,10 +300,12 @@ main(int argc, char **argv) atexit(disconnect_atexit); - /* - * Ok, we have all the options and we're ready to start. First, connect to - * remote server. - */ + /* Ok, we have all the options and we're ready to start. */ + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + + /* First, connect to remote server. */ if (connstr_source) { conn = PQconnectdb(connstr_source); -- 2.47.3 --ibfr3ah5qy6tcbhw-- ^ permalink raw reply [nested|flat] 190+ messages in thread
* [PATCH v5] Log a note at program start when running in dry-run mode @ 2025-11-11 08:54 Álvaro Herrera <[email protected]> 0 siblings, 0 replies; 190+ messages in thread From: Álvaro Herrera @ 2025-11-11 08:54 UTC (permalink / raw) Users might get some peace of mind knowing their data is not being destroyed or whatever. Author: Peter Smith <[email protected]> Reviewed-by: Álvaro Herrera <[email protected]> Discussion: https://postgr.es/m/CAHut+PsvQJQnQO0KT0S2oegenkvJ8FUuY-QS5syyqmT24R2xFQ@mail.gmail.com --- src/bin/pg_archivecleanup/pg_archivecleanup.c | 4 ++++ src/bin/pg_basebackup/pg_createsubscriber.c | 5 +++++ src/bin/pg_combinebackup/pg_combinebackup.c | 4 ++++ src/bin/pg_resetwal/pg_resetwal.c | 4 ++++ src/bin/pg_rewind/pg_rewind.c | 10 ++++++---- 5 files changed, 23 insertions(+), 4 deletions(-) diff --git a/src/bin/pg_archivecleanup/pg_archivecleanup.c b/src/bin/pg_archivecleanup/pg_archivecleanup.c index c25348bcb85..ab686b4748c 100644 --- a/src/bin/pg_archivecleanup/pg_archivecleanup.c +++ b/src/bin/pg_archivecleanup/pg_archivecleanup.c @@ -375,6 +375,10 @@ main(int argc, char **argv) exit(2); } + if (dryrun) + pg_log_info("Executing in dry-run mode.\n" + "No files will be removed."); + /* * Check archive exists and other initialization if required. */ diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c index df41836e70f..cc4be5d6ef4 100644 --- a/src/bin/pg_basebackup/pg_createsubscriber.c +++ b/src/bin/pg_basebackup/pg_createsubscriber.c @@ -2305,6 +2305,11 @@ main(int argc, char **argv) pg_log_error_hint("Try \"%s --help\" for more information.", progname); exit(1); } + + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + pg_log_info("validating publisher connection string"); pub_base_conninfo = get_base_conninfo(opt.pub_conninfo_str, &dbname_conninfo); diff --git a/src/bin/pg_combinebackup/pg_combinebackup.c b/src/bin/pg_combinebackup/pg_combinebackup.c index 3a325127209..c9bf0a9e105 100644 --- a/src/bin/pg_combinebackup/pg_combinebackup.c +++ b/src/bin/pg_combinebackup/pg_combinebackup.c @@ -242,6 +242,10 @@ main(int argc, char *argv[]) if (opt.no_manifest) opt.manifest_checksums = CHECKSUM_TYPE_NONE; + if (opt.dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + /* Check that the platform supports the requested copy method. */ if (opt.copy_method == COPY_METHOD_CLONE) { diff --git a/src/bin/pg_resetwal/pg_resetwal.c b/src/bin/pg_resetwal/pg_resetwal.c index a89d72fc5cf..dd5d279521e 100644 --- a/src/bin/pg_resetwal/pg_resetwal.c +++ b/src/bin/pg_resetwal/pg_resetwal.c @@ -397,6 +397,10 @@ main(int argc, char *argv[]) exit(1); } + if (noupdate) + pg_log_info("Executing in dry-run mode.\n" + "Nothing will be modified."); + /* * Attempt to read the existing pg_control file */ diff --git a/src/bin/pg_rewind/pg_rewind.c b/src/bin/pg_rewind/pg_rewind.c index 27c514f934a..e9364d04f76 100644 --- a/src/bin/pg_rewind/pg_rewind.c +++ b/src/bin/pg_rewind/pg_rewind.c @@ -300,10 +300,12 @@ main(int argc, char **argv) atexit(disconnect_atexit); - /* - * Ok, we have all the options and we're ready to start. First, connect to - * remote server. - */ + /* Ok, we have all the options and we're ready to start. */ + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + + /* First, connect to remote server. */ if (connstr_source) { conn = PQconnectdb(connstr_source); -- 2.47.3 --ibfr3ah5qy6tcbhw-- ^ permalink raw reply [nested|flat] 190+ messages in thread
* [PATCH v5] Log a note at program start when running in dry-run mode @ 2025-11-11 08:54 Álvaro Herrera <[email protected]> 0 siblings, 0 replies; 190+ messages in thread From: Álvaro Herrera @ 2025-11-11 08:54 UTC (permalink / raw) Users might get some peace of mind knowing their data is not being destroyed or whatever. Author: Peter Smith <[email protected]> Reviewed-by: Álvaro Herrera <[email protected]> Discussion: https://postgr.es/m/CAHut+PsvQJQnQO0KT0S2oegenkvJ8FUuY-QS5syyqmT24R2xFQ@mail.gmail.com --- src/bin/pg_archivecleanup/pg_archivecleanup.c | 4 ++++ src/bin/pg_basebackup/pg_createsubscriber.c | 5 +++++ src/bin/pg_combinebackup/pg_combinebackup.c | 4 ++++ src/bin/pg_resetwal/pg_resetwal.c | 4 ++++ src/bin/pg_rewind/pg_rewind.c | 10 ++++++---- 5 files changed, 23 insertions(+), 4 deletions(-) diff --git a/src/bin/pg_archivecleanup/pg_archivecleanup.c b/src/bin/pg_archivecleanup/pg_archivecleanup.c index c25348bcb85..ab686b4748c 100644 --- a/src/bin/pg_archivecleanup/pg_archivecleanup.c +++ b/src/bin/pg_archivecleanup/pg_archivecleanup.c @@ -375,6 +375,10 @@ main(int argc, char **argv) exit(2); } + if (dryrun) + pg_log_info("Executing in dry-run mode.\n" + "No files will be removed."); + /* * Check archive exists and other initialization if required. */ diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c index df41836e70f..cc4be5d6ef4 100644 --- a/src/bin/pg_basebackup/pg_createsubscriber.c +++ b/src/bin/pg_basebackup/pg_createsubscriber.c @@ -2305,6 +2305,11 @@ main(int argc, char **argv) pg_log_error_hint("Try \"%s --help\" for more information.", progname); exit(1); } + + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + pg_log_info("validating publisher connection string"); pub_base_conninfo = get_base_conninfo(opt.pub_conninfo_str, &dbname_conninfo); diff --git a/src/bin/pg_combinebackup/pg_combinebackup.c b/src/bin/pg_combinebackup/pg_combinebackup.c index 3a325127209..c9bf0a9e105 100644 --- a/src/bin/pg_combinebackup/pg_combinebackup.c +++ b/src/bin/pg_combinebackup/pg_combinebackup.c @@ -242,6 +242,10 @@ main(int argc, char *argv[]) if (opt.no_manifest) opt.manifest_checksums = CHECKSUM_TYPE_NONE; + if (opt.dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + /* Check that the platform supports the requested copy method. */ if (opt.copy_method == COPY_METHOD_CLONE) { diff --git a/src/bin/pg_resetwal/pg_resetwal.c b/src/bin/pg_resetwal/pg_resetwal.c index a89d72fc5cf..dd5d279521e 100644 --- a/src/bin/pg_resetwal/pg_resetwal.c +++ b/src/bin/pg_resetwal/pg_resetwal.c @@ -397,6 +397,10 @@ main(int argc, char *argv[]) exit(1); } + if (noupdate) + pg_log_info("Executing in dry-run mode.\n" + "Nothing will be modified."); + /* * Attempt to read the existing pg_control file */ diff --git a/src/bin/pg_rewind/pg_rewind.c b/src/bin/pg_rewind/pg_rewind.c index 27c514f934a..e9364d04f76 100644 --- a/src/bin/pg_rewind/pg_rewind.c +++ b/src/bin/pg_rewind/pg_rewind.c @@ -300,10 +300,12 @@ main(int argc, char **argv) atexit(disconnect_atexit); - /* - * Ok, we have all the options and we're ready to start. First, connect to - * remote server. - */ + /* Ok, we have all the options and we're ready to start. */ + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + + /* First, connect to remote server. */ if (connstr_source) { conn = PQconnectdb(connstr_source); -- 2.47.3 --ibfr3ah5qy6tcbhw-- ^ permalink raw reply [nested|flat] 190+ messages in thread
* [PATCH v5] Log a note at program start when running in dry-run mode @ 2025-11-11 08:54 Álvaro Herrera <[email protected]> 0 siblings, 0 replies; 190+ messages in thread From: Álvaro Herrera @ 2025-11-11 08:54 UTC (permalink / raw) Users might get some peace of mind knowing their data is not being destroyed or whatever. Author: Peter Smith <[email protected]> Reviewed-by: Álvaro Herrera <[email protected]> Discussion: https://postgr.es/m/CAHut+PsvQJQnQO0KT0S2oegenkvJ8FUuY-QS5syyqmT24R2xFQ@mail.gmail.com --- src/bin/pg_archivecleanup/pg_archivecleanup.c | 4 ++++ src/bin/pg_basebackup/pg_createsubscriber.c | 5 +++++ src/bin/pg_combinebackup/pg_combinebackup.c | 4 ++++ src/bin/pg_resetwal/pg_resetwal.c | 4 ++++ src/bin/pg_rewind/pg_rewind.c | 10 ++++++---- 5 files changed, 23 insertions(+), 4 deletions(-) diff --git a/src/bin/pg_archivecleanup/pg_archivecleanup.c b/src/bin/pg_archivecleanup/pg_archivecleanup.c index c25348bcb85..ab686b4748c 100644 --- a/src/bin/pg_archivecleanup/pg_archivecleanup.c +++ b/src/bin/pg_archivecleanup/pg_archivecleanup.c @@ -375,6 +375,10 @@ main(int argc, char **argv) exit(2); } + if (dryrun) + pg_log_info("Executing in dry-run mode.\n" + "No files will be removed."); + /* * Check archive exists and other initialization if required. */ diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c index df41836e70f..cc4be5d6ef4 100644 --- a/src/bin/pg_basebackup/pg_createsubscriber.c +++ b/src/bin/pg_basebackup/pg_createsubscriber.c @@ -2305,6 +2305,11 @@ main(int argc, char **argv) pg_log_error_hint("Try \"%s --help\" for more information.", progname); exit(1); } + + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + pg_log_info("validating publisher connection string"); pub_base_conninfo = get_base_conninfo(opt.pub_conninfo_str, &dbname_conninfo); diff --git a/src/bin/pg_combinebackup/pg_combinebackup.c b/src/bin/pg_combinebackup/pg_combinebackup.c index 3a325127209..c9bf0a9e105 100644 --- a/src/bin/pg_combinebackup/pg_combinebackup.c +++ b/src/bin/pg_combinebackup/pg_combinebackup.c @@ -242,6 +242,10 @@ main(int argc, char *argv[]) if (opt.no_manifest) opt.manifest_checksums = CHECKSUM_TYPE_NONE; + if (opt.dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + /* Check that the platform supports the requested copy method. */ if (opt.copy_method == COPY_METHOD_CLONE) { diff --git a/src/bin/pg_resetwal/pg_resetwal.c b/src/bin/pg_resetwal/pg_resetwal.c index a89d72fc5cf..dd5d279521e 100644 --- a/src/bin/pg_resetwal/pg_resetwal.c +++ b/src/bin/pg_resetwal/pg_resetwal.c @@ -397,6 +397,10 @@ main(int argc, char *argv[]) exit(1); } + if (noupdate) + pg_log_info("Executing in dry-run mode.\n" + "Nothing will be modified."); + /* * Attempt to read the existing pg_control file */ diff --git a/src/bin/pg_rewind/pg_rewind.c b/src/bin/pg_rewind/pg_rewind.c index 27c514f934a..e9364d04f76 100644 --- a/src/bin/pg_rewind/pg_rewind.c +++ b/src/bin/pg_rewind/pg_rewind.c @@ -300,10 +300,12 @@ main(int argc, char **argv) atexit(disconnect_atexit); - /* - * Ok, we have all the options and we're ready to start. First, connect to - * remote server. - */ + /* Ok, we have all the options and we're ready to start. */ + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + + /* First, connect to remote server. */ if (connstr_source) { conn = PQconnectdb(connstr_source); -- 2.47.3 --ibfr3ah5qy6tcbhw-- ^ permalink raw reply [nested|flat] 190+ messages in thread
* [PATCH v5] Log a note at program start when running in dry-run mode @ 2025-11-11 08:54 Álvaro Herrera <[email protected]> 0 siblings, 0 replies; 190+ messages in thread From: Álvaro Herrera @ 2025-11-11 08:54 UTC (permalink / raw) Users might get some peace of mind knowing their data is not being destroyed or whatever. Author: Peter Smith <[email protected]> Reviewed-by: Álvaro Herrera <[email protected]> Discussion: https://postgr.es/m/CAHut+PsvQJQnQO0KT0S2oegenkvJ8FUuY-QS5syyqmT24R2xFQ@mail.gmail.com --- src/bin/pg_archivecleanup/pg_archivecleanup.c | 4 ++++ src/bin/pg_basebackup/pg_createsubscriber.c | 5 +++++ src/bin/pg_combinebackup/pg_combinebackup.c | 4 ++++ src/bin/pg_resetwal/pg_resetwal.c | 4 ++++ src/bin/pg_rewind/pg_rewind.c | 10 ++++++---- 5 files changed, 23 insertions(+), 4 deletions(-) diff --git a/src/bin/pg_archivecleanup/pg_archivecleanup.c b/src/bin/pg_archivecleanup/pg_archivecleanup.c index c25348bcb85..ab686b4748c 100644 --- a/src/bin/pg_archivecleanup/pg_archivecleanup.c +++ b/src/bin/pg_archivecleanup/pg_archivecleanup.c @@ -375,6 +375,10 @@ main(int argc, char **argv) exit(2); } + if (dryrun) + pg_log_info("Executing in dry-run mode.\n" + "No files will be removed."); + /* * Check archive exists and other initialization if required. */ diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c index df41836e70f..cc4be5d6ef4 100644 --- a/src/bin/pg_basebackup/pg_createsubscriber.c +++ b/src/bin/pg_basebackup/pg_createsubscriber.c @@ -2305,6 +2305,11 @@ main(int argc, char **argv) pg_log_error_hint("Try \"%s --help\" for more information.", progname); exit(1); } + + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + pg_log_info("validating publisher connection string"); pub_base_conninfo = get_base_conninfo(opt.pub_conninfo_str, &dbname_conninfo); diff --git a/src/bin/pg_combinebackup/pg_combinebackup.c b/src/bin/pg_combinebackup/pg_combinebackup.c index 3a325127209..c9bf0a9e105 100644 --- a/src/bin/pg_combinebackup/pg_combinebackup.c +++ b/src/bin/pg_combinebackup/pg_combinebackup.c @@ -242,6 +242,10 @@ main(int argc, char *argv[]) if (opt.no_manifest) opt.manifest_checksums = CHECKSUM_TYPE_NONE; + if (opt.dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + /* Check that the platform supports the requested copy method. */ if (opt.copy_method == COPY_METHOD_CLONE) { diff --git a/src/bin/pg_resetwal/pg_resetwal.c b/src/bin/pg_resetwal/pg_resetwal.c index a89d72fc5cf..dd5d279521e 100644 --- a/src/bin/pg_resetwal/pg_resetwal.c +++ b/src/bin/pg_resetwal/pg_resetwal.c @@ -397,6 +397,10 @@ main(int argc, char *argv[]) exit(1); } + if (noupdate) + pg_log_info("Executing in dry-run mode.\n" + "Nothing will be modified."); + /* * Attempt to read the existing pg_control file */ diff --git a/src/bin/pg_rewind/pg_rewind.c b/src/bin/pg_rewind/pg_rewind.c index 27c514f934a..e9364d04f76 100644 --- a/src/bin/pg_rewind/pg_rewind.c +++ b/src/bin/pg_rewind/pg_rewind.c @@ -300,10 +300,12 @@ main(int argc, char **argv) atexit(disconnect_atexit); - /* - * Ok, we have all the options and we're ready to start. First, connect to - * remote server. - */ + /* Ok, we have all the options and we're ready to start. */ + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + + /* First, connect to remote server. */ if (connstr_source) { conn = PQconnectdb(connstr_source); -- 2.47.3 --ibfr3ah5qy6tcbhw-- ^ permalink raw reply [nested|flat] 190+ messages in thread
* [PATCH v5] Log a note at program start when running in dry-run mode @ 2025-11-11 08:54 Álvaro Herrera <[email protected]> 0 siblings, 0 replies; 190+ messages in thread From: Álvaro Herrera @ 2025-11-11 08:54 UTC (permalink / raw) Users might get some peace of mind knowing their data is not being destroyed or whatever. Author: Peter Smith <[email protected]> Reviewed-by: Álvaro Herrera <[email protected]> Discussion: https://postgr.es/m/CAHut+PsvQJQnQO0KT0S2oegenkvJ8FUuY-QS5syyqmT24R2xFQ@mail.gmail.com --- src/bin/pg_archivecleanup/pg_archivecleanup.c | 4 ++++ src/bin/pg_basebackup/pg_createsubscriber.c | 5 +++++ src/bin/pg_combinebackup/pg_combinebackup.c | 4 ++++ src/bin/pg_resetwal/pg_resetwal.c | 4 ++++ src/bin/pg_rewind/pg_rewind.c | 10 ++++++---- 5 files changed, 23 insertions(+), 4 deletions(-) diff --git a/src/bin/pg_archivecleanup/pg_archivecleanup.c b/src/bin/pg_archivecleanup/pg_archivecleanup.c index c25348bcb85..ab686b4748c 100644 --- a/src/bin/pg_archivecleanup/pg_archivecleanup.c +++ b/src/bin/pg_archivecleanup/pg_archivecleanup.c @@ -375,6 +375,10 @@ main(int argc, char **argv) exit(2); } + if (dryrun) + pg_log_info("Executing in dry-run mode.\n" + "No files will be removed."); + /* * Check archive exists and other initialization if required. */ diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c index df41836e70f..cc4be5d6ef4 100644 --- a/src/bin/pg_basebackup/pg_createsubscriber.c +++ b/src/bin/pg_basebackup/pg_createsubscriber.c @@ -2305,6 +2305,11 @@ main(int argc, char **argv) pg_log_error_hint("Try \"%s --help\" for more information.", progname); exit(1); } + + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + pg_log_info("validating publisher connection string"); pub_base_conninfo = get_base_conninfo(opt.pub_conninfo_str, &dbname_conninfo); diff --git a/src/bin/pg_combinebackup/pg_combinebackup.c b/src/bin/pg_combinebackup/pg_combinebackup.c index 3a325127209..c9bf0a9e105 100644 --- a/src/bin/pg_combinebackup/pg_combinebackup.c +++ b/src/bin/pg_combinebackup/pg_combinebackup.c @@ -242,6 +242,10 @@ main(int argc, char *argv[]) if (opt.no_manifest) opt.manifest_checksums = CHECKSUM_TYPE_NONE; + if (opt.dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + /* Check that the platform supports the requested copy method. */ if (opt.copy_method == COPY_METHOD_CLONE) { diff --git a/src/bin/pg_resetwal/pg_resetwal.c b/src/bin/pg_resetwal/pg_resetwal.c index a89d72fc5cf..dd5d279521e 100644 --- a/src/bin/pg_resetwal/pg_resetwal.c +++ b/src/bin/pg_resetwal/pg_resetwal.c @@ -397,6 +397,10 @@ main(int argc, char *argv[]) exit(1); } + if (noupdate) + pg_log_info("Executing in dry-run mode.\n" + "Nothing will be modified."); + /* * Attempt to read the existing pg_control file */ diff --git a/src/bin/pg_rewind/pg_rewind.c b/src/bin/pg_rewind/pg_rewind.c index 27c514f934a..e9364d04f76 100644 --- a/src/bin/pg_rewind/pg_rewind.c +++ b/src/bin/pg_rewind/pg_rewind.c @@ -300,10 +300,12 @@ main(int argc, char **argv) atexit(disconnect_atexit); - /* - * Ok, we have all the options and we're ready to start. First, connect to - * remote server. - */ + /* Ok, we have all the options and we're ready to start. */ + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + + /* First, connect to remote server. */ if (connstr_source) { conn = PQconnectdb(connstr_source); -- 2.47.3 --ibfr3ah5qy6tcbhw-- ^ permalink raw reply [nested|flat] 190+ messages in thread
* [PATCH v5] Log a note at program start when running in dry-run mode @ 2025-11-11 08:54 Álvaro Herrera <[email protected]> 0 siblings, 0 replies; 190+ messages in thread From: Álvaro Herrera @ 2025-11-11 08:54 UTC (permalink / raw) Users might get some peace of mind knowing their data is not being destroyed or whatever. Author: Peter Smith <[email protected]> Reviewed-by: Álvaro Herrera <[email protected]> Discussion: https://postgr.es/m/CAHut+PsvQJQnQO0KT0S2oegenkvJ8FUuY-QS5syyqmT24R2xFQ@mail.gmail.com --- src/bin/pg_archivecleanup/pg_archivecleanup.c | 4 ++++ src/bin/pg_basebackup/pg_createsubscriber.c | 5 +++++ src/bin/pg_combinebackup/pg_combinebackup.c | 4 ++++ src/bin/pg_resetwal/pg_resetwal.c | 4 ++++ src/bin/pg_rewind/pg_rewind.c | 10 ++++++---- 5 files changed, 23 insertions(+), 4 deletions(-) diff --git a/src/bin/pg_archivecleanup/pg_archivecleanup.c b/src/bin/pg_archivecleanup/pg_archivecleanup.c index c25348bcb85..ab686b4748c 100644 --- a/src/bin/pg_archivecleanup/pg_archivecleanup.c +++ b/src/bin/pg_archivecleanup/pg_archivecleanup.c @@ -375,6 +375,10 @@ main(int argc, char **argv) exit(2); } + if (dryrun) + pg_log_info("Executing in dry-run mode.\n" + "No files will be removed."); + /* * Check archive exists and other initialization if required. */ diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c index df41836e70f..cc4be5d6ef4 100644 --- a/src/bin/pg_basebackup/pg_createsubscriber.c +++ b/src/bin/pg_basebackup/pg_createsubscriber.c @@ -2305,6 +2305,11 @@ main(int argc, char **argv) pg_log_error_hint("Try \"%s --help\" for more information.", progname); exit(1); } + + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + pg_log_info("validating publisher connection string"); pub_base_conninfo = get_base_conninfo(opt.pub_conninfo_str, &dbname_conninfo); diff --git a/src/bin/pg_combinebackup/pg_combinebackup.c b/src/bin/pg_combinebackup/pg_combinebackup.c index 3a325127209..c9bf0a9e105 100644 --- a/src/bin/pg_combinebackup/pg_combinebackup.c +++ b/src/bin/pg_combinebackup/pg_combinebackup.c @@ -242,6 +242,10 @@ main(int argc, char *argv[]) if (opt.no_manifest) opt.manifest_checksums = CHECKSUM_TYPE_NONE; + if (opt.dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + /* Check that the platform supports the requested copy method. */ if (opt.copy_method == COPY_METHOD_CLONE) { diff --git a/src/bin/pg_resetwal/pg_resetwal.c b/src/bin/pg_resetwal/pg_resetwal.c index a89d72fc5cf..dd5d279521e 100644 --- a/src/bin/pg_resetwal/pg_resetwal.c +++ b/src/bin/pg_resetwal/pg_resetwal.c @@ -397,6 +397,10 @@ main(int argc, char *argv[]) exit(1); } + if (noupdate) + pg_log_info("Executing in dry-run mode.\n" + "Nothing will be modified."); + /* * Attempt to read the existing pg_control file */ diff --git a/src/bin/pg_rewind/pg_rewind.c b/src/bin/pg_rewind/pg_rewind.c index 27c514f934a..e9364d04f76 100644 --- a/src/bin/pg_rewind/pg_rewind.c +++ b/src/bin/pg_rewind/pg_rewind.c @@ -300,10 +300,12 @@ main(int argc, char **argv) atexit(disconnect_atexit); - /* - * Ok, we have all the options and we're ready to start. First, connect to - * remote server. - */ + /* Ok, we have all the options and we're ready to start. */ + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + + /* First, connect to remote server. */ if (connstr_source) { conn = PQconnectdb(connstr_source); -- 2.47.3 --ibfr3ah5qy6tcbhw-- ^ permalink raw reply [nested|flat] 190+ messages in thread
* [PATCH v5] Log a note at program start when running in dry-run mode @ 2025-11-11 08:54 Álvaro Herrera <[email protected]> 0 siblings, 0 replies; 190+ messages in thread From: Álvaro Herrera @ 2025-11-11 08:54 UTC (permalink / raw) Users might get some peace of mind knowing their data is not being destroyed or whatever. Author: Peter Smith <[email protected]> Reviewed-by: Álvaro Herrera <[email protected]> Discussion: https://postgr.es/m/CAHut+PsvQJQnQO0KT0S2oegenkvJ8FUuY-QS5syyqmT24R2xFQ@mail.gmail.com --- src/bin/pg_archivecleanup/pg_archivecleanup.c | 4 ++++ src/bin/pg_basebackup/pg_createsubscriber.c | 5 +++++ src/bin/pg_combinebackup/pg_combinebackup.c | 4 ++++ src/bin/pg_resetwal/pg_resetwal.c | 4 ++++ src/bin/pg_rewind/pg_rewind.c | 10 ++++++---- 5 files changed, 23 insertions(+), 4 deletions(-) diff --git a/src/bin/pg_archivecleanup/pg_archivecleanup.c b/src/bin/pg_archivecleanup/pg_archivecleanup.c index c25348bcb85..ab686b4748c 100644 --- a/src/bin/pg_archivecleanup/pg_archivecleanup.c +++ b/src/bin/pg_archivecleanup/pg_archivecleanup.c @@ -375,6 +375,10 @@ main(int argc, char **argv) exit(2); } + if (dryrun) + pg_log_info("Executing in dry-run mode.\n" + "No files will be removed."); + /* * Check archive exists and other initialization if required. */ diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c index df41836e70f..cc4be5d6ef4 100644 --- a/src/bin/pg_basebackup/pg_createsubscriber.c +++ b/src/bin/pg_basebackup/pg_createsubscriber.c @@ -2305,6 +2305,11 @@ main(int argc, char **argv) pg_log_error_hint("Try \"%s --help\" for more information.", progname); exit(1); } + + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + pg_log_info("validating publisher connection string"); pub_base_conninfo = get_base_conninfo(opt.pub_conninfo_str, &dbname_conninfo); diff --git a/src/bin/pg_combinebackup/pg_combinebackup.c b/src/bin/pg_combinebackup/pg_combinebackup.c index 3a325127209..c9bf0a9e105 100644 --- a/src/bin/pg_combinebackup/pg_combinebackup.c +++ b/src/bin/pg_combinebackup/pg_combinebackup.c @@ -242,6 +242,10 @@ main(int argc, char *argv[]) if (opt.no_manifest) opt.manifest_checksums = CHECKSUM_TYPE_NONE; + if (opt.dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + /* Check that the platform supports the requested copy method. */ if (opt.copy_method == COPY_METHOD_CLONE) { diff --git a/src/bin/pg_resetwal/pg_resetwal.c b/src/bin/pg_resetwal/pg_resetwal.c index a89d72fc5cf..dd5d279521e 100644 --- a/src/bin/pg_resetwal/pg_resetwal.c +++ b/src/bin/pg_resetwal/pg_resetwal.c @@ -397,6 +397,10 @@ main(int argc, char *argv[]) exit(1); } + if (noupdate) + pg_log_info("Executing in dry-run mode.\n" + "Nothing will be modified."); + /* * Attempt to read the existing pg_control file */ diff --git a/src/bin/pg_rewind/pg_rewind.c b/src/bin/pg_rewind/pg_rewind.c index 27c514f934a..e9364d04f76 100644 --- a/src/bin/pg_rewind/pg_rewind.c +++ b/src/bin/pg_rewind/pg_rewind.c @@ -300,10 +300,12 @@ main(int argc, char **argv) atexit(disconnect_atexit); - /* - * Ok, we have all the options and we're ready to start. First, connect to - * remote server. - */ + /* Ok, we have all the options and we're ready to start. */ + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + + /* First, connect to remote server. */ if (connstr_source) { conn = PQconnectdb(connstr_source); -- 2.47.3 --ibfr3ah5qy6tcbhw-- ^ permalink raw reply [nested|flat] 190+ messages in thread
* [PATCH v5] Log a note at program start when running in dry-run mode @ 2025-11-11 08:54 Álvaro Herrera <[email protected]> 0 siblings, 0 replies; 190+ messages in thread From: Álvaro Herrera @ 2025-11-11 08:54 UTC (permalink / raw) Users might get some peace of mind knowing their data is not being destroyed or whatever. Author: Peter Smith <[email protected]> Reviewed-by: Álvaro Herrera <[email protected]> Discussion: https://postgr.es/m/CAHut+PsvQJQnQO0KT0S2oegenkvJ8FUuY-QS5syyqmT24R2xFQ@mail.gmail.com --- src/bin/pg_archivecleanup/pg_archivecleanup.c | 4 ++++ src/bin/pg_basebackup/pg_createsubscriber.c | 5 +++++ src/bin/pg_combinebackup/pg_combinebackup.c | 4 ++++ src/bin/pg_resetwal/pg_resetwal.c | 4 ++++ src/bin/pg_rewind/pg_rewind.c | 10 ++++++---- 5 files changed, 23 insertions(+), 4 deletions(-) diff --git a/src/bin/pg_archivecleanup/pg_archivecleanup.c b/src/bin/pg_archivecleanup/pg_archivecleanup.c index c25348bcb85..ab686b4748c 100644 --- a/src/bin/pg_archivecleanup/pg_archivecleanup.c +++ b/src/bin/pg_archivecleanup/pg_archivecleanup.c @@ -375,6 +375,10 @@ main(int argc, char **argv) exit(2); } + if (dryrun) + pg_log_info("Executing in dry-run mode.\n" + "No files will be removed."); + /* * Check archive exists and other initialization if required. */ diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c index df41836e70f..cc4be5d6ef4 100644 --- a/src/bin/pg_basebackup/pg_createsubscriber.c +++ b/src/bin/pg_basebackup/pg_createsubscriber.c @@ -2305,6 +2305,11 @@ main(int argc, char **argv) pg_log_error_hint("Try \"%s --help\" for more information.", progname); exit(1); } + + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + pg_log_info("validating publisher connection string"); pub_base_conninfo = get_base_conninfo(opt.pub_conninfo_str, &dbname_conninfo); diff --git a/src/bin/pg_combinebackup/pg_combinebackup.c b/src/bin/pg_combinebackup/pg_combinebackup.c index 3a325127209..c9bf0a9e105 100644 --- a/src/bin/pg_combinebackup/pg_combinebackup.c +++ b/src/bin/pg_combinebackup/pg_combinebackup.c @@ -242,6 +242,10 @@ main(int argc, char *argv[]) if (opt.no_manifest) opt.manifest_checksums = CHECKSUM_TYPE_NONE; + if (opt.dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + /* Check that the platform supports the requested copy method. */ if (opt.copy_method == COPY_METHOD_CLONE) { diff --git a/src/bin/pg_resetwal/pg_resetwal.c b/src/bin/pg_resetwal/pg_resetwal.c index a89d72fc5cf..dd5d279521e 100644 --- a/src/bin/pg_resetwal/pg_resetwal.c +++ b/src/bin/pg_resetwal/pg_resetwal.c @@ -397,6 +397,10 @@ main(int argc, char *argv[]) exit(1); } + if (noupdate) + pg_log_info("Executing in dry-run mode.\n" + "Nothing will be modified."); + /* * Attempt to read the existing pg_control file */ diff --git a/src/bin/pg_rewind/pg_rewind.c b/src/bin/pg_rewind/pg_rewind.c index 27c514f934a..e9364d04f76 100644 --- a/src/bin/pg_rewind/pg_rewind.c +++ b/src/bin/pg_rewind/pg_rewind.c @@ -300,10 +300,12 @@ main(int argc, char **argv) atexit(disconnect_atexit); - /* - * Ok, we have all the options and we're ready to start. First, connect to - * remote server. - */ + /* Ok, we have all the options and we're ready to start. */ + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + + /* First, connect to remote server. */ if (connstr_source) { conn = PQconnectdb(connstr_source); -- 2.47.3 --ibfr3ah5qy6tcbhw-- ^ permalink raw reply [nested|flat] 190+ messages in thread
* [PATCH v5] Log a note at program start when running in dry-run mode @ 2025-11-11 08:54 Álvaro Herrera <[email protected]> 0 siblings, 0 replies; 190+ messages in thread From: Álvaro Herrera @ 2025-11-11 08:54 UTC (permalink / raw) Users might get some peace of mind knowing their data is not being destroyed or whatever. Author: Peter Smith <[email protected]> Reviewed-by: Álvaro Herrera <[email protected]> Discussion: https://postgr.es/m/CAHut+PsvQJQnQO0KT0S2oegenkvJ8FUuY-QS5syyqmT24R2xFQ@mail.gmail.com --- src/bin/pg_archivecleanup/pg_archivecleanup.c | 4 ++++ src/bin/pg_basebackup/pg_createsubscriber.c | 5 +++++ src/bin/pg_combinebackup/pg_combinebackup.c | 4 ++++ src/bin/pg_resetwal/pg_resetwal.c | 4 ++++ src/bin/pg_rewind/pg_rewind.c | 10 ++++++---- 5 files changed, 23 insertions(+), 4 deletions(-) diff --git a/src/bin/pg_archivecleanup/pg_archivecleanup.c b/src/bin/pg_archivecleanup/pg_archivecleanup.c index c25348bcb85..ab686b4748c 100644 --- a/src/bin/pg_archivecleanup/pg_archivecleanup.c +++ b/src/bin/pg_archivecleanup/pg_archivecleanup.c @@ -375,6 +375,10 @@ main(int argc, char **argv) exit(2); } + if (dryrun) + pg_log_info("Executing in dry-run mode.\n" + "No files will be removed."); + /* * Check archive exists and other initialization if required. */ diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c index df41836e70f..cc4be5d6ef4 100644 --- a/src/bin/pg_basebackup/pg_createsubscriber.c +++ b/src/bin/pg_basebackup/pg_createsubscriber.c @@ -2305,6 +2305,11 @@ main(int argc, char **argv) pg_log_error_hint("Try \"%s --help\" for more information.", progname); exit(1); } + + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + pg_log_info("validating publisher connection string"); pub_base_conninfo = get_base_conninfo(opt.pub_conninfo_str, &dbname_conninfo); diff --git a/src/bin/pg_combinebackup/pg_combinebackup.c b/src/bin/pg_combinebackup/pg_combinebackup.c index 3a325127209..c9bf0a9e105 100644 --- a/src/bin/pg_combinebackup/pg_combinebackup.c +++ b/src/bin/pg_combinebackup/pg_combinebackup.c @@ -242,6 +242,10 @@ main(int argc, char *argv[]) if (opt.no_manifest) opt.manifest_checksums = CHECKSUM_TYPE_NONE; + if (opt.dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + /* Check that the platform supports the requested copy method. */ if (opt.copy_method == COPY_METHOD_CLONE) { diff --git a/src/bin/pg_resetwal/pg_resetwal.c b/src/bin/pg_resetwal/pg_resetwal.c index a89d72fc5cf..dd5d279521e 100644 --- a/src/bin/pg_resetwal/pg_resetwal.c +++ b/src/bin/pg_resetwal/pg_resetwal.c @@ -397,6 +397,10 @@ main(int argc, char *argv[]) exit(1); } + if (noupdate) + pg_log_info("Executing in dry-run mode.\n" + "Nothing will be modified."); + /* * Attempt to read the existing pg_control file */ diff --git a/src/bin/pg_rewind/pg_rewind.c b/src/bin/pg_rewind/pg_rewind.c index 27c514f934a..e9364d04f76 100644 --- a/src/bin/pg_rewind/pg_rewind.c +++ b/src/bin/pg_rewind/pg_rewind.c @@ -300,10 +300,12 @@ main(int argc, char **argv) atexit(disconnect_atexit); - /* - * Ok, we have all the options and we're ready to start. First, connect to - * remote server. - */ + /* Ok, we have all the options and we're ready to start. */ + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + + /* First, connect to remote server. */ if (connstr_source) { conn = PQconnectdb(connstr_source); -- 2.47.3 --ibfr3ah5qy6tcbhw-- ^ permalink raw reply [nested|flat] 190+ messages in thread
* [PATCH v5] Log a note at program start when running in dry-run mode @ 2025-11-11 08:54 Álvaro Herrera <[email protected]> 0 siblings, 0 replies; 190+ messages in thread From: Álvaro Herrera @ 2025-11-11 08:54 UTC (permalink / raw) Users might get some peace of mind knowing their data is not being destroyed or whatever. Author: Peter Smith <[email protected]> Reviewed-by: Álvaro Herrera <[email protected]> Discussion: https://postgr.es/m/CAHut+PsvQJQnQO0KT0S2oegenkvJ8FUuY-QS5syyqmT24R2xFQ@mail.gmail.com --- src/bin/pg_archivecleanup/pg_archivecleanup.c | 4 ++++ src/bin/pg_basebackup/pg_createsubscriber.c | 5 +++++ src/bin/pg_combinebackup/pg_combinebackup.c | 4 ++++ src/bin/pg_resetwal/pg_resetwal.c | 4 ++++ src/bin/pg_rewind/pg_rewind.c | 10 ++++++---- 5 files changed, 23 insertions(+), 4 deletions(-) diff --git a/src/bin/pg_archivecleanup/pg_archivecleanup.c b/src/bin/pg_archivecleanup/pg_archivecleanup.c index c25348bcb85..ab686b4748c 100644 --- a/src/bin/pg_archivecleanup/pg_archivecleanup.c +++ b/src/bin/pg_archivecleanup/pg_archivecleanup.c @@ -375,6 +375,10 @@ main(int argc, char **argv) exit(2); } + if (dryrun) + pg_log_info("Executing in dry-run mode.\n" + "No files will be removed."); + /* * Check archive exists and other initialization if required. */ diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c index df41836e70f..cc4be5d6ef4 100644 --- a/src/bin/pg_basebackup/pg_createsubscriber.c +++ b/src/bin/pg_basebackup/pg_createsubscriber.c @@ -2305,6 +2305,11 @@ main(int argc, char **argv) pg_log_error_hint("Try \"%s --help\" for more information.", progname); exit(1); } + + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + pg_log_info("validating publisher connection string"); pub_base_conninfo = get_base_conninfo(opt.pub_conninfo_str, &dbname_conninfo); diff --git a/src/bin/pg_combinebackup/pg_combinebackup.c b/src/bin/pg_combinebackup/pg_combinebackup.c index 3a325127209..c9bf0a9e105 100644 --- a/src/bin/pg_combinebackup/pg_combinebackup.c +++ b/src/bin/pg_combinebackup/pg_combinebackup.c @@ -242,6 +242,10 @@ main(int argc, char *argv[]) if (opt.no_manifest) opt.manifest_checksums = CHECKSUM_TYPE_NONE; + if (opt.dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + /* Check that the platform supports the requested copy method. */ if (opt.copy_method == COPY_METHOD_CLONE) { diff --git a/src/bin/pg_resetwal/pg_resetwal.c b/src/bin/pg_resetwal/pg_resetwal.c index a89d72fc5cf..dd5d279521e 100644 --- a/src/bin/pg_resetwal/pg_resetwal.c +++ b/src/bin/pg_resetwal/pg_resetwal.c @@ -397,6 +397,10 @@ main(int argc, char *argv[]) exit(1); } + if (noupdate) + pg_log_info("Executing in dry-run mode.\n" + "Nothing will be modified."); + /* * Attempt to read the existing pg_control file */ diff --git a/src/bin/pg_rewind/pg_rewind.c b/src/bin/pg_rewind/pg_rewind.c index 27c514f934a..e9364d04f76 100644 --- a/src/bin/pg_rewind/pg_rewind.c +++ b/src/bin/pg_rewind/pg_rewind.c @@ -300,10 +300,12 @@ main(int argc, char **argv) atexit(disconnect_atexit); - /* - * Ok, we have all the options and we're ready to start. First, connect to - * remote server. - */ + /* Ok, we have all the options and we're ready to start. */ + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + + /* First, connect to remote server. */ if (connstr_source) { conn = PQconnectdb(connstr_source); -- 2.47.3 --ibfr3ah5qy6tcbhw-- ^ permalink raw reply [nested|flat] 190+ messages in thread
* [PATCH v5] Log a note at program start when running in dry-run mode @ 2025-11-11 08:54 Álvaro Herrera <[email protected]> 0 siblings, 0 replies; 190+ messages in thread From: Álvaro Herrera @ 2025-11-11 08:54 UTC (permalink / raw) Users might get some peace of mind knowing their data is not being destroyed or whatever. Author: Peter Smith <[email protected]> Reviewed-by: Álvaro Herrera <[email protected]> Discussion: https://postgr.es/m/CAHut+PsvQJQnQO0KT0S2oegenkvJ8FUuY-QS5syyqmT24R2xFQ@mail.gmail.com --- src/bin/pg_archivecleanup/pg_archivecleanup.c | 4 ++++ src/bin/pg_basebackup/pg_createsubscriber.c | 5 +++++ src/bin/pg_combinebackup/pg_combinebackup.c | 4 ++++ src/bin/pg_resetwal/pg_resetwal.c | 4 ++++ src/bin/pg_rewind/pg_rewind.c | 10 ++++++---- 5 files changed, 23 insertions(+), 4 deletions(-) diff --git a/src/bin/pg_archivecleanup/pg_archivecleanup.c b/src/bin/pg_archivecleanup/pg_archivecleanup.c index c25348bcb85..ab686b4748c 100644 --- a/src/bin/pg_archivecleanup/pg_archivecleanup.c +++ b/src/bin/pg_archivecleanup/pg_archivecleanup.c @@ -375,6 +375,10 @@ main(int argc, char **argv) exit(2); } + if (dryrun) + pg_log_info("Executing in dry-run mode.\n" + "No files will be removed."); + /* * Check archive exists and other initialization if required. */ diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c index df41836e70f..cc4be5d6ef4 100644 --- a/src/bin/pg_basebackup/pg_createsubscriber.c +++ b/src/bin/pg_basebackup/pg_createsubscriber.c @@ -2305,6 +2305,11 @@ main(int argc, char **argv) pg_log_error_hint("Try \"%s --help\" for more information.", progname); exit(1); } + + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + pg_log_info("validating publisher connection string"); pub_base_conninfo = get_base_conninfo(opt.pub_conninfo_str, &dbname_conninfo); diff --git a/src/bin/pg_combinebackup/pg_combinebackup.c b/src/bin/pg_combinebackup/pg_combinebackup.c index 3a325127209..c9bf0a9e105 100644 --- a/src/bin/pg_combinebackup/pg_combinebackup.c +++ b/src/bin/pg_combinebackup/pg_combinebackup.c @@ -242,6 +242,10 @@ main(int argc, char *argv[]) if (opt.no_manifest) opt.manifest_checksums = CHECKSUM_TYPE_NONE; + if (opt.dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + /* Check that the platform supports the requested copy method. */ if (opt.copy_method == COPY_METHOD_CLONE) { diff --git a/src/bin/pg_resetwal/pg_resetwal.c b/src/bin/pg_resetwal/pg_resetwal.c index a89d72fc5cf..dd5d279521e 100644 --- a/src/bin/pg_resetwal/pg_resetwal.c +++ b/src/bin/pg_resetwal/pg_resetwal.c @@ -397,6 +397,10 @@ main(int argc, char *argv[]) exit(1); } + if (noupdate) + pg_log_info("Executing in dry-run mode.\n" + "Nothing will be modified."); + /* * Attempt to read the existing pg_control file */ diff --git a/src/bin/pg_rewind/pg_rewind.c b/src/bin/pg_rewind/pg_rewind.c index 27c514f934a..e9364d04f76 100644 --- a/src/bin/pg_rewind/pg_rewind.c +++ b/src/bin/pg_rewind/pg_rewind.c @@ -300,10 +300,12 @@ main(int argc, char **argv) atexit(disconnect_atexit); - /* - * Ok, we have all the options and we're ready to start. First, connect to - * remote server. - */ + /* Ok, we have all the options and we're ready to start. */ + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + + /* First, connect to remote server. */ if (connstr_source) { conn = PQconnectdb(connstr_source); -- 2.47.3 --ibfr3ah5qy6tcbhw-- ^ permalink raw reply [nested|flat] 190+ messages in thread
* [PATCH v5] Log a note at program start when running in dry-run mode @ 2025-11-11 08:54 Álvaro Herrera <[email protected]> 0 siblings, 0 replies; 190+ messages in thread From: Álvaro Herrera @ 2025-11-11 08:54 UTC (permalink / raw) Users might get some peace of mind knowing their data is not being destroyed or whatever. Author: Peter Smith <[email protected]> Reviewed-by: Álvaro Herrera <[email protected]> Discussion: https://postgr.es/m/CAHut+PsvQJQnQO0KT0S2oegenkvJ8FUuY-QS5syyqmT24R2xFQ@mail.gmail.com --- src/bin/pg_archivecleanup/pg_archivecleanup.c | 4 ++++ src/bin/pg_basebackup/pg_createsubscriber.c | 5 +++++ src/bin/pg_combinebackup/pg_combinebackup.c | 4 ++++ src/bin/pg_resetwal/pg_resetwal.c | 4 ++++ src/bin/pg_rewind/pg_rewind.c | 10 ++++++---- 5 files changed, 23 insertions(+), 4 deletions(-) diff --git a/src/bin/pg_archivecleanup/pg_archivecleanup.c b/src/bin/pg_archivecleanup/pg_archivecleanup.c index c25348bcb85..ab686b4748c 100644 --- a/src/bin/pg_archivecleanup/pg_archivecleanup.c +++ b/src/bin/pg_archivecleanup/pg_archivecleanup.c @@ -375,6 +375,10 @@ main(int argc, char **argv) exit(2); } + if (dryrun) + pg_log_info("Executing in dry-run mode.\n" + "No files will be removed."); + /* * Check archive exists and other initialization if required. */ diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c index df41836e70f..cc4be5d6ef4 100644 --- a/src/bin/pg_basebackup/pg_createsubscriber.c +++ b/src/bin/pg_basebackup/pg_createsubscriber.c @@ -2305,6 +2305,11 @@ main(int argc, char **argv) pg_log_error_hint("Try \"%s --help\" for more information.", progname); exit(1); } + + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + pg_log_info("validating publisher connection string"); pub_base_conninfo = get_base_conninfo(opt.pub_conninfo_str, &dbname_conninfo); diff --git a/src/bin/pg_combinebackup/pg_combinebackup.c b/src/bin/pg_combinebackup/pg_combinebackup.c index 3a325127209..c9bf0a9e105 100644 --- a/src/bin/pg_combinebackup/pg_combinebackup.c +++ b/src/bin/pg_combinebackup/pg_combinebackup.c @@ -242,6 +242,10 @@ main(int argc, char *argv[]) if (opt.no_manifest) opt.manifest_checksums = CHECKSUM_TYPE_NONE; + if (opt.dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + /* Check that the platform supports the requested copy method. */ if (opt.copy_method == COPY_METHOD_CLONE) { diff --git a/src/bin/pg_resetwal/pg_resetwal.c b/src/bin/pg_resetwal/pg_resetwal.c index a89d72fc5cf..dd5d279521e 100644 --- a/src/bin/pg_resetwal/pg_resetwal.c +++ b/src/bin/pg_resetwal/pg_resetwal.c @@ -397,6 +397,10 @@ main(int argc, char *argv[]) exit(1); } + if (noupdate) + pg_log_info("Executing in dry-run mode.\n" + "Nothing will be modified."); + /* * Attempt to read the existing pg_control file */ diff --git a/src/bin/pg_rewind/pg_rewind.c b/src/bin/pg_rewind/pg_rewind.c index 27c514f934a..e9364d04f76 100644 --- a/src/bin/pg_rewind/pg_rewind.c +++ b/src/bin/pg_rewind/pg_rewind.c @@ -300,10 +300,12 @@ main(int argc, char **argv) atexit(disconnect_atexit); - /* - * Ok, we have all the options and we're ready to start. First, connect to - * remote server. - */ + /* Ok, we have all the options and we're ready to start. */ + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + + /* First, connect to remote server. */ if (connstr_source) { conn = PQconnectdb(connstr_source); -- 2.47.3 --ibfr3ah5qy6tcbhw-- ^ permalink raw reply [nested|flat] 190+ messages in thread
* [PATCH v5] Log a note at program start when running in dry-run mode @ 2025-11-11 08:54 Álvaro Herrera <[email protected]> 0 siblings, 0 replies; 190+ messages in thread From: Álvaro Herrera @ 2025-11-11 08:54 UTC (permalink / raw) Users might get some peace of mind knowing their data is not being destroyed or whatever. Author: Peter Smith <[email protected]> Reviewed-by: Álvaro Herrera <[email protected]> Discussion: https://postgr.es/m/CAHut+PsvQJQnQO0KT0S2oegenkvJ8FUuY-QS5syyqmT24R2xFQ@mail.gmail.com --- src/bin/pg_archivecleanup/pg_archivecleanup.c | 4 ++++ src/bin/pg_basebackup/pg_createsubscriber.c | 5 +++++ src/bin/pg_combinebackup/pg_combinebackup.c | 4 ++++ src/bin/pg_resetwal/pg_resetwal.c | 4 ++++ src/bin/pg_rewind/pg_rewind.c | 10 ++++++---- 5 files changed, 23 insertions(+), 4 deletions(-) diff --git a/src/bin/pg_archivecleanup/pg_archivecleanup.c b/src/bin/pg_archivecleanup/pg_archivecleanup.c index c25348bcb85..ab686b4748c 100644 --- a/src/bin/pg_archivecleanup/pg_archivecleanup.c +++ b/src/bin/pg_archivecleanup/pg_archivecleanup.c @@ -375,6 +375,10 @@ main(int argc, char **argv) exit(2); } + if (dryrun) + pg_log_info("Executing in dry-run mode.\n" + "No files will be removed."); + /* * Check archive exists and other initialization if required. */ diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c index df41836e70f..cc4be5d6ef4 100644 --- a/src/bin/pg_basebackup/pg_createsubscriber.c +++ b/src/bin/pg_basebackup/pg_createsubscriber.c @@ -2305,6 +2305,11 @@ main(int argc, char **argv) pg_log_error_hint("Try \"%s --help\" for more information.", progname); exit(1); } + + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + pg_log_info("validating publisher connection string"); pub_base_conninfo = get_base_conninfo(opt.pub_conninfo_str, &dbname_conninfo); diff --git a/src/bin/pg_combinebackup/pg_combinebackup.c b/src/bin/pg_combinebackup/pg_combinebackup.c index 3a325127209..c9bf0a9e105 100644 --- a/src/bin/pg_combinebackup/pg_combinebackup.c +++ b/src/bin/pg_combinebackup/pg_combinebackup.c @@ -242,6 +242,10 @@ main(int argc, char *argv[]) if (opt.no_manifest) opt.manifest_checksums = CHECKSUM_TYPE_NONE; + if (opt.dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + /* Check that the platform supports the requested copy method. */ if (opt.copy_method == COPY_METHOD_CLONE) { diff --git a/src/bin/pg_resetwal/pg_resetwal.c b/src/bin/pg_resetwal/pg_resetwal.c index a89d72fc5cf..dd5d279521e 100644 --- a/src/bin/pg_resetwal/pg_resetwal.c +++ b/src/bin/pg_resetwal/pg_resetwal.c @@ -397,6 +397,10 @@ main(int argc, char *argv[]) exit(1); } + if (noupdate) + pg_log_info("Executing in dry-run mode.\n" + "Nothing will be modified."); + /* * Attempt to read the existing pg_control file */ diff --git a/src/bin/pg_rewind/pg_rewind.c b/src/bin/pg_rewind/pg_rewind.c index 27c514f934a..e9364d04f76 100644 --- a/src/bin/pg_rewind/pg_rewind.c +++ b/src/bin/pg_rewind/pg_rewind.c @@ -300,10 +300,12 @@ main(int argc, char **argv) atexit(disconnect_atexit); - /* - * Ok, we have all the options and we're ready to start. First, connect to - * remote server. - */ + /* Ok, we have all the options and we're ready to start. */ + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + + /* First, connect to remote server. */ if (connstr_source) { conn = PQconnectdb(connstr_source); -- 2.47.3 --ibfr3ah5qy6tcbhw-- ^ permalink raw reply [nested|flat] 190+ messages in thread
* [PATCH v5] Log a note at program start when running in dry-run mode @ 2025-11-11 08:54 Álvaro Herrera <[email protected]> 0 siblings, 0 replies; 190+ messages in thread From: Álvaro Herrera @ 2025-11-11 08:54 UTC (permalink / raw) Users might get some peace of mind knowing their data is not being destroyed or whatever. Author: Peter Smith <[email protected]> Reviewed-by: Álvaro Herrera <[email protected]> Discussion: https://postgr.es/m/CAHut+PsvQJQnQO0KT0S2oegenkvJ8FUuY-QS5syyqmT24R2xFQ@mail.gmail.com --- src/bin/pg_archivecleanup/pg_archivecleanup.c | 4 ++++ src/bin/pg_basebackup/pg_createsubscriber.c | 5 +++++ src/bin/pg_combinebackup/pg_combinebackup.c | 4 ++++ src/bin/pg_resetwal/pg_resetwal.c | 4 ++++ src/bin/pg_rewind/pg_rewind.c | 10 ++++++---- 5 files changed, 23 insertions(+), 4 deletions(-) diff --git a/src/bin/pg_archivecleanup/pg_archivecleanup.c b/src/bin/pg_archivecleanup/pg_archivecleanup.c index c25348bcb85..ab686b4748c 100644 --- a/src/bin/pg_archivecleanup/pg_archivecleanup.c +++ b/src/bin/pg_archivecleanup/pg_archivecleanup.c @@ -375,6 +375,10 @@ main(int argc, char **argv) exit(2); } + if (dryrun) + pg_log_info("Executing in dry-run mode.\n" + "No files will be removed."); + /* * Check archive exists and other initialization if required. */ diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c index df41836e70f..cc4be5d6ef4 100644 --- a/src/bin/pg_basebackup/pg_createsubscriber.c +++ b/src/bin/pg_basebackup/pg_createsubscriber.c @@ -2305,6 +2305,11 @@ main(int argc, char **argv) pg_log_error_hint("Try \"%s --help\" for more information.", progname); exit(1); } + + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + pg_log_info("validating publisher connection string"); pub_base_conninfo = get_base_conninfo(opt.pub_conninfo_str, &dbname_conninfo); diff --git a/src/bin/pg_combinebackup/pg_combinebackup.c b/src/bin/pg_combinebackup/pg_combinebackup.c index 3a325127209..c9bf0a9e105 100644 --- a/src/bin/pg_combinebackup/pg_combinebackup.c +++ b/src/bin/pg_combinebackup/pg_combinebackup.c @@ -242,6 +242,10 @@ main(int argc, char *argv[]) if (opt.no_manifest) opt.manifest_checksums = CHECKSUM_TYPE_NONE; + if (opt.dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + /* Check that the platform supports the requested copy method. */ if (opt.copy_method == COPY_METHOD_CLONE) { diff --git a/src/bin/pg_resetwal/pg_resetwal.c b/src/bin/pg_resetwal/pg_resetwal.c index a89d72fc5cf..dd5d279521e 100644 --- a/src/bin/pg_resetwal/pg_resetwal.c +++ b/src/bin/pg_resetwal/pg_resetwal.c @@ -397,6 +397,10 @@ main(int argc, char *argv[]) exit(1); } + if (noupdate) + pg_log_info("Executing in dry-run mode.\n" + "Nothing will be modified."); + /* * Attempt to read the existing pg_control file */ diff --git a/src/bin/pg_rewind/pg_rewind.c b/src/bin/pg_rewind/pg_rewind.c index 27c514f934a..e9364d04f76 100644 --- a/src/bin/pg_rewind/pg_rewind.c +++ b/src/bin/pg_rewind/pg_rewind.c @@ -300,10 +300,12 @@ main(int argc, char **argv) atexit(disconnect_atexit); - /* - * Ok, we have all the options and we're ready to start. First, connect to - * remote server. - */ + /* Ok, we have all the options and we're ready to start. */ + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + + /* First, connect to remote server. */ if (connstr_source) { conn = PQconnectdb(connstr_source); -- 2.47.3 --ibfr3ah5qy6tcbhw-- ^ permalink raw reply [nested|flat] 190+ messages in thread
* [PATCH v5] Log a note at program start when running in dry-run mode @ 2025-11-11 08:54 Álvaro Herrera <[email protected]> 0 siblings, 0 replies; 190+ messages in thread From: Álvaro Herrera @ 2025-11-11 08:54 UTC (permalink / raw) Users might get some peace of mind knowing their data is not being destroyed or whatever. Author: Peter Smith <[email protected]> Reviewed-by: Álvaro Herrera <[email protected]> Discussion: https://postgr.es/m/CAHut+PsvQJQnQO0KT0S2oegenkvJ8FUuY-QS5syyqmT24R2xFQ@mail.gmail.com --- src/bin/pg_archivecleanup/pg_archivecleanup.c | 4 ++++ src/bin/pg_basebackup/pg_createsubscriber.c | 5 +++++ src/bin/pg_combinebackup/pg_combinebackup.c | 4 ++++ src/bin/pg_resetwal/pg_resetwal.c | 4 ++++ src/bin/pg_rewind/pg_rewind.c | 10 ++++++---- 5 files changed, 23 insertions(+), 4 deletions(-) diff --git a/src/bin/pg_archivecleanup/pg_archivecleanup.c b/src/bin/pg_archivecleanup/pg_archivecleanup.c index c25348bcb85..ab686b4748c 100644 --- a/src/bin/pg_archivecleanup/pg_archivecleanup.c +++ b/src/bin/pg_archivecleanup/pg_archivecleanup.c @@ -375,6 +375,10 @@ main(int argc, char **argv) exit(2); } + if (dryrun) + pg_log_info("Executing in dry-run mode.\n" + "No files will be removed."); + /* * Check archive exists and other initialization if required. */ diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c index df41836e70f..cc4be5d6ef4 100644 --- a/src/bin/pg_basebackup/pg_createsubscriber.c +++ b/src/bin/pg_basebackup/pg_createsubscriber.c @@ -2305,6 +2305,11 @@ main(int argc, char **argv) pg_log_error_hint("Try \"%s --help\" for more information.", progname); exit(1); } + + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + pg_log_info("validating publisher connection string"); pub_base_conninfo = get_base_conninfo(opt.pub_conninfo_str, &dbname_conninfo); diff --git a/src/bin/pg_combinebackup/pg_combinebackup.c b/src/bin/pg_combinebackup/pg_combinebackup.c index 3a325127209..c9bf0a9e105 100644 --- a/src/bin/pg_combinebackup/pg_combinebackup.c +++ b/src/bin/pg_combinebackup/pg_combinebackup.c @@ -242,6 +242,10 @@ main(int argc, char *argv[]) if (opt.no_manifest) opt.manifest_checksums = CHECKSUM_TYPE_NONE; + if (opt.dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + /* Check that the platform supports the requested copy method. */ if (opt.copy_method == COPY_METHOD_CLONE) { diff --git a/src/bin/pg_resetwal/pg_resetwal.c b/src/bin/pg_resetwal/pg_resetwal.c index a89d72fc5cf..dd5d279521e 100644 --- a/src/bin/pg_resetwal/pg_resetwal.c +++ b/src/bin/pg_resetwal/pg_resetwal.c @@ -397,6 +397,10 @@ main(int argc, char *argv[]) exit(1); } + if (noupdate) + pg_log_info("Executing in dry-run mode.\n" + "Nothing will be modified."); + /* * Attempt to read the existing pg_control file */ diff --git a/src/bin/pg_rewind/pg_rewind.c b/src/bin/pg_rewind/pg_rewind.c index 27c514f934a..e9364d04f76 100644 --- a/src/bin/pg_rewind/pg_rewind.c +++ b/src/bin/pg_rewind/pg_rewind.c @@ -300,10 +300,12 @@ main(int argc, char **argv) atexit(disconnect_atexit); - /* - * Ok, we have all the options and we're ready to start. First, connect to - * remote server. - */ + /* Ok, we have all the options and we're ready to start. */ + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + + /* First, connect to remote server. */ if (connstr_source) { conn = PQconnectdb(connstr_source); -- 2.47.3 --ibfr3ah5qy6tcbhw-- ^ permalink raw reply [nested|flat] 190+ messages in thread
* [PATCH v5] Log a note at program start when running in dry-run mode @ 2025-11-11 08:54 Álvaro Herrera <[email protected]> 0 siblings, 0 replies; 190+ messages in thread From: Álvaro Herrera @ 2025-11-11 08:54 UTC (permalink / raw) Users might get some peace of mind knowing their data is not being destroyed or whatever. Author: Peter Smith <[email protected]> Reviewed-by: Álvaro Herrera <[email protected]> Discussion: https://postgr.es/m/CAHut+PsvQJQnQO0KT0S2oegenkvJ8FUuY-QS5syyqmT24R2xFQ@mail.gmail.com --- src/bin/pg_archivecleanup/pg_archivecleanup.c | 4 ++++ src/bin/pg_basebackup/pg_createsubscriber.c | 5 +++++ src/bin/pg_combinebackup/pg_combinebackup.c | 4 ++++ src/bin/pg_resetwal/pg_resetwal.c | 4 ++++ src/bin/pg_rewind/pg_rewind.c | 10 ++++++---- 5 files changed, 23 insertions(+), 4 deletions(-) diff --git a/src/bin/pg_archivecleanup/pg_archivecleanup.c b/src/bin/pg_archivecleanup/pg_archivecleanup.c index c25348bcb85..ab686b4748c 100644 --- a/src/bin/pg_archivecleanup/pg_archivecleanup.c +++ b/src/bin/pg_archivecleanup/pg_archivecleanup.c @@ -375,6 +375,10 @@ main(int argc, char **argv) exit(2); } + if (dryrun) + pg_log_info("Executing in dry-run mode.\n" + "No files will be removed."); + /* * Check archive exists and other initialization if required. */ diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c index df41836e70f..cc4be5d6ef4 100644 --- a/src/bin/pg_basebackup/pg_createsubscriber.c +++ b/src/bin/pg_basebackup/pg_createsubscriber.c @@ -2305,6 +2305,11 @@ main(int argc, char **argv) pg_log_error_hint("Try \"%s --help\" for more information.", progname); exit(1); } + + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + pg_log_info("validating publisher connection string"); pub_base_conninfo = get_base_conninfo(opt.pub_conninfo_str, &dbname_conninfo); diff --git a/src/bin/pg_combinebackup/pg_combinebackup.c b/src/bin/pg_combinebackup/pg_combinebackup.c index 3a325127209..c9bf0a9e105 100644 --- a/src/bin/pg_combinebackup/pg_combinebackup.c +++ b/src/bin/pg_combinebackup/pg_combinebackup.c @@ -242,6 +242,10 @@ main(int argc, char *argv[]) if (opt.no_manifest) opt.manifest_checksums = CHECKSUM_TYPE_NONE; + if (opt.dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + /* Check that the platform supports the requested copy method. */ if (opt.copy_method == COPY_METHOD_CLONE) { diff --git a/src/bin/pg_resetwal/pg_resetwal.c b/src/bin/pg_resetwal/pg_resetwal.c index a89d72fc5cf..dd5d279521e 100644 --- a/src/bin/pg_resetwal/pg_resetwal.c +++ b/src/bin/pg_resetwal/pg_resetwal.c @@ -397,6 +397,10 @@ main(int argc, char *argv[]) exit(1); } + if (noupdate) + pg_log_info("Executing in dry-run mode.\n" + "Nothing will be modified."); + /* * Attempt to read the existing pg_control file */ diff --git a/src/bin/pg_rewind/pg_rewind.c b/src/bin/pg_rewind/pg_rewind.c index 27c514f934a..e9364d04f76 100644 --- a/src/bin/pg_rewind/pg_rewind.c +++ b/src/bin/pg_rewind/pg_rewind.c @@ -300,10 +300,12 @@ main(int argc, char **argv) atexit(disconnect_atexit); - /* - * Ok, we have all the options and we're ready to start. First, connect to - * remote server. - */ + /* Ok, we have all the options and we're ready to start. */ + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + + /* First, connect to remote server. */ if (connstr_source) { conn = PQconnectdb(connstr_source); -- 2.47.3 --ibfr3ah5qy6tcbhw-- ^ permalink raw reply [nested|flat] 190+ messages in thread
* [PATCH v5] Log a note at program start when running in dry-run mode @ 2025-11-11 08:54 Álvaro Herrera <[email protected]> 0 siblings, 0 replies; 190+ messages in thread From: Álvaro Herrera @ 2025-11-11 08:54 UTC (permalink / raw) Users might get some peace of mind knowing their data is not being destroyed or whatever. Author: Peter Smith <[email protected]> Reviewed-by: Álvaro Herrera <[email protected]> Discussion: https://postgr.es/m/CAHut+PsvQJQnQO0KT0S2oegenkvJ8FUuY-QS5syyqmT24R2xFQ@mail.gmail.com --- src/bin/pg_archivecleanup/pg_archivecleanup.c | 4 ++++ src/bin/pg_basebackup/pg_createsubscriber.c | 5 +++++ src/bin/pg_combinebackup/pg_combinebackup.c | 4 ++++ src/bin/pg_resetwal/pg_resetwal.c | 4 ++++ src/bin/pg_rewind/pg_rewind.c | 10 ++++++---- 5 files changed, 23 insertions(+), 4 deletions(-) diff --git a/src/bin/pg_archivecleanup/pg_archivecleanup.c b/src/bin/pg_archivecleanup/pg_archivecleanup.c index c25348bcb85..ab686b4748c 100644 --- a/src/bin/pg_archivecleanup/pg_archivecleanup.c +++ b/src/bin/pg_archivecleanup/pg_archivecleanup.c @@ -375,6 +375,10 @@ main(int argc, char **argv) exit(2); } + if (dryrun) + pg_log_info("Executing in dry-run mode.\n" + "No files will be removed."); + /* * Check archive exists and other initialization if required. */ diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c index df41836e70f..cc4be5d6ef4 100644 --- a/src/bin/pg_basebackup/pg_createsubscriber.c +++ b/src/bin/pg_basebackup/pg_createsubscriber.c @@ -2305,6 +2305,11 @@ main(int argc, char **argv) pg_log_error_hint("Try \"%s --help\" for more information.", progname); exit(1); } + + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + pg_log_info("validating publisher connection string"); pub_base_conninfo = get_base_conninfo(opt.pub_conninfo_str, &dbname_conninfo); diff --git a/src/bin/pg_combinebackup/pg_combinebackup.c b/src/bin/pg_combinebackup/pg_combinebackup.c index 3a325127209..c9bf0a9e105 100644 --- a/src/bin/pg_combinebackup/pg_combinebackup.c +++ b/src/bin/pg_combinebackup/pg_combinebackup.c @@ -242,6 +242,10 @@ main(int argc, char *argv[]) if (opt.no_manifest) opt.manifest_checksums = CHECKSUM_TYPE_NONE; + if (opt.dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + /* Check that the platform supports the requested copy method. */ if (opt.copy_method == COPY_METHOD_CLONE) { diff --git a/src/bin/pg_resetwal/pg_resetwal.c b/src/bin/pg_resetwal/pg_resetwal.c index a89d72fc5cf..dd5d279521e 100644 --- a/src/bin/pg_resetwal/pg_resetwal.c +++ b/src/bin/pg_resetwal/pg_resetwal.c @@ -397,6 +397,10 @@ main(int argc, char *argv[]) exit(1); } + if (noupdate) + pg_log_info("Executing in dry-run mode.\n" + "Nothing will be modified."); + /* * Attempt to read the existing pg_control file */ diff --git a/src/bin/pg_rewind/pg_rewind.c b/src/bin/pg_rewind/pg_rewind.c index 27c514f934a..e9364d04f76 100644 --- a/src/bin/pg_rewind/pg_rewind.c +++ b/src/bin/pg_rewind/pg_rewind.c @@ -300,10 +300,12 @@ main(int argc, char **argv) atexit(disconnect_atexit); - /* - * Ok, we have all the options and we're ready to start. First, connect to - * remote server. - */ + /* Ok, we have all the options and we're ready to start. */ + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + + /* First, connect to remote server. */ if (connstr_source) { conn = PQconnectdb(connstr_source); -- 2.47.3 --ibfr3ah5qy6tcbhw-- ^ permalink raw reply [nested|flat] 190+ messages in thread
* [PATCH v5] Log a note at program start when running in dry-run mode @ 2025-11-11 08:54 Álvaro Herrera <[email protected]> 0 siblings, 0 replies; 190+ messages in thread From: Álvaro Herrera @ 2025-11-11 08:54 UTC (permalink / raw) Users might get some peace of mind knowing their data is not being destroyed or whatever. Author: Peter Smith <[email protected]> Reviewed-by: Álvaro Herrera <[email protected]> Discussion: https://postgr.es/m/CAHut+PsvQJQnQO0KT0S2oegenkvJ8FUuY-QS5syyqmT24R2xFQ@mail.gmail.com --- src/bin/pg_archivecleanup/pg_archivecleanup.c | 4 ++++ src/bin/pg_basebackup/pg_createsubscriber.c | 5 +++++ src/bin/pg_combinebackup/pg_combinebackup.c | 4 ++++ src/bin/pg_resetwal/pg_resetwal.c | 4 ++++ src/bin/pg_rewind/pg_rewind.c | 10 ++++++---- 5 files changed, 23 insertions(+), 4 deletions(-) diff --git a/src/bin/pg_archivecleanup/pg_archivecleanup.c b/src/bin/pg_archivecleanup/pg_archivecleanup.c index c25348bcb85..ab686b4748c 100644 --- a/src/bin/pg_archivecleanup/pg_archivecleanup.c +++ b/src/bin/pg_archivecleanup/pg_archivecleanup.c @@ -375,6 +375,10 @@ main(int argc, char **argv) exit(2); } + if (dryrun) + pg_log_info("Executing in dry-run mode.\n" + "No files will be removed."); + /* * Check archive exists and other initialization if required. */ diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c index df41836e70f..cc4be5d6ef4 100644 --- a/src/bin/pg_basebackup/pg_createsubscriber.c +++ b/src/bin/pg_basebackup/pg_createsubscriber.c @@ -2305,6 +2305,11 @@ main(int argc, char **argv) pg_log_error_hint("Try \"%s --help\" for more information.", progname); exit(1); } + + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + pg_log_info("validating publisher connection string"); pub_base_conninfo = get_base_conninfo(opt.pub_conninfo_str, &dbname_conninfo); diff --git a/src/bin/pg_combinebackup/pg_combinebackup.c b/src/bin/pg_combinebackup/pg_combinebackup.c index 3a325127209..c9bf0a9e105 100644 --- a/src/bin/pg_combinebackup/pg_combinebackup.c +++ b/src/bin/pg_combinebackup/pg_combinebackup.c @@ -242,6 +242,10 @@ main(int argc, char *argv[]) if (opt.no_manifest) opt.manifest_checksums = CHECKSUM_TYPE_NONE; + if (opt.dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + /* Check that the platform supports the requested copy method. */ if (opt.copy_method == COPY_METHOD_CLONE) { diff --git a/src/bin/pg_resetwal/pg_resetwal.c b/src/bin/pg_resetwal/pg_resetwal.c index a89d72fc5cf..dd5d279521e 100644 --- a/src/bin/pg_resetwal/pg_resetwal.c +++ b/src/bin/pg_resetwal/pg_resetwal.c @@ -397,6 +397,10 @@ main(int argc, char *argv[]) exit(1); } + if (noupdate) + pg_log_info("Executing in dry-run mode.\n" + "Nothing will be modified."); + /* * Attempt to read the existing pg_control file */ diff --git a/src/bin/pg_rewind/pg_rewind.c b/src/bin/pg_rewind/pg_rewind.c index 27c514f934a..e9364d04f76 100644 --- a/src/bin/pg_rewind/pg_rewind.c +++ b/src/bin/pg_rewind/pg_rewind.c @@ -300,10 +300,12 @@ main(int argc, char **argv) atexit(disconnect_atexit); - /* - * Ok, we have all the options and we're ready to start. First, connect to - * remote server. - */ + /* Ok, we have all the options and we're ready to start. */ + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + + /* First, connect to remote server. */ if (connstr_source) { conn = PQconnectdb(connstr_source); -- 2.47.3 --ibfr3ah5qy6tcbhw-- ^ permalink raw reply [nested|flat] 190+ messages in thread
* [PATCH v5] Log a note at program start when running in dry-run mode @ 2025-11-11 08:54 Álvaro Herrera <[email protected]> 0 siblings, 0 replies; 190+ messages in thread From: Álvaro Herrera @ 2025-11-11 08:54 UTC (permalink / raw) Users might get some peace of mind knowing their data is not being destroyed or whatever. Author: Peter Smith <[email protected]> Reviewed-by: Álvaro Herrera <[email protected]> Discussion: https://postgr.es/m/CAHut+PsvQJQnQO0KT0S2oegenkvJ8FUuY-QS5syyqmT24R2xFQ@mail.gmail.com --- src/bin/pg_archivecleanup/pg_archivecleanup.c | 4 ++++ src/bin/pg_basebackup/pg_createsubscriber.c | 5 +++++ src/bin/pg_combinebackup/pg_combinebackup.c | 4 ++++ src/bin/pg_resetwal/pg_resetwal.c | 4 ++++ src/bin/pg_rewind/pg_rewind.c | 10 ++++++---- 5 files changed, 23 insertions(+), 4 deletions(-) diff --git a/src/bin/pg_archivecleanup/pg_archivecleanup.c b/src/bin/pg_archivecleanup/pg_archivecleanup.c index c25348bcb85..ab686b4748c 100644 --- a/src/bin/pg_archivecleanup/pg_archivecleanup.c +++ b/src/bin/pg_archivecleanup/pg_archivecleanup.c @@ -375,6 +375,10 @@ main(int argc, char **argv) exit(2); } + if (dryrun) + pg_log_info("Executing in dry-run mode.\n" + "No files will be removed."); + /* * Check archive exists and other initialization if required. */ diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c index df41836e70f..cc4be5d6ef4 100644 --- a/src/bin/pg_basebackup/pg_createsubscriber.c +++ b/src/bin/pg_basebackup/pg_createsubscriber.c @@ -2305,6 +2305,11 @@ main(int argc, char **argv) pg_log_error_hint("Try \"%s --help\" for more information.", progname); exit(1); } + + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + pg_log_info("validating publisher connection string"); pub_base_conninfo = get_base_conninfo(opt.pub_conninfo_str, &dbname_conninfo); diff --git a/src/bin/pg_combinebackup/pg_combinebackup.c b/src/bin/pg_combinebackup/pg_combinebackup.c index 3a325127209..c9bf0a9e105 100644 --- a/src/bin/pg_combinebackup/pg_combinebackup.c +++ b/src/bin/pg_combinebackup/pg_combinebackup.c @@ -242,6 +242,10 @@ main(int argc, char *argv[]) if (opt.no_manifest) opt.manifest_checksums = CHECKSUM_TYPE_NONE; + if (opt.dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + /* Check that the platform supports the requested copy method. */ if (opt.copy_method == COPY_METHOD_CLONE) { diff --git a/src/bin/pg_resetwal/pg_resetwal.c b/src/bin/pg_resetwal/pg_resetwal.c index a89d72fc5cf..dd5d279521e 100644 --- a/src/bin/pg_resetwal/pg_resetwal.c +++ b/src/bin/pg_resetwal/pg_resetwal.c @@ -397,6 +397,10 @@ main(int argc, char *argv[]) exit(1); } + if (noupdate) + pg_log_info("Executing in dry-run mode.\n" + "Nothing will be modified."); + /* * Attempt to read the existing pg_control file */ diff --git a/src/bin/pg_rewind/pg_rewind.c b/src/bin/pg_rewind/pg_rewind.c index 27c514f934a..e9364d04f76 100644 --- a/src/bin/pg_rewind/pg_rewind.c +++ b/src/bin/pg_rewind/pg_rewind.c @@ -300,10 +300,12 @@ main(int argc, char **argv) atexit(disconnect_atexit); - /* - * Ok, we have all the options and we're ready to start. First, connect to - * remote server. - */ + /* Ok, we have all the options and we're ready to start. */ + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + + /* First, connect to remote server. */ if (connstr_source) { conn = PQconnectdb(connstr_source); -- 2.47.3 --ibfr3ah5qy6tcbhw-- ^ permalink raw reply [nested|flat] 190+ messages in thread
* [PATCH v5] Log a note at program start when running in dry-run mode @ 2025-11-11 08:54 Álvaro Herrera <[email protected]> 0 siblings, 0 replies; 190+ messages in thread From: Álvaro Herrera @ 2025-11-11 08:54 UTC (permalink / raw) Users might get some peace of mind knowing their data is not being destroyed or whatever. Author: Peter Smith <[email protected]> Reviewed-by: Álvaro Herrera <[email protected]> Discussion: https://postgr.es/m/CAHut+PsvQJQnQO0KT0S2oegenkvJ8FUuY-QS5syyqmT24R2xFQ@mail.gmail.com --- src/bin/pg_archivecleanup/pg_archivecleanup.c | 4 ++++ src/bin/pg_basebackup/pg_createsubscriber.c | 5 +++++ src/bin/pg_combinebackup/pg_combinebackup.c | 4 ++++ src/bin/pg_resetwal/pg_resetwal.c | 4 ++++ src/bin/pg_rewind/pg_rewind.c | 10 ++++++---- 5 files changed, 23 insertions(+), 4 deletions(-) diff --git a/src/bin/pg_archivecleanup/pg_archivecleanup.c b/src/bin/pg_archivecleanup/pg_archivecleanup.c index c25348bcb85..ab686b4748c 100644 --- a/src/bin/pg_archivecleanup/pg_archivecleanup.c +++ b/src/bin/pg_archivecleanup/pg_archivecleanup.c @@ -375,6 +375,10 @@ main(int argc, char **argv) exit(2); } + if (dryrun) + pg_log_info("Executing in dry-run mode.\n" + "No files will be removed."); + /* * Check archive exists and other initialization if required. */ diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c index df41836e70f..cc4be5d6ef4 100644 --- a/src/bin/pg_basebackup/pg_createsubscriber.c +++ b/src/bin/pg_basebackup/pg_createsubscriber.c @@ -2305,6 +2305,11 @@ main(int argc, char **argv) pg_log_error_hint("Try \"%s --help\" for more information.", progname); exit(1); } + + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + pg_log_info("validating publisher connection string"); pub_base_conninfo = get_base_conninfo(opt.pub_conninfo_str, &dbname_conninfo); diff --git a/src/bin/pg_combinebackup/pg_combinebackup.c b/src/bin/pg_combinebackup/pg_combinebackup.c index 3a325127209..c9bf0a9e105 100644 --- a/src/bin/pg_combinebackup/pg_combinebackup.c +++ b/src/bin/pg_combinebackup/pg_combinebackup.c @@ -242,6 +242,10 @@ main(int argc, char *argv[]) if (opt.no_manifest) opt.manifest_checksums = CHECKSUM_TYPE_NONE; + if (opt.dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + /* Check that the platform supports the requested copy method. */ if (opt.copy_method == COPY_METHOD_CLONE) { diff --git a/src/bin/pg_resetwal/pg_resetwal.c b/src/bin/pg_resetwal/pg_resetwal.c index a89d72fc5cf..dd5d279521e 100644 --- a/src/bin/pg_resetwal/pg_resetwal.c +++ b/src/bin/pg_resetwal/pg_resetwal.c @@ -397,6 +397,10 @@ main(int argc, char *argv[]) exit(1); } + if (noupdate) + pg_log_info("Executing in dry-run mode.\n" + "Nothing will be modified."); + /* * Attempt to read the existing pg_control file */ diff --git a/src/bin/pg_rewind/pg_rewind.c b/src/bin/pg_rewind/pg_rewind.c index 27c514f934a..e9364d04f76 100644 --- a/src/bin/pg_rewind/pg_rewind.c +++ b/src/bin/pg_rewind/pg_rewind.c @@ -300,10 +300,12 @@ main(int argc, char **argv) atexit(disconnect_atexit); - /* - * Ok, we have all the options and we're ready to start. First, connect to - * remote server. - */ + /* Ok, we have all the options and we're ready to start. */ + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + + /* First, connect to remote server. */ if (connstr_source) { conn = PQconnectdb(connstr_source); -- 2.47.3 --ibfr3ah5qy6tcbhw-- ^ permalink raw reply [nested|flat] 190+ messages in thread
* [PATCH v5] Log a note at program start when running in dry-run mode @ 2025-11-11 08:54 Álvaro Herrera <[email protected]> 0 siblings, 0 replies; 190+ messages in thread From: Álvaro Herrera @ 2025-11-11 08:54 UTC (permalink / raw) Users might get some peace of mind knowing their data is not being destroyed or whatever. Author: Peter Smith <[email protected]> Reviewed-by: Álvaro Herrera <[email protected]> Discussion: https://postgr.es/m/CAHut+PsvQJQnQO0KT0S2oegenkvJ8FUuY-QS5syyqmT24R2xFQ@mail.gmail.com --- src/bin/pg_archivecleanup/pg_archivecleanup.c | 4 ++++ src/bin/pg_basebackup/pg_createsubscriber.c | 5 +++++ src/bin/pg_combinebackup/pg_combinebackup.c | 4 ++++ src/bin/pg_resetwal/pg_resetwal.c | 4 ++++ src/bin/pg_rewind/pg_rewind.c | 10 ++++++---- 5 files changed, 23 insertions(+), 4 deletions(-) diff --git a/src/bin/pg_archivecleanup/pg_archivecleanup.c b/src/bin/pg_archivecleanup/pg_archivecleanup.c index c25348bcb85..ab686b4748c 100644 --- a/src/bin/pg_archivecleanup/pg_archivecleanup.c +++ b/src/bin/pg_archivecleanup/pg_archivecleanup.c @@ -375,6 +375,10 @@ main(int argc, char **argv) exit(2); } + if (dryrun) + pg_log_info("Executing in dry-run mode.\n" + "No files will be removed."); + /* * Check archive exists and other initialization if required. */ diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c index df41836e70f..cc4be5d6ef4 100644 --- a/src/bin/pg_basebackup/pg_createsubscriber.c +++ b/src/bin/pg_basebackup/pg_createsubscriber.c @@ -2305,6 +2305,11 @@ main(int argc, char **argv) pg_log_error_hint("Try \"%s --help\" for more information.", progname); exit(1); } + + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + pg_log_info("validating publisher connection string"); pub_base_conninfo = get_base_conninfo(opt.pub_conninfo_str, &dbname_conninfo); diff --git a/src/bin/pg_combinebackup/pg_combinebackup.c b/src/bin/pg_combinebackup/pg_combinebackup.c index 3a325127209..c9bf0a9e105 100644 --- a/src/bin/pg_combinebackup/pg_combinebackup.c +++ b/src/bin/pg_combinebackup/pg_combinebackup.c @@ -242,6 +242,10 @@ main(int argc, char *argv[]) if (opt.no_manifest) opt.manifest_checksums = CHECKSUM_TYPE_NONE; + if (opt.dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + /* Check that the platform supports the requested copy method. */ if (opt.copy_method == COPY_METHOD_CLONE) { diff --git a/src/bin/pg_resetwal/pg_resetwal.c b/src/bin/pg_resetwal/pg_resetwal.c index a89d72fc5cf..dd5d279521e 100644 --- a/src/bin/pg_resetwal/pg_resetwal.c +++ b/src/bin/pg_resetwal/pg_resetwal.c @@ -397,6 +397,10 @@ main(int argc, char *argv[]) exit(1); } + if (noupdate) + pg_log_info("Executing in dry-run mode.\n" + "Nothing will be modified."); + /* * Attempt to read the existing pg_control file */ diff --git a/src/bin/pg_rewind/pg_rewind.c b/src/bin/pg_rewind/pg_rewind.c index 27c514f934a..e9364d04f76 100644 --- a/src/bin/pg_rewind/pg_rewind.c +++ b/src/bin/pg_rewind/pg_rewind.c @@ -300,10 +300,12 @@ main(int argc, char **argv) atexit(disconnect_atexit); - /* - * Ok, we have all the options and we're ready to start. First, connect to - * remote server. - */ + /* Ok, we have all the options and we're ready to start. */ + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + + /* First, connect to remote server. */ if (connstr_source) { conn = PQconnectdb(connstr_source); -- 2.47.3 --ibfr3ah5qy6tcbhw-- ^ permalink raw reply [nested|flat] 190+ messages in thread
* [PATCH v5] Log a note at program start when running in dry-run mode @ 2025-11-11 08:54 Álvaro Herrera <[email protected]> 0 siblings, 0 replies; 190+ messages in thread From: Álvaro Herrera @ 2025-11-11 08:54 UTC (permalink / raw) Users might get some peace of mind knowing their data is not being destroyed or whatever. Author: Peter Smith <[email protected]> Reviewed-by: Álvaro Herrera <[email protected]> Discussion: https://postgr.es/m/CAHut+PsvQJQnQO0KT0S2oegenkvJ8FUuY-QS5syyqmT24R2xFQ@mail.gmail.com --- src/bin/pg_archivecleanup/pg_archivecleanup.c | 4 ++++ src/bin/pg_basebackup/pg_createsubscriber.c | 5 +++++ src/bin/pg_combinebackup/pg_combinebackup.c | 4 ++++ src/bin/pg_resetwal/pg_resetwal.c | 4 ++++ src/bin/pg_rewind/pg_rewind.c | 10 ++++++---- 5 files changed, 23 insertions(+), 4 deletions(-) diff --git a/src/bin/pg_archivecleanup/pg_archivecleanup.c b/src/bin/pg_archivecleanup/pg_archivecleanup.c index c25348bcb85..ab686b4748c 100644 --- a/src/bin/pg_archivecleanup/pg_archivecleanup.c +++ b/src/bin/pg_archivecleanup/pg_archivecleanup.c @@ -375,6 +375,10 @@ main(int argc, char **argv) exit(2); } + if (dryrun) + pg_log_info("Executing in dry-run mode.\n" + "No files will be removed."); + /* * Check archive exists and other initialization if required. */ diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c index df41836e70f..cc4be5d6ef4 100644 --- a/src/bin/pg_basebackup/pg_createsubscriber.c +++ b/src/bin/pg_basebackup/pg_createsubscriber.c @@ -2305,6 +2305,11 @@ main(int argc, char **argv) pg_log_error_hint("Try \"%s --help\" for more information.", progname); exit(1); } + + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + pg_log_info("validating publisher connection string"); pub_base_conninfo = get_base_conninfo(opt.pub_conninfo_str, &dbname_conninfo); diff --git a/src/bin/pg_combinebackup/pg_combinebackup.c b/src/bin/pg_combinebackup/pg_combinebackup.c index 3a325127209..c9bf0a9e105 100644 --- a/src/bin/pg_combinebackup/pg_combinebackup.c +++ b/src/bin/pg_combinebackup/pg_combinebackup.c @@ -242,6 +242,10 @@ main(int argc, char *argv[]) if (opt.no_manifest) opt.manifest_checksums = CHECKSUM_TYPE_NONE; + if (opt.dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + /* Check that the platform supports the requested copy method. */ if (opt.copy_method == COPY_METHOD_CLONE) { diff --git a/src/bin/pg_resetwal/pg_resetwal.c b/src/bin/pg_resetwal/pg_resetwal.c index a89d72fc5cf..dd5d279521e 100644 --- a/src/bin/pg_resetwal/pg_resetwal.c +++ b/src/bin/pg_resetwal/pg_resetwal.c @@ -397,6 +397,10 @@ main(int argc, char *argv[]) exit(1); } + if (noupdate) + pg_log_info("Executing in dry-run mode.\n" + "Nothing will be modified."); + /* * Attempt to read the existing pg_control file */ diff --git a/src/bin/pg_rewind/pg_rewind.c b/src/bin/pg_rewind/pg_rewind.c index 27c514f934a..e9364d04f76 100644 --- a/src/bin/pg_rewind/pg_rewind.c +++ b/src/bin/pg_rewind/pg_rewind.c @@ -300,10 +300,12 @@ main(int argc, char **argv) atexit(disconnect_atexit); - /* - * Ok, we have all the options and we're ready to start. First, connect to - * remote server. - */ + /* Ok, we have all the options and we're ready to start. */ + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + + /* First, connect to remote server. */ if (connstr_source) { conn = PQconnectdb(connstr_source); -- 2.47.3 --ibfr3ah5qy6tcbhw-- ^ permalink raw reply [nested|flat] 190+ messages in thread
* [PATCH v5] Log a note at program start when running in dry-run mode @ 2025-11-11 08:54 Álvaro Herrera <[email protected]> 0 siblings, 0 replies; 190+ messages in thread From: Álvaro Herrera @ 2025-11-11 08:54 UTC (permalink / raw) Users might get some peace of mind knowing their data is not being destroyed or whatever. Author: Peter Smith <[email protected]> Reviewed-by: Álvaro Herrera <[email protected]> Discussion: https://postgr.es/m/CAHut+PsvQJQnQO0KT0S2oegenkvJ8FUuY-QS5syyqmT24R2xFQ@mail.gmail.com --- src/bin/pg_archivecleanup/pg_archivecleanup.c | 4 ++++ src/bin/pg_basebackup/pg_createsubscriber.c | 5 +++++ src/bin/pg_combinebackup/pg_combinebackup.c | 4 ++++ src/bin/pg_resetwal/pg_resetwal.c | 4 ++++ src/bin/pg_rewind/pg_rewind.c | 10 ++++++---- 5 files changed, 23 insertions(+), 4 deletions(-) diff --git a/src/bin/pg_archivecleanup/pg_archivecleanup.c b/src/bin/pg_archivecleanup/pg_archivecleanup.c index c25348bcb85..ab686b4748c 100644 --- a/src/bin/pg_archivecleanup/pg_archivecleanup.c +++ b/src/bin/pg_archivecleanup/pg_archivecleanup.c @@ -375,6 +375,10 @@ main(int argc, char **argv) exit(2); } + if (dryrun) + pg_log_info("Executing in dry-run mode.\n" + "No files will be removed."); + /* * Check archive exists and other initialization if required. */ diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c index df41836e70f..cc4be5d6ef4 100644 --- a/src/bin/pg_basebackup/pg_createsubscriber.c +++ b/src/bin/pg_basebackup/pg_createsubscriber.c @@ -2305,6 +2305,11 @@ main(int argc, char **argv) pg_log_error_hint("Try \"%s --help\" for more information.", progname); exit(1); } + + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + pg_log_info("validating publisher connection string"); pub_base_conninfo = get_base_conninfo(opt.pub_conninfo_str, &dbname_conninfo); diff --git a/src/bin/pg_combinebackup/pg_combinebackup.c b/src/bin/pg_combinebackup/pg_combinebackup.c index 3a325127209..c9bf0a9e105 100644 --- a/src/bin/pg_combinebackup/pg_combinebackup.c +++ b/src/bin/pg_combinebackup/pg_combinebackup.c @@ -242,6 +242,10 @@ main(int argc, char *argv[]) if (opt.no_manifest) opt.manifest_checksums = CHECKSUM_TYPE_NONE; + if (opt.dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + /* Check that the platform supports the requested copy method. */ if (opt.copy_method == COPY_METHOD_CLONE) { diff --git a/src/bin/pg_resetwal/pg_resetwal.c b/src/bin/pg_resetwal/pg_resetwal.c index a89d72fc5cf..dd5d279521e 100644 --- a/src/bin/pg_resetwal/pg_resetwal.c +++ b/src/bin/pg_resetwal/pg_resetwal.c @@ -397,6 +397,10 @@ main(int argc, char *argv[]) exit(1); } + if (noupdate) + pg_log_info("Executing in dry-run mode.\n" + "Nothing will be modified."); + /* * Attempt to read the existing pg_control file */ diff --git a/src/bin/pg_rewind/pg_rewind.c b/src/bin/pg_rewind/pg_rewind.c index 27c514f934a..e9364d04f76 100644 --- a/src/bin/pg_rewind/pg_rewind.c +++ b/src/bin/pg_rewind/pg_rewind.c @@ -300,10 +300,12 @@ main(int argc, char **argv) atexit(disconnect_atexit); - /* - * Ok, we have all the options and we're ready to start. First, connect to - * remote server. - */ + /* Ok, we have all the options and we're ready to start. */ + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + + /* First, connect to remote server. */ if (connstr_source) { conn = PQconnectdb(connstr_source); -- 2.47.3 --ibfr3ah5qy6tcbhw-- ^ permalink raw reply [nested|flat] 190+ messages in thread
* [PATCH v5] Log a note at program start when running in dry-run mode @ 2025-11-11 08:54 Álvaro Herrera <[email protected]> 0 siblings, 0 replies; 190+ messages in thread From: Álvaro Herrera @ 2025-11-11 08:54 UTC (permalink / raw) Users might get some peace of mind knowing their data is not being destroyed or whatever. Author: Peter Smith <[email protected]> Reviewed-by: Álvaro Herrera <[email protected]> Discussion: https://postgr.es/m/CAHut+PsvQJQnQO0KT0S2oegenkvJ8FUuY-QS5syyqmT24R2xFQ@mail.gmail.com --- src/bin/pg_archivecleanup/pg_archivecleanup.c | 4 ++++ src/bin/pg_basebackup/pg_createsubscriber.c | 5 +++++ src/bin/pg_combinebackup/pg_combinebackup.c | 4 ++++ src/bin/pg_resetwal/pg_resetwal.c | 4 ++++ src/bin/pg_rewind/pg_rewind.c | 10 ++++++---- 5 files changed, 23 insertions(+), 4 deletions(-) diff --git a/src/bin/pg_archivecleanup/pg_archivecleanup.c b/src/bin/pg_archivecleanup/pg_archivecleanup.c index c25348bcb85..ab686b4748c 100644 --- a/src/bin/pg_archivecleanup/pg_archivecleanup.c +++ b/src/bin/pg_archivecleanup/pg_archivecleanup.c @@ -375,6 +375,10 @@ main(int argc, char **argv) exit(2); } + if (dryrun) + pg_log_info("Executing in dry-run mode.\n" + "No files will be removed."); + /* * Check archive exists and other initialization if required. */ diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c index df41836e70f..cc4be5d6ef4 100644 --- a/src/bin/pg_basebackup/pg_createsubscriber.c +++ b/src/bin/pg_basebackup/pg_createsubscriber.c @@ -2305,6 +2305,11 @@ main(int argc, char **argv) pg_log_error_hint("Try \"%s --help\" for more information.", progname); exit(1); } + + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + pg_log_info("validating publisher connection string"); pub_base_conninfo = get_base_conninfo(opt.pub_conninfo_str, &dbname_conninfo); diff --git a/src/bin/pg_combinebackup/pg_combinebackup.c b/src/bin/pg_combinebackup/pg_combinebackup.c index 3a325127209..c9bf0a9e105 100644 --- a/src/bin/pg_combinebackup/pg_combinebackup.c +++ b/src/bin/pg_combinebackup/pg_combinebackup.c @@ -242,6 +242,10 @@ main(int argc, char *argv[]) if (opt.no_manifest) opt.manifest_checksums = CHECKSUM_TYPE_NONE; + if (opt.dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + /* Check that the platform supports the requested copy method. */ if (opt.copy_method == COPY_METHOD_CLONE) { diff --git a/src/bin/pg_resetwal/pg_resetwal.c b/src/bin/pg_resetwal/pg_resetwal.c index a89d72fc5cf..dd5d279521e 100644 --- a/src/bin/pg_resetwal/pg_resetwal.c +++ b/src/bin/pg_resetwal/pg_resetwal.c @@ -397,6 +397,10 @@ main(int argc, char *argv[]) exit(1); } + if (noupdate) + pg_log_info("Executing in dry-run mode.\n" + "Nothing will be modified."); + /* * Attempt to read the existing pg_control file */ diff --git a/src/bin/pg_rewind/pg_rewind.c b/src/bin/pg_rewind/pg_rewind.c index 27c514f934a..e9364d04f76 100644 --- a/src/bin/pg_rewind/pg_rewind.c +++ b/src/bin/pg_rewind/pg_rewind.c @@ -300,10 +300,12 @@ main(int argc, char **argv) atexit(disconnect_atexit); - /* - * Ok, we have all the options and we're ready to start. First, connect to - * remote server. - */ + /* Ok, we have all the options and we're ready to start. */ + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + + /* First, connect to remote server. */ if (connstr_source) { conn = PQconnectdb(connstr_source); -- 2.47.3 --ibfr3ah5qy6tcbhw-- ^ permalink raw reply [nested|flat] 190+ messages in thread
* [PATCH v5] Log a note at program start when running in dry-run mode @ 2025-11-11 08:54 Álvaro Herrera <[email protected]> 0 siblings, 0 replies; 190+ messages in thread From: Álvaro Herrera @ 2025-11-11 08:54 UTC (permalink / raw) Users might get some peace of mind knowing their data is not being destroyed or whatever. Author: Peter Smith <[email protected]> Reviewed-by: Álvaro Herrera <[email protected]> Discussion: https://postgr.es/m/CAHut+PsvQJQnQO0KT0S2oegenkvJ8FUuY-QS5syyqmT24R2xFQ@mail.gmail.com --- src/bin/pg_archivecleanup/pg_archivecleanup.c | 4 ++++ src/bin/pg_basebackup/pg_createsubscriber.c | 5 +++++ src/bin/pg_combinebackup/pg_combinebackup.c | 4 ++++ src/bin/pg_resetwal/pg_resetwal.c | 4 ++++ src/bin/pg_rewind/pg_rewind.c | 10 ++++++---- 5 files changed, 23 insertions(+), 4 deletions(-) diff --git a/src/bin/pg_archivecleanup/pg_archivecleanup.c b/src/bin/pg_archivecleanup/pg_archivecleanup.c index c25348bcb85..ab686b4748c 100644 --- a/src/bin/pg_archivecleanup/pg_archivecleanup.c +++ b/src/bin/pg_archivecleanup/pg_archivecleanup.c @@ -375,6 +375,10 @@ main(int argc, char **argv) exit(2); } + if (dryrun) + pg_log_info("Executing in dry-run mode.\n" + "No files will be removed."); + /* * Check archive exists and other initialization if required. */ diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c index df41836e70f..cc4be5d6ef4 100644 --- a/src/bin/pg_basebackup/pg_createsubscriber.c +++ b/src/bin/pg_basebackup/pg_createsubscriber.c @@ -2305,6 +2305,11 @@ main(int argc, char **argv) pg_log_error_hint("Try \"%s --help\" for more information.", progname); exit(1); } + + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + pg_log_info("validating publisher connection string"); pub_base_conninfo = get_base_conninfo(opt.pub_conninfo_str, &dbname_conninfo); diff --git a/src/bin/pg_combinebackup/pg_combinebackup.c b/src/bin/pg_combinebackup/pg_combinebackup.c index 3a325127209..c9bf0a9e105 100644 --- a/src/bin/pg_combinebackup/pg_combinebackup.c +++ b/src/bin/pg_combinebackup/pg_combinebackup.c @@ -242,6 +242,10 @@ main(int argc, char *argv[]) if (opt.no_manifest) opt.manifest_checksums = CHECKSUM_TYPE_NONE; + if (opt.dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + /* Check that the platform supports the requested copy method. */ if (opt.copy_method == COPY_METHOD_CLONE) { diff --git a/src/bin/pg_resetwal/pg_resetwal.c b/src/bin/pg_resetwal/pg_resetwal.c index a89d72fc5cf..dd5d279521e 100644 --- a/src/bin/pg_resetwal/pg_resetwal.c +++ b/src/bin/pg_resetwal/pg_resetwal.c @@ -397,6 +397,10 @@ main(int argc, char *argv[]) exit(1); } + if (noupdate) + pg_log_info("Executing in dry-run mode.\n" + "Nothing will be modified."); + /* * Attempt to read the existing pg_control file */ diff --git a/src/bin/pg_rewind/pg_rewind.c b/src/bin/pg_rewind/pg_rewind.c index 27c514f934a..e9364d04f76 100644 --- a/src/bin/pg_rewind/pg_rewind.c +++ b/src/bin/pg_rewind/pg_rewind.c @@ -300,10 +300,12 @@ main(int argc, char **argv) atexit(disconnect_atexit); - /* - * Ok, we have all the options and we're ready to start. First, connect to - * remote server. - */ + /* Ok, we have all the options and we're ready to start. */ + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + + /* First, connect to remote server. */ if (connstr_source) { conn = PQconnectdb(connstr_source); -- 2.47.3 --ibfr3ah5qy6tcbhw-- ^ permalink raw reply [nested|flat] 190+ messages in thread
* [PATCH v5] Log a note at program start when running in dry-run mode @ 2025-11-11 08:54 Álvaro Herrera <[email protected]> 0 siblings, 0 replies; 190+ messages in thread From: Álvaro Herrera @ 2025-11-11 08:54 UTC (permalink / raw) Users might get some peace of mind knowing their data is not being destroyed or whatever. Author: Peter Smith <[email protected]> Reviewed-by: Álvaro Herrera <[email protected]> Discussion: https://postgr.es/m/CAHut+PsvQJQnQO0KT0S2oegenkvJ8FUuY-QS5syyqmT24R2xFQ@mail.gmail.com --- src/bin/pg_archivecleanup/pg_archivecleanup.c | 4 ++++ src/bin/pg_basebackup/pg_createsubscriber.c | 5 +++++ src/bin/pg_combinebackup/pg_combinebackup.c | 4 ++++ src/bin/pg_resetwal/pg_resetwal.c | 4 ++++ src/bin/pg_rewind/pg_rewind.c | 10 ++++++---- 5 files changed, 23 insertions(+), 4 deletions(-) diff --git a/src/bin/pg_archivecleanup/pg_archivecleanup.c b/src/bin/pg_archivecleanup/pg_archivecleanup.c index c25348bcb85..ab686b4748c 100644 --- a/src/bin/pg_archivecleanup/pg_archivecleanup.c +++ b/src/bin/pg_archivecleanup/pg_archivecleanup.c @@ -375,6 +375,10 @@ main(int argc, char **argv) exit(2); } + if (dryrun) + pg_log_info("Executing in dry-run mode.\n" + "No files will be removed."); + /* * Check archive exists and other initialization if required. */ diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c index df41836e70f..cc4be5d6ef4 100644 --- a/src/bin/pg_basebackup/pg_createsubscriber.c +++ b/src/bin/pg_basebackup/pg_createsubscriber.c @@ -2305,6 +2305,11 @@ main(int argc, char **argv) pg_log_error_hint("Try \"%s --help\" for more information.", progname); exit(1); } + + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + pg_log_info("validating publisher connection string"); pub_base_conninfo = get_base_conninfo(opt.pub_conninfo_str, &dbname_conninfo); diff --git a/src/bin/pg_combinebackup/pg_combinebackup.c b/src/bin/pg_combinebackup/pg_combinebackup.c index 3a325127209..c9bf0a9e105 100644 --- a/src/bin/pg_combinebackup/pg_combinebackup.c +++ b/src/bin/pg_combinebackup/pg_combinebackup.c @@ -242,6 +242,10 @@ main(int argc, char *argv[]) if (opt.no_manifest) opt.manifest_checksums = CHECKSUM_TYPE_NONE; + if (opt.dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + /* Check that the platform supports the requested copy method. */ if (opt.copy_method == COPY_METHOD_CLONE) { diff --git a/src/bin/pg_resetwal/pg_resetwal.c b/src/bin/pg_resetwal/pg_resetwal.c index a89d72fc5cf..dd5d279521e 100644 --- a/src/bin/pg_resetwal/pg_resetwal.c +++ b/src/bin/pg_resetwal/pg_resetwal.c @@ -397,6 +397,10 @@ main(int argc, char *argv[]) exit(1); } + if (noupdate) + pg_log_info("Executing in dry-run mode.\n" + "Nothing will be modified."); + /* * Attempt to read the existing pg_control file */ diff --git a/src/bin/pg_rewind/pg_rewind.c b/src/bin/pg_rewind/pg_rewind.c index 27c514f934a..e9364d04f76 100644 --- a/src/bin/pg_rewind/pg_rewind.c +++ b/src/bin/pg_rewind/pg_rewind.c @@ -300,10 +300,12 @@ main(int argc, char **argv) atexit(disconnect_atexit); - /* - * Ok, we have all the options and we're ready to start. First, connect to - * remote server. - */ + /* Ok, we have all the options and we're ready to start. */ + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + + /* First, connect to remote server. */ if (connstr_source) { conn = PQconnectdb(connstr_source); -- 2.47.3 --ibfr3ah5qy6tcbhw-- ^ permalink raw reply [nested|flat] 190+ messages in thread
* [PATCH v5] Log a note at program start when running in dry-run mode @ 2025-11-11 08:54 Álvaro Herrera <[email protected]> 0 siblings, 0 replies; 190+ messages in thread From: Álvaro Herrera @ 2025-11-11 08:54 UTC (permalink / raw) Users might get some peace of mind knowing their data is not being destroyed or whatever. Author: Peter Smith <[email protected]> Reviewed-by: Álvaro Herrera <[email protected]> Discussion: https://postgr.es/m/CAHut+PsvQJQnQO0KT0S2oegenkvJ8FUuY-QS5syyqmT24R2xFQ@mail.gmail.com --- src/bin/pg_archivecleanup/pg_archivecleanup.c | 4 ++++ src/bin/pg_basebackup/pg_createsubscriber.c | 5 +++++ src/bin/pg_combinebackup/pg_combinebackup.c | 4 ++++ src/bin/pg_resetwal/pg_resetwal.c | 4 ++++ src/bin/pg_rewind/pg_rewind.c | 10 ++++++---- 5 files changed, 23 insertions(+), 4 deletions(-) diff --git a/src/bin/pg_archivecleanup/pg_archivecleanup.c b/src/bin/pg_archivecleanup/pg_archivecleanup.c index c25348bcb85..ab686b4748c 100644 --- a/src/bin/pg_archivecleanup/pg_archivecleanup.c +++ b/src/bin/pg_archivecleanup/pg_archivecleanup.c @@ -375,6 +375,10 @@ main(int argc, char **argv) exit(2); } + if (dryrun) + pg_log_info("Executing in dry-run mode.\n" + "No files will be removed."); + /* * Check archive exists and other initialization if required. */ diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c index df41836e70f..cc4be5d6ef4 100644 --- a/src/bin/pg_basebackup/pg_createsubscriber.c +++ b/src/bin/pg_basebackup/pg_createsubscriber.c @@ -2305,6 +2305,11 @@ main(int argc, char **argv) pg_log_error_hint("Try \"%s --help\" for more information.", progname); exit(1); } + + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + pg_log_info("validating publisher connection string"); pub_base_conninfo = get_base_conninfo(opt.pub_conninfo_str, &dbname_conninfo); diff --git a/src/bin/pg_combinebackup/pg_combinebackup.c b/src/bin/pg_combinebackup/pg_combinebackup.c index 3a325127209..c9bf0a9e105 100644 --- a/src/bin/pg_combinebackup/pg_combinebackup.c +++ b/src/bin/pg_combinebackup/pg_combinebackup.c @@ -242,6 +242,10 @@ main(int argc, char *argv[]) if (opt.no_manifest) opt.manifest_checksums = CHECKSUM_TYPE_NONE; + if (opt.dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + /* Check that the platform supports the requested copy method. */ if (opt.copy_method == COPY_METHOD_CLONE) { diff --git a/src/bin/pg_resetwal/pg_resetwal.c b/src/bin/pg_resetwal/pg_resetwal.c index a89d72fc5cf..dd5d279521e 100644 --- a/src/bin/pg_resetwal/pg_resetwal.c +++ b/src/bin/pg_resetwal/pg_resetwal.c @@ -397,6 +397,10 @@ main(int argc, char *argv[]) exit(1); } + if (noupdate) + pg_log_info("Executing in dry-run mode.\n" + "Nothing will be modified."); + /* * Attempt to read the existing pg_control file */ diff --git a/src/bin/pg_rewind/pg_rewind.c b/src/bin/pg_rewind/pg_rewind.c index 27c514f934a..e9364d04f76 100644 --- a/src/bin/pg_rewind/pg_rewind.c +++ b/src/bin/pg_rewind/pg_rewind.c @@ -300,10 +300,12 @@ main(int argc, char **argv) atexit(disconnect_atexit); - /* - * Ok, we have all the options and we're ready to start. First, connect to - * remote server. - */ + /* Ok, we have all the options and we're ready to start. */ + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + + /* First, connect to remote server. */ if (connstr_source) { conn = PQconnectdb(connstr_source); -- 2.47.3 --ibfr3ah5qy6tcbhw-- ^ permalink raw reply [nested|flat] 190+ messages in thread
* [PATCH v5] Log a note at program start when running in dry-run mode @ 2025-11-11 08:54 Álvaro Herrera <[email protected]> 0 siblings, 0 replies; 190+ messages in thread From: Álvaro Herrera @ 2025-11-11 08:54 UTC (permalink / raw) Users might get some peace of mind knowing their data is not being destroyed or whatever. Author: Peter Smith <[email protected]> Reviewed-by: Álvaro Herrera <[email protected]> Discussion: https://postgr.es/m/CAHut+PsvQJQnQO0KT0S2oegenkvJ8FUuY-QS5syyqmT24R2xFQ@mail.gmail.com --- src/bin/pg_archivecleanup/pg_archivecleanup.c | 4 ++++ src/bin/pg_basebackup/pg_createsubscriber.c | 5 +++++ src/bin/pg_combinebackup/pg_combinebackup.c | 4 ++++ src/bin/pg_resetwal/pg_resetwal.c | 4 ++++ src/bin/pg_rewind/pg_rewind.c | 10 ++++++---- 5 files changed, 23 insertions(+), 4 deletions(-) diff --git a/src/bin/pg_archivecleanup/pg_archivecleanup.c b/src/bin/pg_archivecleanup/pg_archivecleanup.c index c25348bcb85..ab686b4748c 100644 --- a/src/bin/pg_archivecleanup/pg_archivecleanup.c +++ b/src/bin/pg_archivecleanup/pg_archivecleanup.c @@ -375,6 +375,10 @@ main(int argc, char **argv) exit(2); } + if (dryrun) + pg_log_info("Executing in dry-run mode.\n" + "No files will be removed."); + /* * Check archive exists and other initialization if required. */ diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c index df41836e70f..cc4be5d6ef4 100644 --- a/src/bin/pg_basebackup/pg_createsubscriber.c +++ b/src/bin/pg_basebackup/pg_createsubscriber.c @@ -2305,6 +2305,11 @@ main(int argc, char **argv) pg_log_error_hint("Try \"%s --help\" for more information.", progname); exit(1); } + + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + pg_log_info("validating publisher connection string"); pub_base_conninfo = get_base_conninfo(opt.pub_conninfo_str, &dbname_conninfo); diff --git a/src/bin/pg_combinebackup/pg_combinebackup.c b/src/bin/pg_combinebackup/pg_combinebackup.c index 3a325127209..c9bf0a9e105 100644 --- a/src/bin/pg_combinebackup/pg_combinebackup.c +++ b/src/bin/pg_combinebackup/pg_combinebackup.c @@ -242,6 +242,10 @@ main(int argc, char *argv[]) if (opt.no_manifest) opt.manifest_checksums = CHECKSUM_TYPE_NONE; + if (opt.dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + /* Check that the platform supports the requested copy method. */ if (opt.copy_method == COPY_METHOD_CLONE) { diff --git a/src/bin/pg_resetwal/pg_resetwal.c b/src/bin/pg_resetwal/pg_resetwal.c index a89d72fc5cf..dd5d279521e 100644 --- a/src/bin/pg_resetwal/pg_resetwal.c +++ b/src/bin/pg_resetwal/pg_resetwal.c @@ -397,6 +397,10 @@ main(int argc, char *argv[]) exit(1); } + if (noupdate) + pg_log_info("Executing in dry-run mode.\n" + "Nothing will be modified."); + /* * Attempt to read the existing pg_control file */ diff --git a/src/bin/pg_rewind/pg_rewind.c b/src/bin/pg_rewind/pg_rewind.c index 27c514f934a..e9364d04f76 100644 --- a/src/bin/pg_rewind/pg_rewind.c +++ b/src/bin/pg_rewind/pg_rewind.c @@ -300,10 +300,12 @@ main(int argc, char **argv) atexit(disconnect_atexit); - /* - * Ok, we have all the options and we're ready to start. First, connect to - * remote server. - */ + /* Ok, we have all the options and we're ready to start. */ + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + + /* First, connect to remote server. */ if (connstr_source) { conn = PQconnectdb(connstr_source); -- 2.47.3 --ibfr3ah5qy6tcbhw-- ^ permalink raw reply [nested|flat] 190+ messages in thread
* [PATCH v5] Log a note at program start when running in dry-run mode @ 2025-11-11 08:54 Álvaro Herrera <[email protected]> 0 siblings, 0 replies; 190+ messages in thread From: Álvaro Herrera @ 2025-11-11 08:54 UTC (permalink / raw) Users might get some peace of mind knowing their data is not being destroyed or whatever. Author: Peter Smith <[email protected]> Reviewed-by: Álvaro Herrera <[email protected]> Discussion: https://postgr.es/m/CAHut+PsvQJQnQO0KT0S2oegenkvJ8FUuY-QS5syyqmT24R2xFQ@mail.gmail.com --- src/bin/pg_archivecleanup/pg_archivecleanup.c | 4 ++++ src/bin/pg_basebackup/pg_createsubscriber.c | 5 +++++ src/bin/pg_combinebackup/pg_combinebackup.c | 4 ++++ src/bin/pg_resetwal/pg_resetwal.c | 4 ++++ src/bin/pg_rewind/pg_rewind.c | 10 ++++++---- 5 files changed, 23 insertions(+), 4 deletions(-) diff --git a/src/bin/pg_archivecleanup/pg_archivecleanup.c b/src/bin/pg_archivecleanup/pg_archivecleanup.c index c25348bcb85..ab686b4748c 100644 --- a/src/bin/pg_archivecleanup/pg_archivecleanup.c +++ b/src/bin/pg_archivecleanup/pg_archivecleanup.c @@ -375,6 +375,10 @@ main(int argc, char **argv) exit(2); } + if (dryrun) + pg_log_info("Executing in dry-run mode.\n" + "No files will be removed."); + /* * Check archive exists and other initialization if required. */ diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c index df41836e70f..cc4be5d6ef4 100644 --- a/src/bin/pg_basebackup/pg_createsubscriber.c +++ b/src/bin/pg_basebackup/pg_createsubscriber.c @@ -2305,6 +2305,11 @@ main(int argc, char **argv) pg_log_error_hint("Try \"%s --help\" for more information.", progname); exit(1); } + + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + pg_log_info("validating publisher connection string"); pub_base_conninfo = get_base_conninfo(opt.pub_conninfo_str, &dbname_conninfo); diff --git a/src/bin/pg_combinebackup/pg_combinebackup.c b/src/bin/pg_combinebackup/pg_combinebackup.c index 3a325127209..c9bf0a9e105 100644 --- a/src/bin/pg_combinebackup/pg_combinebackup.c +++ b/src/bin/pg_combinebackup/pg_combinebackup.c @@ -242,6 +242,10 @@ main(int argc, char *argv[]) if (opt.no_manifest) opt.manifest_checksums = CHECKSUM_TYPE_NONE; + if (opt.dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + /* Check that the platform supports the requested copy method. */ if (opt.copy_method == COPY_METHOD_CLONE) { diff --git a/src/bin/pg_resetwal/pg_resetwal.c b/src/bin/pg_resetwal/pg_resetwal.c index a89d72fc5cf..dd5d279521e 100644 --- a/src/bin/pg_resetwal/pg_resetwal.c +++ b/src/bin/pg_resetwal/pg_resetwal.c @@ -397,6 +397,10 @@ main(int argc, char *argv[]) exit(1); } + if (noupdate) + pg_log_info("Executing in dry-run mode.\n" + "Nothing will be modified."); + /* * Attempt to read the existing pg_control file */ diff --git a/src/bin/pg_rewind/pg_rewind.c b/src/bin/pg_rewind/pg_rewind.c index 27c514f934a..e9364d04f76 100644 --- a/src/bin/pg_rewind/pg_rewind.c +++ b/src/bin/pg_rewind/pg_rewind.c @@ -300,10 +300,12 @@ main(int argc, char **argv) atexit(disconnect_atexit); - /* - * Ok, we have all the options and we're ready to start. First, connect to - * remote server. - */ + /* Ok, we have all the options and we're ready to start. */ + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + + /* First, connect to remote server. */ if (connstr_source) { conn = PQconnectdb(connstr_source); -- 2.47.3 --ibfr3ah5qy6tcbhw-- ^ permalink raw reply [nested|flat] 190+ messages in thread
* [PATCH v5] Log a note at program start when running in dry-run mode @ 2025-11-11 08:54 Álvaro Herrera <[email protected]> 0 siblings, 0 replies; 190+ messages in thread From: Álvaro Herrera @ 2025-11-11 08:54 UTC (permalink / raw) Users might get some peace of mind knowing their data is not being destroyed or whatever. Author: Peter Smith <[email protected]> Reviewed-by: Álvaro Herrera <[email protected]> Discussion: https://postgr.es/m/CAHut+PsvQJQnQO0KT0S2oegenkvJ8FUuY-QS5syyqmT24R2xFQ@mail.gmail.com --- src/bin/pg_archivecleanup/pg_archivecleanup.c | 4 ++++ src/bin/pg_basebackup/pg_createsubscriber.c | 5 +++++ src/bin/pg_combinebackup/pg_combinebackup.c | 4 ++++ src/bin/pg_resetwal/pg_resetwal.c | 4 ++++ src/bin/pg_rewind/pg_rewind.c | 10 ++++++---- 5 files changed, 23 insertions(+), 4 deletions(-) diff --git a/src/bin/pg_archivecleanup/pg_archivecleanup.c b/src/bin/pg_archivecleanup/pg_archivecleanup.c index c25348bcb85..ab686b4748c 100644 --- a/src/bin/pg_archivecleanup/pg_archivecleanup.c +++ b/src/bin/pg_archivecleanup/pg_archivecleanup.c @@ -375,6 +375,10 @@ main(int argc, char **argv) exit(2); } + if (dryrun) + pg_log_info("Executing in dry-run mode.\n" + "No files will be removed."); + /* * Check archive exists and other initialization if required. */ diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c index df41836e70f..cc4be5d6ef4 100644 --- a/src/bin/pg_basebackup/pg_createsubscriber.c +++ b/src/bin/pg_basebackup/pg_createsubscriber.c @@ -2305,6 +2305,11 @@ main(int argc, char **argv) pg_log_error_hint("Try \"%s --help\" for more information.", progname); exit(1); } + + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + pg_log_info("validating publisher connection string"); pub_base_conninfo = get_base_conninfo(opt.pub_conninfo_str, &dbname_conninfo); diff --git a/src/bin/pg_combinebackup/pg_combinebackup.c b/src/bin/pg_combinebackup/pg_combinebackup.c index 3a325127209..c9bf0a9e105 100644 --- a/src/bin/pg_combinebackup/pg_combinebackup.c +++ b/src/bin/pg_combinebackup/pg_combinebackup.c @@ -242,6 +242,10 @@ main(int argc, char *argv[]) if (opt.no_manifest) opt.manifest_checksums = CHECKSUM_TYPE_NONE; + if (opt.dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + /* Check that the platform supports the requested copy method. */ if (opt.copy_method == COPY_METHOD_CLONE) { diff --git a/src/bin/pg_resetwal/pg_resetwal.c b/src/bin/pg_resetwal/pg_resetwal.c index a89d72fc5cf..dd5d279521e 100644 --- a/src/bin/pg_resetwal/pg_resetwal.c +++ b/src/bin/pg_resetwal/pg_resetwal.c @@ -397,6 +397,10 @@ main(int argc, char *argv[]) exit(1); } + if (noupdate) + pg_log_info("Executing in dry-run mode.\n" + "Nothing will be modified."); + /* * Attempt to read the existing pg_control file */ diff --git a/src/bin/pg_rewind/pg_rewind.c b/src/bin/pg_rewind/pg_rewind.c index 27c514f934a..e9364d04f76 100644 --- a/src/bin/pg_rewind/pg_rewind.c +++ b/src/bin/pg_rewind/pg_rewind.c @@ -300,10 +300,12 @@ main(int argc, char **argv) atexit(disconnect_atexit); - /* - * Ok, we have all the options and we're ready to start. First, connect to - * remote server. - */ + /* Ok, we have all the options and we're ready to start. */ + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + + /* First, connect to remote server. */ if (connstr_source) { conn = PQconnectdb(connstr_source); -- 2.47.3 --ibfr3ah5qy6tcbhw-- ^ permalink raw reply [nested|flat] 190+ messages in thread
* [PATCH v5] Log a note at program start when running in dry-run mode @ 2025-11-11 08:54 Álvaro Herrera <[email protected]> 0 siblings, 0 replies; 190+ messages in thread From: Álvaro Herrera @ 2025-11-11 08:54 UTC (permalink / raw) Users might get some peace of mind knowing their data is not being destroyed or whatever. Author: Peter Smith <[email protected]> Reviewed-by: Álvaro Herrera <[email protected]> Discussion: https://postgr.es/m/CAHut+PsvQJQnQO0KT0S2oegenkvJ8FUuY-QS5syyqmT24R2xFQ@mail.gmail.com --- src/bin/pg_archivecleanup/pg_archivecleanup.c | 4 ++++ src/bin/pg_basebackup/pg_createsubscriber.c | 5 +++++ src/bin/pg_combinebackup/pg_combinebackup.c | 4 ++++ src/bin/pg_resetwal/pg_resetwal.c | 4 ++++ src/bin/pg_rewind/pg_rewind.c | 10 ++++++---- 5 files changed, 23 insertions(+), 4 deletions(-) diff --git a/src/bin/pg_archivecleanup/pg_archivecleanup.c b/src/bin/pg_archivecleanup/pg_archivecleanup.c index c25348bcb85..ab686b4748c 100644 --- a/src/bin/pg_archivecleanup/pg_archivecleanup.c +++ b/src/bin/pg_archivecleanup/pg_archivecleanup.c @@ -375,6 +375,10 @@ main(int argc, char **argv) exit(2); } + if (dryrun) + pg_log_info("Executing in dry-run mode.\n" + "No files will be removed."); + /* * Check archive exists and other initialization if required. */ diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c index df41836e70f..cc4be5d6ef4 100644 --- a/src/bin/pg_basebackup/pg_createsubscriber.c +++ b/src/bin/pg_basebackup/pg_createsubscriber.c @@ -2305,6 +2305,11 @@ main(int argc, char **argv) pg_log_error_hint("Try \"%s --help\" for more information.", progname); exit(1); } + + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + pg_log_info("validating publisher connection string"); pub_base_conninfo = get_base_conninfo(opt.pub_conninfo_str, &dbname_conninfo); diff --git a/src/bin/pg_combinebackup/pg_combinebackup.c b/src/bin/pg_combinebackup/pg_combinebackup.c index 3a325127209..c9bf0a9e105 100644 --- a/src/bin/pg_combinebackup/pg_combinebackup.c +++ b/src/bin/pg_combinebackup/pg_combinebackup.c @@ -242,6 +242,10 @@ main(int argc, char *argv[]) if (opt.no_manifest) opt.manifest_checksums = CHECKSUM_TYPE_NONE; + if (opt.dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + /* Check that the platform supports the requested copy method. */ if (opt.copy_method == COPY_METHOD_CLONE) { diff --git a/src/bin/pg_resetwal/pg_resetwal.c b/src/bin/pg_resetwal/pg_resetwal.c index a89d72fc5cf..dd5d279521e 100644 --- a/src/bin/pg_resetwal/pg_resetwal.c +++ b/src/bin/pg_resetwal/pg_resetwal.c @@ -397,6 +397,10 @@ main(int argc, char *argv[]) exit(1); } + if (noupdate) + pg_log_info("Executing in dry-run mode.\n" + "Nothing will be modified."); + /* * Attempt to read the existing pg_control file */ diff --git a/src/bin/pg_rewind/pg_rewind.c b/src/bin/pg_rewind/pg_rewind.c index 27c514f934a..e9364d04f76 100644 --- a/src/bin/pg_rewind/pg_rewind.c +++ b/src/bin/pg_rewind/pg_rewind.c @@ -300,10 +300,12 @@ main(int argc, char **argv) atexit(disconnect_atexit); - /* - * Ok, we have all the options and we're ready to start. First, connect to - * remote server. - */ + /* Ok, we have all the options and we're ready to start. */ + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + + /* First, connect to remote server. */ if (connstr_source) { conn = PQconnectdb(connstr_source); -- 2.47.3 --ibfr3ah5qy6tcbhw-- ^ permalink raw reply [nested|flat] 190+ messages in thread
* [PATCH v5] Log a note at program start when running in dry-run mode @ 2025-11-11 08:54 Álvaro Herrera <[email protected]> 0 siblings, 0 replies; 190+ messages in thread From: Álvaro Herrera @ 2025-11-11 08:54 UTC (permalink / raw) Users might get some peace of mind knowing their data is not being destroyed or whatever. Author: Peter Smith <[email protected]> Reviewed-by: Álvaro Herrera <[email protected]> Discussion: https://postgr.es/m/CAHut+PsvQJQnQO0KT0S2oegenkvJ8FUuY-QS5syyqmT24R2xFQ@mail.gmail.com --- src/bin/pg_archivecleanup/pg_archivecleanup.c | 4 ++++ src/bin/pg_basebackup/pg_createsubscriber.c | 5 +++++ src/bin/pg_combinebackup/pg_combinebackup.c | 4 ++++ src/bin/pg_resetwal/pg_resetwal.c | 4 ++++ src/bin/pg_rewind/pg_rewind.c | 10 ++++++---- 5 files changed, 23 insertions(+), 4 deletions(-) diff --git a/src/bin/pg_archivecleanup/pg_archivecleanup.c b/src/bin/pg_archivecleanup/pg_archivecleanup.c index c25348bcb85..ab686b4748c 100644 --- a/src/bin/pg_archivecleanup/pg_archivecleanup.c +++ b/src/bin/pg_archivecleanup/pg_archivecleanup.c @@ -375,6 +375,10 @@ main(int argc, char **argv) exit(2); } + if (dryrun) + pg_log_info("Executing in dry-run mode.\n" + "No files will be removed."); + /* * Check archive exists and other initialization if required. */ diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c index df41836e70f..cc4be5d6ef4 100644 --- a/src/bin/pg_basebackup/pg_createsubscriber.c +++ b/src/bin/pg_basebackup/pg_createsubscriber.c @@ -2305,6 +2305,11 @@ main(int argc, char **argv) pg_log_error_hint("Try \"%s --help\" for more information.", progname); exit(1); } + + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + pg_log_info("validating publisher connection string"); pub_base_conninfo = get_base_conninfo(opt.pub_conninfo_str, &dbname_conninfo); diff --git a/src/bin/pg_combinebackup/pg_combinebackup.c b/src/bin/pg_combinebackup/pg_combinebackup.c index 3a325127209..c9bf0a9e105 100644 --- a/src/bin/pg_combinebackup/pg_combinebackup.c +++ b/src/bin/pg_combinebackup/pg_combinebackup.c @@ -242,6 +242,10 @@ main(int argc, char *argv[]) if (opt.no_manifest) opt.manifest_checksums = CHECKSUM_TYPE_NONE; + if (opt.dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + /* Check that the platform supports the requested copy method. */ if (opt.copy_method == COPY_METHOD_CLONE) { diff --git a/src/bin/pg_resetwal/pg_resetwal.c b/src/bin/pg_resetwal/pg_resetwal.c index a89d72fc5cf..dd5d279521e 100644 --- a/src/bin/pg_resetwal/pg_resetwal.c +++ b/src/bin/pg_resetwal/pg_resetwal.c @@ -397,6 +397,10 @@ main(int argc, char *argv[]) exit(1); } + if (noupdate) + pg_log_info("Executing in dry-run mode.\n" + "Nothing will be modified."); + /* * Attempt to read the existing pg_control file */ diff --git a/src/bin/pg_rewind/pg_rewind.c b/src/bin/pg_rewind/pg_rewind.c index 27c514f934a..e9364d04f76 100644 --- a/src/bin/pg_rewind/pg_rewind.c +++ b/src/bin/pg_rewind/pg_rewind.c @@ -300,10 +300,12 @@ main(int argc, char **argv) atexit(disconnect_atexit); - /* - * Ok, we have all the options and we're ready to start. First, connect to - * remote server. - */ + /* Ok, we have all the options and we're ready to start. */ + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + + /* First, connect to remote server. */ if (connstr_source) { conn = PQconnectdb(connstr_source); -- 2.47.3 --ibfr3ah5qy6tcbhw-- ^ permalink raw reply [nested|flat] 190+ messages in thread
* [PATCH v5] Log a note at program start when running in dry-run mode @ 2025-11-11 08:54 Álvaro Herrera <[email protected]> 0 siblings, 0 replies; 190+ messages in thread From: Álvaro Herrera @ 2025-11-11 08:54 UTC (permalink / raw) Users might get some peace of mind knowing their data is not being destroyed or whatever. Author: Peter Smith <[email protected]> Reviewed-by: Álvaro Herrera <[email protected]> Discussion: https://postgr.es/m/CAHut+PsvQJQnQO0KT0S2oegenkvJ8FUuY-QS5syyqmT24R2xFQ@mail.gmail.com --- src/bin/pg_archivecleanup/pg_archivecleanup.c | 4 ++++ src/bin/pg_basebackup/pg_createsubscriber.c | 5 +++++ src/bin/pg_combinebackup/pg_combinebackup.c | 4 ++++ src/bin/pg_resetwal/pg_resetwal.c | 4 ++++ src/bin/pg_rewind/pg_rewind.c | 10 ++++++---- 5 files changed, 23 insertions(+), 4 deletions(-) diff --git a/src/bin/pg_archivecleanup/pg_archivecleanup.c b/src/bin/pg_archivecleanup/pg_archivecleanup.c index c25348bcb85..ab686b4748c 100644 --- a/src/bin/pg_archivecleanup/pg_archivecleanup.c +++ b/src/bin/pg_archivecleanup/pg_archivecleanup.c @@ -375,6 +375,10 @@ main(int argc, char **argv) exit(2); } + if (dryrun) + pg_log_info("Executing in dry-run mode.\n" + "No files will be removed."); + /* * Check archive exists and other initialization if required. */ diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c index df41836e70f..cc4be5d6ef4 100644 --- a/src/bin/pg_basebackup/pg_createsubscriber.c +++ b/src/bin/pg_basebackup/pg_createsubscriber.c @@ -2305,6 +2305,11 @@ main(int argc, char **argv) pg_log_error_hint("Try \"%s --help\" for more information.", progname); exit(1); } + + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + pg_log_info("validating publisher connection string"); pub_base_conninfo = get_base_conninfo(opt.pub_conninfo_str, &dbname_conninfo); diff --git a/src/bin/pg_combinebackup/pg_combinebackup.c b/src/bin/pg_combinebackup/pg_combinebackup.c index 3a325127209..c9bf0a9e105 100644 --- a/src/bin/pg_combinebackup/pg_combinebackup.c +++ b/src/bin/pg_combinebackup/pg_combinebackup.c @@ -242,6 +242,10 @@ main(int argc, char *argv[]) if (opt.no_manifest) opt.manifest_checksums = CHECKSUM_TYPE_NONE; + if (opt.dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + /* Check that the platform supports the requested copy method. */ if (opt.copy_method == COPY_METHOD_CLONE) { diff --git a/src/bin/pg_resetwal/pg_resetwal.c b/src/bin/pg_resetwal/pg_resetwal.c index a89d72fc5cf..dd5d279521e 100644 --- a/src/bin/pg_resetwal/pg_resetwal.c +++ b/src/bin/pg_resetwal/pg_resetwal.c @@ -397,6 +397,10 @@ main(int argc, char *argv[]) exit(1); } + if (noupdate) + pg_log_info("Executing in dry-run mode.\n" + "Nothing will be modified."); + /* * Attempt to read the existing pg_control file */ diff --git a/src/bin/pg_rewind/pg_rewind.c b/src/bin/pg_rewind/pg_rewind.c index 27c514f934a..e9364d04f76 100644 --- a/src/bin/pg_rewind/pg_rewind.c +++ b/src/bin/pg_rewind/pg_rewind.c @@ -300,10 +300,12 @@ main(int argc, char **argv) atexit(disconnect_atexit); - /* - * Ok, we have all the options and we're ready to start. First, connect to - * remote server. - */ + /* Ok, we have all the options and we're ready to start. */ + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + + /* First, connect to remote server. */ if (connstr_source) { conn = PQconnectdb(connstr_source); -- 2.47.3 --ibfr3ah5qy6tcbhw-- ^ permalink raw reply [nested|flat] 190+ messages in thread
* [PATCH v5] Log a note at program start when running in dry-run mode @ 2025-11-11 08:54 Álvaro Herrera <[email protected]> 0 siblings, 0 replies; 190+ messages in thread From: Álvaro Herrera @ 2025-11-11 08:54 UTC (permalink / raw) Users might get some peace of mind knowing their data is not being destroyed or whatever. Author: Peter Smith <[email protected]> Reviewed-by: Álvaro Herrera <[email protected]> Discussion: https://postgr.es/m/CAHut+PsvQJQnQO0KT0S2oegenkvJ8FUuY-QS5syyqmT24R2xFQ@mail.gmail.com --- src/bin/pg_archivecleanup/pg_archivecleanup.c | 4 ++++ src/bin/pg_basebackup/pg_createsubscriber.c | 5 +++++ src/bin/pg_combinebackup/pg_combinebackup.c | 4 ++++ src/bin/pg_resetwal/pg_resetwal.c | 4 ++++ src/bin/pg_rewind/pg_rewind.c | 10 ++++++---- 5 files changed, 23 insertions(+), 4 deletions(-) diff --git a/src/bin/pg_archivecleanup/pg_archivecleanup.c b/src/bin/pg_archivecleanup/pg_archivecleanup.c index c25348bcb85..ab686b4748c 100644 --- a/src/bin/pg_archivecleanup/pg_archivecleanup.c +++ b/src/bin/pg_archivecleanup/pg_archivecleanup.c @@ -375,6 +375,10 @@ main(int argc, char **argv) exit(2); } + if (dryrun) + pg_log_info("Executing in dry-run mode.\n" + "No files will be removed."); + /* * Check archive exists and other initialization if required. */ diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c index df41836e70f..cc4be5d6ef4 100644 --- a/src/bin/pg_basebackup/pg_createsubscriber.c +++ b/src/bin/pg_basebackup/pg_createsubscriber.c @@ -2305,6 +2305,11 @@ main(int argc, char **argv) pg_log_error_hint("Try \"%s --help\" for more information.", progname); exit(1); } + + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + pg_log_info("validating publisher connection string"); pub_base_conninfo = get_base_conninfo(opt.pub_conninfo_str, &dbname_conninfo); diff --git a/src/bin/pg_combinebackup/pg_combinebackup.c b/src/bin/pg_combinebackup/pg_combinebackup.c index 3a325127209..c9bf0a9e105 100644 --- a/src/bin/pg_combinebackup/pg_combinebackup.c +++ b/src/bin/pg_combinebackup/pg_combinebackup.c @@ -242,6 +242,10 @@ main(int argc, char *argv[]) if (opt.no_manifest) opt.manifest_checksums = CHECKSUM_TYPE_NONE; + if (opt.dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + /* Check that the platform supports the requested copy method. */ if (opt.copy_method == COPY_METHOD_CLONE) { diff --git a/src/bin/pg_resetwal/pg_resetwal.c b/src/bin/pg_resetwal/pg_resetwal.c index a89d72fc5cf..dd5d279521e 100644 --- a/src/bin/pg_resetwal/pg_resetwal.c +++ b/src/bin/pg_resetwal/pg_resetwal.c @@ -397,6 +397,10 @@ main(int argc, char *argv[]) exit(1); } + if (noupdate) + pg_log_info("Executing in dry-run mode.\n" + "Nothing will be modified."); + /* * Attempt to read the existing pg_control file */ diff --git a/src/bin/pg_rewind/pg_rewind.c b/src/bin/pg_rewind/pg_rewind.c index 27c514f934a..e9364d04f76 100644 --- a/src/bin/pg_rewind/pg_rewind.c +++ b/src/bin/pg_rewind/pg_rewind.c @@ -300,10 +300,12 @@ main(int argc, char **argv) atexit(disconnect_atexit); - /* - * Ok, we have all the options and we're ready to start. First, connect to - * remote server. - */ + /* Ok, we have all the options and we're ready to start. */ + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + + /* First, connect to remote server. */ if (connstr_source) { conn = PQconnectdb(connstr_source); -- 2.47.3 --ibfr3ah5qy6tcbhw-- ^ permalink raw reply [nested|flat] 190+ messages in thread
* [PATCH v5] Log a note at program start when running in dry-run mode @ 2025-11-11 08:54 Álvaro Herrera <[email protected]> 0 siblings, 0 replies; 190+ messages in thread From: Álvaro Herrera @ 2025-11-11 08:54 UTC (permalink / raw) Users might get some peace of mind knowing their data is not being destroyed or whatever. Author: Peter Smith <[email protected]> Reviewed-by: Álvaro Herrera <[email protected]> Discussion: https://postgr.es/m/CAHut+PsvQJQnQO0KT0S2oegenkvJ8FUuY-QS5syyqmT24R2xFQ@mail.gmail.com --- src/bin/pg_archivecleanup/pg_archivecleanup.c | 4 ++++ src/bin/pg_basebackup/pg_createsubscriber.c | 5 +++++ src/bin/pg_combinebackup/pg_combinebackup.c | 4 ++++ src/bin/pg_resetwal/pg_resetwal.c | 4 ++++ src/bin/pg_rewind/pg_rewind.c | 10 ++++++---- 5 files changed, 23 insertions(+), 4 deletions(-) diff --git a/src/bin/pg_archivecleanup/pg_archivecleanup.c b/src/bin/pg_archivecleanup/pg_archivecleanup.c index c25348bcb85..ab686b4748c 100644 --- a/src/bin/pg_archivecleanup/pg_archivecleanup.c +++ b/src/bin/pg_archivecleanup/pg_archivecleanup.c @@ -375,6 +375,10 @@ main(int argc, char **argv) exit(2); } + if (dryrun) + pg_log_info("Executing in dry-run mode.\n" + "No files will be removed."); + /* * Check archive exists and other initialization if required. */ diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c index df41836e70f..cc4be5d6ef4 100644 --- a/src/bin/pg_basebackup/pg_createsubscriber.c +++ b/src/bin/pg_basebackup/pg_createsubscriber.c @@ -2305,6 +2305,11 @@ main(int argc, char **argv) pg_log_error_hint("Try \"%s --help\" for more information.", progname); exit(1); } + + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + pg_log_info("validating publisher connection string"); pub_base_conninfo = get_base_conninfo(opt.pub_conninfo_str, &dbname_conninfo); diff --git a/src/bin/pg_combinebackup/pg_combinebackup.c b/src/bin/pg_combinebackup/pg_combinebackup.c index 3a325127209..c9bf0a9e105 100644 --- a/src/bin/pg_combinebackup/pg_combinebackup.c +++ b/src/bin/pg_combinebackup/pg_combinebackup.c @@ -242,6 +242,10 @@ main(int argc, char *argv[]) if (opt.no_manifest) opt.manifest_checksums = CHECKSUM_TYPE_NONE; + if (opt.dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + /* Check that the platform supports the requested copy method. */ if (opt.copy_method == COPY_METHOD_CLONE) { diff --git a/src/bin/pg_resetwal/pg_resetwal.c b/src/bin/pg_resetwal/pg_resetwal.c index a89d72fc5cf..dd5d279521e 100644 --- a/src/bin/pg_resetwal/pg_resetwal.c +++ b/src/bin/pg_resetwal/pg_resetwal.c @@ -397,6 +397,10 @@ main(int argc, char *argv[]) exit(1); } + if (noupdate) + pg_log_info("Executing in dry-run mode.\n" + "Nothing will be modified."); + /* * Attempt to read the existing pg_control file */ diff --git a/src/bin/pg_rewind/pg_rewind.c b/src/bin/pg_rewind/pg_rewind.c index 27c514f934a..e9364d04f76 100644 --- a/src/bin/pg_rewind/pg_rewind.c +++ b/src/bin/pg_rewind/pg_rewind.c @@ -300,10 +300,12 @@ main(int argc, char **argv) atexit(disconnect_atexit); - /* - * Ok, we have all the options and we're ready to start. First, connect to - * remote server. - */ + /* Ok, we have all the options and we're ready to start. */ + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + + /* First, connect to remote server. */ if (connstr_source) { conn = PQconnectdb(connstr_source); -- 2.47.3 --ibfr3ah5qy6tcbhw-- ^ permalink raw reply [nested|flat] 190+ messages in thread
* [PATCH v5] Log a note at program start when running in dry-run mode @ 2025-11-11 08:54 Álvaro Herrera <[email protected]> 0 siblings, 0 replies; 190+ messages in thread From: Álvaro Herrera @ 2025-11-11 08:54 UTC (permalink / raw) Users might get some peace of mind knowing their data is not being destroyed or whatever. Author: Peter Smith <[email protected]> Reviewed-by: Álvaro Herrera <[email protected]> Discussion: https://postgr.es/m/CAHut+PsvQJQnQO0KT0S2oegenkvJ8FUuY-QS5syyqmT24R2xFQ@mail.gmail.com --- src/bin/pg_archivecleanup/pg_archivecleanup.c | 4 ++++ src/bin/pg_basebackup/pg_createsubscriber.c | 5 +++++ src/bin/pg_combinebackup/pg_combinebackup.c | 4 ++++ src/bin/pg_resetwal/pg_resetwal.c | 4 ++++ src/bin/pg_rewind/pg_rewind.c | 10 ++++++---- 5 files changed, 23 insertions(+), 4 deletions(-) diff --git a/src/bin/pg_archivecleanup/pg_archivecleanup.c b/src/bin/pg_archivecleanup/pg_archivecleanup.c index c25348bcb85..ab686b4748c 100644 --- a/src/bin/pg_archivecleanup/pg_archivecleanup.c +++ b/src/bin/pg_archivecleanup/pg_archivecleanup.c @@ -375,6 +375,10 @@ main(int argc, char **argv) exit(2); } + if (dryrun) + pg_log_info("Executing in dry-run mode.\n" + "No files will be removed."); + /* * Check archive exists and other initialization if required. */ diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c index df41836e70f..cc4be5d6ef4 100644 --- a/src/bin/pg_basebackup/pg_createsubscriber.c +++ b/src/bin/pg_basebackup/pg_createsubscriber.c @@ -2305,6 +2305,11 @@ main(int argc, char **argv) pg_log_error_hint("Try \"%s --help\" for more information.", progname); exit(1); } + + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + pg_log_info("validating publisher connection string"); pub_base_conninfo = get_base_conninfo(opt.pub_conninfo_str, &dbname_conninfo); diff --git a/src/bin/pg_combinebackup/pg_combinebackup.c b/src/bin/pg_combinebackup/pg_combinebackup.c index 3a325127209..c9bf0a9e105 100644 --- a/src/bin/pg_combinebackup/pg_combinebackup.c +++ b/src/bin/pg_combinebackup/pg_combinebackup.c @@ -242,6 +242,10 @@ main(int argc, char *argv[]) if (opt.no_manifest) opt.manifest_checksums = CHECKSUM_TYPE_NONE; + if (opt.dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + /* Check that the platform supports the requested copy method. */ if (opt.copy_method == COPY_METHOD_CLONE) { diff --git a/src/bin/pg_resetwal/pg_resetwal.c b/src/bin/pg_resetwal/pg_resetwal.c index a89d72fc5cf..dd5d279521e 100644 --- a/src/bin/pg_resetwal/pg_resetwal.c +++ b/src/bin/pg_resetwal/pg_resetwal.c @@ -397,6 +397,10 @@ main(int argc, char *argv[]) exit(1); } + if (noupdate) + pg_log_info("Executing in dry-run mode.\n" + "Nothing will be modified."); + /* * Attempt to read the existing pg_control file */ diff --git a/src/bin/pg_rewind/pg_rewind.c b/src/bin/pg_rewind/pg_rewind.c index 27c514f934a..e9364d04f76 100644 --- a/src/bin/pg_rewind/pg_rewind.c +++ b/src/bin/pg_rewind/pg_rewind.c @@ -300,10 +300,12 @@ main(int argc, char **argv) atexit(disconnect_atexit); - /* - * Ok, we have all the options and we're ready to start. First, connect to - * remote server. - */ + /* Ok, we have all the options and we're ready to start. */ + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + + /* First, connect to remote server. */ if (connstr_source) { conn = PQconnectdb(connstr_source); -- 2.47.3 --ibfr3ah5qy6tcbhw-- ^ permalink raw reply [nested|flat] 190+ messages in thread
* [PATCH v5] Log a note at program start when running in dry-run mode @ 2025-11-11 08:54 Álvaro Herrera <[email protected]> 0 siblings, 0 replies; 190+ messages in thread From: Álvaro Herrera @ 2025-11-11 08:54 UTC (permalink / raw) Users might get some peace of mind knowing their data is not being destroyed or whatever. Author: Peter Smith <[email protected]> Reviewed-by: Álvaro Herrera <[email protected]> Discussion: https://postgr.es/m/CAHut+PsvQJQnQO0KT0S2oegenkvJ8FUuY-QS5syyqmT24R2xFQ@mail.gmail.com --- src/bin/pg_archivecleanup/pg_archivecleanup.c | 4 ++++ src/bin/pg_basebackup/pg_createsubscriber.c | 5 +++++ src/bin/pg_combinebackup/pg_combinebackup.c | 4 ++++ src/bin/pg_resetwal/pg_resetwal.c | 4 ++++ src/bin/pg_rewind/pg_rewind.c | 10 ++++++---- 5 files changed, 23 insertions(+), 4 deletions(-) diff --git a/src/bin/pg_archivecleanup/pg_archivecleanup.c b/src/bin/pg_archivecleanup/pg_archivecleanup.c index c25348bcb85..ab686b4748c 100644 --- a/src/bin/pg_archivecleanup/pg_archivecleanup.c +++ b/src/bin/pg_archivecleanup/pg_archivecleanup.c @@ -375,6 +375,10 @@ main(int argc, char **argv) exit(2); } + if (dryrun) + pg_log_info("Executing in dry-run mode.\n" + "No files will be removed."); + /* * Check archive exists and other initialization if required. */ diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c index df41836e70f..cc4be5d6ef4 100644 --- a/src/bin/pg_basebackup/pg_createsubscriber.c +++ b/src/bin/pg_basebackup/pg_createsubscriber.c @@ -2305,6 +2305,11 @@ main(int argc, char **argv) pg_log_error_hint("Try \"%s --help\" for more information.", progname); exit(1); } + + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + pg_log_info("validating publisher connection string"); pub_base_conninfo = get_base_conninfo(opt.pub_conninfo_str, &dbname_conninfo); diff --git a/src/bin/pg_combinebackup/pg_combinebackup.c b/src/bin/pg_combinebackup/pg_combinebackup.c index 3a325127209..c9bf0a9e105 100644 --- a/src/bin/pg_combinebackup/pg_combinebackup.c +++ b/src/bin/pg_combinebackup/pg_combinebackup.c @@ -242,6 +242,10 @@ main(int argc, char *argv[]) if (opt.no_manifest) opt.manifest_checksums = CHECKSUM_TYPE_NONE; + if (opt.dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + /* Check that the platform supports the requested copy method. */ if (opt.copy_method == COPY_METHOD_CLONE) { diff --git a/src/bin/pg_resetwal/pg_resetwal.c b/src/bin/pg_resetwal/pg_resetwal.c index a89d72fc5cf..dd5d279521e 100644 --- a/src/bin/pg_resetwal/pg_resetwal.c +++ b/src/bin/pg_resetwal/pg_resetwal.c @@ -397,6 +397,10 @@ main(int argc, char *argv[]) exit(1); } + if (noupdate) + pg_log_info("Executing in dry-run mode.\n" + "Nothing will be modified."); + /* * Attempt to read the existing pg_control file */ diff --git a/src/bin/pg_rewind/pg_rewind.c b/src/bin/pg_rewind/pg_rewind.c index 27c514f934a..e9364d04f76 100644 --- a/src/bin/pg_rewind/pg_rewind.c +++ b/src/bin/pg_rewind/pg_rewind.c @@ -300,10 +300,12 @@ main(int argc, char **argv) atexit(disconnect_atexit); - /* - * Ok, we have all the options and we're ready to start. First, connect to - * remote server. - */ + /* Ok, we have all the options and we're ready to start. */ + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + + /* First, connect to remote server. */ if (connstr_source) { conn = PQconnectdb(connstr_source); -- 2.47.3 --ibfr3ah5qy6tcbhw-- ^ permalink raw reply [nested|flat] 190+ messages in thread
* [PATCH v5] Log a note at program start when running in dry-run mode @ 2025-11-11 08:54 Álvaro Herrera <[email protected]> 0 siblings, 0 replies; 190+ messages in thread From: Álvaro Herrera @ 2025-11-11 08:54 UTC (permalink / raw) Users might get some peace of mind knowing their data is not being destroyed or whatever. Author: Peter Smith <[email protected]> Reviewed-by: Álvaro Herrera <[email protected]> Discussion: https://postgr.es/m/CAHut+PsvQJQnQO0KT0S2oegenkvJ8FUuY-QS5syyqmT24R2xFQ@mail.gmail.com --- src/bin/pg_archivecleanup/pg_archivecleanup.c | 4 ++++ src/bin/pg_basebackup/pg_createsubscriber.c | 5 +++++ src/bin/pg_combinebackup/pg_combinebackup.c | 4 ++++ src/bin/pg_resetwal/pg_resetwal.c | 4 ++++ src/bin/pg_rewind/pg_rewind.c | 10 ++++++---- 5 files changed, 23 insertions(+), 4 deletions(-) diff --git a/src/bin/pg_archivecleanup/pg_archivecleanup.c b/src/bin/pg_archivecleanup/pg_archivecleanup.c index c25348bcb85..ab686b4748c 100644 --- a/src/bin/pg_archivecleanup/pg_archivecleanup.c +++ b/src/bin/pg_archivecleanup/pg_archivecleanup.c @@ -375,6 +375,10 @@ main(int argc, char **argv) exit(2); } + if (dryrun) + pg_log_info("Executing in dry-run mode.\n" + "No files will be removed."); + /* * Check archive exists and other initialization if required. */ diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c index df41836e70f..cc4be5d6ef4 100644 --- a/src/bin/pg_basebackup/pg_createsubscriber.c +++ b/src/bin/pg_basebackup/pg_createsubscriber.c @@ -2305,6 +2305,11 @@ main(int argc, char **argv) pg_log_error_hint("Try \"%s --help\" for more information.", progname); exit(1); } + + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + pg_log_info("validating publisher connection string"); pub_base_conninfo = get_base_conninfo(opt.pub_conninfo_str, &dbname_conninfo); diff --git a/src/bin/pg_combinebackup/pg_combinebackup.c b/src/bin/pg_combinebackup/pg_combinebackup.c index 3a325127209..c9bf0a9e105 100644 --- a/src/bin/pg_combinebackup/pg_combinebackup.c +++ b/src/bin/pg_combinebackup/pg_combinebackup.c @@ -242,6 +242,10 @@ main(int argc, char *argv[]) if (opt.no_manifest) opt.manifest_checksums = CHECKSUM_TYPE_NONE; + if (opt.dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + /* Check that the platform supports the requested copy method. */ if (opt.copy_method == COPY_METHOD_CLONE) { diff --git a/src/bin/pg_resetwal/pg_resetwal.c b/src/bin/pg_resetwal/pg_resetwal.c index a89d72fc5cf..dd5d279521e 100644 --- a/src/bin/pg_resetwal/pg_resetwal.c +++ b/src/bin/pg_resetwal/pg_resetwal.c @@ -397,6 +397,10 @@ main(int argc, char *argv[]) exit(1); } + if (noupdate) + pg_log_info("Executing in dry-run mode.\n" + "Nothing will be modified."); + /* * Attempt to read the existing pg_control file */ diff --git a/src/bin/pg_rewind/pg_rewind.c b/src/bin/pg_rewind/pg_rewind.c index 27c514f934a..e9364d04f76 100644 --- a/src/bin/pg_rewind/pg_rewind.c +++ b/src/bin/pg_rewind/pg_rewind.c @@ -300,10 +300,12 @@ main(int argc, char **argv) atexit(disconnect_atexit); - /* - * Ok, we have all the options and we're ready to start. First, connect to - * remote server. - */ + /* Ok, we have all the options and we're ready to start. */ + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + + /* First, connect to remote server. */ if (connstr_source) { conn = PQconnectdb(connstr_source); -- 2.47.3 --ibfr3ah5qy6tcbhw-- ^ permalink raw reply [nested|flat] 190+ messages in thread
* [PATCH v5] Log a note at program start when running in dry-run mode @ 2025-11-11 08:54 Álvaro Herrera <[email protected]> 0 siblings, 0 replies; 190+ messages in thread From: Álvaro Herrera @ 2025-11-11 08:54 UTC (permalink / raw) Users might get some peace of mind knowing their data is not being destroyed or whatever. Author: Peter Smith <[email protected]> Reviewed-by: Álvaro Herrera <[email protected]> Discussion: https://postgr.es/m/CAHut+PsvQJQnQO0KT0S2oegenkvJ8FUuY-QS5syyqmT24R2xFQ@mail.gmail.com --- src/bin/pg_archivecleanup/pg_archivecleanup.c | 4 ++++ src/bin/pg_basebackup/pg_createsubscriber.c | 5 +++++ src/bin/pg_combinebackup/pg_combinebackup.c | 4 ++++ src/bin/pg_resetwal/pg_resetwal.c | 4 ++++ src/bin/pg_rewind/pg_rewind.c | 10 ++++++---- 5 files changed, 23 insertions(+), 4 deletions(-) diff --git a/src/bin/pg_archivecleanup/pg_archivecleanup.c b/src/bin/pg_archivecleanup/pg_archivecleanup.c index c25348bcb85..ab686b4748c 100644 --- a/src/bin/pg_archivecleanup/pg_archivecleanup.c +++ b/src/bin/pg_archivecleanup/pg_archivecleanup.c @@ -375,6 +375,10 @@ main(int argc, char **argv) exit(2); } + if (dryrun) + pg_log_info("Executing in dry-run mode.\n" + "No files will be removed."); + /* * Check archive exists and other initialization if required. */ diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c index df41836e70f..cc4be5d6ef4 100644 --- a/src/bin/pg_basebackup/pg_createsubscriber.c +++ b/src/bin/pg_basebackup/pg_createsubscriber.c @@ -2305,6 +2305,11 @@ main(int argc, char **argv) pg_log_error_hint("Try \"%s --help\" for more information.", progname); exit(1); } + + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + pg_log_info("validating publisher connection string"); pub_base_conninfo = get_base_conninfo(opt.pub_conninfo_str, &dbname_conninfo); diff --git a/src/bin/pg_combinebackup/pg_combinebackup.c b/src/bin/pg_combinebackup/pg_combinebackup.c index 3a325127209..c9bf0a9e105 100644 --- a/src/bin/pg_combinebackup/pg_combinebackup.c +++ b/src/bin/pg_combinebackup/pg_combinebackup.c @@ -242,6 +242,10 @@ main(int argc, char *argv[]) if (opt.no_manifest) opt.manifest_checksums = CHECKSUM_TYPE_NONE; + if (opt.dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + /* Check that the platform supports the requested copy method. */ if (opt.copy_method == COPY_METHOD_CLONE) { diff --git a/src/bin/pg_resetwal/pg_resetwal.c b/src/bin/pg_resetwal/pg_resetwal.c index a89d72fc5cf..dd5d279521e 100644 --- a/src/bin/pg_resetwal/pg_resetwal.c +++ b/src/bin/pg_resetwal/pg_resetwal.c @@ -397,6 +397,10 @@ main(int argc, char *argv[]) exit(1); } + if (noupdate) + pg_log_info("Executing in dry-run mode.\n" + "Nothing will be modified."); + /* * Attempt to read the existing pg_control file */ diff --git a/src/bin/pg_rewind/pg_rewind.c b/src/bin/pg_rewind/pg_rewind.c index 27c514f934a..e9364d04f76 100644 --- a/src/bin/pg_rewind/pg_rewind.c +++ b/src/bin/pg_rewind/pg_rewind.c @@ -300,10 +300,12 @@ main(int argc, char **argv) atexit(disconnect_atexit); - /* - * Ok, we have all the options and we're ready to start. First, connect to - * remote server. - */ + /* Ok, we have all the options and we're ready to start. */ + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + + /* First, connect to remote server. */ if (connstr_source) { conn = PQconnectdb(connstr_source); -- 2.47.3 --ibfr3ah5qy6tcbhw-- ^ permalink raw reply [nested|flat] 190+ messages in thread
* [PATCH v5] Log a note at program start when running in dry-run mode @ 2025-11-11 08:54 Álvaro Herrera <[email protected]> 0 siblings, 0 replies; 190+ messages in thread From: Álvaro Herrera @ 2025-11-11 08:54 UTC (permalink / raw) Users might get some peace of mind knowing their data is not being destroyed or whatever. Author: Peter Smith <[email protected]> Reviewed-by: Álvaro Herrera <[email protected]> Discussion: https://postgr.es/m/CAHut+PsvQJQnQO0KT0S2oegenkvJ8FUuY-QS5syyqmT24R2xFQ@mail.gmail.com --- src/bin/pg_archivecleanup/pg_archivecleanup.c | 4 ++++ src/bin/pg_basebackup/pg_createsubscriber.c | 5 +++++ src/bin/pg_combinebackup/pg_combinebackup.c | 4 ++++ src/bin/pg_resetwal/pg_resetwal.c | 4 ++++ src/bin/pg_rewind/pg_rewind.c | 10 ++++++---- 5 files changed, 23 insertions(+), 4 deletions(-) diff --git a/src/bin/pg_archivecleanup/pg_archivecleanup.c b/src/bin/pg_archivecleanup/pg_archivecleanup.c index c25348bcb85..ab686b4748c 100644 --- a/src/bin/pg_archivecleanup/pg_archivecleanup.c +++ b/src/bin/pg_archivecleanup/pg_archivecleanup.c @@ -375,6 +375,10 @@ main(int argc, char **argv) exit(2); } + if (dryrun) + pg_log_info("Executing in dry-run mode.\n" + "No files will be removed."); + /* * Check archive exists and other initialization if required. */ diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c index df41836e70f..cc4be5d6ef4 100644 --- a/src/bin/pg_basebackup/pg_createsubscriber.c +++ b/src/bin/pg_basebackup/pg_createsubscriber.c @@ -2305,6 +2305,11 @@ main(int argc, char **argv) pg_log_error_hint("Try \"%s --help\" for more information.", progname); exit(1); } + + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + pg_log_info("validating publisher connection string"); pub_base_conninfo = get_base_conninfo(opt.pub_conninfo_str, &dbname_conninfo); diff --git a/src/bin/pg_combinebackup/pg_combinebackup.c b/src/bin/pg_combinebackup/pg_combinebackup.c index 3a325127209..c9bf0a9e105 100644 --- a/src/bin/pg_combinebackup/pg_combinebackup.c +++ b/src/bin/pg_combinebackup/pg_combinebackup.c @@ -242,6 +242,10 @@ main(int argc, char *argv[]) if (opt.no_manifest) opt.manifest_checksums = CHECKSUM_TYPE_NONE; + if (opt.dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + /* Check that the platform supports the requested copy method. */ if (opt.copy_method == COPY_METHOD_CLONE) { diff --git a/src/bin/pg_resetwal/pg_resetwal.c b/src/bin/pg_resetwal/pg_resetwal.c index a89d72fc5cf..dd5d279521e 100644 --- a/src/bin/pg_resetwal/pg_resetwal.c +++ b/src/bin/pg_resetwal/pg_resetwal.c @@ -397,6 +397,10 @@ main(int argc, char *argv[]) exit(1); } + if (noupdate) + pg_log_info("Executing in dry-run mode.\n" + "Nothing will be modified."); + /* * Attempt to read the existing pg_control file */ diff --git a/src/bin/pg_rewind/pg_rewind.c b/src/bin/pg_rewind/pg_rewind.c index 27c514f934a..e9364d04f76 100644 --- a/src/bin/pg_rewind/pg_rewind.c +++ b/src/bin/pg_rewind/pg_rewind.c @@ -300,10 +300,12 @@ main(int argc, char **argv) atexit(disconnect_atexit); - /* - * Ok, we have all the options and we're ready to start. First, connect to - * remote server. - */ + /* Ok, we have all the options and we're ready to start. */ + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + + /* First, connect to remote server. */ if (connstr_source) { conn = PQconnectdb(connstr_source); -- 2.47.3 --ibfr3ah5qy6tcbhw-- ^ permalink raw reply [nested|flat] 190+ messages in thread
* [PATCH v5] Log a note at program start when running in dry-run mode @ 2025-11-11 08:54 Álvaro Herrera <[email protected]> 0 siblings, 0 replies; 190+ messages in thread From: Álvaro Herrera @ 2025-11-11 08:54 UTC (permalink / raw) Users might get some peace of mind knowing their data is not being destroyed or whatever. Author: Peter Smith <[email protected]> Reviewed-by: Álvaro Herrera <[email protected]> Discussion: https://postgr.es/m/CAHut+PsvQJQnQO0KT0S2oegenkvJ8FUuY-QS5syyqmT24R2xFQ@mail.gmail.com --- src/bin/pg_archivecleanup/pg_archivecleanup.c | 4 ++++ src/bin/pg_basebackup/pg_createsubscriber.c | 5 +++++ src/bin/pg_combinebackup/pg_combinebackup.c | 4 ++++ src/bin/pg_resetwal/pg_resetwal.c | 4 ++++ src/bin/pg_rewind/pg_rewind.c | 10 ++++++---- 5 files changed, 23 insertions(+), 4 deletions(-) diff --git a/src/bin/pg_archivecleanup/pg_archivecleanup.c b/src/bin/pg_archivecleanup/pg_archivecleanup.c index c25348bcb85..ab686b4748c 100644 --- a/src/bin/pg_archivecleanup/pg_archivecleanup.c +++ b/src/bin/pg_archivecleanup/pg_archivecleanup.c @@ -375,6 +375,10 @@ main(int argc, char **argv) exit(2); } + if (dryrun) + pg_log_info("Executing in dry-run mode.\n" + "No files will be removed."); + /* * Check archive exists and other initialization if required. */ diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c index df41836e70f..cc4be5d6ef4 100644 --- a/src/bin/pg_basebackup/pg_createsubscriber.c +++ b/src/bin/pg_basebackup/pg_createsubscriber.c @@ -2305,6 +2305,11 @@ main(int argc, char **argv) pg_log_error_hint("Try \"%s --help\" for more information.", progname); exit(1); } + + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + pg_log_info("validating publisher connection string"); pub_base_conninfo = get_base_conninfo(opt.pub_conninfo_str, &dbname_conninfo); diff --git a/src/bin/pg_combinebackup/pg_combinebackup.c b/src/bin/pg_combinebackup/pg_combinebackup.c index 3a325127209..c9bf0a9e105 100644 --- a/src/bin/pg_combinebackup/pg_combinebackup.c +++ b/src/bin/pg_combinebackup/pg_combinebackup.c @@ -242,6 +242,10 @@ main(int argc, char *argv[]) if (opt.no_manifest) opt.manifest_checksums = CHECKSUM_TYPE_NONE; + if (opt.dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + /* Check that the platform supports the requested copy method. */ if (opt.copy_method == COPY_METHOD_CLONE) { diff --git a/src/bin/pg_resetwal/pg_resetwal.c b/src/bin/pg_resetwal/pg_resetwal.c index a89d72fc5cf..dd5d279521e 100644 --- a/src/bin/pg_resetwal/pg_resetwal.c +++ b/src/bin/pg_resetwal/pg_resetwal.c @@ -397,6 +397,10 @@ main(int argc, char *argv[]) exit(1); } + if (noupdate) + pg_log_info("Executing in dry-run mode.\n" + "Nothing will be modified."); + /* * Attempt to read the existing pg_control file */ diff --git a/src/bin/pg_rewind/pg_rewind.c b/src/bin/pg_rewind/pg_rewind.c index 27c514f934a..e9364d04f76 100644 --- a/src/bin/pg_rewind/pg_rewind.c +++ b/src/bin/pg_rewind/pg_rewind.c @@ -300,10 +300,12 @@ main(int argc, char **argv) atexit(disconnect_atexit); - /* - * Ok, we have all the options and we're ready to start. First, connect to - * remote server. - */ + /* Ok, we have all the options and we're ready to start. */ + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + + /* First, connect to remote server. */ if (connstr_source) { conn = PQconnectdb(connstr_source); -- 2.47.3 --ibfr3ah5qy6tcbhw-- ^ permalink raw reply [nested|flat] 190+ messages in thread
* [PATCH v5] Log a note at program start when running in dry-run mode @ 2025-11-11 08:54 Álvaro Herrera <[email protected]> 0 siblings, 0 replies; 190+ messages in thread From: Álvaro Herrera @ 2025-11-11 08:54 UTC (permalink / raw) Users might get some peace of mind knowing their data is not being destroyed or whatever. Author: Peter Smith <[email protected]> Reviewed-by: Álvaro Herrera <[email protected]> Discussion: https://postgr.es/m/CAHut+PsvQJQnQO0KT0S2oegenkvJ8FUuY-QS5syyqmT24R2xFQ@mail.gmail.com --- src/bin/pg_archivecleanup/pg_archivecleanup.c | 4 ++++ src/bin/pg_basebackup/pg_createsubscriber.c | 5 +++++ src/bin/pg_combinebackup/pg_combinebackup.c | 4 ++++ src/bin/pg_resetwal/pg_resetwal.c | 4 ++++ src/bin/pg_rewind/pg_rewind.c | 10 ++++++---- 5 files changed, 23 insertions(+), 4 deletions(-) diff --git a/src/bin/pg_archivecleanup/pg_archivecleanup.c b/src/bin/pg_archivecleanup/pg_archivecleanup.c index c25348bcb85..ab686b4748c 100644 --- a/src/bin/pg_archivecleanup/pg_archivecleanup.c +++ b/src/bin/pg_archivecleanup/pg_archivecleanup.c @@ -375,6 +375,10 @@ main(int argc, char **argv) exit(2); } + if (dryrun) + pg_log_info("Executing in dry-run mode.\n" + "No files will be removed."); + /* * Check archive exists and other initialization if required. */ diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c index df41836e70f..cc4be5d6ef4 100644 --- a/src/bin/pg_basebackup/pg_createsubscriber.c +++ b/src/bin/pg_basebackup/pg_createsubscriber.c @@ -2305,6 +2305,11 @@ main(int argc, char **argv) pg_log_error_hint("Try \"%s --help\" for more information.", progname); exit(1); } + + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + pg_log_info("validating publisher connection string"); pub_base_conninfo = get_base_conninfo(opt.pub_conninfo_str, &dbname_conninfo); diff --git a/src/bin/pg_combinebackup/pg_combinebackup.c b/src/bin/pg_combinebackup/pg_combinebackup.c index 3a325127209..c9bf0a9e105 100644 --- a/src/bin/pg_combinebackup/pg_combinebackup.c +++ b/src/bin/pg_combinebackup/pg_combinebackup.c @@ -242,6 +242,10 @@ main(int argc, char *argv[]) if (opt.no_manifest) opt.manifest_checksums = CHECKSUM_TYPE_NONE; + if (opt.dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + /* Check that the platform supports the requested copy method. */ if (opt.copy_method == COPY_METHOD_CLONE) { diff --git a/src/bin/pg_resetwal/pg_resetwal.c b/src/bin/pg_resetwal/pg_resetwal.c index a89d72fc5cf..dd5d279521e 100644 --- a/src/bin/pg_resetwal/pg_resetwal.c +++ b/src/bin/pg_resetwal/pg_resetwal.c @@ -397,6 +397,10 @@ main(int argc, char *argv[]) exit(1); } + if (noupdate) + pg_log_info("Executing in dry-run mode.\n" + "Nothing will be modified."); + /* * Attempt to read the existing pg_control file */ diff --git a/src/bin/pg_rewind/pg_rewind.c b/src/bin/pg_rewind/pg_rewind.c index 27c514f934a..e9364d04f76 100644 --- a/src/bin/pg_rewind/pg_rewind.c +++ b/src/bin/pg_rewind/pg_rewind.c @@ -300,10 +300,12 @@ main(int argc, char **argv) atexit(disconnect_atexit); - /* - * Ok, we have all the options and we're ready to start. First, connect to - * remote server. - */ + /* Ok, we have all the options and we're ready to start. */ + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + + /* First, connect to remote server. */ if (connstr_source) { conn = PQconnectdb(connstr_source); -- 2.47.3 --ibfr3ah5qy6tcbhw-- ^ permalink raw reply [nested|flat] 190+ messages in thread
* [PATCH v5] Log a note at program start when running in dry-run mode @ 2025-11-11 08:54 Álvaro Herrera <[email protected]> 0 siblings, 0 replies; 190+ messages in thread From: Álvaro Herrera @ 2025-11-11 08:54 UTC (permalink / raw) Users might get some peace of mind knowing their data is not being destroyed or whatever. Author: Peter Smith <[email protected]> Reviewed-by: Álvaro Herrera <[email protected]> Discussion: https://postgr.es/m/CAHut+PsvQJQnQO0KT0S2oegenkvJ8FUuY-QS5syyqmT24R2xFQ@mail.gmail.com --- src/bin/pg_archivecleanup/pg_archivecleanup.c | 4 ++++ src/bin/pg_basebackup/pg_createsubscriber.c | 5 +++++ src/bin/pg_combinebackup/pg_combinebackup.c | 4 ++++ src/bin/pg_resetwal/pg_resetwal.c | 4 ++++ src/bin/pg_rewind/pg_rewind.c | 10 ++++++---- 5 files changed, 23 insertions(+), 4 deletions(-) diff --git a/src/bin/pg_archivecleanup/pg_archivecleanup.c b/src/bin/pg_archivecleanup/pg_archivecleanup.c index c25348bcb85..ab686b4748c 100644 --- a/src/bin/pg_archivecleanup/pg_archivecleanup.c +++ b/src/bin/pg_archivecleanup/pg_archivecleanup.c @@ -375,6 +375,10 @@ main(int argc, char **argv) exit(2); } + if (dryrun) + pg_log_info("Executing in dry-run mode.\n" + "No files will be removed."); + /* * Check archive exists and other initialization if required. */ diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c index df41836e70f..cc4be5d6ef4 100644 --- a/src/bin/pg_basebackup/pg_createsubscriber.c +++ b/src/bin/pg_basebackup/pg_createsubscriber.c @@ -2305,6 +2305,11 @@ main(int argc, char **argv) pg_log_error_hint("Try \"%s --help\" for more information.", progname); exit(1); } + + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + pg_log_info("validating publisher connection string"); pub_base_conninfo = get_base_conninfo(opt.pub_conninfo_str, &dbname_conninfo); diff --git a/src/bin/pg_combinebackup/pg_combinebackup.c b/src/bin/pg_combinebackup/pg_combinebackup.c index 3a325127209..c9bf0a9e105 100644 --- a/src/bin/pg_combinebackup/pg_combinebackup.c +++ b/src/bin/pg_combinebackup/pg_combinebackup.c @@ -242,6 +242,10 @@ main(int argc, char *argv[]) if (opt.no_manifest) opt.manifest_checksums = CHECKSUM_TYPE_NONE; + if (opt.dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + /* Check that the platform supports the requested copy method. */ if (opt.copy_method == COPY_METHOD_CLONE) { diff --git a/src/bin/pg_resetwal/pg_resetwal.c b/src/bin/pg_resetwal/pg_resetwal.c index a89d72fc5cf..dd5d279521e 100644 --- a/src/bin/pg_resetwal/pg_resetwal.c +++ b/src/bin/pg_resetwal/pg_resetwal.c @@ -397,6 +397,10 @@ main(int argc, char *argv[]) exit(1); } + if (noupdate) + pg_log_info("Executing in dry-run mode.\n" + "Nothing will be modified."); + /* * Attempt to read the existing pg_control file */ diff --git a/src/bin/pg_rewind/pg_rewind.c b/src/bin/pg_rewind/pg_rewind.c index 27c514f934a..e9364d04f76 100644 --- a/src/bin/pg_rewind/pg_rewind.c +++ b/src/bin/pg_rewind/pg_rewind.c @@ -300,10 +300,12 @@ main(int argc, char **argv) atexit(disconnect_atexit); - /* - * Ok, we have all the options and we're ready to start. First, connect to - * remote server. - */ + /* Ok, we have all the options and we're ready to start. */ + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + + /* First, connect to remote server. */ if (connstr_source) { conn = PQconnectdb(connstr_source); -- 2.47.3 --ibfr3ah5qy6tcbhw-- ^ permalink raw reply [nested|flat] 190+ messages in thread
* [PATCH v5] Log a note at program start when running in dry-run mode @ 2025-11-11 08:54 Álvaro Herrera <[email protected]> 0 siblings, 0 replies; 190+ messages in thread From: Álvaro Herrera @ 2025-11-11 08:54 UTC (permalink / raw) Users might get some peace of mind knowing their data is not being destroyed or whatever. Author: Peter Smith <[email protected]> Reviewed-by: Álvaro Herrera <[email protected]> Discussion: https://postgr.es/m/CAHut+PsvQJQnQO0KT0S2oegenkvJ8FUuY-QS5syyqmT24R2xFQ@mail.gmail.com --- src/bin/pg_archivecleanup/pg_archivecleanup.c | 4 ++++ src/bin/pg_basebackup/pg_createsubscriber.c | 5 +++++ src/bin/pg_combinebackup/pg_combinebackup.c | 4 ++++ src/bin/pg_resetwal/pg_resetwal.c | 4 ++++ src/bin/pg_rewind/pg_rewind.c | 10 ++++++---- 5 files changed, 23 insertions(+), 4 deletions(-) diff --git a/src/bin/pg_archivecleanup/pg_archivecleanup.c b/src/bin/pg_archivecleanup/pg_archivecleanup.c index c25348bcb85..ab686b4748c 100644 --- a/src/bin/pg_archivecleanup/pg_archivecleanup.c +++ b/src/bin/pg_archivecleanup/pg_archivecleanup.c @@ -375,6 +375,10 @@ main(int argc, char **argv) exit(2); } + if (dryrun) + pg_log_info("Executing in dry-run mode.\n" + "No files will be removed."); + /* * Check archive exists and other initialization if required. */ diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c index df41836e70f..cc4be5d6ef4 100644 --- a/src/bin/pg_basebackup/pg_createsubscriber.c +++ b/src/bin/pg_basebackup/pg_createsubscriber.c @@ -2305,6 +2305,11 @@ main(int argc, char **argv) pg_log_error_hint("Try \"%s --help\" for more information.", progname); exit(1); } + + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + pg_log_info("validating publisher connection string"); pub_base_conninfo = get_base_conninfo(opt.pub_conninfo_str, &dbname_conninfo); diff --git a/src/bin/pg_combinebackup/pg_combinebackup.c b/src/bin/pg_combinebackup/pg_combinebackup.c index 3a325127209..c9bf0a9e105 100644 --- a/src/bin/pg_combinebackup/pg_combinebackup.c +++ b/src/bin/pg_combinebackup/pg_combinebackup.c @@ -242,6 +242,10 @@ main(int argc, char *argv[]) if (opt.no_manifest) opt.manifest_checksums = CHECKSUM_TYPE_NONE; + if (opt.dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + /* Check that the platform supports the requested copy method. */ if (opt.copy_method == COPY_METHOD_CLONE) { diff --git a/src/bin/pg_resetwal/pg_resetwal.c b/src/bin/pg_resetwal/pg_resetwal.c index a89d72fc5cf..dd5d279521e 100644 --- a/src/bin/pg_resetwal/pg_resetwal.c +++ b/src/bin/pg_resetwal/pg_resetwal.c @@ -397,6 +397,10 @@ main(int argc, char *argv[]) exit(1); } + if (noupdate) + pg_log_info("Executing in dry-run mode.\n" + "Nothing will be modified."); + /* * Attempt to read the existing pg_control file */ diff --git a/src/bin/pg_rewind/pg_rewind.c b/src/bin/pg_rewind/pg_rewind.c index 27c514f934a..e9364d04f76 100644 --- a/src/bin/pg_rewind/pg_rewind.c +++ b/src/bin/pg_rewind/pg_rewind.c @@ -300,10 +300,12 @@ main(int argc, char **argv) atexit(disconnect_atexit); - /* - * Ok, we have all the options and we're ready to start. First, connect to - * remote server. - */ + /* Ok, we have all the options and we're ready to start. */ + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + + /* First, connect to remote server. */ if (connstr_source) { conn = PQconnectdb(connstr_source); -- 2.47.3 --ibfr3ah5qy6tcbhw-- ^ permalink raw reply [nested|flat] 190+ messages in thread
* [PATCH v5] Log a note at program start when running in dry-run mode @ 2025-11-11 08:54 Álvaro Herrera <[email protected]> 0 siblings, 0 replies; 190+ messages in thread From: Álvaro Herrera @ 2025-11-11 08:54 UTC (permalink / raw) Users might get some peace of mind knowing their data is not being destroyed or whatever. Author: Peter Smith <[email protected]> Reviewed-by: Álvaro Herrera <[email protected]> Discussion: https://postgr.es/m/CAHut+PsvQJQnQO0KT0S2oegenkvJ8FUuY-QS5syyqmT24R2xFQ@mail.gmail.com --- src/bin/pg_archivecleanup/pg_archivecleanup.c | 4 ++++ src/bin/pg_basebackup/pg_createsubscriber.c | 5 +++++ src/bin/pg_combinebackup/pg_combinebackup.c | 4 ++++ src/bin/pg_resetwal/pg_resetwal.c | 4 ++++ src/bin/pg_rewind/pg_rewind.c | 10 ++++++---- 5 files changed, 23 insertions(+), 4 deletions(-) diff --git a/src/bin/pg_archivecleanup/pg_archivecleanup.c b/src/bin/pg_archivecleanup/pg_archivecleanup.c index c25348bcb85..ab686b4748c 100644 --- a/src/bin/pg_archivecleanup/pg_archivecleanup.c +++ b/src/bin/pg_archivecleanup/pg_archivecleanup.c @@ -375,6 +375,10 @@ main(int argc, char **argv) exit(2); } + if (dryrun) + pg_log_info("Executing in dry-run mode.\n" + "No files will be removed."); + /* * Check archive exists and other initialization if required. */ diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c index df41836e70f..cc4be5d6ef4 100644 --- a/src/bin/pg_basebackup/pg_createsubscriber.c +++ b/src/bin/pg_basebackup/pg_createsubscriber.c @@ -2305,6 +2305,11 @@ main(int argc, char **argv) pg_log_error_hint("Try \"%s --help\" for more information.", progname); exit(1); } + + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + pg_log_info("validating publisher connection string"); pub_base_conninfo = get_base_conninfo(opt.pub_conninfo_str, &dbname_conninfo); diff --git a/src/bin/pg_combinebackup/pg_combinebackup.c b/src/bin/pg_combinebackup/pg_combinebackup.c index 3a325127209..c9bf0a9e105 100644 --- a/src/bin/pg_combinebackup/pg_combinebackup.c +++ b/src/bin/pg_combinebackup/pg_combinebackup.c @@ -242,6 +242,10 @@ main(int argc, char *argv[]) if (opt.no_manifest) opt.manifest_checksums = CHECKSUM_TYPE_NONE; + if (opt.dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + /* Check that the platform supports the requested copy method. */ if (opt.copy_method == COPY_METHOD_CLONE) { diff --git a/src/bin/pg_resetwal/pg_resetwal.c b/src/bin/pg_resetwal/pg_resetwal.c index a89d72fc5cf..dd5d279521e 100644 --- a/src/bin/pg_resetwal/pg_resetwal.c +++ b/src/bin/pg_resetwal/pg_resetwal.c @@ -397,6 +397,10 @@ main(int argc, char *argv[]) exit(1); } + if (noupdate) + pg_log_info("Executing in dry-run mode.\n" + "Nothing will be modified."); + /* * Attempt to read the existing pg_control file */ diff --git a/src/bin/pg_rewind/pg_rewind.c b/src/bin/pg_rewind/pg_rewind.c index 27c514f934a..e9364d04f76 100644 --- a/src/bin/pg_rewind/pg_rewind.c +++ b/src/bin/pg_rewind/pg_rewind.c @@ -300,10 +300,12 @@ main(int argc, char **argv) atexit(disconnect_atexit); - /* - * Ok, we have all the options and we're ready to start. First, connect to - * remote server. - */ + /* Ok, we have all the options and we're ready to start. */ + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + + /* First, connect to remote server. */ if (connstr_source) { conn = PQconnectdb(connstr_source); -- 2.47.3 --ibfr3ah5qy6tcbhw-- ^ permalink raw reply [nested|flat] 190+ messages in thread
* [PATCH v5] Log a note at program start when running in dry-run mode @ 2025-11-11 08:54 Álvaro Herrera <[email protected]> 0 siblings, 0 replies; 190+ messages in thread From: Álvaro Herrera @ 2025-11-11 08:54 UTC (permalink / raw) Users might get some peace of mind knowing their data is not being destroyed or whatever. Author: Peter Smith <[email protected]> Reviewed-by: Álvaro Herrera <[email protected]> Discussion: https://postgr.es/m/CAHut+PsvQJQnQO0KT0S2oegenkvJ8FUuY-QS5syyqmT24R2xFQ@mail.gmail.com --- src/bin/pg_archivecleanup/pg_archivecleanup.c | 4 ++++ src/bin/pg_basebackup/pg_createsubscriber.c | 5 +++++ src/bin/pg_combinebackup/pg_combinebackup.c | 4 ++++ src/bin/pg_resetwal/pg_resetwal.c | 4 ++++ src/bin/pg_rewind/pg_rewind.c | 10 ++++++---- 5 files changed, 23 insertions(+), 4 deletions(-) diff --git a/src/bin/pg_archivecleanup/pg_archivecleanup.c b/src/bin/pg_archivecleanup/pg_archivecleanup.c index c25348bcb85..ab686b4748c 100644 --- a/src/bin/pg_archivecleanup/pg_archivecleanup.c +++ b/src/bin/pg_archivecleanup/pg_archivecleanup.c @@ -375,6 +375,10 @@ main(int argc, char **argv) exit(2); } + if (dryrun) + pg_log_info("Executing in dry-run mode.\n" + "No files will be removed."); + /* * Check archive exists and other initialization if required. */ diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c index df41836e70f..cc4be5d6ef4 100644 --- a/src/bin/pg_basebackup/pg_createsubscriber.c +++ b/src/bin/pg_basebackup/pg_createsubscriber.c @@ -2305,6 +2305,11 @@ main(int argc, char **argv) pg_log_error_hint("Try \"%s --help\" for more information.", progname); exit(1); } + + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + pg_log_info("validating publisher connection string"); pub_base_conninfo = get_base_conninfo(opt.pub_conninfo_str, &dbname_conninfo); diff --git a/src/bin/pg_combinebackup/pg_combinebackup.c b/src/bin/pg_combinebackup/pg_combinebackup.c index 3a325127209..c9bf0a9e105 100644 --- a/src/bin/pg_combinebackup/pg_combinebackup.c +++ b/src/bin/pg_combinebackup/pg_combinebackup.c @@ -242,6 +242,10 @@ main(int argc, char *argv[]) if (opt.no_manifest) opt.manifest_checksums = CHECKSUM_TYPE_NONE; + if (opt.dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + /* Check that the platform supports the requested copy method. */ if (opt.copy_method == COPY_METHOD_CLONE) { diff --git a/src/bin/pg_resetwal/pg_resetwal.c b/src/bin/pg_resetwal/pg_resetwal.c index a89d72fc5cf..dd5d279521e 100644 --- a/src/bin/pg_resetwal/pg_resetwal.c +++ b/src/bin/pg_resetwal/pg_resetwal.c @@ -397,6 +397,10 @@ main(int argc, char *argv[]) exit(1); } + if (noupdate) + pg_log_info("Executing in dry-run mode.\n" + "Nothing will be modified."); + /* * Attempt to read the existing pg_control file */ diff --git a/src/bin/pg_rewind/pg_rewind.c b/src/bin/pg_rewind/pg_rewind.c index 27c514f934a..e9364d04f76 100644 --- a/src/bin/pg_rewind/pg_rewind.c +++ b/src/bin/pg_rewind/pg_rewind.c @@ -300,10 +300,12 @@ main(int argc, char **argv) atexit(disconnect_atexit); - /* - * Ok, we have all the options and we're ready to start. First, connect to - * remote server. - */ + /* Ok, we have all the options and we're ready to start. */ + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + + /* First, connect to remote server. */ if (connstr_source) { conn = PQconnectdb(connstr_source); -- 2.47.3 --ibfr3ah5qy6tcbhw-- ^ permalink raw reply [nested|flat] 190+ messages in thread
* [PATCH v5] Log a note at program start when running in dry-run mode @ 2025-11-11 08:54 Álvaro Herrera <[email protected]> 0 siblings, 0 replies; 190+ messages in thread From: Álvaro Herrera @ 2025-11-11 08:54 UTC (permalink / raw) Users might get some peace of mind knowing their data is not being destroyed or whatever. Author: Peter Smith <[email protected]> Reviewed-by: Álvaro Herrera <[email protected]> Discussion: https://postgr.es/m/CAHut+PsvQJQnQO0KT0S2oegenkvJ8FUuY-QS5syyqmT24R2xFQ@mail.gmail.com --- src/bin/pg_archivecleanup/pg_archivecleanup.c | 4 ++++ src/bin/pg_basebackup/pg_createsubscriber.c | 5 +++++ src/bin/pg_combinebackup/pg_combinebackup.c | 4 ++++ src/bin/pg_resetwal/pg_resetwal.c | 4 ++++ src/bin/pg_rewind/pg_rewind.c | 10 ++++++---- 5 files changed, 23 insertions(+), 4 deletions(-) diff --git a/src/bin/pg_archivecleanup/pg_archivecleanup.c b/src/bin/pg_archivecleanup/pg_archivecleanup.c index c25348bcb85..ab686b4748c 100644 --- a/src/bin/pg_archivecleanup/pg_archivecleanup.c +++ b/src/bin/pg_archivecleanup/pg_archivecleanup.c @@ -375,6 +375,10 @@ main(int argc, char **argv) exit(2); } + if (dryrun) + pg_log_info("Executing in dry-run mode.\n" + "No files will be removed."); + /* * Check archive exists and other initialization if required. */ diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c index df41836e70f..cc4be5d6ef4 100644 --- a/src/bin/pg_basebackup/pg_createsubscriber.c +++ b/src/bin/pg_basebackup/pg_createsubscriber.c @@ -2305,6 +2305,11 @@ main(int argc, char **argv) pg_log_error_hint("Try \"%s --help\" for more information.", progname); exit(1); } + + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + pg_log_info("validating publisher connection string"); pub_base_conninfo = get_base_conninfo(opt.pub_conninfo_str, &dbname_conninfo); diff --git a/src/bin/pg_combinebackup/pg_combinebackup.c b/src/bin/pg_combinebackup/pg_combinebackup.c index 3a325127209..c9bf0a9e105 100644 --- a/src/bin/pg_combinebackup/pg_combinebackup.c +++ b/src/bin/pg_combinebackup/pg_combinebackup.c @@ -242,6 +242,10 @@ main(int argc, char *argv[]) if (opt.no_manifest) opt.manifest_checksums = CHECKSUM_TYPE_NONE; + if (opt.dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + /* Check that the platform supports the requested copy method. */ if (opt.copy_method == COPY_METHOD_CLONE) { diff --git a/src/bin/pg_resetwal/pg_resetwal.c b/src/bin/pg_resetwal/pg_resetwal.c index a89d72fc5cf..dd5d279521e 100644 --- a/src/bin/pg_resetwal/pg_resetwal.c +++ b/src/bin/pg_resetwal/pg_resetwal.c @@ -397,6 +397,10 @@ main(int argc, char *argv[]) exit(1); } + if (noupdate) + pg_log_info("Executing in dry-run mode.\n" + "Nothing will be modified."); + /* * Attempt to read the existing pg_control file */ diff --git a/src/bin/pg_rewind/pg_rewind.c b/src/bin/pg_rewind/pg_rewind.c index 27c514f934a..e9364d04f76 100644 --- a/src/bin/pg_rewind/pg_rewind.c +++ b/src/bin/pg_rewind/pg_rewind.c @@ -300,10 +300,12 @@ main(int argc, char **argv) atexit(disconnect_atexit); - /* - * Ok, we have all the options and we're ready to start. First, connect to - * remote server. - */ + /* Ok, we have all the options and we're ready to start. */ + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + + /* First, connect to remote server. */ if (connstr_source) { conn = PQconnectdb(connstr_source); -- 2.47.3 --ibfr3ah5qy6tcbhw-- ^ permalink raw reply [nested|flat] 190+ messages in thread
* [PATCH v5] Log a note at program start when running in dry-run mode @ 2025-11-11 08:54 Álvaro Herrera <[email protected]> 0 siblings, 0 replies; 190+ messages in thread From: Álvaro Herrera @ 2025-11-11 08:54 UTC (permalink / raw) Users might get some peace of mind knowing their data is not being destroyed or whatever. Author: Peter Smith <[email protected]> Reviewed-by: Álvaro Herrera <[email protected]> Discussion: https://postgr.es/m/CAHut+PsvQJQnQO0KT0S2oegenkvJ8FUuY-QS5syyqmT24R2xFQ@mail.gmail.com --- src/bin/pg_archivecleanup/pg_archivecleanup.c | 4 ++++ src/bin/pg_basebackup/pg_createsubscriber.c | 5 +++++ src/bin/pg_combinebackup/pg_combinebackup.c | 4 ++++ src/bin/pg_resetwal/pg_resetwal.c | 4 ++++ src/bin/pg_rewind/pg_rewind.c | 10 ++++++---- 5 files changed, 23 insertions(+), 4 deletions(-) diff --git a/src/bin/pg_archivecleanup/pg_archivecleanup.c b/src/bin/pg_archivecleanup/pg_archivecleanup.c index c25348bcb85..ab686b4748c 100644 --- a/src/bin/pg_archivecleanup/pg_archivecleanup.c +++ b/src/bin/pg_archivecleanup/pg_archivecleanup.c @@ -375,6 +375,10 @@ main(int argc, char **argv) exit(2); } + if (dryrun) + pg_log_info("Executing in dry-run mode.\n" + "No files will be removed."); + /* * Check archive exists and other initialization if required. */ diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c index df41836e70f..cc4be5d6ef4 100644 --- a/src/bin/pg_basebackup/pg_createsubscriber.c +++ b/src/bin/pg_basebackup/pg_createsubscriber.c @@ -2305,6 +2305,11 @@ main(int argc, char **argv) pg_log_error_hint("Try \"%s --help\" for more information.", progname); exit(1); } + + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + pg_log_info("validating publisher connection string"); pub_base_conninfo = get_base_conninfo(opt.pub_conninfo_str, &dbname_conninfo); diff --git a/src/bin/pg_combinebackup/pg_combinebackup.c b/src/bin/pg_combinebackup/pg_combinebackup.c index 3a325127209..c9bf0a9e105 100644 --- a/src/bin/pg_combinebackup/pg_combinebackup.c +++ b/src/bin/pg_combinebackup/pg_combinebackup.c @@ -242,6 +242,10 @@ main(int argc, char *argv[]) if (opt.no_manifest) opt.manifest_checksums = CHECKSUM_TYPE_NONE; + if (opt.dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + /* Check that the platform supports the requested copy method. */ if (opt.copy_method == COPY_METHOD_CLONE) { diff --git a/src/bin/pg_resetwal/pg_resetwal.c b/src/bin/pg_resetwal/pg_resetwal.c index a89d72fc5cf..dd5d279521e 100644 --- a/src/bin/pg_resetwal/pg_resetwal.c +++ b/src/bin/pg_resetwal/pg_resetwal.c @@ -397,6 +397,10 @@ main(int argc, char *argv[]) exit(1); } + if (noupdate) + pg_log_info("Executing in dry-run mode.\n" + "Nothing will be modified."); + /* * Attempt to read the existing pg_control file */ diff --git a/src/bin/pg_rewind/pg_rewind.c b/src/bin/pg_rewind/pg_rewind.c index 27c514f934a..e9364d04f76 100644 --- a/src/bin/pg_rewind/pg_rewind.c +++ b/src/bin/pg_rewind/pg_rewind.c @@ -300,10 +300,12 @@ main(int argc, char **argv) atexit(disconnect_atexit); - /* - * Ok, we have all the options and we're ready to start. First, connect to - * remote server. - */ + /* Ok, we have all the options and we're ready to start. */ + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + + /* First, connect to remote server. */ if (connstr_source) { conn = PQconnectdb(connstr_source); -- 2.47.3 --ibfr3ah5qy6tcbhw-- ^ permalink raw reply [nested|flat] 190+ messages in thread
* [PATCH v5] Log a note at program start when running in dry-run mode @ 2025-11-11 08:54 Álvaro Herrera <[email protected]> 0 siblings, 0 replies; 190+ messages in thread From: Álvaro Herrera @ 2025-11-11 08:54 UTC (permalink / raw) Users might get some peace of mind knowing their data is not being destroyed or whatever. Author: Peter Smith <[email protected]> Reviewed-by: Álvaro Herrera <[email protected]> Discussion: https://postgr.es/m/CAHut+PsvQJQnQO0KT0S2oegenkvJ8FUuY-QS5syyqmT24R2xFQ@mail.gmail.com --- src/bin/pg_archivecleanup/pg_archivecleanup.c | 4 ++++ src/bin/pg_basebackup/pg_createsubscriber.c | 5 +++++ src/bin/pg_combinebackup/pg_combinebackup.c | 4 ++++ src/bin/pg_resetwal/pg_resetwal.c | 4 ++++ src/bin/pg_rewind/pg_rewind.c | 10 ++++++---- 5 files changed, 23 insertions(+), 4 deletions(-) diff --git a/src/bin/pg_archivecleanup/pg_archivecleanup.c b/src/bin/pg_archivecleanup/pg_archivecleanup.c index c25348bcb85..ab686b4748c 100644 --- a/src/bin/pg_archivecleanup/pg_archivecleanup.c +++ b/src/bin/pg_archivecleanup/pg_archivecleanup.c @@ -375,6 +375,10 @@ main(int argc, char **argv) exit(2); } + if (dryrun) + pg_log_info("Executing in dry-run mode.\n" + "No files will be removed."); + /* * Check archive exists and other initialization if required. */ diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c index df41836e70f..cc4be5d6ef4 100644 --- a/src/bin/pg_basebackup/pg_createsubscriber.c +++ b/src/bin/pg_basebackup/pg_createsubscriber.c @@ -2305,6 +2305,11 @@ main(int argc, char **argv) pg_log_error_hint("Try \"%s --help\" for more information.", progname); exit(1); } + + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + pg_log_info("validating publisher connection string"); pub_base_conninfo = get_base_conninfo(opt.pub_conninfo_str, &dbname_conninfo); diff --git a/src/bin/pg_combinebackup/pg_combinebackup.c b/src/bin/pg_combinebackup/pg_combinebackup.c index 3a325127209..c9bf0a9e105 100644 --- a/src/bin/pg_combinebackup/pg_combinebackup.c +++ b/src/bin/pg_combinebackup/pg_combinebackup.c @@ -242,6 +242,10 @@ main(int argc, char *argv[]) if (opt.no_manifest) opt.manifest_checksums = CHECKSUM_TYPE_NONE; + if (opt.dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + /* Check that the platform supports the requested copy method. */ if (opt.copy_method == COPY_METHOD_CLONE) { diff --git a/src/bin/pg_resetwal/pg_resetwal.c b/src/bin/pg_resetwal/pg_resetwal.c index a89d72fc5cf..dd5d279521e 100644 --- a/src/bin/pg_resetwal/pg_resetwal.c +++ b/src/bin/pg_resetwal/pg_resetwal.c @@ -397,6 +397,10 @@ main(int argc, char *argv[]) exit(1); } + if (noupdate) + pg_log_info("Executing in dry-run mode.\n" + "Nothing will be modified."); + /* * Attempt to read the existing pg_control file */ diff --git a/src/bin/pg_rewind/pg_rewind.c b/src/bin/pg_rewind/pg_rewind.c index 27c514f934a..e9364d04f76 100644 --- a/src/bin/pg_rewind/pg_rewind.c +++ b/src/bin/pg_rewind/pg_rewind.c @@ -300,10 +300,12 @@ main(int argc, char **argv) atexit(disconnect_atexit); - /* - * Ok, we have all the options and we're ready to start. First, connect to - * remote server. - */ + /* Ok, we have all the options and we're ready to start. */ + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + + /* First, connect to remote server. */ if (connstr_source) { conn = PQconnectdb(connstr_source); -- 2.47.3 --ibfr3ah5qy6tcbhw-- ^ permalink raw reply [nested|flat] 190+ messages in thread
* [PATCH v5] Log a note at program start when running in dry-run mode @ 2025-11-11 08:54 Álvaro Herrera <[email protected]> 0 siblings, 0 replies; 190+ messages in thread From: Álvaro Herrera @ 2025-11-11 08:54 UTC (permalink / raw) Users might get some peace of mind knowing their data is not being destroyed or whatever. Author: Peter Smith <[email protected]> Reviewed-by: Álvaro Herrera <[email protected]> Discussion: https://postgr.es/m/CAHut+PsvQJQnQO0KT0S2oegenkvJ8FUuY-QS5syyqmT24R2xFQ@mail.gmail.com --- src/bin/pg_archivecleanup/pg_archivecleanup.c | 4 ++++ src/bin/pg_basebackup/pg_createsubscriber.c | 5 +++++ src/bin/pg_combinebackup/pg_combinebackup.c | 4 ++++ src/bin/pg_resetwal/pg_resetwal.c | 4 ++++ src/bin/pg_rewind/pg_rewind.c | 10 ++++++---- 5 files changed, 23 insertions(+), 4 deletions(-) diff --git a/src/bin/pg_archivecleanup/pg_archivecleanup.c b/src/bin/pg_archivecleanup/pg_archivecleanup.c index c25348bcb85..ab686b4748c 100644 --- a/src/bin/pg_archivecleanup/pg_archivecleanup.c +++ b/src/bin/pg_archivecleanup/pg_archivecleanup.c @@ -375,6 +375,10 @@ main(int argc, char **argv) exit(2); } + if (dryrun) + pg_log_info("Executing in dry-run mode.\n" + "No files will be removed."); + /* * Check archive exists and other initialization if required. */ diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c index df41836e70f..cc4be5d6ef4 100644 --- a/src/bin/pg_basebackup/pg_createsubscriber.c +++ b/src/bin/pg_basebackup/pg_createsubscriber.c @@ -2305,6 +2305,11 @@ main(int argc, char **argv) pg_log_error_hint("Try \"%s --help\" for more information.", progname); exit(1); } + + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + pg_log_info("validating publisher connection string"); pub_base_conninfo = get_base_conninfo(opt.pub_conninfo_str, &dbname_conninfo); diff --git a/src/bin/pg_combinebackup/pg_combinebackup.c b/src/bin/pg_combinebackup/pg_combinebackup.c index 3a325127209..c9bf0a9e105 100644 --- a/src/bin/pg_combinebackup/pg_combinebackup.c +++ b/src/bin/pg_combinebackup/pg_combinebackup.c @@ -242,6 +242,10 @@ main(int argc, char *argv[]) if (opt.no_manifest) opt.manifest_checksums = CHECKSUM_TYPE_NONE; + if (opt.dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + /* Check that the platform supports the requested copy method. */ if (opt.copy_method == COPY_METHOD_CLONE) { diff --git a/src/bin/pg_resetwal/pg_resetwal.c b/src/bin/pg_resetwal/pg_resetwal.c index a89d72fc5cf..dd5d279521e 100644 --- a/src/bin/pg_resetwal/pg_resetwal.c +++ b/src/bin/pg_resetwal/pg_resetwal.c @@ -397,6 +397,10 @@ main(int argc, char *argv[]) exit(1); } + if (noupdate) + pg_log_info("Executing in dry-run mode.\n" + "Nothing will be modified."); + /* * Attempt to read the existing pg_control file */ diff --git a/src/bin/pg_rewind/pg_rewind.c b/src/bin/pg_rewind/pg_rewind.c index 27c514f934a..e9364d04f76 100644 --- a/src/bin/pg_rewind/pg_rewind.c +++ b/src/bin/pg_rewind/pg_rewind.c @@ -300,10 +300,12 @@ main(int argc, char **argv) atexit(disconnect_atexit); - /* - * Ok, we have all the options and we're ready to start. First, connect to - * remote server. - */ + /* Ok, we have all the options and we're ready to start. */ + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + + /* First, connect to remote server. */ if (connstr_source) { conn = PQconnectdb(connstr_source); -- 2.47.3 --ibfr3ah5qy6tcbhw-- ^ permalink raw reply [nested|flat] 190+ messages in thread
* [PATCH v5] Log a note at program start when running in dry-run mode @ 2025-11-11 08:54 Álvaro Herrera <[email protected]> 0 siblings, 0 replies; 190+ messages in thread From: Álvaro Herrera @ 2025-11-11 08:54 UTC (permalink / raw) Users might get some peace of mind knowing their data is not being destroyed or whatever. Author: Peter Smith <[email protected]> Reviewed-by: Álvaro Herrera <[email protected]> Discussion: https://postgr.es/m/CAHut+PsvQJQnQO0KT0S2oegenkvJ8FUuY-QS5syyqmT24R2xFQ@mail.gmail.com --- src/bin/pg_archivecleanup/pg_archivecleanup.c | 4 ++++ src/bin/pg_basebackup/pg_createsubscriber.c | 5 +++++ src/bin/pg_combinebackup/pg_combinebackup.c | 4 ++++ src/bin/pg_resetwal/pg_resetwal.c | 4 ++++ src/bin/pg_rewind/pg_rewind.c | 10 ++++++---- 5 files changed, 23 insertions(+), 4 deletions(-) diff --git a/src/bin/pg_archivecleanup/pg_archivecleanup.c b/src/bin/pg_archivecleanup/pg_archivecleanup.c index c25348bcb85..ab686b4748c 100644 --- a/src/bin/pg_archivecleanup/pg_archivecleanup.c +++ b/src/bin/pg_archivecleanup/pg_archivecleanup.c @@ -375,6 +375,10 @@ main(int argc, char **argv) exit(2); } + if (dryrun) + pg_log_info("Executing in dry-run mode.\n" + "No files will be removed."); + /* * Check archive exists and other initialization if required. */ diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c index df41836e70f..cc4be5d6ef4 100644 --- a/src/bin/pg_basebackup/pg_createsubscriber.c +++ b/src/bin/pg_basebackup/pg_createsubscriber.c @@ -2305,6 +2305,11 @@ main(int argc, char **argv) pg_log_error_hint("Try \"%s --help\" for more information.", progname); exit(1); } + + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + pg_log_info("validating publisher connection string"); pub_base_conninfo = get_base_conninfo(opt.pub_conninfo_str, &dbname_conninfo); diff --git a/src/bin/pg_combinebackup/pg_combinebackup.c b/src/bin/pg_combinebackup/pg_combinebackup.c index 3a325127209..c9bf0a9e105 100644 --- a/src/bin/pg_combinebackup/pg_combinebackup.c +++ b/src/bin/pg_combinebackup/pg_combinebackup.c @@ -242,6 +242,10 @@ main(int argc, char *argv[]) if (opt.no_manifest) opt.manifest_checksums = CHECKSUM_TYPE_NONE; + if (opt.dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + /* Check that the platform supports the requested copy method. */ if (opt.copy_method == COPY_METHOD_CLONE) { diff --git a/src/bin/pg_resetwal/pg_resetwal.c b/src/bin/pg_resetwal/pg_resetwal.c index a89d72fc5cf..dd5d279521e 100644 --- a/src/bin/pg_resetwal/pg_resetwal.c +++ b/src/bin/pg_resetwal/pg_resetwal.c @@ -397,6 +397,10 @@ main(int argc, char *argv[]) exit(1); } + if (noupdate) + pg_log_info("Executing in dry-run mode.\n" + "Nothing will be modified."); + /* * Attempt to read the existing pg_control file */ diff --git a/src/bin/pg_rewind/pg_rewind.c b/src/bin/pg_rewind/pg_rewind.c index 27c514f934a..e9364d04f76 100644 --- a/src/bin/pg_rewind/pg_rewind.c +++ b/src/bin/pg_rewind/pg_rewind.c @@ -300,10 +300,12 @@ main(int argc, char **argv) atexit(disconnect_atexit); - /* - * Ok, we have all the options and we're ready to start. First, connect to - * remote server. - */ + /* Ok, we have all the options and we're ready to start. */ + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + + /* First, connect to remote server. */ if (connstr_source) { conn = PQconnectdb(connstr_source); -- 2.47.3 --ibfr3ah5qy6tcbhw-- ^ permalink raw reply [nested|flat] 190+ messages in thread
* [PATCH v5] Log a note at program start when running in dry-run mode @ 2025-11-11 08:54 Álvaro Herrera <[email protected]> 0 siblings, 0 replies; 190+ messages in thread From: Álvaro Herrera @ 2025-11-11 08:54 UTC (permalink / raw) Users might get some peace of mind knowing their data is not being destroyed or whatever. Author: Peter Smith <[email protected]> Reviewed-by: Álvaro Herrera <[email protected]> Discussion: https://postgr.es/m/CAHut+PsvQJQnQO0KT0S2oegenkvJ8FUuY-QS5syyqmT24R2xFQ@mail.gmail.com --- src/bin/pg_archivecleanup/pg_archivecleanup.c | 4 ++++ src/bin/pg_basebackup/pg_createsubscriber.c | 5 +++++ src/bin/pg_combinebackup/pg_combinebackup.c | 4 ++++ src/bin/pg_resetwal/pg_resetwal.c | 4 ++++ src/bin/pg_rewind/pg_rewind.c | 10 ++++++---- 5 files changed, 23 insertions(+), 4 deletions(-) diff --git a/src/bin/pg_archivecleanup/pg_archivecleanup.c b/src/bin/pg_archivecleanup/pg_archivecleanup.c index c25348bcb85..ab686b4748c 100644 --- a/src/bin/pg_archivecleanup/pg_archivecleanup.c +++ b/src/bin/pg_archivecleanup/pg_archivecleanup.c @@ -375,6 +375,10 @@ main(int argc, char **argv) exit(2); } + if (dryrun) + pg_log_info("Executing in dry-run mode.\n" + "No files will be removed."); + /* * Check archive exists and other initialization if required. */ diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c index df41836e70f..cc4be5d6ef4 100644 --- a/src/bin/pg_basebackup/pg_createsubscriber.c +++ b/src/bin/pg_basebackup/pg_createsubscriber.c @@ -2305,6 +2305,11 @@ main(int argc, char **argv) pg_log_error_hint("Try \"%s --help\" for more information.", progname); exit(1); } + + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + pg_log_info("validating publisher connection string"); pub_base_conninfo = get_base_conninfo(opt.pub_conninfo_str, &dbname_conninfo); diff --git a/src/bin/pg_combinebackup/pg_combinebackup.c b/src/bin/pg_combinebackup/pg_combinebackup.c index 3a325127209..c9bf0a9e105 100644 --- a/src/bin/pg_combinebackup/pg_combinebackup.c +++ b/src/bin/pg_combinebackup/pg_combinebackup.c @@ -242,6 +242,10 @@ main(int argc, char *argv[]) if (opt.no_manifest) opt.manifest_checksums = CHECKSUM_TYPE_NONE; + if (opt.dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + /* Check that the platform supports the requested copy method. */ if (opt.copy_method == COPY_METHOD_CLONE) { diff --git a/src/bin/pg_resetwal/pg_resetwal.c b/src/bin/pg_resetwal/pg_resetwal.c index a89d72fc5cf..dd5d279521e 100644 --- a/src/bin/pg_resetwal/pg_resetwal.c +++ b/src/bin/pg_resetwal/pg_resetwal.c @@ -397,6 +397,10 @@ main(int argc, char *argv[]) exit(1); } + if (noupdate) + pg_log_info("Executing in dry-run mode.\n" + "Nothing will be modified."); + /* * Attempt to read the existing pg_control file */ diff --git a/src/bin/pg_rewind/pg_rewind.c b/src/bin/pg_rewind/pg_rewind.c index 27c514f934a..e9364d04f76 100644 --- a/src/bin/pg_rewind/pg_rewind.c +++ b/src/bin/pg_rewind/pg_rewind.c @@ -300,10 +300,12 @@ main(int argc, char **argv) atexit(disconnect_atexit); - /* - * Ok, we have all the options and we're ready to start. First, connect to - * remote server. - */ + /* Ok, we have all the options and we're ready to start. */ + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + + /* First, connect to remote server. */ if (connstr_source) { conn = PQconnectdb(connstr_source); -- 2.47.3 --ibfr3ah5qy6tcbhw-- ^ permalink raw reply [nested|flat] 190+ messages in thread
* [PATCH v5] Log a note at program start when running in dry-run mode @ 2025-11-11 08:54 Álvaro Herrera <[email protected]> 0 siblings, 0 replies; 190+ messages in thread From: Álvaro Herrera @ 2025-11-11 08:54 UTC (permalink / raw) Users might get some peace of mind knowing their data is not being destroyed or whatever. Author: Peter Smith <[email protected]> Reviewed-by: Álvaro Herrera <[email protected]> Discussion: https://postgr.es/m/CAHut+PsvQJQnQO0KT0S2oegenkvJ8FUuY-QS5syyqmT24R2xFQ@mail.gmail.com --- src/bin/pg_archivecleanup/pg_archivecleanup.c | 4 ++++ src/bin/pg_basebackup/pg_createsubscriber.c | 5 +++++ src/bin/pg_combinebackup/pg_combinebackup.c | 4 ++++ src/bin/pg_resetwal/pg_resetwal.c | 4 ++++ src/bin/pg_rewind/pg_rewind.c | 10 ++++++---- 5 files changed, 23 insertions(+), 4 deletions(-) diff --git a/src/bin/pg_archivecleanup/pg_archivecleanup.c b/src/bin/pg_archivecleanup/pg_archivecleanup.c index c25348bcb85..ab686b4748c 100644 --- a/src/bin/pg_archivecleanup/pg_archivecleanup.c +++ b/src/bin/pg_archivecleanup/pg_archivecleanup.c @@ -375,6 +375,10 @@ main(int argc, char **argv) exit(2); } + if (dryrun) + pg_log_info("Executing in dry-run mode.\n" + "No files will be removed."); + /* * Check archive exists and other initialization if required. */ diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c index df41836e70f..cc4be5d6ef4 100644 --- a/src/bin/pg_basebackup/pg_createsubscriber.c +++ b/src/bin/pg_basebackup/pg_createsubscriber.c @@ -2305,6 +2305,11 @@ main(int argc, char **argv) pg_log_error_hint("Try \"%s --help\" for more information.", progname); exit(1); } + + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + pg_log_info("validating publisher connection string"); pub_base_conninfo = get_base_conninfo(opt.pub_conninfo_str, &dbname_conninfo); diff --git a/src/bin/pg_combinebackup/pg_combinebackup.c b/src/bin/pg_combinebackup/pg_combinebackup.c index 3a325127209..c9bf0a9e105 100644 --- a/src/bin/pg_combinebackup/pg_combinebackup.c +++ b/src/bin/pg_combinebackup/pg_combinebackup.c @@ -242,6 +242,10 @@ main(int argc, char *argv[]) if (opt.no_manifest) opt.manifest_checksums = CHECKSUM_TYPE_NONE; + if (opt.dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + /* Check that the platform supports the requested copy method. */ if (opt.copy_method == COPY_METHOD_CLONE) { diff --git a/src/bin/pg_resetwal/pg_resetwal.c b/src/bin/pg_resetwal/pg_resetwal.c index a89d72fc5cf..dd5d279521e 100644 --- a/src/bin/pg_resetwal/pg_resetwal.c +++ b/src/bin/pg_resetwal/pg_resetwal.c @@ -397,6 +397,10 @@ main(int argc, char *argv[]) exit(1); } + if (noupdate) + pg_log_info("Executing in dry-run mode.\n" + "Nothing will be modified."); + /* * Attempt to read the existing pg_control file */ diff --git a/src/bin/pg_rewind/pg_rewind.c b/src/bin/pg_rewind/pg_rewind.c index 27c514f934a..e9364d04f76 100644 --- a/src/bin/pg_rewind/pg_rewind.c +++ b/src/bin/pg_rewind/pg_rewind.c @@ -300,10 +300,12 @@ main(int argc, char **argv) atexit(disconnect_atexit); - /* - * Ok, we have all the options and we're ready to start. First, connect to - * remote server. - */ + /* Ok, we have all the options and we're ready to start. */ + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + + /* First, connect to remote server. */ if (connstr_source) { conn = PQconnectdb(connstr_source); -- 2.47.3 --ibfr3ah5qy6tcbhw-- ^ permalink raw reply [nested|flat] 190+ messages in thread
* [PATCH v5] Log a note at program start when running in dry-run mode @ 2025-11-11 08:54 Álvaro Herrera <[email protected]> 0 siblings, 0 replies; 190+ messages in thread From: Álvaro Herrera @ 2025-11-11 08:54 UTC (permalink / raw) Users might get some peace of mind knowing their data is not being destroyed or whatever. Author: Peter Smith <[email protected]> Reviewed-by: Álvaro Herrera <[email protected]> Discussion: https://postgr.es/m/CAHut+PsvQJQnQO0KT0S2oegenkvJ8FUuY-QS5syyqmT24R2xFQ@mail.gmail.com --- src/bin/pg_archivecleanup/pg_archivecleanup.c | 4 ++++ src/bin/pg_basebackup/pg_createsubscriber.c | 5 +++++ src/bin/pg_combinebackup/pg_combinebackup.c | 4 ++++ src/bin/pg_resetwal/pg_resetwal.c | 4 ++++ src/bin/pg_rewind/pg_rewind.c | 10 ++++++---- 5 files changed, 23 insertions(+), 4 deletions(-) diff --git a/src/bin/pg_archivecleanup/pg_archivecleanup.c b/src/bin/pg_archivecleanup/pg_archivecleanup.c index c25348bcb85..ab686b4748c 100644 --- a/src/bin/pg_archivecleanup/pg_archivecleanup.c +++ b/src/bin/pg_archivecleanup/pg_archivecleanup.c @@ -375,6 +375,10 @@ main(int argc, char **argv) exit(2); } + if (dryrun) + pg_log_info("Executing in dry-run mode.\n" + "No files will be removed."); + /* * Check archive exists and other initialization if required. */ diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c index df41836e70f..cc4be5d6ef4 100644 --- a/src/bin/pg_basebackup/pg_createsubscriber.c +++ b/src/bin/pg_basebackup/pg_createsubscriber.c @@ -2305,6 +2305,11 @@ main(int argc, char **argv) pg_log_error_hint("Try \"%s --help\" for more information.", progname); exit(1); } + + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + pg_log_info("validating publisher connection string"); pub_base_conninfo = get_base_conninfo(opt.pub_conninfo_str, &dbname_conninfo); diff --git a/src/bin/pg_combinebackup/pg_combinebackup.c b/src/bin/pg_combinebackup/pg_combinebackup.c index 3a325127209..c9bf0a9e105 100644 --- a/src/bin/pg_combinebackup/pg_combinebackup.c +++ b/src/bin/pg_combinebackup/pg_combinebackup.c @@ -242,6 +242,10 @@ main(int argc, char *argv[]) if (opt.no_manifest) opt.manifest_checksums = CHECKSUM_TYPE_NONE; + if (opt.dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + /* Check that the platform supports the requested copy method. */ if (opt.copy_method == COPY_METHOD_CLONE) { diff --git a/src/bin/pg_resetwal/pg_resetwal.c b/src/bin/pg_resetwal/pg_resetwal.c index a89d72fc5cf..dd5d279521e 100644 --- a/src/bin/pg_resetwal/pg_resetwal.c +++ b/src/bin/pg_resetwal/pg_resetwal.c @@ -397,6 +397,10 @@ main(int argc, char *argv[]) exit(1); } + if (noupdate) + pg_log_info("Executing in dry-run mode.\n" + "Nothing will be modified."); + /* * Attempt to read the existing pg_control file */ diff --git a/src/bin/pg_rewind/pg_rewind.c b/src/bin/pg_rewind/pg_rewind.c index 27c514f934a..e9364d04f76 100644 --- a/src/bin/pg_rewind/pg_rewind.c +++ b/src/bin/pg_rewind/pg_rewind.c @@ -300,10 +300,12 @@ main(int argc, char **argv) atexit(disconnect_atexit); - /* - * Ok, we have all the options and we're ready to start. First, connect to - * remote server. - */ + /* Ok, we have all the options and we're ready to start. */ + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + + /* First, connect to remote server. */ if (connstr_source) { conn = PQconnectdb(connstr_source); -- 2.47.3 --ibfr3ah5qy6tcbhw-- ^ permalink raw reply [nested|flat] 190+ messages in thread
* [PATCH v5] Log a note at program start when running in dry-run mode @ 2025-11-11 08:54 Álvaro Herrera <[email protected]> 0 siblings, 0 replies; 190+ messages in thread From: Álvaro Herrera @ 2025-11-11 08:54 UTC (permalink / raw) Users might get some peace of mind knowing their data is not being destroyed or whatever. Author: Peter Smith <[email protected]> Reviewed-by: Álvaro Herrera <[email protected]> Discussion: https://postgr.es/m/CAHut+PsvQJQnQO0KT0S2oegenkvJ8FUuY-QS5syyqmT24R2xFQ@mail.gmail.com --- src/bin/pg_archivecleanup/pg_archivecleanup.c | 4 ++++ src/bin/pg_basebackup/pg_createsubscriber.c | 5 +++++ src/bin/pg_combinebackup/pg_combinebackup.c | 4 ++++ src/bin/pg_resetwal/pg_resetwal.c | 4 ++++ src/bin/pg_rewind/pg_rewind.c | 10 ++++++---- 5 files changed, 23 insertions(+), 4 deletions(-) diff --git a/src/bin/pg_archivecleanup/pg_archivecleanup.c b/src/bin/pg_archivecleanup/pg_archivecleanup.c index c25348bcb85..ab686b4748c 100644 --- a/src/bin/pg_archivecleanup/pg_archivecleanup.c +++ b/src/bin/pg_archivecleanup/pg_archivecleanup.c @@ -375,6 +375,10 @@ main(int argc, char **argv) exit(2); } + if (dryrun) + pg_log_info("Executing in dry-run mode.\n" + "No files will be removed."); + /* * Check archive exists and other initialization if required. */ diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c index df41836e70f..cc4be5d6ef4 100644 --- a/src/bin/pg_basebackup/pg_createsubscriber.c +++ b/src/bin/pg_basebackup/pg_createsubscriber.c @@ -2305,6 +2305,11 @@ main(int argc, char **argv) pg_log_error_hint("Try \"%s --help\" for more information.", progname); exit(1); } + + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + pg_log_info("validating publisher connection string"); pub_base_conninfo = get_base_conninfo(opt.pub_conninfo_str, &dbname_conninfo); diff --git a/src/bin/pg_combinebackup/pg_combinebackup.c b/src/bin/pg_combinebackup/pg_combinebackup.c index 3a325127209..c9bf0a9e105 100644 --- a/src/bin/pg_combinebackup/pg_combinebackup.c +++ b/src/bin/pg_combinebackup/pg_combinebackup.c @@ -242,6 +242,10 @@ main(int argc, char *argv[]) if (opt.no_manifest) opt.manifest_checksums = CHECKSUM_TYPE_NONE; + if (opt.dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + /* Check that the platform supports the requested copy method. */ if (opt.copy_method == COPY_METHOD_CLONE) { diff --git a/src/bin/pg_resetwal/pg_resetwal.c b/src/bin/pg_resetwal/pg_resetwal.c index a89d72fc5cf..dd5d279521e 100644 --- a/src/bin/pg_resetwal/pg_resetwal.c +++ b/src/bin/pg_resetwal/pg_resetwal.c @@ -397,6 +397,10 @@ main(int argc, char *argv[]) exit(1); } + if (noupdate) + pg_log_info("Executing in dry-run mode.\n" + "Nothing will be modified."); + /* * Attempt to read the existing pg_control file */ diff --git a/src/bin/pg_rewind/pg_rewind.c b/src/bin/pg_rewind/pg_rewind.c index 27c514f934a..e9364d04f76 100644 --- a/src/bin/pg_rewind/pg_rewind.c +++ b/src/bin/pg_rewind/pg_rewind.c @@ -300,10 +300,12 @@ main(int argc, char **argv) atexit(disconnect_atexit); - /* - * Ok, we have all the options and we're ready to start. First, connect to - * remote server. - */ + /* Ok, we have all the options and we're ready to start. */ + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + + /* First, connect to remote server. */ if (connstr_source) { conn = PQconnectdb(connstr_source); -- 2.47.3 --ibfr3ah5qy6tcbhw-- ^ permalink raw reply [nested|flat] 190+ messages in thread
* [PATCH v5] Log a note at program start when running in dry-run mode @ 2025-11-11 08:54 Álvaro Herrera <[email protected]> 0 siblings, 0 replies; 190+ messages in thread From: Álvaro Herrera @ 2025-11-11 08:54 UTC (permalink / raw) Users might get some peace of mind knowing their data is not being destroyed or whatever. Author: Peter Smith <[email protected]> Reviewed-by: Álvaro Herrera <[email protected]> Discussion: https://postgr.es/m/CAHut+PsvQJQnQO0KT0S2oegenkvJ8FUuY-QS5syyqmT24R2xFQ@mail.gmail.com --- src/bin/pg_archivecleanup/pg_archivecleanup.c | 4 ++++ src/bin/pg_basebackup/pg_createsubscriber.c | 5 +++++ src/bin/pg_combinebackup/pg_combinebackup.c | 4 ++++ src/bin/pg_resetwal/pg_resetwal.c | 4 ++++ src/bin/pg_rewind/pg_rewind.c | 10 ++++++---- 5 files changed, 23 insertions(+), 4 deletions(-) diff --git a/src/bin/pg_archivecleanup/pg_archivecleanup.c b/src/bin/pg_archivecleanup/pg_archivecleanup.c index c25348bcb85..ab686b4748c 100644 --- a/src/bin/pg_archivecleanup/pg_archivecleanup.c +++ b/src/bin/pg_archivecleanup/pg_archivecleanup.c @@ -375,6 +375,10 @@ main(int argc, char **argv) exit(2); } + if (dryrun) + pg_log_info("Executing in dry-run mode.\n" + "No files will be removed."); + /* * Check archive exists and other initialization if required. */ diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c index df41836e70f..cc4be5d6ef4 100644 --- a/src/bin/pg_basebackup/pg_createsubscriber.c +++ b/src/bin/pg_basebackup/pg_createsubscriber.c @@ -2305,6 +2305,11 @@ main(int argc, char **argv) pg_log_error_hint("Try \"%s --help\" for more information.", progname); exit(1); } + + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + pg_log_info("validating publisher connection string"); pub_base_conninfo = get_base_conninfo(opt.pub_conninfo_str, &dbname_conninfo); diff --git a/src/bin/pg_combinebackup/pg_combinebackup.c b/src/bin/pg_combinebackup/pg_combinebackup.c index 3a325127209..c9bf0a9e105 100644 --- a/src/bin/pg_combinebackup/pg_combinebackup.c +++ b/src/bin/pg_combinebackup/pg_combinebackup.c @@ -242,6 +242,10 @@ main(int argc, char *argv[]) if (opt.no_manifest) opt.manifest_checksums = CHECKSUM_TYPE_NONE; + if (opt.dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + /* Check that the platform supports the requested copy method. */ if (opt.copy_method == COPY_METHOD_CLONE) { diff --git a/src/bin/pg_resetwal/pg_resetwal.c b/src/bin/pg_resetwal/pg_resetwal.c index a89d72fc5cf..dd5d279521e 100644 --- a/src/bin/pg_resetwal/pg_resetwal.c +++ b/src/bin/pg_resetwal/pg_resetwal.c @@ -397,6 +397,10 @@ main(int argc, char *argv[]) exit(1); } + if (noupdate) + pg_log_info("Executing in dry-run mode.\n" + "Nothing will be modified."); + /* * Attempt to read the existing pg_control file */ diff --git a/src/bin/pg_rewind/pg_rewind.c b/src/bin/pg_rewind/pg_rewind.c index 27c514f934a..e9364d04f76 100644 --- a/src/bin/pg_rewind/pg_rewind.c +++ b/src/bin/pg_rewind/pg_rewind.c @@ -300,10 +300,12 @@ main(int argc, char **argv) atexit(disconnect_atexit); - /* - * Ok, we have all the options and we're ready to start. First, connect to - * remote server. - */ + /* Ok, we have all the options and we're ready to start. */ + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + + /* First, connect to remote server. */ if (connstr_source) { conn = PQconnectdb(connstr_source); -- 2.47.3 --ibfr3ah5qy6tcbhw-- ^ permalink raw reply [nested|flat] 190+ messages in thread
* [PATCH v5] Log a note at program start when running in dry-run mode @ 2025-11-11 08:54 Álvaro Herrera <[email protected]> 0 siblings, 0 replies; 190+ messages in thread From: Álvaro Herrera @ 2025-11-11 08:54 UTC (permalink / raw) Users might get some peace of mind knowing their data is not being destroyed or whatever. Author: Peter Smith <[email protected]> Reviewed-by: Álvaro Herrera <[email protected]> Discussion: https://postgr.es/m/CAHut+PsvQJQnQO0KT0S2oegenkvJ8FUuY-QS5syyqmT24R2xFQ@mail.gmail.com --- src/bin/pg_archivecleanup/pg_archivecleanup.c | 4 ++++ src/bin/pg_basebackup/pg_createsubscriber.c | 5 +++++ src/bin/pg_combinebackup/pg_combinebackup.c | 4 ++++ src/bin/pg_resetwal/pg_resetwal.c | 4 ++++ src/bin/pg_rewind/pg_rewind.c | 10 ++++++---- 5 files changed, 23 insertions(+), 4 deletions(-) diff --git a/src/bin/pg_archivecleanup/pg_archivecleanup.c b/src/bin/pg_archivecleanup/pg_archivecleanup.c index c25348bcb85..ab686b4748c 100644 --- a/src/bin/pg_archivecleanup/pg_archivecleanup.c +++ b/src/bin/pg_archivecleanup/pg_archivecleanup.c @@ -375,6 +375,10 @@ main(int argc, char **argv) exit(2); } + if (dryrun) + pg_log_info("Executing in dry-run mode.\n" + "No files will be removed."); + /* * Check archive exists and other initialization if required. */ diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c index df41836e70f..cc4be5d6ef4 100644 --- a/src/bin/pg_basebackup/pg_createsubscriber.c +++ b/src/bin/pg_basebackup/pg_createsubscriber.c @@ -2305,6 +2305,11 @@ main(int argc, char **argv) pg_log_error_hint("Try \"%s --help\" for more information.", progname); exit(1); } + + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + pg_log_info("validating publisher connection string"); pub_base_conninfo = get_base_conninfo(opt.pub_conninfo_str, &dbname_conninfo); diff --git a/src/bin/pg_combinebackup/pg_combinebackup.c b/src/bin/pg_combinebackup/pg_combinebackup.c index 3a325127209..c9bf0a9e105 100644 --- a/src/bin/pg_combinebackup/pg_combinebackup.c +++ b/src/bin/pg_combinebackup/pg_combinebackup.c @@ -242,6 +242,10 @@ main(int argc, char *argv[]) if (opt.no_manifest) opt.manifest_checksums = CHECKSUM_TYPE_NONE; + if (opt.dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + /* Check that the platform supports the requested copy method. */ if (opt.copy_method == COPY_METHOD_CLONE) { diff --git a/src/bin/pg_resetwal/pg_resetwal.c b/src/bin/pg_resetwal/pg_resetwal.c index a89d72fc5cf..dd5d279521e 100644 --- a/src/bin/pg_resetwal/pg_resetwal.c +++ b/src/bin/pg_resetwal/pg_resetwal.c @@ -397,6 +397,10 @@ main(int argc, char *argv[]) exit(1); } + if (noupdate) + pg_log_info("Executing in dry-run mode.\n" + "Nothing will be modified."); + /* * Attempt to read the existing pg_control file */ diff --git a/src/bin/pg_rewind/pg_rewind.c b/src/bin/pg_rewind/pg_rewind.c index 27c514f934a..e9364d04f76 100644 --- a/src/bin/pg_rewind/pg_rewind.c +++ b/src/bin/pg_rewind/pg_rewind.c @@ -300,10 +300,12 @@ main(int argc, char **argv) atexit(disconnect_atexit); - /* - * Ok, we have all the options and we're ready to start. First, connect to - * remote server. - */ + /* Ok, we have all the options and we're ready to start. */ + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + + /* First, connect to remote server. */ if (connstr_source) { conn = PQconnectdb(connstr_source); -- 2.47.3 --ibfr3ah5qy6tcbhw-- ^ permalink raw reply [nested|flat] 190+ messages in thread
* [PATCH v5] Log a note at program start when running in dry-run mode @ 2025-11-11 08:54 Álvaro Herrera <[email protected]> 0 siblings, 0 replies; 190+ messages in thread From: Álvaro Herrera @ 2025-11-11 08:54 UTC (permalink / raw) Users might get some peace of mind knowing their data is not being destroyed or whatever. Author: Peter Smith <[email protected]> Reviewed-by: Álvaro Herrera <[email protected]> Discussion: https://postgr.es/m/CAHut+PsvQJQnQO0KT0S2oegenkvJ8FUuY-QS5syyqmT24R2xFQ@mail.gmail.com --- src/bin/pg_archivecleanup/pg_archivecleanup.c | 4 ++++ src/bin/pg_basebackup/pg_createsubscriber.c | 5 +++++ src/bin/pg_combinebackup/pg_combinebackup.c | 4 ++++ src/bin/pg_resetwal/pg_resetwal.c | 4 ++++ src/bin/pg_rewind/pg_rewind.c | 10 ++++++---- 5 files changed, 23 insertions(+), 4 deletions(-) diff --git a/src/bin/pg_archivecleanup/pg_archivecleanup.c b/src/bin/pg_archivecleanup/pg_archivecleanup.c index c25348bcb85..ab686b4748c 100644 --- a/src/bin/pg_archivecleanup/pg_archivecleanup.c +++ b/src/bin/pg_archivecleanup/pg_archivecleanup.c @@ -375,6 +375,10 @@ main(int argc, char **argv) exit(2); } + if (dryrun) + pg_log_info("Executing in dry-run mode.\n" + "No files will be removed."); + /* * Check archive exists and other initialization if required. */ diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c index df41836e70f..cc4be5d6ef4 100644 --- a/src/bin/pg_basebackup/pg_createsubscriber.c +++ b/src/bin/pg_basebackup/pg_createsubscriber.c @@ -2305,6 +2305,11 @@ main(int argc, char **argv) pg_log_error_hint("Try \"%s --help\" for more information.", progname); exit(1); } + + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + pg_log_info("validating publisher connection string"); pub_base_conninfo = get_base_conninfo(opt.pub_conninfo_str, &dbname_conninfo); diff --git a/src/bin/pg_combinebackup/pg_combinebackup.c b/src/bin/pg_combinebackup/pg_combinebackup.c index 3a325127209..c9bf0a9e105 100644 --- a/src/bin/pg_combinebackup/pg_combinebackup.c +++ b/src/bin/pg_combinebackup/pg_combinebackup.c @@ -242,6 +242,10 @@ main(int argc, char *argv[]) if (opt.no_manifest) opt.manifest_checksums = CHECKSUM_TYPE_NONE; + if (opt.dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + /* Check that the platform supports the requested copy method. */ if (opt.copy_method == COPY_METHOD_CLONE) { diff --git a/src/bin/pg_resetwal/pg_resetwal.c b/src/bin/pg_resetwal/pg_resetwal.c index a89d72fc5cf..dd5d279521e 100644 --- a/src/bin/pg_resetwal/pg_resetwal.c +++ b/src/bin/pg_resetwal/pg_resetwal.c @@ -397,6 +397,10 @@ main(int argc, char *argv[]) exit(1); } + if (noupdate) + pg_log_info("Executing in dry-run mode.\n" + "Nothing will be modified."); + /* * Attempt to read the existing pg_control file */ diff --git a/src/bin/pg_rewind/pg_rewind.c b/src/bin/pg_rewind/pg_rewind.c index 27c514f934a..e9364d04f76 100644 --- a/src/bin/pg_rewind/pg_rewind.c +++ b/src/bin/pg_rewind/pg_rewind.c @@ -300,10 +300,12 @@ main(int argc, char **argv) atexit(disconnect_atexit); - /* - * Ok, we have all the options and we're ready to start. First, connect to - * remote server. - */ + /* Ok, we have all the options and we're ready to start. */ + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + + /* First, connect to remote server. */ if (connstr_source) { conn = PQconnectdb(connstr_source); -- 2.47.3 --ibfr3ah5qy6tcbhw-- ^ permalink raw reply [nested|flat] 190+ messages in thread
* [PATCH v5] Log a note at program start when running in dry-run mode @ 2025-11-11 08:54 Álvaro Herrera <[email protected]> 0 siblings, 0 replies; 190+ messages in thread From: Álvaro Herrera @ 2025-11-11 08:54 UTC (permalink / raw) Users might get some peace of mind knowing their data is not being destroyed or whatever. Author: Peter Smith <[email protected]> Reviewed-by: Álvaro Herrera <[email protected]> Discussion: https://postgr.es/m/CAHut+PsvQJQnQO0KT0S2oegenkvJ8FUuY-QS5syyqmT24R2xFQ@mail.gmail.com --- src/bin/pg_archivecleanup/pg_archivecleanup.c | 4 ++++ src/bin/pg_basebackup/pg_createsubscriber.c | 5 +++++ src/bin/pg_combinebackup/pg_combinebackup.c | 4 ++++ src/bin/pg_resetwal/pg_resetwal.c | 4 ++++ src/bin/pg_rewind/pg_rewind.c | 10 ++++++---- 5 files changed, 23 insertions(+), 4 deletions(-) diff --git a/src/bin/pg_archivecleanup/pg_archivecleanup.c b/src/bin/pg_archivecleanup/pg_archivecleanup.c index c25348bcb85..ab686b4748c 100644 --- a/src/bin/pg_archivecleanup/pg_archivecleanup.c +++ b/src/bin/pg_archivecleanup/pg_archivecleanup.c @@ -375,6 +375,10 @@ main(int argc, char **argv) exit(2); } + if (dryrun) + pg_log_info("Executing in dry-run mode.\n" + "No files will be removed."); + /* * Check archive exists and other initialization if required. */ diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c index df41836e70f..cc4be5d6ef4 100644 --- a/src/bin/pg_basebackup/pg_createsubscriber.c +++ b/src/bin/pg_basebackup/pg_createsubscriber.c @@ -2305,6 +2305,11 @@ main(int argc, char **argv) pg_log_error_hint("Try \"%s --help\" for more information.", progname); exit(1); } + + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + pg_log_info("validating publisher connection string"); pub_base_conninfo = get_base_conninfo(opt.pub_conninfo_str, &dbname_conninfo); diff --git a/src/bin/pg_combinebackup/pg_combinebackup.c b/src/bin/pg_combinebackup/pg_combinebackup.c index 3a325127209..c9bf0a9e105 100644 --- a/src/bin/pg_combinebackup/pg_combinebackup.c +++ b/src/bin/pg_combinebackup/pg_combinebackup.c @@ -242,6 +242,10 @@ main(int argc, char *argv[]) if (opt.no_manifest) opt.manifest_checksums = CHECKSUM_TYPE_NONE; + if (opt.dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + /* Check that the platform supports the requested copy method. */ if (opt.copy_method == COPY_METHOD_CLONE) { diff --git a/src/bin/pg_resetwal/pg_resetwal.c b/src/bin/pg_resetwal/pg_resetwal.c index a89d72fc5cf..dd5d279521e 100644 --- a/src/bin/pg_resetwal/pg_resetwal.c +++ b/src/bin/pg_resetwal/pg_resetwal.c @@ -397,6 +397,10 @@ main(int argc, char *argv[]) exit(1); } + if (noupdate) + pg_log_info("Executing in dry-run mode.\n" + "Nothing will be modified."); + /* * Attempt to read the existing pg_control file */ diff --git a/src/bin/pg_rewind/pg_rewind.c b/src/bin/pg_rewind/pg_rewind.c index 27c514f934a..e9364d04f76 100644 --- a/src/bin/pg_rewind/pg_rewind.c +++ b/src/bin/pg_rewind/pg_rewind.c @@ -300,10 +300,12 @@ main(int argc, char **argv) atexit(disconnect_atexit); - /* - * Ok, we have all the options and we're ready to start. First, connect to - * remote server. - */ + /* Ok, we have all the options and we're ready to start. */ + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + + /* First, connect to remote server. */ if (connstr_source) { conn = PQconnectdb(connstr_source); -- 2.47.3 --ibfr3ah5qy6tcbhw-- ^ permalink raw reply [nested|flat] 190+ messages in thread
* [PATCH v5] Log a note at program start when running in dry-run mode @ 2025-11-11 08:54 Álvaro Herrera <[email protected]> 0 siblings, 0 replies; 190+ messages in thread From: Álvaro Herrera @ 2025-11-11 08:54 UTC (permalink / raw) Users might get some peace of mind knowing their data is not being destroyed or whatever. Author: Peter Smith <[email protected]> Reviewed-by: Álvaro Herrera <[email protected]> Discussion: https://postgr.es/m/CAHut+PsvQJQnQO0KT0S2oegenkvJ8FUuY-QS5syyqmT24R2xFQ@mail.gmail.com --- src/bin/pg_archivecleanup/pg_archivecleanup.c | 4 ++++ src/bin/pg_basebackup/pg_createsubscriber.c | 5 +++++ src/bin/pg_combinebackup/pg_combinebackup.c | 4 ++++ src/bin/pg_resetwal/pg_resetwal.c | 4 ++++ src/bin/pg_rewind/pg_rewind.c | 10 ++++++---- 5 files changed, 23 insertions(+), 4 deletions(-) diff --git a/src/bin/pg_archivecleanup/pg_archivecleanup.c b/src/bin/pg_archivecleanup/pg_archivecleanup.c index c25348bcb85..ab686b4748c 100644 --- a/src/bin/pg_archivecleanup/pg_archivecleanup.c +++ b/src/bin/pg_archivecleanup/pg_archivecleanup.c @@ -375,6 +375,10 @@ main(int argc, char **argv) exit(2); } + if (dryrun) + pg_log_info("Executing in dry-run mode.\n" + "No files will be removed."); + /* * Check archive exists and other initialization if required. */ diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c index df41836e70f..cc4be5d6ef4 100644 --- a/src/bin/pg_basebackup/pg_createsubscriber.c +++ b/src/bin/pg_basebackup/pg_createsubscriber.c @@ -2305,6 +2305,11 @@ main(int argc, char **argv) pg_log_error_hint("Try \"%s --help\" for more information.", progname); exit(1); } + + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + pg_log_info("validating publisher connection string"); pub_base_conninfo = get_base_conninfo(opt.pub_conninfo_str, &dbname_conninfo); diff --git a/src/bin/pg_combinebackup/pg_combinebackup.c b/src/bin/pg_combinebackup/pg_combinebackup.c index 3a325127209..c9bf0a9e105 100644 --- a/src/bin/pg_combinebackup/pg_combinebackup.c +++ b/src/bin/pg_combinebackup/pg_combinebackup.c @@ -242,6 +242,10 @@ main(int argc, char *argv[]) if (opt.no_manifest) opt.manifest_checksums = CHECKSUM_TYPE_NONE; + if (opt.dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + /* Check that the platform supports the requested copy method. */ if (opt.copy_method == COPY_METHOD_CLONE) { diff --git a/src/bin/pg_resetwal/pg_resetwal.c b/src/bin/pg_resetwal/pg_resetwal.c index a89d72fc5cf..dd5d279521e 100644 --- a/src/bin/pg_resetwal/pg_resetwal.c +++ b/src/bin/pg_resetwal/pg_resetwal.c @@ -397,6 +397,10 @@ main(int argc, char *argv[]) exit(1); } + if (noupdate) + pg_log_info("Executing in dry-run mode.\n" + "Nothing will be modified."); + /* * Attempt to read the existing pg_control file */ diff --git a/src/bin/pg_rewind/pg_rewind.c b/src/bin/pg_rewind/pg_rewind.c index 27c514f934a..e9364d04f76 100644 --- a/src/bin/pg_rewind/pg_rewind.c +++ b/src/bin/pg_rewind/pg_rewind.c @@ -300,10 +300,12 @@ main(int argc, char **argv) atexit(disconnect_atexit); - /* - * Ok, we have all the options and we're ready to start. First, connect to - * remote server. - */ + /* Ok, we have all the options and we're ready to start. */ + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + + /* First, connect to remote server. */ if (connstr_source) { conn = PQconnectdb(connstr_source); -- 2.47.3 --ibfr3ah5qy6tcbhw-- ^ permalink raw reply [nested|flat] 190+ messages in thread
* [PATCH v5] Log a note at program start when running in dry-run mode @ 2025-11-11 08:54 Álvaro Herrera <[email protected]> 0 siblings, 0 replies; 190+ messages in thread From: Álvaro Herrera @ 2025-11-11 08:54 UTC (permalink / raw) Users might get some peace of mind knowing their data is not being destroyed or whatever. Author: Peter Smith <[email protected]> Reviewed-by: Álvaro Herrera <[email protected]> Discussion: https://postgr.es/m/CAHut+PsvQJQnQO0KT0S2oegenkvJ8FUuY-QS5syyqmT24R2xFQ@mail.gmail.com --- src/bin/pg_archivecleanup/pg_archivecleanup.c | 4 ++++ src/bin/pg_basebackup/pg_createsubscriber.c | 5 +++++ src/bin/pg_combinebackup/pg_combinebackup.c | 4 ++++ src/bin/pg_resetwal/pg_resetwal.c | 4 ++++ src/bin/pg_rewind/pg_rewind.c | 10 ++++++---- 5 files changed, 23 insertions(+), 4 deletions(-) diff --git a/src/bin/pg_archivecleanup/pg_archivecleanup.c b/src/bin/pg_archivecleanup/pg_archivecleanup.c index c25348bcb85..ab686b4748c 100644 --- a/src/bin/pg_archivecleanup/pg_archivecleanup.c +++ b/src/bin/pg_archivecleanup/pg_archivecleanup.c @@ -375,6 +375,10 @@ main(int argc, char **argv) exit(2); } + if (dryrun) + pg_log_info("Executing in dry-run mode.\n" + "No files will be removed."); + /* * Check archive exists and other initialization if required. */ diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c index df41836e70f..cc4be5d6ef4 100644 --- a/src/bin/pg_basebackup/pg_createsubscriber.c +++ b/src/bin/pg_basebackup/pg_createsubscriber.c @@ -2305,6 +2305,11 @@ main(int argc, char **argv) pg_log_error_hint("Try \"%s --help\" for more information.", progname); exit(1); } + + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + pg_log_info("validating publisher connection string"); pub_base_conninfo = get_base_conninfo(opt.pub_conninfo_str, &dbname_conninfo); diff --git a/src/bin/pg_combinebackup/pg_combinebackup.c b/src/bin/pg_combinebackup/pg_combinebackup.c index 3a325127209..c9bf0a9e105 100644 --- a/src/bin/pg_combinebackup/pg_combinebackup.c +++ b/src/bin/pg_combinebackup/pg_combinebackup.c @@ -242,6 +242,10 @@ main(int argc, char *argv[]) if (opt.no_manifest) opt.manifest_checksums = CHECKSUM_TYPE_NONE; + if (opt.dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + /* Check that the platform supports the requested copy method. */ if (opt.copy_method == COPY_METHOD_CLONE) { diff --git a/src/bin/pg_resetwal/pg_resetwal.c b/src/bin/pg_resetwal/pg_resetwal.c index a89d72fc5cf..dd5d279521e 100644 --- a/src/bin/pg_resetwal/pg_resetwal.c +++ b/src/bin/pg_resetwal/pg_resetwal.c @@ -397,6 +397,10 @@ main(int argc, char *argv[]) exit(1); } + if (noupdate) + pg_log_info("Executing in dry-run mode.\n" + "Nothing will be modified."); + /* * Attempt to read the existing pg_control file */ diff --git a/src/bin/pg_rewind/pg_rewind.c b/src/bin/pg_rewind/pg_rewind.c index 27c514f934a..e9364d04f76 100644 --- a/src/bin/pg_rewind/pg_rewind.c +++ b/src/bin/pg_rewind/pg_rewind.c @@ -300,10 +300,12 @@ main(int argc, char **argv) atexit(disconnect_atexit); - /* - * Ok, we have all the options and we're ready to start. First, connect to - * remote server. - */ + /* Ok, we have all the options and we're ready to start. */ + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + + /* First, connect to remote server. */ if (connstr_source) { conn = PQconnectdb(connstr_source); -- 2.47.3 --ibfr3ah5qy6tcbhw-- ^ permalink raw reply [nested|flat] 190+ messages in thread
* [PATCH v5] Log a note at program start when running in dry-run mode @ 2025-11-11 08:54 Álvaro Herrera <[email protected]> 0 siblings, 0 replies; 190+ messages in thread From: Álvaro Herrera @ 2025-11-11 08:54 UTC (permalink / raw) Users might get some peace of mind knowing their data is not being destroyed or whatever. Author: Peter Smith <[email protected]> Reviewed-by: Álvaro Herrera <[email protected]> Discussion: https://postgr.es/m/CAHut+PsvQJQnQO0KT0S2oegenkvJ8FUuY-QS5syyqmT24R2xFQ@mail.gmail.com --- src/bin/pg_archivecleanup/pg_archivecleanup.c | 4 ++++ src/bin/pg_basebackup/pg_createsubscriber.c | 5 +++++ src/bin/pg_combinebackup/pg_combinebackup.c | 4 ++++ src/bin/pg_resetwal/pg_resetwal.c | 4 ++++ src/bin/pg_rewind/pg_rewind.c | 10 ++++++---- 5 files changed, 23 insertions(+), 4 deletions(-) diff --git a/src/bin/pg_archivecleanup/pg_archivecleanup.c b/src/bin/pg_archivecleanup/pg_archivecleanup.c index c25348bcb85..ab686b4748c 100644 --- a/src/bin/pg_archivecleanup/pg_archivecleanup.c +++ b/src/bin/pg_archivecleanup/pg_archivecleanup.c @@ -375,6 +375,10 @@ main(int argc, char **argv) exit(2); } + if (dryrun) + pg_log_info("Executing in dry-run mode.\n" + "No files will be removed."); + /* * Check archive exists and other initialization if required. */ diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c index df41836e70f..cc4be5d6ef4 100644 --- a/src/bin/pg_basebackup/pg_createsubscriber.c +++ b/src/bin/pg_basebackup/pg_createsubscriber.c @@ -2305,6 +2305,11 @@ main(int argc, char **argv) pg_log_error_hint("Try \"%s --help\" for more information.", progname); exit(1); } + + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + pg_log_info("validating publisher connection string"); pub_base_conninfo = get_base_conninfo(opt.pub_conninfo_str, &dbname_conninfo); diff --git a/src/bin/pg_combinebackup/pg_combinebackup.c b/src/bin/pg_combinebackup/pg_combinebackup.c index 3a325127209..c9bf0a9e105 100644 --- a/src/bin/pg_combinebackup/pg_combinebackup.c +++ b/src/bin/pg_combinebackup/pg_combinebackup.c @@ -242,6 +242,10 @@ main(int argc, char *argv[]) if (opt.no_manifest) opt.manifest_checksums = CHECKSUM_TYPE_NONE; + if (opt.dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + /* Check that the platform supports the requested copy method. */ if (opt.copy_method == COPY_METHOD_CLONE) { diff --git a/src/bin/pg_resetwal/pg_resetwal.c b/src/bin/pg_resetwal/pg_resetwal.c index a89d72fc5cf..dd5d279521e 100644 --- a/src/bin/pg_resetwal/pg_resetwal.c +++ b/src/bin/pg_resetwal/pg_resetwal.c @@ -397,6 +397,10 @@ main(int argc, char *argv[]) exit(1); } + if (noupdate) + pg_log_info("Executing in dry-run mode.\n" + "Nothing will be modified."); + /* * Attempt to read the existing pg_control file */ diff --git a/src/bin/pg_rewind/pg_rewind.c b/src/bin/pg_rewind/pg_rewind.c index 27c514f934a..e9364d04f76 100644 --- a/src/bin/pg_rewind/pg_rewind.c +++ b/src/bin/pg_rewind/pg_rewind.c @@ -300,10 +300,12 @@ main(int argc, char **argv) atexit(disconnect_atexit); - /* - * Ok, we have all the options and we're ready to start. First, connect to - * remote server. - */ + /* Ok, we have all the options and we're ready to start. */ + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + + /* First, connect to remote server. */ if (connstr_source) { conn = PQconnectdb(connstr_source); -- 2.47.3 --ibfr3ah5qy6tcbhw-- ^ permalink raw reply [nested|flat] 190+ messages in thread
* [PATCH v5] Log a note at program start when running in dry-run mode @ 2025-11-11 08:54 Álvaro Herrera <[email protected]> 0 siblings, 0 replies; 190+ messages in thread From: Álvaro Herrera @ 2025-11-11 08:54 UTC (permalink / raw) Users might get some peace of mind knowing their data is not being destroyed or whatever. Author: Peter Smith <[email protected]> Reviewed-by: Álvaro Herrera <[email protected]> Discussion: https://postgr.es/m/CAHut+PsvQJQnQO0KT0S2oegenkvJ8FUuY-QS5syyqmT24R2xFQ@mail.gmail.com --- src/bin/pg_archivecleanup/pg_archivecleanup.c | 4 ++++ src/bin/pg_basebackup/pg_createsubscriber.c | 5 +++++ src/bin/pg_combinebackup/pg_combinebackup.c | 4 ++++ src/bin/pg_resetwal/pg_resetwal.c | 4 ++++ src/bin/pg_rewind/pg_rewind.c | 10 ++++++---- 5 files changed, 23 insertions(+), 4 deletions(-) diff --git a/src/bin/pg_archivecleanup/pg_archivecleanup.c b/src/bin/pg_archivecleanup/pg_archivecleanup.c index c25348bcb85..ab686b4748c 100644 --- a/src/bin/pg_archivecleanup/pg_archivecleanup.c +++ b/src/bin/pg_archivecleanup/pg_archivecleanup.c @@ -375,6 +375,10 @@ main(int argc, char **argv) exit(2); } + if (dryrun) + pg_log_info("Executing in dry-run mode.\n" + "No files will be removed."); + /* * Check archive exists and other initialization if required. */ diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c index df41836e70f..cc4be5d6ef4 100644 --- a/src/bin/pg_basebackup/pg_createsubscriber.c +++ b/src/bin/pg_basebackup/pg_createsubscriber.c @@ -2305,6 +2305,11 @@ main(int argc, char **argv) pg_log_error_hint("Try \"%s --help\" for more information.", progname); exit(1); } + + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + pg_log_info("validating publisher connection string"); pub_base_conninfo = get_base_conninfo(opt.pub_conninfo_str, &dbname_conninfo); diff --git a/src/bin/pg_combinebackup/pg_combinebackup.c b/src/bin/pg_combinebackup/pg_combinebackup.c index 3a325127209..c9bf0a9e105 100644 --- a/src/bin/pg_combinebackup/pg_combinebackup.c +++ b/src/bin/pg_combinebackup/pg_combinebackup.c @@ -242,6 +242,10 @@ main(int argc, char *argv[]) if (opt.no_manifest) opt.manifest_checksums = CHECKSUM_TYPE_NONE; + if (opt.dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + /* Check that the platform supports the requested copy method. */ if (opt.copy_method == COPY_METHOD_CLONE) { diff --git a/src/bin/pg_resetwal/pg_resetwal.c b/src/bin/pg_resetwal/pg_resetwal.c index a89d72fc5cf..dd5d279521e 100644 --- a/src/bin/pg_resetwal/pg_resetwal.c +++ b/src/bin/pg_resetwal/pg_resetwal.c @@ -397,6 +397,10 @@ main(int argc, char *argv[]) exit(1); } + if (noupdate) + pg_log_info("Executing in dry-run mode.\n" + "Nothing will be modified."); + /* * Attempt to read the existing pg_control file */ diff --git a/src/bin/pg_rewind/pg_rewind.c b/src/bin/pg_rewind/pg_rewind.c index 27c514f934a..e9364d04f76 100644 --- a/src/bin/pg_rewind/pg_rewind.c +++ b/src/bin/pg_rewind/pg_rewind.c @@ -300,10 +300,12 @@ main(int argc, char **argv) atexit(disconnect_atexit); - /* - * Ok, we have all the options and we're ready to start. First, connect to - * remote server. - */ + /* Ok, we have all the options and we're ready to start. */ + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + + /* First, connect to remote server. */ if (connstr_source) { conn = PQconnectdb(connstr_source); -- 2.47.3 --ibfr3ah5qy6tcbhw-- ^ permalink raw reply [nested|flat] 190+ messages in thread
* [PATCH v5] Log a note at program start when running in dry-run mode @ 2025-11-11 08:54 Álvaro Herrera <[email protected]> 0 siblings, 0 replies; 190+ messages in thread From: Álvaro Herrera @ 2025-11-11 08:54 UTC (permalink / raw) Users might get some peace of mind knowing their data is not being destroyed or whatever. Author: Peter Smith <[email protected]> Reviewed-by: Álvaro Herrera <[email protected]> Discussion: https://postgr.es/m/CAHut+PsvQJQnQO0KT0S2oegenkvJ8FUuY-QS5syyqmT24R2xFQ@mail.gmail.com --- src/bin/pg_archivecleanup/pg_archivecleanup.c | 4 ++++ src/bin/pg_basebackup/pg_createsubscriber.c | 5 +++++ src/bin/pg_combinebackup/pg_combinebackup.c | 4 ++++ src/bin/pg_resetwal/pg_resetwal.c | 4 ++++ src/bin/pg_rewind/pg_rewind.c | 10 ++++++---- 5 files changed, 23 insertions(+), 4 deletions(-) diff --git a/src/bin/pg_archivecleanup/pg_archivecleanup.c b/src/bin/pg_archivecleanup/pg_archivecleanup.c index c25348bcb85..ab686b4748c 100644 --- a/src/bin/pg_archivecleanup/pg_archivecleanup.c +++ b/src/bin/pg_archivecleanup/pg_archivecleanup.c @@ -375,6 +375,10 @@ main(int argc, char **argv) exit(2); } + if (dryrun) + pg_log_info("Executing in dry-run mode.\n" + "No files will be removed."); + /* * Check archive exists and other initialization if required. */ diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c index df41836e70f..cc4be5d6ef4 100644 --- a/src/bin/pg_basebackup/pg_createsubscriber.c +++ b/src/bin/pg_basebackup/pg_createsubscriber.c @@ -2305,6 +2305,11 @@ main(int argc, char **argv) pg_log_error_hint("Try \"%s --help\" for more information.", progname); exit(1); } + + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + pg_log_info("validating publisher connection string"); pub_base_conninfo = get_base_conninfo(opt.pub_conninfo_str, &dbname_conninfo); diff --git a/src/bin/pg_combinebackup/pg_combinebackup.c b/src/bin/pg_combinebackup/pg_combinebackup.c index 3a325127209..c9bf0a9e105 100644 --- a/src/bin/pg_combinebackup/pg_combinebackup.c +++ b/src/bin/pg_combinebackup/pg_combinebackup.c @@ -242,6 +242,10 @@ main(int argc, char *argv[]) if (opt.no_manifest) opt.manifest_checksums = CHECKSUM_TYPE_NONE; + if (opt.dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + /* Check that the platform supports the requested copy method. */ if (opt.copy_method == COPY_METHOD_CLONE) { diff --git a/src/bin/pg_resetwal/pg_resetwal.c b/src/bin/pg_resetwal/pg_resetwal.c index a89d72fc5cf..dd5d279521e 100644 --- a/src/bin/pg_resetwal/pg_resetwal.c +++ b/src/bin/pg_resetwal/pg_resetwal.c @@ -397,6 +397,10 @@ main(int argc, char *argv[]) exit(1); } + if (noupdate) + pg_log_info("Executing in dry-run mode.\n" + "Nothing will be modified."); + /* * Attempt to read the existing pg_control file */ diff --git a/src/bin/pg_rewind/pg_rewind.c b/src/bin/pg_rewind/pg_rewind.c index 27c514f934a..e9364d04f76 100644 --- a/src/bin/pg_rewind/pg_rewind.c +++ b/src/bin/pg_rewind/pg_rewind.c @@ -300,10 +300,12 @@ main(int argc, char **argv) atexit(disconnect_atexit); - /* - * Ok, we have all the options and we're ready to start. First, connect to - * remote server. - */ + /* Ok, we have all the options and we're ready to start. */ + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + + /* First, connect to remote server. */ if (connstr_source) { conn = PQconnectdb(connstr_source); -- 2.47.3 --ibfr3ah5qy6tcbhw-- ^ permalink raw reply [nested|flat] 190+ messages in thread
* [PATCH v5] Log a note at program start when running in dry-run mode @ 2025-11-11 08:54 Álvaro Herrera <[email protected]> 0 siblings, 0 replies; 190+ messages in thread From: Álvaro Herrera @ 2025-11-11 08:54 UTC (permalink / raw) Users might get some peace of mind knowing their data is not being destroyed or whatever. Author: Peter Smith <[email protected]> Reviewed-by: Álvaro Herrera <[email protected]> Discussion: https://postgr.es/m/CAHut+PsvQJQnQO0KT0S2oegenkvJ8FUuY-QS5syyqmT24R2xFQ@mail.gmail.com --- src/bin/pg_archivecleanup/pg_archivecleanup.c | 4 ++++ src/bin/pg_basebackup/pg_createsubscriber.c | 5 +++++ src/bin/pg_combinebackup/pg_combinebackup.c | 4 ++++ src/bin/pg_resetwal/pg_resetwal.c | 4 ++++ src/bin/pg_rewind/pg_rewind.c | 10 ++++++---- 5 files changed, 23 insertions(+), 4 deletions(-) diff --git a/src/bin/pg_archivecleanup/pg_archivecleanup.c b/src/bin/pg_archivecleanup/pg_archivecleanup.c index c25348bcb85..ab686b4748c 100644 --- a/src/bin/pg_archivecleanup/pg_archivecleanup.c +++ b/src/bin/pg_archivecleanup/pg_archivecleanup.c @@ -375,6 +375,10 @@ main(int argc, char **argv) exit(2); } + if (dryrun) + pg_log_info("Executing in dry-run mode.\n" + "No files will be removed."); + /* * Check archive exists and other initialization if required. */ diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c index df41836e70f..cc4be5d6ef4 100644 --- a/src/bin/pg_basebackup/pg_createsubscriber.c +++ b/src/bin/pg_basebackup/pg_createsubscriber.c @@ -2305,6 +2305,11 @@ main(int argc, char **argv) pg_log_error_hint("Try \"%s --help\" for more information.", progname); exit(1); } + + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + pg_log_info("validating publisher connection string"); pub_base_conninfo = get_base_conninfo(opt.pub_conninfo_str, &dbname_conninfo); diff --git a/src/bin/pg_combinebackup/pg_combinebackup.c b/src/bin/pg_combinebackup/pg_combinebackup.c index 3a325127209..c9bf0a9e105 100644 --- a/src/bin/pg_combinebackup/pg_combinebackup.c +++ b/src/bin/pg_combinebackup/pg_combinebackup.c @@ -242,6 +242,10 @@ main(int argc, char *argv[]) if (opt.no_manifest) opt.manifest_checksums = CHECKSUM_TYPE_NONE; + if (opt.dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + /* Check that the platform supports the requested copy method. */ if (opt.copy_method == COPY_METHOD_CLONE) { diff --git a/src/bin/pg_resetwal/pg_resetwal.c b/src/bin/pg_resetwal/pg_resetwal.c index a89d72fc5cf..dd5d279521e 100644 --- a/src/bin/pg_resetwal/pg_resetwal.c +++ b/src/bin/pg_resetwal/pg_resetwal.c @@ -397,6 +397,10 @@ main(int argc, char *argv[]) exit(1); } + if (noupdate) + pg_log_info("Executing in dry-run mode.\n" + "Nothing will be modified."); + /* * Attempt to read the existing pg_control file */ diff --git a/src/bin/pg_rewind/pg_rewind.c b/src/bin/pg_rewind/pg_rewind.c index 27c514f934a..e9364d04f76 100644 --- a/src/bin/pg_rewind/pg_rewind.c +++ b/src/bin/pg_rewind/pg_rewind.c @@ -300,10 +300,12 @@ main(int argc, char **argv) atexit(disconnect_atexit); - /* - * Ok, we have all the options and we're ready to start. First, connect to - * remote server. - */ + /* Ok, we have all the options and we're ready to start. */ + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + + /* First, connect to remote server. */ if (connstr_source) { conn = PQconnectdb(connstr_source); -- 2.47.3 --ibfr3ah5qy6tcbhw-- ^ permalink raw reply [nested|flat] 190+ messages in thread
* [PATCH v5] Log a note at program start when running in dry-run mode @ 2025-11-11 08:54 Álvaro Herrera <[email protected]> 0 siblings, 0 replies; 190+ messages in thread From: Álvaro Herrera @ 2025-11-11 08:54 UTC (permalink / raw) Users might get some peace of mind knowing their data is not being destroyed or whatever. Author: Peter Smith <[email protected]> Reviewed-by: Álvaro Herrera <[email protected]> Discussion: https://postgr.es/m/CAHut+PsvQJQnQO0KT0S2oegenkvJ8FUuY-QS5syyqmT24R2xFQ@mail.gmail.com --- src/bin/pg_archivecleanup/pg_archivecleanup.c | 4 ++++ src/bin/pg_basebackup/pg_createsubscriber.c | 5 +++++ src/bin/pg_combinebackup/pg_combinebackup.c | 4 ++++ src/bin/pg_resetwal/pg_resetwal.c | 4 ++++ src/bin/pg_rewind/pg_rewind.c | 10 ++++++---- 5 files changed, 23 insertions(+), 4 deletions(-) diff --git a/src/bin/pg_archivecleanup/pg_archivecleanup.c b/src/bin/pg_archivecleanup/pg_archivecleanup.c index c25348bcb85..ab686b4748c 100644 --- a/src/bin/pg_archivecleanup/pg_archivecleanup.c +++ b/src/bin/pg_archivecleanup/pg_archivecleanup.c @@ -375,6 +375,10 @@ main(int argc, char **argv) exit(2); } + if (dryrun) + pg_log_info("Executing in dry-run mode.\n" + "No files will be removed."); + /* * Check archive exists and other initialization if required. */ diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c index df41836e70f..cc4be5d6ef4 100644 --- a/src/bin/pg_basebackup/pg_createsubscriber.c +++ b/src/bin/pg_basebackup/pg_createsubscriber.c @@ -2305,6 +2305,11 @@ main(int argc, char **argv) pg_log_error_hint("Try \"%s --help\" for more information.", progname); exit(1); } + + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + pg_log_info("validating publisher connection string"); pub_base_conninfo = get_base_conninfo(opt.pub_conninfo_str, &dbname_conninfo); diff --git a/src/bin/pg_combinebackup/pg_combinebackup.c b/src/bin/pg_combinebackup/pg_combinebackup.c index 3a325127209..c9bf0a9e105 100644 --- a/src/bin/pg_combinebackup/pg_combinebackup.c +++ b/src/bin/pg_combinebackup/pg_combinebackup.c @@ -242,6 +242,10 @@ main(int argc, char *argv[]) if (opt.no_manifest) opt.manifest_checksums = CHECKSUM_TYPE_NONE; + if (opt.dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + /* Check that the platform supports the requested copy method. */ if (opt.copy_method == COPY_METHOD_CLONE) { diff --git a/src/bin/pg_resetwal/pg_resetwal.c b/src/bin/pg_resetwal/pg_resetwal.c index a89d72fc5cf..dd5d279521e 100644 --- a/src/bin/pg_resetwal/pg_resetwal.c +++ b/src/bin/pg_resetwal/pg_resetwal.c @@ -397,6 +397,10 @@ main(int argc, char *argv[]) exit(1); } + if (noupdate) + pg_log_info("Executing in dry-run mode.\n" + "Nothing will be modified."); + /* * Attempt to read the existing pg_control file */ diff --git a/src/bin/pg_rewind/pg_rewind.c b/src/bin/pg_rewind/pg_rewind.c index 27c514f934a..e9364d04f76 100644 --- a/src/bin/pg_rewind/pg_rewind.c +++ b/src/bin/pg_rewind/pg_rewind.c @@ -300,10 +300,12 @@ main(int argc, char **argv) atexit(disconnect_atexit); - /* - * Ok, we have all the options and we're ready to start. First, connect to - * remote server. - */ + /* Ok, we have all the options and we're ready to start. */ + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + + /* First, connect to remote server. */ if (connstr_source) { conn = PQconnectdb(connstr_source); -- 2.47.3 --ibfr3ah5qy6tcbhw-- ^ permalink raw reply [nested|flat] 190+ messages in thread
* [PATCH v5] Log a note at program start when running in dry-run mode @ 2025-11-11 08:54 Álvaro Herrera <[email protected]> 0 siblings, 0 replies; 190+ messages in thread From: Álvaro Herrera @ 2025-11-11 08:54 UTC (permalink / raw) Users might get some peace of mind knowing their data is not being destroyed or whatever. Author: Peter Smith <[email protected]> Reviewed-by: Álvaro Herrera <[email protected]> Discussion: https://postgr.es/m/CAHut+PsvQJQnQO0KT0S2oegenkvJ8FUuY-QS5syyqmT24R2xFQ@mail.gmail.com --- src/bin/pg_archivecleanup/pg_archivecleanup.c | 4 ++++ src/bin/pg_basebackup/pg_createsubscriber.c | 5 +++++ src/bin/pg_combinebackup/pg_combinebackup.c | 4 ++++ src/bin/pg_resetwal/pg_resetwal.c | 4 ++++ src/bin/pg_rewind/pg_rewind.c | 10 ++++++---- 5 files changed, 23 insertions(+), 4 deletions(-) diff --git a/src/bin/pg_archivecleanup/pg_archivecleanup.c b/src/bin/pg_archivecleanup/pg_archivecleanup.c index c25348bcb85..ab686b4748c 100644 --- a/src/bin/pg_archivecleanup/pg_archivecleanup.c +++ b/src/bin/pg_archivecleanup/pg_archivecleanup.c @@ -375,6 +375,10 @@ main(int argc, char **argv) exit(2); } + if (dryrun) + pg_log_info("Executing in dry-run mode.\n" + "No files will be removed."); + /* * Check archive exists and other initialization if required. */ diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c index df41836e70f..cc4be5d6ef4 100644 --- a/src/bin/pg_basebackup/pg_createsubscriber.c +++ b/src/bin/pg_basebackup/pg_createsubscriber.c @@ -2305,6 +2305,11 @@ main(int argc, char **argv) pg_log_error_hint("Try \"%s --help\" for more information.", progname); exit(1); } + + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + pg_log_info("validating publisher connection string"); pub_base_conninfo = get_base_conninfo(opt.pub_conninfo_str, &dbname_conninfo); diff --git a/src/bin/pg_combinebackup/pg_combinebackup.c b/src/bin/pg_combinebackup/pg_combinebackup.c index 3a325127209..c9bf0a9e105 100644 --- a/src/bin/pg_combinebackup/pg_combinebackup.c +++ b/src/bin/pg_combinebackup/pg_combinebackup.c @@ -242,6 +242,10 @@ main(int argc, char *argv[]) if (opt.no_manifest) opt.manifest_checksums = CHECKSUM_TYPE_NONE; + if (opt.dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + /* Check that the platform supports the requested copy method. */ if (opt.copy_method == COPY_METHOD_CLONE) { diff --git a/src/bin/pg_resetwal/pg_resetwal.c b/src/bin/pg_resetwal/pg_resetwal.c index a89d72fc5cf..dd5d279521e 100644 --- a/src/bin/pg_resetwal/pg_resetwal.c +++ b/src/bin/pg_resetwal/pg_resetwal.c @@ -397,6 +397,10 @@ main(int argc, char *argv[]) exit(1); } + if (noupdate) + pg_log_info("Executing in dry-run mode.\n" + "Nothing will be modified."); + /* * Attempt to read the existing pg_control file */ diff --git a/src/bin/pg_rewind/pg_rewind.c b/src/bin/pg_rewind/pg_rewind.c index 27c514f934a..e9364d04f76 100644 --- a/src/bin/pg_rewind/pg_rewind.c +++ b/src/bin/pg_rewind/pg_rewind.c @@ -300,10 +300,12 @@ main(int argc, char **argv) atexit(disconnect_atexit); - /* - * Ok, we have all the options and we're ready to start. First, connect to - * remote server. - */ + /* Ok, we have all the options and we're ready to start. */ + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + + /* First, connect to remote server. */ if (connstr_source) { conn = PQconnectdb(connstr_source); -- 2.47.3 --ibfr3ah5qy6tcbhw-- ^ permalink raw reply [nested|flat] 190+ messages in thread
* [PATCH v5] Log a note at program start when running in dry-run mode @ 2025-11-11 08:54 Álvaro Herrera <[email protected]> 0 siblings, 0 replies; 190+ messages in thread From: Álvaro Herrera @ 2025-11-11 08:54 UTC (permalink / raw) Users might get some peace of mind knowing their data is not being destroyed or whatever. Author: Peter Smith <[email protected]> Reviewed-by: Álvaro Herrera <[email protected]> Discussion: https://postgr.es/m/CAHut+PsvQJQnQO0KT0S2oegenkvJ8FUuY-QS5syyqmT24R2xFQ@mail.gmail.com --- src/bin/pg_archivecleanup/pg_archivecleanup.c | 4 ++++ src/bin/pg_basebackup/pg_createsubscriber.c | 5 +++++ src/bin/pg_combinebackup/pg_combinebackup.c | 4 ++++ src/bin/pg_resetwal/pg_resetwal.c | 4 ++++ src/bin/pg_rewind/pg_rewind.c | 10 ++++++---- 5 files changed, 23 insertions(+), 4 deletions(-) diff --git a/src/bin/pg_archivecleanup/pg_archivecleanup.c b/src/bin/pg_archivecleanup/pg_archivecleanup.c index c25348bcb85..ab686b4748c 100644 --- a/src/bin/pg_archivecleanup/pg_archivecleanup.c +++ b/src/bin/pg_archivecleanup/pg_archivecleanup.c @@ -375,6 +375,10 @@ main(int argc, char **argv) exit(2); } + if (dryrun) + pg_log_info("Executing in dry-run mode.\n" + "No files will be removed."); + /* * Check archive exists and other initialization if required. */ diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c index df41836e70f..cc4be5d6ef4 100644 --- a/src/bin/pg_basebackup/pg_createsubscriber.c +++ b/src/bin/pg_basebackup/pg_createsubscriber.c @@ -2305,6 +2305,11 @@ main(int argc, char **argv) pg_log_error_hint("Try \"%s --help\" for more information.", progname); exit(1); } + + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + pg_log_info("validating publisher connection string"); pub_base_conninfo = get_base_conninfo(opt.pub_conninfo_str, &dbname_conninfo); diff --git a/src/bin/pg_combinebackup/pg_combinebackup.c b/src/bin/pg_combinebackup/pg_combinebackup.c index 3a325127209..c9bf0a9e105 100644 --- a/src/bin/pg_combinebackup/pg_combinebackup.c +++ b/src/bin/pg_combinebackup/pg_combinebackup.c @@ -242,6 +242,10 @@ main(int argc, char *argv[]) if (opt.no_manifest) opt.manifest_checksums = CHECKSUM_TYPE_NONE; + if (opt.dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + /* Check that the platform supports the requested copy method. */ if (opt.copy_method == COPY_METHOD_CLONE) { diff --git a/src/bin/pg_resetwal/pg_resetwal.c b/src/bin/pg_resetwal/pg_resetwal.c index a89d72fc5cf..dd5d279521e 100644 --- a/src/bin/pg_resetwal/pg_resetwal.c +++ b/src/bin/pg_resetwal/pg_resetwal.c @@ -397,6 +397,10 @@ main(int argc, char *argv[]) exit(1); } + if (noupdate) + pg_log_info("Executing in dry-run mode.\n" + "Nothing will be modified."); + /* * Attempt to read the existing pg_control file */ diff --git a/src/bin/pg_rewind/pg_rewind.c b/src/bin/pg_rewind/pg_rewind.c index 27c514f934a..e9364d04f76 100644 --- a/src/bin/pg_rewind/pg_rewind.c +++ b/src/bin/pg_rewind/pg_rewind.c @@ -300,10 +300,12 @@ main(int argc, char **argv) atexit(disconnect_atexit); - /* - * Ok, we have all the options and we're ready to start. First, connect to - * remote server. - */ + /* Ok, we have all the options and we're ready to start. */ + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + + /* First, connect to remote server. */ if (connstr_source) { conn = PQconnectdb(connstr_source); -- 2.47.3 --ibfr3ah5qy6tcbhw-- ^ permalink raw reply [nested|flat] 190+ messages in thread
* [PATCH v5] Log a note at program start when running in dry-run mode @ 2025-11-11 08:54 Álvaro Herrera <[email protected]> 0 siblings, 0 replies; 190+ messages in thread From: Álvaro Herrera @ 2025-11-11 08:54 UTC (permalink / raw) Users might get some peace of mind knowing their data is not being destroyed or whatever. Author: Peter Smith <[email protected]> Reviewed-by: Álvaro Herrera <[email protected]> Discussion: https://postgr.es/m/CAHut+PsvQJQnQO0KT0S2oegenkvJ8FUuY-QS5syyqmT24R2xFQ@mail.gmail.com --- src/bin/pg_archivecleanup/pg_archivecleanup.c | 4 ++++ src/bin/pg_basebackup/pg_createsubscriber.c | 5 +++++ src/bin/pg_combinebackup/pg_combinebackup.c | 4 ++++ src/bin/pg_resetwal/pg_resetwal.c | 4 ++++ src/bin/pg_rewind/pg_rewind.c | 10 ++++++---- 5 files changed, 23 insertions(+), 4 deletions(-) diff --git a/src/bin/pg_archivecleanup/pg_archivecleanup.c b/src/bin/pg_archivecleanup/pg_archivecleanup.c index c25348bcb85..ab686b4748c 100644 --- a/src/bin/pg_archivecleanup/pg_archivecleanup.c +++ b/src/bin/pg_archivecleanup/pg_archivecleanup.c @@ -375,6 +375,10 @@ main(int argc, char **argv) exit(2); } + if (dryrun) + pg_log_info("Executing in dry-run mode.\n" + "No files will be removed."); + /* * Check archive exists and other initialization if required. */ diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c index df41836e70f..cc4be5d6ef4 100644 --- a/src/bin/pg_basebackup/pg_createsubscriber.c +++ b/src/bin/pg_basebackup/pg_createsubscriber.c @@ -2305,6 +2305,11 @@ main(int argc, char **argv) pg_log_error_hint("Try \"%s --help\" for more information.", progname); exit(1); } + + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + pg_log_info("validating publisher connection string"); pub_base_conninfo = get_base_conninfo(opt.pub_conninfo_str, &dbname_conninfo); diff --git a/src/bin/pg_combinebackup/pg_combinebackup.c b/src/bin/pg_combinebackup/pg_combinebackup.c index 3a325127209..c9bf0a9e105 100644 --- a/src/bin/pg_combinebackup/pg_combinebackup.c +++ b/src/bin/pg_combinebackup/pg_combinebackup.c @@ -242,6 +242,10 @@ main(int argc, char *argv[]) if (opt.no_manifest) opt.manifest_checksums = CHECKSUM_TYPE_NONE; + if (opt.dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + /* Check that the platform supports the requested copy method. */ if (opt.copy_method == COPY_METHOD_CLONE) { diff --git a/src/bin/pg_resetwal/pg_resetwal.c b/src/bin/pg_resetwal/pg_resetwal.c index a89d72fc5cf..dd5d279521e 100644 --- a/src/bin/pg_resetwal/pg_resetwal.c +++ b/src/bin/pg_resetwal/pg_resetwal.c @@ -397,6 +397,10 @@ main(int argc, char *argv[]) exit(1); } + if (noupdate) + pg_log_info("Executing in dry-run mode.\n" + "Nothing will be modified."); + /* * Attempt to read the existing pg_control file */ diff --git a/src/bin/pg_rewind/pg_rewind.c b/src/bin/pg_rewind/pg_rewind.c index 27c514f934a..e9364d04f76 100644 --- a/src/bin/pg_rewind/pg_rewind.c +++ b/src/bin/pg_rewind/pg_rewind.c @@ -300,10 +300,12 @@ main(int argc, char **argv) atexit(disconnect_atexit); - /* - * Ok, we have all the options and we're ready to start. First, connect to - * remote server. - */ + /* Ok, we have all the options and we're ready to start. */ + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + + /* First, connect to remote server. */ if (connstr_source) { conn = PQconnectdb(connstr_source); -- 2.47.3 --ibfr3ah5qy6tcbhw-- ^ permalink raw reply [nested|flat] 190+ messages in thread
* [PATCH v5] Log a note at program start when running in dry-run mode @ 2025-11-11 08:54 Álvaro Herrera <[email protected]> 0 siblings, 0 replies; 190+ messages in thread From: Álvaro Herrera @ 2025-11-11 08:54 UTC (permalink / raw) Users might get some peace of mind knowing their data is not being destroyed or whatever. Author: Peter Smith <[email protected]> Reviewed-by: Álvaro Herrera <[email protected]> Discussion: https://postgr.es/m/CAHut+PsvQJQnQO0KT0S2oegenkvJ8FUuY-QS5syyqmT24R2xFQ@mail.gmail.com --- src/bin/pg_archivecleanup/pg_archivecleanup.c | 4 ++++ src/bin/pg_basebackup/pg_createsubscriber.c | 5 +++++ src/bin/pg_combinebackup/pg_combinebackup.c | 4 ++++ src/bin/pg_resetwal/pg_resetwal.c | 4 ++++ src/bin/pg_rewind/pg_rewind.c | 10 ++++++---- 5 files changed, 23 insertions(+), 4 deletions(-) diff --git a/src/bin/pg_archivecleanup/pg_archivecleanup.c b/src/bin/pg_archivecleanup/pg_archivecleanup.c index c25348bcb85..ab686b4748c 100644 --- a/src/bin/pg_archivecleanup/pg_archivecleanup.c +++ b/src/bin/pg_archivecleanup/pg_archivecleanup.c @@ -375,6 +375,10 @@ main(int argc, char **argv) exit(2); } + if (dryrun) + pg_log_info("Executing in dry-run mode.\n" + "No files will be removed."); + /* * Check archive exists and other initialization if required. */ diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c index df41836e70f..cc4be5d6ef4 100644 --- a/src/bin/pg_basebackup/pg_createsubscriber.c +++ b/src/bin/pg_basebackup/pg_createsubscriber.c @@ -2305,6 +2305,11 @@ main(int argc, char **argv) pg_log_error_hint("Try \"%s --help\" for more information.", progname); exit(1); } + + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + pg_log_info("validating publisher connection string"); pub_base_conninfo = get_base_conninfo(opt.pub_conninfo_str, &dbname_conninfo); diff --git a/src/bin/pg_combinebackup/pg_combinebackup.c b/src/bin/pg_combinebackup/pg_combinebackup.c index 3a325127209..c9bf0a9e105 100644 --- a/src/bin/pg_combinebackup/pg_combinebackup.c +++ b/src/bin/pg_combinebackup/pg_combinebackup.c @@ -242,6 +242,10 @@ main(int argc, char *argv[]) if (opt.no_manifest) opt.manifest_checksums = CHECKSUM_TYPE_NONE; + if (opt.dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + /* Check that the platform supports the requested copy method. */ if (opt.copy_method == COPY_METHOD_CLONE) { diff --git a/src/bin/pg_resetwal/pg_resetwal.c b/src/bin/pg_resetwal/pg_resetwal.c index a89d72fc5cf..dd5d279521e 100644 --- a/src/bin/pg_resetwal/pg_resetwal.c +++ b/src/bin/pg_resetwal/pg_resetwal.c @@ -397,6 +397,10 @@ main(int argc, char *argv[]) exit(1); } + if (noupdate) + pg_log_info("Executing in dry-run mode.\n" + "Nothing will be modified."); + /* * Attempt to read the existing pg_control file */ diff --git a/src/bin/pg_rewind/pg_rewind.c b/src/bin/pg_rewind/pg_rewind.c index 27c514f934a..e9364d04f76 100644 --- a/src/bin/pg_rewind/pg_rewind.c +++ b/src/bin/pg_rewind/pg_rewind.c @@ -300,10 +300,12 @@ main(int argc, char **argv) atexit(disconnect_atexit); - /* - * Ok, we have all the options and we're ready to start. First, connect to - * remote server. - */ + /* Ok, we have all the options and we're ready to start. */ + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + + /* First, connect to remote server. */ if (connstr_source) { conn = PQconnectdb(connstr_source); -- 2.47.3 --ibfr3ah5qy6tcbhw-- ^ permalink raw reply [nested|flat] 190+ messages in thread
* [PATCH v5] Log a note at program start when running in dry-run mode @ 2025-11-11 08:54 Álvaro Herrera <[email protected]> 0 siblings, 0 replies; 190+ messages in thread From: Álvaro Herrera @ 2025-11-11 08:54 UTC (permalink / raw) Users might get some peace of mind knowing their data is not being destroyed or whatever. Author: Peter Smith <[email protected]> Reviewed-by: Álvaro Herrera <[email protected]> Discussion: https://postgr.es/m/CAHut+PsvQJQnQO0KT0S2oegenkvJ8FUuY-QS5syyqmT24R2xFQ@mail.gmail.com --- src/bin/pg_archivecleanup/pg_archivecleanup.c | 4 ++++ src/bin/pg_basebackup/pg_createsubscriber.c | 5 +++++ src/bin/pg_combinebackup/pg_combinebackup.c | 4 ++++ src/bin/pg_resetwal/pg_resetwal.c | 4 ++++ src/bin/pg_rewind/pg_rewind.c | 10 ++++++---- 5 files changed, 23 insertions(+), 4 deletions(-) diff --git a/src/bin/pg_archivecleanup/pg_archivecleanup.c b/src/bin/pg_archivecleanup/pg_archivecleanup.c index c25348bcb85..ab686b4748c 100644 --- a/src/bin/pg_archivecleanup/pg_archivecleanup.c +++ b/src/bin/pg_archivecleanup/pg_archivecleanup.c @@ -375,6 +375,10 @@ main(int argc, char **argv) exit(2); } + if (dryrun) + pg_log_info("Executing in dry-run mode.\n" + "No files will be removed."); + /* * Check archive exists and other initialization if required. */ diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c index df41836e70f..cc4be5d6ef4 100644 --- a/src/bin/pg_basebackup/pg_createsubscriber.c +++ b/src/bin/pg_basebackup/pg_createsubscriber.c @@ -2305,6 +2305,11 @@ main(int argc, char **argv) pg_log_error_hint("Try \"%s --help\" for more information.", progname); exit(1); } + + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + pg_log_info("validating publisher connection string"); pub_base_conninfo = get_base_conninfo(opt.pub_conninfo_str, &dbname_conninfo); diff --git a/src/bin/pg_combinebackup/pg_combinebackup.c b/src/bin/pg_combinebackup/pg_combinebackup.c index 3a325127209..c9bf0a9e105 100644 --- a/src/bin/pg_combinebackup/pg_combinebackup.c +++ b/src/bin/pg_combinebackup/pg_combinebackup.c @@ -242,6 +242,10 @@ main(int argc, char *argv[]) if (opt.no_manifest) opt.manifest_checksums = CHECKSUM_TYPE_NONE; + if (opt.dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + /* Check that the platform supports the requested copy method. */ if (opt.copy_method == COPY_METHOD_CLONE) { diff --git a/src/bin/pg_resetwal/pg_resetwal.c b/src/bin/pg_resetwal/pg_resetwal.c index a89d72fc5cf..dd5d279521e 100644 --- a/src/bin/pg_resetwal/pg_resetwal.c +++ b/src/bin/pg_resetwal/pg_resetwal.c @@ -397,6 +397,10 @@ main(int argc, char *argv[]) exit(1); } + if (noupdate) + pg_log_info("Executing in dry-run mode.\n" + "Nothing will be modified."); + /* * Attempt to read the existing pg_control file */ diff --git a/src/bin/pg_rewind/pg_rewind.c b/src/bin/pg_rewind/pg_rewind.c index 27c514f934a..e9364d04f76 100644 --- a/src/bin/pg_rewind/pg_rewind.c +++ b/src/bin/pg_rewind/pg_rewind.c @@ -300,10 +300,12 @@ main(int argc, char **argv) atexit(disconnect_atexit); - /* - * Ok, we have all the options and we're ready to start. First, connect to - * remote server. - */ + /* Ok, we have all the options and we're ready to start. */ + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + + /* First, connect to remote server. */ if (connstr_source) { conn = PQconnectdb(connstr_source); -- 2.47.3 --ibfr3ah5qy6tcbhw-- ^ permalink raw reply [nested|flat] 190+ messages in thread
* [PATCH v5] Log a note at program start when running in dry-run mode @ 2025-11-11 08:54 Álvaro Herrera <[email protected]> 0 siblings, 0 replies; 190+ messages in thread From: Álvaro Herrera @ 2025-11-11 08:54 UTC (permalink / raw) Users might get some peace of mind knowing their data is not being destroyed or whatever. Author: Peter Smith <[email protected]> Reviewed-by: Álvaro Herrera <[email protected]> Discussion: https://postgr.es/m/CAHut+PsvQJQnQO0KT0S2oegenkvJ8FUuY-QS5syyqmT24R2xFQ@mail.gmail.com --- src/bin/pg_archivecleanup/pg_archivecleanup.c | 4 ++++ src/bin/pg_basebackup/pg_createsubscriber.c | 5 +++++ src/bin/pg_combinebackup/pg_combinebackup.c | 4 ++++ src/bin/pg_resetwal/pg_resetwal.c | 4 ++++ src/bin/pg_rewind/pg_rewind.c | 10 ++++++---- 5 files changed, 23 insertions(+), 4 deletions(-) diff --git a/src/bin/pg_archivecleanup/pg_archivecleanup.c b/src/bin/pg_archivecleanup/pg_archivecleanup.c index c25348bcb85..ab686b4748c 100644 --- a/src/bin/pg_archivecleanup/pg_archivecleanup.c +++ b/src/bin/pg_archivecleanup/pg_archivecleanup.c @@ -375,6 +375,10 @@ main(int argc, char **argv) exit(2); } + if (dryrun) + pg_log_info("Executing in dry-run mode.\n" + "No files will be removed."); + /* * Check archive exists and other initialization if required. */ diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c index df41836e70f..cc4be5d6ef4 100644 --- a/src/bin/pg_basebackup/pg_createsubscriber.c +++ b/src/bin/pg_basebackup/pg_createsubscriber.c @@ -2305,6 +2305,11 @@ main(int argc, char **argv) pg_log_error_hint("Try \"%s --help\" for more information.", progname); exit(1); } + + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + pg_log_info("validating publisher connection string"); pub_base_conninfo = get_base_conninfo(opt.pub_conninfo_str, &dbname_conninfo); diff --git a/src/bin/pg_combinebackup/pg_combinebackup.c b/src/bin/pg_combinebackup/pg_combinebackup.c index 3a325127209..c9bf0a9e105 100644 --- a/src/bin/pg_combinebackup/pg_combinebackup.c +++ b/src/bin/pg_combinebackup/pg_combinebackup.c @@ -242,6 +242,10 @@ main(int argc, char *argv[]) if (opt.no_manifest) opt.manifest_checksums = CHECKSUM_TYPE_NONE; + if (opt.dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + /* Check that the platform supports the requested copy method. */ if (opt.copy_method == COPY_METHOD_CLONE) { diff --git a/src/bin/pg_resetwal/pg_resetwal.c b/src/bin/pg_resetwal/pg_resetwal.c index a89d72fc5cf..dd5d279521e 100644 --- a/src/bin/pg_resetwal/pg_resetwal.c +++ b/src/bin/pg_resetwal/pg_resetwal.c @@ -397,6 +397,10 @@ main(int argc, char *argv[]) exit(1); } + if (noupdate) + pg_log_info("Executing in dry-run mode.\n" + "Nothing will be modified."); + /* * Attempt to read the existing pg_control file */ diff --git a/src/bin/pg_rewind/pg_rewind.c b/src/bin/pg_rewind/pg_rewind.c index 27c514f934a..e9364d04f76 100644 --- a/src/bin/pg_rewind/pg_rewind.c +++ b/src/bin/pg_rewind/pg_rewind.c @@ -300,10 +300,12 @@ main(int argc, char **argv) atexit(disconnect_atexit); - /* - * Ok, we have all the options and we're ready to start. First, connect to - * remote server. - */ + /* Ok, we have all the options and we're ready to start. */ + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + + /* First, connect to remote server. */ if (connstr_source) { conn = PQconnectdb(connstr_source); -- 2.47.3 --ibfr3ah5qy6tcbhw-- ^ permalink raw reply [nested|flat] 190+ messages in thread
* [PATCH v5] Log a note at program start when running in dry-run mode @ 2025-11-11 08:54 Álvaro Herrera <[email protected]> 0 siblings, 0 replies; 190+ messages in thread From: Álvaro Herrera @ 2025-11-11 08:54 UTC (permalink / raw) Users might get some peace of mind knowing their data is not being destroyed or whatever. Author: Peter Smith <[email protected]> Reviewed-by: Álvaro Herrera <[email protected]> Discussion: https://postgr.es/m/CAHut+PsvQJQnQO0KT0S2oegenkvJ8FUuY-QS5syyqmT24R2xFQ@mail.gmail.com --- src/bin/pg_archivecleanup/pg_archivecleanup.c | 4 ++++ src/bin/pg_basebackup/pg_createsubscriber.c | 5 +++++ src/bin/pg_combinebackup/pg_combinebackup.c | 4 ++++ src/bin/pg_resetwal/pg_resetwal.c | 4 ++++ src/bin/pg_rewind/pg_rewind.c | 10 ++++++---- 5 files changed, 23 insertions(+), 4 deletions(-) diff --git a/src/bin/pg_archivecleanup/pg_archivecleanup.c b/src/bin/pg_archivecleanup/pg_archivecleanup.c index c25348bcb85..ab686b4748c 100644 --- a/src/bin/pg_archivecleanup/pg_archivecleanup.c +++ b/src/bin/pg_archivecleanup/pg_archivecleanup.c @@ -375,6 +375,10 @@ main(int argc, char **argv) exit(2); } + if (dryrun) + pg_log_info("Executing in dry-run mode.\n" + "No files will be removed."); + /* * Check archive exists and other initialization if required. */ diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c index df41836e70f..cc4be5d6ef4 100644 --- a/src/bin/pg_basebackup/pg_createsubscriber.c +++ b/src/bin/pg_basebackup/pg_createsubscriber.c @@ -2305,6 +2305,11 @@ main(int argc, char **argv) pg_log_error_hint("Try \"%s --help\" for more information.", progname); exit(1); } + + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + pg_log_info("validating publisher connection string"); pub_base_conninfo = get_base_conninfo(opt.pub_conninfo_str, &dbname_conninfo); diff --git a/src/bin/pg_combinebackup/pg_combinebackup.c b/src/bin/pg_combinebackup/pg_combinebackup.c index 3a325127209..c9bf0a9e105 100644 --- a/src/bin/pg_combinebackup/pg_combinebackup.c +++ b/src/bin/pg_combinebackup/pg_combinebackup.c @@ -242,6 +242,10 @@ main(int argc, char *argv[]) if (opt.no_manifest) opt.manifest_checksums = CHECKSUM_TYPE_NONE; + if (opt.dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + /* Check that the platform supports the requested copy method. */ if (opt.copy_method == COPY_METHOD_CLONE) { diff --git a/src/bin/pg_resetwal/pg_resetwal.c b/src/bin/pg_resetwal/pg_resetwal.c index a89d72fc5cf..dd5d279521e 100644 --- a/src/bin/pg_resetwal/pg_resetwal.c +++ b/src/bin/pg_resetwal/pg_resetwal.c @@ -397,6 +397,10 @@ main(int argc, char *argv[]) exit(1); } + if (noupdate) + pg_log_info("Executing in dry-run mode.\n" + "Nothing will be modified."); + /* * Attempt to read the existing pg_control file */ diff --git a/src/bin/pg_rewind/pg_rewind.c b/src/bin/pg_rewind/pg_rewind.c index 27c514f934a..e9364d04f76 100644 --- a/src/bin/pg_rewind/pg_rewind.c +++ b/src/bin/pg_rewind/pg_rewind.c @@ -300,10 +300,12 @@ main(int argc, char **argv) atexit(disconnect_atexit); - /* - * Ok, we have all the options and we're ready to start. First, connect to - * remote server. - */ + /* Ok, we have all the options and we're ready to start. */ + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + + /* First, connect to remote server. */ if (connstr_source) { conn = PQconnectdb(connstr_source); -- 2.47.3 --ibfr3ah5qy6tcbhw-- ^ permalink raw reply [nested|flat] 190+ messages in thread
* [PATCH v5] Log a note at program start when running in dry-run mode @ 2025-11-11 08:54 Álvaro Herrera <[email protected]> 0 siblings, 0 replies; 190+ messages in thread From: Álvaro Herrera @ 2025-11-11 08:54 UTC (permalink / raw) Users might get some peace of mind knowing their data is not being destroyed or whatever. Author: Peter Smith <[email protected]> Reviewed-by: Álvaro Herrera <[email protected]> Discussion: https://postgr.es/m/CAHut+PsvQJQnQO0KT0S2oegenkvJ8FUuY-QS5syyqmT24R2xFQ@mail.gmail.com --- src/bin/pg_archivecleanup/pg_archivecleanup.c | 4 ++++ src/bin/pg_basebackup/pg_createsubscriber.c | 5 +++++ src/bin/pg_combinebackup/pg_combinebackup.c | 4 ++++ src/bin/pg_resetwal/pg_resetwal.c | 4 ++++ src/bin/pg_rewind/pg_rewind.c | 10 ++++++---- 5 files changed, 23 insertions(+), 4 deletions(-) diff --git a/src/bin/pg_archivecleanup/pg_archivecleanup.c b/src/bin/pg_archivecleanup/pg_archivecleanup.c index c25348bcb85..ab686b4748c 100644 --- a/src/bin/pg_archivecleanup/pg_archivecleanup.c +++ b/src/bin/pg_archivecleanup/pg_archivecleanup.c @@ -375,6 +375,10 @@ main(int argc, char **argv) exit(2); } + if (dryrun) + pg_log_info("Executing in dry-run mode.\n" + "No files will be removed."); + /* * Check archive exists and other initialization if required. */ diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c index df41836e70f..cc4be5d6ef4 100644 --- a/src/bin/pg_basebackup/pg_createsubscriber.c +++ b/src/bin/pg_basebackup/pg_createsubscriber.c @@ -2305,6 +2305,11 @@ main(int argc, char **argv) pg_log_error_hint("Try \"%s --help\" for more information.", progname); exit(1); } + + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + pg_log_info("validating publisher connection string"); pub_base_conninfo = get_base_conninfo(opt.pub_conninfo_str, &dbname_conninfo); diff --git a/src/bin/pg_combinebackup/pg_combinebackup.c b/src/bin/pg_combinebackup/pg_combinebackup.c index 3a325127209..c9bf0a9e105 100644 --- a/src/bin/pg_combinebackup/pg_combinebackup.c +++ b/src/bin/pg_combinebackup/pg_combinebackup.c @@ -242,6 +242,10 @@ main(int argc, char *argv[]) if (opt.no_manifest) opt.manifest_checksums = CHECKSUM_TYPE_NONE; + if (opt.dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + /* Check that the platform supports the requested copy method. */ if (opt.copy_method == COPY_METHOD_CLONE) { diff --git a/src/bin/pg_resetwal/pg_resetwal.c b/src/bin/pg_resetwal/pg_resetwal.c index a89d72fc5cf..dd5d279521e 100644 --- a/src/bin/pg_resetwal/pg_resetwal.c +++ b/src/bin/pg_resetwal/pg_resetwal.c @@ -397,6 +397,10 @@ main(int argc, char *argv[]) exit(1); } + if (noupdate) + pg_log_info("Executing in dry-run mode.\n" + "Nothing will be modified."); + /* * Attempt to read the existing pg_control file */ diff --git a/src/bin/pg_rewind/pg_rewind.c b/src/bin/pg_rewind/pg_rewind.c index 27c514f934a..e9364d04f76 100644 --- a/src/bin/pg_rewind/pg_rewind.c +++ b/src/bin/pg_rewind/pg_rewind.c @@ -300,10 +300,12 @@ main(int argc, char **argv) atexit(disconnect_atexit); - /* - * Ok, we have all the options and we're ready to start. First, connect to - * remote server. - */ + /* Ok, we have all the options and we're ready to start. */ + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + + /* First, connect to remote server. */ if (connstr_source) { conn = PQconnectdb(connstr_source); -- 2.47.3 --ibfr3ah5qy6tcbhw-- ^ permalink raw reply [nested|flat] 190+ messages in thread
* [PATCH v5] Log a note at program start when running in dry-run mode @ 2025-11-11 08:54 Álvaro Herrera <[email protected]> 0 siblings, 0 replies; 190+ messages in thread From: Álvaro Herrera @ 2025-11-11 08:54 UTC (permalink / raw) Users might get some peace of mind knowing their data is not being destroyed or whatever. Author: Peter Smith <[email protected]> Reviewed-by: Álvaro Herrera <[email protected]> Discussion: https://postgr.es/m/CAHut+PsvQJQnQO0KT0S2oegenkvJ8FUuY-QS5syyqmT24R2xFQ@mail.gmail.com --- src/bin/pg_archivecleanup/pg_archivecleanup.c | 4 ++++ src/bin/pg_basebackup/pg_createsubscriber.c | 5 +++++ src/bin/pg_combinebackup/pg_combinebackup.c | 4 ++++ src/bin/pg_resetwal/pg_resetwal.c | 4 ++++ src/bin/pg_rewind/pg_rewind.c | 10 ++++++---- 5 files changed, 23 insertions(+), 4 deletions(-) diff --git a/src/bin/pg_archivecleanup/pg_archivecleanup.c b/src/bin/pg_archivecleanup/pg_archivecleanup.c index c25348bcb85..ab686b4748c 100644 --- a/src/bin/pg_archivecleanup/pg_archivecleanup.c +++ b/src/bin/pg_archivecleanup/pg_archivecleanup.c @@ -375,6 +375,10 @@ main(int argc, char **argv) exit(2); } + if (dryrun) + pg_log_info("Executing in dry-run mode.\n" + "No files will be removed."); + /* * Check archive exists and other initialization if required. */ diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c index df41836e70f..cc4be5d6ef4 100644 --- a/src/bin/pg_basebackup/pg_createsubscriber.c +++ b/src/bin/pg_basebackup/pg_createsubscriber.c @@ -2305,6 +2305,11 @@ main(int argc, char **argv) pg_log_error_hint("Try \"%s --help\" for more information.", progname); exit(1); } + + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + pg_log_info("validating publisher connection string"); pub_base_conninfo = get_base_conninfo(opt.pub_conninfo_str, &dbname_conninfo); diff --git a/src/bin/pg_combinebackup/pg_combinebackup.c b/src/bin/pg_combinebackup/pg_combinebackup.c index 3a325127209..c9bf0a9e105 100644 --- a/src/bin/pg_combinebackup/pg_combinebackup.c +++ b/src/bin/pg_combinebackup/pg_combinebackup.c @@ -242,6 +242,10 @@ main(int argc, char *argv[]) if (opt.no_manifest) opt.manifest_checksums = CHECKSUM_TYPE_NONE; + if (opt.dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + /* Check that the platform supports the requested copy method. */ if (opt.copy_method == COPY_METHOD_CLONE) { diff --git a/src/bin/pg_resetwal/pg_resetwal.c b/src/bin/pg_resetwal/pg_resetwal.c index a89d72fc5cf..dd5d279521e 100644 --- a/src/bin/pg_resetwal/pg_resetwal.c +++ b/src/bin/pg_resetwal/pg_resetwal.c @@ -397,6 +397,10 @@ main(int argc, char *argv[]) exit(1); } + if (noupdate) + pg_log_info("Executing in dry-run mode.\n" + "Nothing will be modified."); + /* * Attempt to read the existing pg_control file */ diff --git a/src/bin/pg_rewind/pg_rewind.c b/src/bin/pg_rewind/pg_rewind.c index 27c514f934a..e9364d04f76 100644 --- a/src/bin/pg_rewind/pg_rewind.c +++ b/src/bin/pg_rewind/pg_rewind.c @@ -300,10 +300,12 @@ main(int argc, char **argv) atexit(disconnect_atexit); - /* - * Ok, we have all the options and we're ready to start. First, connect to - * remote server. - */ + /* Ok, we have all the options and we're ready to start. */ + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + + /* First, connect to remote server. */ if (connstr_source) { conn = PQconnectdb(connstr_source); -- 2.47.3 --ibfr3ah5qy6tcbhw-- ^ permalink raw reply [nested|flat] 190+ messages in thread
* [PATCH v5] Log a note at program start when running in dry-run mode @ 2025-11-11 08:54 Álvaro Herrera <[email protected]> 0 siblings, 0 replies; 190+ messages in thread From: Álvaro Herrera @ 2025-11-11 08:54 UTC (permalink / raw) Users might get some peace of mind knowing their data is not being destroyed or whatever. Author: Peter Smith <[email protected]> Reviewed-by: Álvaro Herrera <[email protected]> Discussion: https://postgr.es/m/CAHut+PsvQJQnQO0KT0S2oegenkvJ8FUuY-QS5syyqmT24R2xFQ@mail.gmail.com --- src/bin/pg_archivecleanup/pg_archivecleanup.c | 4 ++++ src/bin/pg_basebackup/pg_createsubscriber.c | 5 +++++ src/bin/pg_combinebackup/pg_combinebackup.c | 4 ++++ src/bin/pg_resetwal/pg_resetwal.c | 4 ++++ src/bin/pg_rewind/pg_rewind.c | 10 ++++++---- 5 files changed, 23 insertions(+), 4 deletions(-) diff --git a/src/bin/pg_archivecleanup/pg_archivecleanup.c b/src/bin/pg_archivecleanup/pg_archivecleanup.c index c25348bcb85..ab686b4748c 100644 --- a/src/bin/pg_archivecleanup/pg_archivecleanup.c +++ b/src/bin/pg_archivecleanup/pg_archivecleanup.c @@ -375,6 +375,10 @@ main(int argc, char **argv) exit(2); } + if (dryrun) + pg_log_info("Executing in dry-run mode.\n" + "No files will be removed."); + /* * Check archive exists and other initialization if required. */ diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c index df41836e70f..cc4be5d6ef4 100644 --- a/src/bin/pg_basebackup/pg_createsubscriber.c +++ b/src/bin/pg_basebackup/pg_createsubscriber.c @@ -2305,6 +2305,11 @@ main(int argc, char **argv) pg_log_error_hint("Try \"%s --help\" for more information.", progname); exit(1); } + + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + pg_log_info("validating publisher connection string"); pub_base_conninfo = get_base_conninfo(opt.pub_conninfo_str, &dbname_conninfo); diff --git a/src/bin/pg_combinebackup/pg_combinebackup.c b/src/bin/pg_combinebackup/pg_combinebackup.c index 3a325127209..c9bf0a9e105 100644 --- a/src/bin/pg_combinebackup/pg_combinebackup.c +++ b/src/bin/pg_combinebackup/pg_combinebackup.c @@ -242,6 +242,10 @@ main(int argc, char *argv[]) if (opt.no_manifest) opt.manifest_checksums = CHECKSUM_TYPE_NONE; + if (opt.dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + /* Check that the platform supports the requested copy method. */ if (opt.copy_method == COPY_METHOD_CLONE) { diff --git a/src/bin/pg_resetwal/pg_resetwal.c b/src/bin/pg_resetwal/pg_resetwal.c index a89d72fc5cf..dd5d279521e 100644 --- a/src/bin/pg_resetwal/pg_resetwal.c +++ b/src/bin/pg_resetwal/pg_resetwal.c @@ -397,6 +397,10 @@ main(int argc, char *argv[]) exit(1); } + if (noupdate) + pg_log_info("Executing in dry-run mode.\n" + "Nothing will be modified."); + /* * Attempt to read the existing pg_control file */ diff --git a/src/bin/pg_rewind/pg_rewind.c b/src/bin/pg_rewind/pg_rewind.c index 27c514f934a..e9364d04f76 100644 --- a/src/bin/pg_rewind/pg_rewind.c +++ b/src/bin/pg_rewind/pg_rewind.c @@ -300,10 +300,12 @@ main(int argc, char **argv) atexit(disconnect_atexit); - /* - * Ok, we have all the options and we're ready to start. First, connect to - * remote server. - */ + /* Ok, we have all the options and we're ready to start. */ + if (dry_run) + pg_log_info("Executing in dry-run mode.\n" + "The target directory will not be modified."); + + /* First, connect to remote server. */ if (connstr_source) { conn = PQconnectdb(connstr_source); -- 2.47.3 --ibfr3ah5qy6tcbhw-- ^ permalink raw reply [nested|flat] 190+ messages in thread
end of thread, other threads:[~2025-11-11 08:54 UTC | newest] Thread overview: 190+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2019-12-20 01:21 [PATCH v31 05/11] Add Incremental View Maintenance support to psql Yugo Nagata <[email protected]> 2025-11-11 08:54 [PATCH v5] Log a note at program start when running in dry-run mode Álvaro Herrera <[email protected]> 2025-11-11 08:54 [PATCH v5] Log a note at program start when running in dry-run mode Álvaro Herrera <[email protected]> 2025-11-11 08:54 [PATCH v5] Log a note at program start when running in dry-run mode Álvaro Herrera <[email protected]> 2025-11-11 08:54 [PATCH v5] Log a note at program start when running in dry-run mode Álvaro Herrera <[email protected]> 2025-11-11 08:54 [PATCH v5] Log a note at program start when running in dry-run mode Álvaro Herrera <[email protected]> 2025-11-11 08:54 [PATCH v5] Log a note at program start when running in dry-run mode Álvaro Herrera <[email protected]> 2025-11-11 08:54 [PATCH v5] Log a note at program start when running in dry-run mode Álvaro Herrera <[email protected]> 2025-11-11 08:54 [PATCH v5] Log a note at program start when running in dry-run mode Álvaro Herrera <[email protected]> 2025-11-11 08:54 [PATCH v5] Log a note at program start when running in dry-run mode Álvaro Herrera <[email protected]> 2025-11-11 08:54 [PATCH v5] Log a note at program start when running in dry-run mode Álvaro Herrera <[email protected]> 2025-11-11 08:54 [PATCH v5] Log a note at program start when running in dry-run mode Álvaro Herrera <[email protected]> 2025-11-11 08:54 [PATCH v5] Log a note at program start when running in dry-run mode Álvaro Herrera <[email protected]> 2025-11-11 08:54 [PATCH v5] Log a note at program start when running in dry-run mode Álvaro Herrera <[email protected]> 2025-11-11 08:54 [PATCH v5] Log a note at program start when running in dry-run mode Álvaro Herrera <[email protected]> 2025-11-11 08:54 [PATCH v5] Log a note at program start when running in dry-run mode Álvaro Herrera <[email protected]> 2025-11-11 08:54 [PATCH v5] Log a note at program start when running in dry-run mode Álvaro Herrera <[email protected]> 2025-11-11 08:54 [PATCH v5] Log a note at program start when running in dry-run mode Álvaro Herrera <[email protected]> 2025-11-11 08:54 [PATCH v5] Log a note at program start when running in dry-run mode Álvaro Herrera <[email protected]> 2025-11-11 08:54 [PATCH v5] Log a note at program start when running in dry-run mode Álvaro Herrera <[email protected]> 2025-11-11 08:54 [PATCH v5] Log a note at program start when running in dry-run mode Álvaro Herrera <[email protected]> 2025-11-11 08:54 [PATCH v5] Log a note at program start when running in dry-run mode Álvaro Herrera <[email protected]> 2025-11-11 08:54 [PATCH v5] Log a note at program start when running in dry-run mode Álvaro Herrera <[email protected]> 2025-11-11 08:54 [PATCH v5] Log a note at program start when running in dry-run mode Álvaro Herrera <[email protected]> 2025-11-11 08:54 [PATCH v5] Log a note at program start when running in dry-run mode Álvaro Herrera <[email protected]> 2025-11-11 08:54 [PATCH v5] Log a note at program start when running in dry-run mode Álvaro Herrera <[email protected]> 2025-11-11 08:54 [PATCH v5] Log a note at program start when running in dry-run mode Álvaro Herrera <[email protected]> 2025-11-11 08:54 [PATCH v5] Log a note at program start when running in dry-run mode Álvaro Herrera <[email protected]> 2025-11-11 08:54 [PATCH v5] Log a note at program start when running in dry-run mode Álvaro Herrera <[email protected]> 2025-11-11 08:54 [PATCH v5] Log a note at program start when running in dry-run mode Álvaro Herrera <[email protected]> 2025-11-11 08:54 [PATCH v5] Log a note at program start when running in dry-run mode Álvaro Herrera <[email protected]> 2025-11-11 08:54 [PATCH v5] Log a note at program start when running in dry-run mode Álvaro Herrera <[email protected]> 2025-11-11 08:54 [PATCH v5] Log a note at program start when running in dry-run mode Álvaro Herrera <[email protected]> 2025-11-11 08:54 [PATCH v5] Log a note at program start when running in dry-run mode Álvaro Herrera <[email protected]> 2025-11-11 08:54 [PATCH v5] Log a note at program start when running in dry-run mode Álvaro Herrera <[email protected]> 2025-11-11 08:54 [PATCH v5] Log a note at program start when running in dry-run mode Álvaro Herrera <[email protected]> 2025-11-11 08:54 [PATCH v5] Log a note at program start when running in dry-run mode Álvaro Herrera <[email protected]> 2025-11-11 08:54 [PATCH v5] Log a note at program start when running in dry-run mode Álvaro Herrera <[email protected]> 2025-11-11 08:54 [PATCH v5] Log a note at program start when running in dry-run mode Álvaro Herrera <[email protected]> 2025-11-11 08:54 [PATCH v5] Log a note at program start when running in dry-run mode Álvaro Herrera <[email protected]> 2025-11-11 08:54 [PATCH v5] Log a note at program start when running in dry-run mode Álvaro Herrera <[email protected]> 2025-11-11 08:54 [PATCH v5] Log a note at program start when running in dry-run mode Álvaro Herrera <[email protected]> 2025-11-11 08:54 [PATCH v5] Log a note at program start when running in dry-run mode Álvaro Herrera <[email protected]> 2025-11-11 08:54 [PATCH v5] Log a note at program start when running in dry-run mode Álvaro Herrera <[email protected]> 2025-11-11 08:54 [PATCH v5] Log a note at program start when running in dry-run mode Álvaro Herrera <[email protected]> 2025-11-11 08:54 [PATCH v5] Log a note at program start when running in dry-run mode Álvaro Herrera <[email protected]> 2025-11-11 08:54 [PATCH v5] Log a note at program start when running in dry-run mode Álvaro Herrera <[email protected]> 2025-11-11 08:54 [PATCH v5] Log a note at program start when running in dry-run mode Álvaro Herrera <[email protected]> 2025-11-11 08:54 [PATCH v5] Log a note at program start when running in dry-run mode Álvaro Herrera <[email protected]> 2025-11-11 08:54 [PATCH v5] Log a note at program start when running in dry-run mode Álvaro Herrera <[email protected]> 2025-11-11 08:54 [PATCH v5] Log a note at program start when running in dry-run mode Álvaro Herrera <[email protected]> 2025-11-11 08:54 [PATCH v5] Log a note at program start when running in dry-run mode Álvaro Herrera <[email protected]> 2025-11-11 08:54 [PATCH v5] Log a note at program start when running in dry-run mode Álvaro Herrera <[email protected]> 2025-11-11 08:54 [PATCH v5] Log a note at program start when running in dry-run mode Álvaro Herrera <[email protected]> 2025-11-11 08:54 [PATCH v5] Log a note at program start when running in dry-run mode Álvaro Herrera <[email protected]> 2025-11-11 08:54 [PATCH v5] Log a note at program start when running in dry-run mode Álvaro Herrera <[email protected]> 2025-11-11 08:54 [PATCH v5] Log a note at program start when running in dry-run mode Álvaro Herrera <[email protected]> 2025-11-11 08:54 [PATCH v5] Log a note at program start when running in dry-run mode Álvaro Herrera <[email protected]> 2025-11-11 08:54 [PATCH v5] Log a note at program start when running in dry-run mode Álvaro Herrera <[email protected]> 2025-11-11 08:54 [PATCH v5] Log a note at program start when running in dry-run mode Álvaro Herrera <[email protected]> 2025-11-11 08:54 [PATCH v5] Log a note at program start when running in dry-run mode Álvaro Herrera <[email protected]> 2025-11-11 08:54 [PATCH v5] Log a note at program start when running in dry-run mode Álvaro Herrera <[email protected]> 2025-11-11 08:54 [PATCH v5] Log a note at program start when running in dry-run mode Álvaro Herrera <[email protected]> 2025-11-11 08:54 [PATCH v5] Log a note at program start when running in dry-run mode Álvaro Herrera <[email protected]> 2025-11-11 08:54 [PATCH v5] Log a note at program start when running in dry-run mode Álvaro Herrera <[email protected]> 2025-11-11 08:54 [PATCH v5] Log a note at program start when running in dry-run mode Álvaro Herrera <[email protected]> 2025-11-11 08:54 [PATCH v5] Log a note at program start when running in dry-run mode Álvaro Herrera <[email protected]> 2025-11-11 08:54 [PATCH v5] Log a note at program start when running in dry-run mode Álvaro Herrera <[email protected]> 2025-11-11 08:54 [PATCH v5] Log a note at program start when running in dry-run mode Álvaro Herrera <[email protected]> 2025-11-11 08:54 [PATCH v5] Log a note at program start when running in dry-run mode Álvaro Herrera <[email protected]> 2025-11-11 08:54 [PATCH v5] Log a note at program start when running in dry-run mode Álvaro Herrera <[email protected]> 2025-11-11 08:54 [PATCH v5] Log a note at program start when running in dry-run mode Álvaro Herrera <[email protected]> 2025-11-11 08:54 [PATCH v5] Log a note at program start when running in dry-run mode Álvaro Herrera <[email protected]> 2025-11-11 08:54 [PATCH v5] Log a note at program start when running in dry-run mode Álvaro Herrera <[email protected]> 2025-11-11 08:54 [PATCH v5] Log a note at program start when running in dry-run mode Álvaro Herrera <[email protected]> 2025-11-11 08:54 [PATCH v5] Log a note at program start when running in dry-run mode Álvaro Herrera <[email protected]> 2025-11-11 08:54 [PATCH v5] Log a note at program start when running in dry-run mode Álvaro Herrera <[email protected]> 2025-11-11 08:54 [PATCH v5] Log a note at program start when running in dry-run mode Álvaro Herrera <[email protected]> 2025-11-11 08:54 [PATCH v5] Log a note at program start when running in dry-run mode Álvaro Herrera <[email protected]> 2025-11-11 08:54 [PATCH v5] Log a note at program start when running in dry-run mode Álvaro Herrera <[email protected]> 2025-11-11 08:54 [PATCH v5] Log a note at program start when running in dry-run mode Álvaro Herrera <[email protected]> 2025-11-11 08:54 [PATCH v5] Log a note at program start when running in dry-run mode Álvaro Herrera <[email protected]> 2025-11-11 08:54 [PATCH v5] Log a note at program start when running in dry-run mode Álvaro Herrera <[email protected]> 2025-11-11 08:54 [PATCH v5] Log a note at program start when running in dry-run mode Álvaro Herrera <[email protected]> 2025-11-11 08:54 [PATCH v5] Log a note at program start when running in dry-run mode Álvaro Herrera <[email protected]> 2025-11-11 08:54 [PATCH v5] Log a note at program start when running in dry-run mode Álvaro Herrera <[email protected]> 2025-11-11 08:54 [PATCH v5] Log a note at program start when running in dry-run mode Álvaro Herrera <[email protected]> 2025-11-11 08:54 [PATCH v5] Log a note at program start when running in dry-run mode Álvaro Herrera <[email protected]> 2025-11-11 08:54 [PATCH v5] Log a note at program start when running in dry-run mode Álvaro Herrera <[email protected]> 2025-11-11 08:54 [PATCH v5] Log a note at program start when running in dry-run mode Álvaro Herrera <[email protected]> 2025-11-11 08:54 [PATCH v5] Log a note at program start when running in dry-run mode Álvaro Herrera <[email protected]> 2025-11-11 08:54 [PATCH v5] Log a note at program start when running in dry-run mode Álvaro Herrera <[email protected]> 2025-11-11 08:54 [PATCH v5] Log a note at program start when running in dry-run mode Álvaro Herrera <[email protected]> 2025-11-11 08:54 [PATCH v5] Log a note at program start when running in dry-run mode Álvaro Herrera <[email protected]> 2025-11-11 08:54 [PATCH v5] Log a note at program start when running in dry-run mode Álvaro Herrera <[email protected]> 2025-11-11 08:54 [PATCH v5] Log a note at program start when running in dry-run mode Álvaro Herrera <[email protected]> 2025-11-11 08:54 [PATCH v5] Log a note at program start when running in dry-run mode Álvaro Herrera <[email protected]> 2025-11-11 08:54 [PATCH v5] Log a note at program start when running in dry-run mode Álvaro Herrera <[email protected]> 2025-11-11 08:54 [PATCH v5] Log a note at program start when running in dry-run mode Álvaro Herrera <[email protected]> 2025-11-11 08:54 [PATCH v5] Log a note at program start when running in dry-run mode Álvaro Herrera <[email protected]> 2025-11-11 08:54 [PATCH v5] Log a note at program start when running in dry-run mode Álvaro Herrera <[email protected]> 2025-11-11 08:54 [PATCH v5] Log a note at program start when running in dry-run mode Álvaro Herrera <[email protected]> 2025-11-11 08:54 [PATCH v5] Log a note at program start when running in dry-run mode Álvaro Herrera <[email protected]> 2025-11-11 08:54 [PATCH v5] Log a note at program start when running in dry-run mode Álvaro Herrera <[email protected]> 2025-11-11 08:54 [PATCH v5] Log a note at program start when running in dry-run mode Álvaro Herrera <[email protected]> 2025-11-11 08:54 [PATCH v5] Log a note at program start when running in dry-run mode Álvaro Herrera <[email protected]> 2025-11-11 08:54 [PATCH v5] Log a note at program start when running in dry-run mode Álvaro Herrera <[email protected]> 2025-11-11 08:54 [PATCH v5] Log a note at program start when running in dry-run mode Álvaro Herrera <[email protected]> 2025-11-11 08:54 [PATCH v5] Log a note at program start when running in dry-run mode Álvaro Herrera <[email protected]> 2025-11-11 08:54 [PATCH v5] Log a note at program start when running in dry-run mode Álvaro Herrera <[email protected]> 2025-11-11 08:54 [PATCH v5] Log a note at program start when running in dry-run mode Álvaro Herrera <[email protected]> 2025-11-11 08:54 [PATCH v5] Log a note at program start when running in dry-run mode Álvaro Herrera <[email protected]> 2025-11-11 08:54 [PATCH v5] Log a note at program start when running in dry-run mode Álvaro Herrera <[email protected]> 2025-11-11 08:54 [PATCH v5] Log a note at program start when running in dry-run mode Álvaro Herrera <[email protected]> 2025-11-11 08:54 [PATCH v5] Log a note at program start when running in dry-run mode Álvaro Herrera <[email protected]> 2025-11-11 08:54 [PATCH v5] Log a note at program start when running in dry-run mode Álvaro Herrera <[email protected]> 2025-11-11 08:54 [PATCH v5] Log a note at program start when running in dry-run mode Álvaro Herrera <[email protected]> 2025-11-11 08:54 [PATCH v5] Log a note at program start when running in dry-run mode Álvaro Herrera <[email protected]> 2025-11-11 08:54 [PATCH v5] Log a note at program start when running in dry-run mode Álvaro Herrera <[email protected]> 2025-11-11 08:54 [PATCH v5] Log a note at program start when running in dry-run mode Álvaro Herrera <[email protected]> 2025-11-11 08:54 [PATCH v5] Log a note at program start when running in dry-run mode Álvaro Herrera <[email protected]> 2025-11-11 08:54 [PATCH v5] Log a note at program start when running in dry-run mode Álvaro Herrera <[email protected]> 2025-11-11 08:54 [PATCH v5] Log a note at program start when running in dry-run mode Álvaro Herrera <[email protected]> 2025-11-11 08:54 [PATCH v5] Log a note at program start when running in dry-run mode Álvaro Herrera <[email protected]> 2025-11-11 08:54 [PATCH v5] Log a note at program start when running in dry-run mode Álvaro Herrera <[email protected]> 2025-11-11 08:54 [PATCH v5] Log a note at program start when running in dry-run mode Álvaro Herrera <[email protected]> 2025-11-11 08:54 [PATCH v5] Log a note at program start when running in dry-run mode Álvaro Herrera <[email protected]> 2025-11-11 08:54 [PATCH v5] Log a note at program start when running in dry-run mode Álvaro Herrera <[email protected]> 2025-11-11 08:54 [PATCH v5] Log a note at program start when running in dry-run mode Álvaro Herrera <[email protected]> 2025-11-11 08:54 [PATCH v5] Log a note at program start when running in dry-run mode Álvaro Herrera <[email protected]> 2025-11-11 08:54 [PATCH v5] Log a note at program start when running in dry-run mode Álvaro Herrera <[email protected]> 2025-11-11 08:54 [PATCH v5] Log a note at program start when running in dry-run mode Álvaro Herrera <[email protected]> 2025-11-11 08:54 [PATCH v5] Log a note at program start when running in dry-run mode Álvaro Herrera <[email protected]> 2025-11-11 08:54 [PATCH v5] Log a note at program start when running in dry-run mode Álvaro Herrera <[email protected]> 2025-11-11 08:54 [PATCH v5] Log a note at program start when running in dry-run mode Álvaro Herrera <[email protected]> 2025-11-11 08:54 [PATCH v5] Log a note at program start when running in dry-run mode Álvaro Herrera <[email protected]> 2025-11-11 08:54 [PATCH v5] Log a note at program start when running in dry-run mode Álvaro Herrera <[email protected]> 2025-11-11 08:54 [PATCH v5] Log a note at program start when running in dry-run mode Álvaro Herrera <[email protected]> 2025-11-11 08:54 [PATCH v5] Log a note at program start when running in dry-run mode Álvaro Herrera <[email protected]> 2025-11-11 08:54 [PATCH v5] Log a note at program start when running in dry-run mode Álvaro Herrera <[email protected]> 2025-11-11 08:54 [PATCH v5] Log a note at program start when running in dry-run mode Álvaro Herrera <[email protected]> 2025-11-11 08:54 [PATCH v5] Log a note at program start when running in dry-run mode Álvaro Herrera <[email protected]> 2025-11-11 08:54 [PATCH v5] Log a note at program start when running in dry-run mode Álvaro Herrera <[email protected]> 2025-11-11 08:54 [PATCH v5] Log a note at program start when running in dry-run mode Álvaro Herrera <[email protected]> 2025-11-11 08:54 [PATCH v5] Log a note at program start when running in dry-run mode Álvaro Herrera <[email protected]> 2025-11-11 08:54 [PATCH v5] Log a note at program start when running in dry-run mode Álvaro Herrera <[email protected]> 2025-11-11 08:54 [PATCH v5] Log a note at program start when running in dry-run mode Álvaro Herrera <[email protected]> 2025-11-11 08:54 [PATCH v5] Log a note at program start when running in dry-run mode Álvaro Herrera <[email protected]> 2025-11-11 08:54 [PATCH v5] Log a note at program start when running in dry-run mode Álvaro Herrera <[email protected]> 2025-11-11 08:54 [PATCH v5] Log a note at program start when running in dry-run mode Álvaro Herrera <[email protected]> 2025-11-11 08:54 [PATCH v5] Log a note at program start when running in dry-run mode Álvaro Herrera <[email protected]> 2025-11-11 08:54 [PATCH v5] Log a note at program start when running in dry-run mode Álvaro Herrera <[email protected]> 2025-11-11 08:54 [PATCH v5] Log a note at program start when running in dry-run mode Álvaro Herrera <[email protected]> 2025-11-11 08:54 [PATCH v5] Log a note at program start when running in dry-run mode Álvaro Herrera <[email protected]> 2025-11-11 08:54 [PATCH v5] Log a note at program start when running in dry-run mode Álvaro Herrera <[email protected]> 2025-11-11 08:54 [PATCH v5] Log a note at program start when running in dry-run mode Álvaro Herrera <[email protected]> 2025-11-11 08:54 [PATCH v5] Log a note at program start when running in dry-run mode Álvaro Herrera <[email protected]> 2025-11-11 08:54 [PATCH v5] Log a note at program start when running in dry-run mode Álvaro Herrera <[email protected]> 2025-11-11 08:54 [PATCH v5] Log a note at program start when running in dry-run mode Álvaro Herrera <[email protected]> 2025-11-11 08:54 [PATCH v5] Log a note at program start when running in dry-run mode Álvaro Herrera <[email protected]> 2025-11-11 08:54 [PATCH v5] Log a note at program start when running in dry-run mode Álvaro Herrera <[email protected]> 2025-11-11 08:54 [PATCH v5] Log a note at program start when running in dry-run mode Álvaro Herrera <[email protected]> 2025-11-11 08:54 [PATCH v5] Log a note at program start when running in dry-run mode Álvaro Herrera <[email protected]> 2025-11-11 08:54 [PATCH v5] Log a note at program start when running in dry-run mode Álvaro Herrera <[email protected]> 2025-11-11 08:54 [PATCH v5] Log a note at program start when running in dry-run mode Álvaro Herrera <[email protected]> 2025-11-11 08:54 [PATCH v5] Log a note at program start when running in dry-run mode Álvaro Herrera <[email protected]> 2025-11-11 08:54 [PATCH v5] Log a note at program start when running in dry-run mode Álvaro Herrera <[email protected]> 2025-11-11 08:54 [PATCH v5] Log a note at program start when running in dry-run mode Álvaro Herrera <[email protected]> 2025-11-11 08:54 [PATCH v5] Log a note at program start when running in dry-run mode Álvaro Herrera <[email protected]> 2025-11-11 08:54 [PATCH v5] Log a note at program start when running in dry-run mode Álvaro Herrera <[email protected]> 2025-11-11 08:54 [PATCH v5] Log a note at program start when running in dry-run mode Álvaro Herrera <[email protected]> 2025-11-11 08:54 [PATCH v5] Log a note at program start when running in dry-run mode Álvaro Herrera <[email protected]> 2025-11-11 08:54 [PATCH v5] Log a note at program start when running in dry-run mode Álvaro Herrera <[email protected]> 2025-11-11 08:54 [PATCH v5] Log a note at program start when running in dry-run mode Álvaro Herrera <[email protected]> 2025-11-11 08:54 [PATCH v5] Log a note at program start when running in dry-run mode Álvaro Herrera <[email protected]> 2025-11-11 08:54 [PATCH v5] Log a note at program start when running in dry-run mode Álvaro Herrera <[email protected]> 2025-11-11 08:54 [PATCH v5] Log a note at program start when running in dry-run mode Álvaro Herrera <[email protected]> 2025-11-11 08:54 [PATCH v5] Log a note at program start when running in dry-run mode Álvaro Herrera <[email protected]> 2025-11-11 08:54 [PATCH v5] Log a note at program start when running in dry-run mode Álvaro Herrera <[email protected]> 2025-11-11 08:54 [PATCH v5] Log a note at program start when running in dry-run mode Álvaro Herrera <[email protected]> 2025-11-11 08:54 [PATCH v5] Log a note at program start when running in dry-run mode Álvaro Herrera <[email protected]> 2025-11-11 08:54 [PATCH v5] Log a note at program start when running in dry-run mode Álvaro Herrera <[email protected]> 2025-11-11 08:54 [PATCH v5] Log a note at program start when running in dry-run mode Álvaro Herrera <[email protected]> 2025-11-11 08:54 [PATCH v5] Log a note at program start when running in dry-run mode Álvaro Herrera <[email protected]> 2025-11-11 08:54 [PATCH v5] Log a note at program start when running in dry-run mode Álvaro Herrera <[email protected]> 2025-11-11 08:54 [PATCH v5] Log a note at program start when running in dry-run mode Álvaro Herrera <[email protected]> 2025-11-11 08:54 [PATCH v5] Log a note at program start when running in dry-run mode Álvaro Herrera <[email protected]> 2025-11-11 08:54 [PATCH v5] Log a note at program start when running in dry-run mode Álvaro Herrera <[email protected]> 2025-11-11 08:54 [PATCH v5] Log a note at program start when running in dry-run mode Álvaro Herrera <[email protected]> 2025-11-11 08:54 [PATCH v5] Log a note at program start when running in dry-run mode Álvaro Herrera <[email protected]>
This inbox is served by agora; see mirroring instructions for how to clone and mirror all data and code used for this inbox