agora inbox for [email protected]help / color / mirror / Atom feed
[PATCH v5] Log a note at program start when running in dry-run mode 303+ messages / 2 participants [nested] [flat]
* [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; 303+ 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] 303+ 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; 303+ 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] 303+ 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; 303+ 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] 303+ 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; 303+ 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] 303+ 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; 303+ 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] 303+ 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; 303+ 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] 303+ 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; 303+ 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] 303+ 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; 303+ 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] 303+ 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; 303+ 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] 303+ 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; 303+ 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] 303+ 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; 303+ 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] 303+ 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; 303+ 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] 303+ 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; 303+ 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] 303+ 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; 303+ 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] 303+ 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; 303+ 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] 303+ 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; 303+ 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] 303+ 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; 303+ 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] 303+ 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; 303+ 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] 303+ 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; 303+ 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] 303+ 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; 303+ 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] 303+ 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; 303+ 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] 303+ 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; 303+ 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] 303+ 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; 303+ 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] 303+ 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; 303+ 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] 303+ 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; 303+ 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] 303+ 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; 303+ 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] 303+ 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; 303+ 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] 303+ 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; 303+ 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] 303+ 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; 303+ 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] 303+ 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; 303+ 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] 303+ 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; 303+ 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] 303+ 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; 303+ 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] 303+ 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; 303+ 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] 303+ 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; 303+ 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] 303+ 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; 303+ 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] 303+ 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; 303+ 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] 303+ 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; 303+ 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] 303+ 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; 303+ 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] 303+ 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; 303+ 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] 303+ 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; 303+ 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] 303+ 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; 303+ 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] 303+ 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; 303+ 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] 303+ 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; 303+ 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] 303+ 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; 303+ 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] 303+ 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; 303+ 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] 303+ 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; 303+ 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] 303+ 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; 303+ 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] 303+ 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; 303+ 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] 303+ 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; 303+ 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] 303+ 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; 303+ 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] 303+ 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; 303+ 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] 303+ 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; 303+ 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] 303+ 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; 303+ 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] 303+ 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; 303+ 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] 303+ 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; 303+ 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] 303+ 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; 303+ 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] 303+ 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; 303+ 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] 303+ 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; 303+ 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] 303+ 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; 303+ 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] 303+ 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; 303+ 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] 303+ 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; 303+ 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] 303+ 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; 303+ 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] 303+ 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; 303+ 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] 303+ 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; 303+ 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] 303+ 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; 303+ 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] 303+ 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; 303+ 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] 303+ 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; 303+ 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] 303+ 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; 303+ 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] 303+ 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; 303+ 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] 303+ 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; 303+ 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] 303+ 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; 303+ 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] 303+ 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; 303+ 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] 303+ 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; 303+ 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] 303+ 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; 303+ 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] 303+ 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; 303+ 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] 303+ 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; 303+ 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] 303+ 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; 303+ 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] 303+ 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; 303+ 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] 303+ 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; 303+ 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] 303+ 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; 303+ 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] 303+ 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; 303+ 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] 303+ 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; 303+ 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] 303+ 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; 303+ 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] 303+ 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; 303+ 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] 303+ 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; 303+ 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] 303+ 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; 303+ 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] 303+ 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; 303+ 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] 303+ 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; 303+ 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] 303+ 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; 303+ 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] 303+ 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; 303+ 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] 303+ 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; 303+ 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] 303+ 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; 303+ 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] 303+ 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; 303+ 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] 303+ 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; 303+ 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] 303+ 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; 303+ 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] 303+ 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; 303+ 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] 303+ 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; 303+ 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] 303+ 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; 303+ 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] 303+ 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; 303+ 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] 303+ 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; 303+ 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] 303+ 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; 303+ 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] 303+ 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; 303+ 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] 303+ 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; 303+ 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] 303+ 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; 303+ 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] 303+ 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; 303+ 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] 303+ 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; 303+ 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] 303+ 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; 303+ 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] 303+ 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; 303+ 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] 303+ 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; 303+ 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] 303+ 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; 303+ 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] 303+ 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; 303+ 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] 303+ 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; 303+ 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] 303+ 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; 303+ 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] 303+ 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; 303+ 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] 303+ 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; 303+ 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] 303+ 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; 303+ 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] 303+ 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; 303+ 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] 303+ 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; 303+ 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] 303+ 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; 303+ 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] 303+ 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; 303+ 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] 303+ 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; 303+ 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] 303+ 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; 303+ 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] 303+ 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; 303+ 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] 303+ 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; 303+ 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] 303+ 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; 303+ 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] 303+ 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; 303+ 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] 303+ 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; 303+ 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] 303+ 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; 303+ 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] 303+ 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; 303+ 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] 303+ 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; 303+ 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] 303+ 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; 303+ 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] 303+ 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; 303+ 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] 303+ 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; 303+ 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] 303+ 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; 303+ 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] 303+ 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; 303+ 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] 303+ 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; 303+ 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] 303+ 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; 303+ 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] 303+ 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; 303+ 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] 303+ 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; 303+ 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] 303+ 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; 303+ 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] 303+ 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; 303+ 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] 303+ 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; 303+ 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] 303+ 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; 303+ 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] 303+ 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; 303+ 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] 303+ 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; 303+ 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] 303+ 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; 303+ 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] 303+ 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; 303+ 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] 303+ 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; 303+ 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] 303+ 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; 303+ 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] 303+ 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; 303+ 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] 303+ 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; 303+ 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] 303+ 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; 303+ 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] 303+ 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; 303+ 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] 303+ 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; 303+ 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] 303+ 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; 303+ 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] 303+ 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; 303+ 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] 303+ 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; 303+ 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] 303+ 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; 303+ 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] 303+ 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; 303+ 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] 303+ 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; 303+ 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] 303+ 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; 303+ 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] 303+ 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; 303+ 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] 303+ 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; 303+ 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] 303+ 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; 303+ 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] 303+ 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; 303+ 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] 303+ 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; 303+ 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] 303+ 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; 303+ 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] 303+ 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; 303+ 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] 303+ 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; 303+ 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] 303+ 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; 303+ 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] 303+ 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; 303+ 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] 303+ 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; 303+ 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] 303+ 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; 303+ 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] 303+ 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; 303+ 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] 303+ 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; 303+ 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] 303+ 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; 303+ 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] 303+ 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; 303+ 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] 303+ 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; 303+ 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] 303+ 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; 303+ 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] 303+ 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; 303+ 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] 303+ 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; 303+ 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] 303+ 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; 303+ 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] 303+ 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; 303+ 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] 303+ 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; 303+ 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] 303+ 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; 303+ 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] 303+ 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; 303+ 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] 303+ 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; 303+ 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] 303+ 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; 303+ 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] 303+ 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; 303+ 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] 303+ 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; 303+ 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] 303+ 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; 303+ 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] 303+ 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; 303+ 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] 303+ 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; 303+ 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] 303+ 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; 303+ 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] 303+ 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; 303+ 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] 303+ 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; 303+ 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] 303+ 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; 303+ 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] 303+ 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; 303+ 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] 303+ 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; 303+ 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] 303+ 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; 303+ 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] 303+ 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; 303+ 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] 303+ 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; 303+ 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] 303+ 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; 303+ 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] 303+ 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; 303+ 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] 303+ 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; 303+ 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] 303+ 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; 303+ 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] 303+ 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; 303+ 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] 303+ 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; 303+ 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] 303+ 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; 303+ 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] 303+ 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; 303+ 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] 303+ 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; 303+ 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] 303+ 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; 303+ 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] 303+ 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; 303+ 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] 303+ 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; 303+ 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] 303+ 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; 303+ 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] 303+ 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; 303+ 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] 303+ 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; 303+ 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] 303+ 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; 303+ 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] 303+ 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; 303+ 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] 303+ 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; 303+ 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] 303+ 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; 303+ 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] 303+ 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; 303+ 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] 303+ 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; 303+ 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] 303+ 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; 303+ 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] 303+ 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; 303+ 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] 303+ 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; 303+ 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] 303+ 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; 303+ 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] 303+ 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; 303+ 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] 303+ 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; 303+ 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] 303+ 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; 303+ 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] 303+ 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; 303+ 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] 303+ 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; 303+ 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] 303+ 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; 303+ 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] 303+ 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; 303+ 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] 303+ 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; 303+ 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] 303+ 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; 303+ 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] 303+ 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; 303+ 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] 303+ 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; 303+ 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] 303+ 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; 303+ 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] 303+ 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; 303+ 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] 303+ 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; 303+ 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] 303+ 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; 303+ 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] 303+ 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; 303+ 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] 303+ 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; 303+ 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] 303+ 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; 303+ 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] 303+ 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; 303+ 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] 303+ 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; 303+ 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] 303+ 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; 303+ 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] 303+ 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; 303+ 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] 303+ 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; 303+ 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] 303+ 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; 303+ 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] 303+ 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; 303+ 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] 303+ 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; 303+ 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] 303+ 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; 303+ 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] 303+ 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; 303+ 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] 303+ 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; 303+ 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] 303+ 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; 303+ 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] 303+ 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; 303+ 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] 303+ 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; 303+ 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] 303+ 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; 303+ 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] 303+ 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; 303+ 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] 303+ 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; 303+ 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] 303+ 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; 303+ 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] 303+ 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; 303+ 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] 303+ 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; 303+ 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] 303+ 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; 303+ 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] 303+ 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; 303+ 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] 303+ 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; 303+ 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] 303+ 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; 303+ 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] 303+ 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; 303+ 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] 303+ 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; 303+ 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] 303+ 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; 303+ 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] 303+ 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; 303+ 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] 303+ 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; 303+ 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] 303+ 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; 303+ 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] 303+ 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; 303+ 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] 303+ 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; 303+ 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] 303+ 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; 303+ 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] 303+ 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; 303+ 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] 303+ 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; 303+ 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] 303+ 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; 303+ 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] 303+ 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; 303+ 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] 303+ 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; 303+ 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] 303+ 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; 303+ 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] 303+ 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; 303+ 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] 303+ 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; 303+ 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] 303+ 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; 303+ 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] 303+ 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; 303+ 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] 303+ 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; 303+ 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] 303+ 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; 303+ 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] 303+ 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; 303+ 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] 303+ 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; 303+ 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] 303+ 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; 303+ 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] 303+ 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; 303+ 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] 303+ 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; 303+ 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] 303+ 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; 303+ 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] 303+ 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; 303+ 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] 303+ 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; 303+ 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] 303+ 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; 303+ 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] 303+ 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; 303+ 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] 303+ 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; 303+ 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] 303+ 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; 303+ 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] 303+ messages in thread
* [PATCH 1/4] Make propgraph object descriptions translatable @ 2026-05-26 07:14 Kyotaro Horiguchi <[email protected]> 0 siblings, 0 replies; 303+ messages in thread From: Kyotaro Horiguchi @ 2026-05-26 07:14 UTC (permalink / raw) getObjectDescription() currently constructs propgraph-related object descriptions incrementally with appendStringInfo(). This effectively fixes the word order in English, which makes the messages difficult to translate naturally into languages such as Japanese. Build the whole object description from a single format string instead. --- src/backend/catalog/objectaddress.c | 61 ++++++++++++++++++++--------- 1 file changed, 43 insertions(+), 18 deletions(-) diff --git a/src/backend/catalog/objectaddress.c b/src/backend/catalog/objectaddress.c index 050b7829eb0..c107d0fb0e4 100644 --- a/src/backend/catalog/objectaddress.c +++ b/src/backend/catalog/objectaddress.c @@ -4077,6 +4077,9 @@ getObjectDescription(const ObjectAddress *object, bool missing_ok) { HeapTuple tup; Form_pg_propgraph_element pgeform; + StringInfoData objdesc; + + initStringInfo(&objdesc); tup = SearchSysCache1(PROPGRAPHELOID, ObjectIdGetDatum(object->objectId)); if (!HeapTupleIsValid(tup)) @@ -4089,15 +4092,15 @@ getObjectDescription(const ObjectAddress *object, bool missing_ok) pgeform = (Form_pg_propgraph_element) GETSTRUCT(tup); + getRelationDescription(&objdesc, pgeform->pgepgid, false); + Assert(objdesc.len > 0); + if (pgeform->pgekind == PGEKIND_VERTEX) - /* translator: followed by, e.g., "property graph %s" */ - appendStringInfo(&buffer, _("vertex %s of "), NameStr(pgeform->pgealias)); + appendStringInfo(&buffer, _("vertex %s of %s"), NameStr(pgeform->pgealias), objdesc.data); else if (pgeform->pgekind == PGEKIND_EDGE) - /* translator: followed by, e.g., "property graph %s" */ - appendStringInfo(&buffer, _("edge %s of "), NameStr(pgeform->pgealias)); + appendStringInfo(&buffer, _("edge %s of %s"), NameStr(pgeform->pgealias), objdesc.data); else - appendStringInfo(&buffer, "??? element %s of ", NameStr(pgeform->pgealias)); - getRelationDescription(&buffer, pgeform->pgepgid, false); + appendStringInfo(&buffer, "??? element %s of %s", NameStr(pgeform->pgealias), objdesc.data); ReleaseSysCache(tup); break; @@ -4109,6 +4112,9 @@ getObjectDescription(const ObjectAddress *object, bool missing_ok) HeapTuple tuple; Form_pg_propgraph_element_label pgelform; ObjectAddress oa; + StringInfoData objdesc; + + initStringInfo(&objdesc); rel = table_open(PropgraphElementLabelRelationId, AccessShareLock); tuple = get_catalog_object_by_oid(rel, @@ -4125,9 +4131,13 @@ getObjectDescription(const ObjectAddress *object, bool missing_ok) pgelform = (Form_pg_propgraph_element_label) GETSTRUCT(tuple); - appendStringInfo(&buffer, _("label %s of "), get_propgraph_label_name(pgelform->pgellabelid)); - ObjectAddressSet(oa, PropgraphElementRelationId, pgelform->pgelelid); - appendStringInfoString(&buffer, getObjectDescription(&oa, false)); + ObjectAddressSet(oa, PropgraphElementRelationId, + pgelform->pgelelid); + appendStringInfoString(&objdesc, + getObjectDescription(&oa, false)); + Assert(objdesc.len > 0); + + appendStringInfo(&buffer, _("label %s of %s"), get_propgraph_label_name(pgelform->pgellabelid), objdesc.data); table_close(rel, AccessShareLock); break; @@ -4137,6 +4147,9 @@ getObjectDescription(const ObjectAddress *object, bool missing_ok) { HeapTuple tuple; Form_pg_propgraph_label pglform; + StringInfoData objdesc; + + initStringInfo(&objdesc); tuple = SearchSysCache1(PROPGRAPHLABELOID, ObjectIdGetDatum(object->objectId)); if (!HeapTupleIsValid(tuple)) @@ -4148,9 +4161,10 @@ getObjectDescription(const ObjectAddress *object, bool missing_ok) pglform = (Form_pg_propgraph_label) GETSTRUCT(tuple); - /* translator: followed by, e.g., "property graph %s" */ - appendStringInfo(&buffer, _("label %s of "), NameStr(pglform->pgllabel)); - getRelationDescription(&buffer, pglform->pglpgid, false); + getRelationDescription(&objdesc, pglform->pglpgid, false); + Assert(objdesc.len > 0); + + appendStringInfo(&buffer, _("label %s of %s"), NameStr(pglform->pgllabel), objdesc.data); ReleaseSysCache(tuple); break; } @@ -4161,6 +4175,9 @@ getObjectDescription(const ObjectAddress *object, bool missing_ok) HeapTuple tuple; Form_pg_propgraph_label_property plpform; ObjectAddress oa; + StringInfoData objdesc; + + initStringInfo(&objdesc); rel = table_open(PropgraphLabelPropertyRelationId, AccessShareLock); tuple = get_catalog_object_by_oid(rel, @@ -4177,9 +4194,13 @@ getObjectDescription(const ObjectAddress *object, bool missing_ok) plpform = (Form_pg_propgraph_label_property) GETSTRUCT(tuple); - appendStringInfo(&buffer, _("property %s of "), get_propgraph_property_name(plpform->plppropid)); - ObjectAddressSet(oa, PropgraphElementLabelRelationId, plpform->plpellabelid); - appendStringInfoString(&buffer, getObjectDescription(&oa, false)); + ObjectAddressSet(oa, PropgraphElementLabelRelationId, + plpform->plpellabelid); + appendStringInfoString(&objdesc, + getObjectDescription(&oa, false)); + Assert(objdesc.len > 0); + + appendStringInfo(&buffer, _("property %s of %s"), get_propgraph_property_name(plpform->plppropid), objdesc.data); table_close(rel, AccessShareLock); break; @@ -4189,6 +4210,9 @@ getObjectDescription(const ObjectAddress *object, bool missing_ok) { HeapTuple tuple; Form_pg_propgraph_property pgpform; + StringInfoData objdesc; + + initStringInfo(&objdesc); tuple = SearchSysCache1(PROPGRAPHPROPOID, ObjectIdGetDatum(object->objectId)); if (!HeapTupleIsValid(tuple)) @@ -4200,9 +4224,10 @@ getObjectDescription(const ObjectAddress *object, bool missing_ok) pgpform = (Form_pg_propgraph_property) GETSTRUCT(tuple); - /* translator: followed by, e.g., "property graph %s" */ - appendStringInfo(&buffer, _("property %s of "), NameStr(pgpform->pgpname)); - getRelationDescription(&buffer, pgpform->pgppgid, false); + getRelationDescription(&objdesc, pgpform->pgppgid, false); + Assert(objdesc.len > 0); + + appendStringInfo(&buffer, _("property %s of %s"), NameStr(pgpform->pgpname), objdesc.data); ReleaseSysCache(tuple); break; } -- 2.47.3 ----Next_Part(Thu_May_28_12_16_22_2026_214)-- Content-Type: Text/X-Patch; charset=us-ascii Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="0002-Use-double-quotes-in-message.patch" ^ permalink raw reply [nested|flat] 303+ messages in thread
end of thread, other threads:[~2026-05-26 07:14 UTC | newest] Thread overview: 303+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 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]> 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]> 2026-05-26 07:14 [PATCH 1/4] Make propgraph object descriptions translatable Kyotaro Horiguchi <[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