agora inbox for [email protected]  
help / color / mirror / Atom feed
[PATCH v5] Log a note at program start when running in dry-run mode
126+ 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; 126+ messages in thread

From: Álvaro Herrera @ 2025-11-11 08:54 UTC (permalink / raw)

Users might get some peace of mind knowing their data is not being
destroyed or whatever.

Author: Peter Smith <[email protected]>
Reviewed-by: Álvaro Herrera <[email protected]>
Discussion: https://postgr.es/m/CAHut+PsvQJQnQO0KT0S2oegenkvJ8FUuY-QS5syyqmT24R2xFQ@mail.gmail.com
---
 src/bin/pg_archivecleanup/pg_archivecleanup.c |  4 ++++
 src/bin/pg_basebackup/pg_createsubscriber.c   |  5 +++++
 src/bin/pg_combinebackup/pg_combinebackup.c   |  4 ++++
 src/bin/pg_resetwal/pg_resetwal.c             |  4 ++++
 src/bin/pg_rewind/pg_rewind.c                 | 10 ++++++----
 5 files changed, 23 insertions(+), 4 deletions(-)

diff --git a/src/bin/pg_archivecleanup/pg_archivecleanup.c b/src/bin/pg_archivecleanup/pg_archivecleanup.c
index c25348bcb85..ab686b4748c 100644
--- a/src/bin/pg_archivecleanup/pg_archivecleanup.c
+++ b/src/bin/pg_archivecleanup/pg_archivecleanup.c
@@ -375,6 +375,10 @@ main(int argc, char **argv)
 		exit(2);
 	}
 
+	if (dryrun)
+		pg_log_info("Executing in dry-run mode.\n"
+					"No files will be removed.");
+
 	/*
 	 * Check archive exists and other initialization if required.
 	 */
diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c
index df41836e70f..cc4be5d6ef4 100644
--- a/src/bin/pg_basebackup/pg_createsubscriber.c
+++ b/src/bin/pg_basebackup/pg_createsubscriber.c
@@ -2305,6 +2305,11 @@ main(int argc, char **argv)
 		pg_log_error_hint("Try \"%s --help\" for more information.", progname);
 		exit(1);
 	}
+
+	if (dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
 	pg_log_info("validating publisher connection string");
 	pub_base_conninfo = get_base_conninfo(opt.pub_conninfo_str,
 										  &dbname_conninfo);
diff --git a/src/bin/pg_combinebackup/pg_combinebackup.c b/src/bin/pg_combinebackup/pg_combinebackup.c
index 3a325127209..c9bf0a9e105 100644
--- a/src/bin/pg_combinebackup/pg_combinebackup.c
+++ b/src/bin/pg_combinebackup/pg_combinebackup.c
@@ -242,6 +242,10 @@ main(int argc, char *argv[])
 	if (opt.no_manifest)
 		opt.manifest_checksums = CHECKSUM_TYPE_NONE;
 
+	if (opt.dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
 	/* Check that the platform supports the requested copy method. */
 	if (opt.copy_method == COPY_METHOD_CLONE)
 	{
diff --git a/src/bin/pg_resetwal/pg_resetwal.c b/src/bin/pg_resetwal/pg_resetwal.c
index a89d72fc5cf..dd5d279521e 100644
--- a/src/bin/pg_resetwal/pg_resetwal.c
+++ b/src/bin/pg_resetwal/pg_resetwal.c
@@ -397,6 +397,10 @@ main(int argc, char *argv[])
 		exit(1);
 	}
 
+	if (noupdate)
+		pg_log_info("Executing in dry-run mode.\n"
+					"Nothing will be modified.");
+
 	/*
 	 * Attempt to read the existing pg_control file
 	 */
diff --git a/src/bin/pg_rewind/pg_rewind.c b/src/bin/pg_rewind/pg_rewind.c
index 27c514f934a..e9364d04f76 100644
--- a/src/bin/pg_rewind/pg_rewind.c
+++ b/src/bin/pg_rewind/pg_rewind.c
@@ -300,10 +300,12 @@ main(int argc, char **argv)
 
 	atexit(disconnect_atexit);
 
-	/*
-	 * Ok, we have all the options and we're ready to start. First, connect to
-	 * remote server.
-	 */
+	/* Ok, we have all the options and we're ready to start. */
+	if (dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
+	/* First, connect to remote server. */
 	if (connstr_source)
 	{
 		conn = PQconnectdb(connstr_source);
-- 
2.47.3


--ibfr3ah5qy6tcbhw--





^ permalink  raw  reply  [nested|flat] 126+ messages in thread

* [PATCH v5] Log a note at program start when running in dry-run mode
@ 2025-11-11 08:54 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 126+ messages in thread

From: Álvaro Herrera @ 2025-11-11 08:54 UTC (permalink / raw)

Users might get some peace of mind knowing their data is not being
destroyed or whatever.

Author: Peter Smith <[email protected]>
Reviewed-by: Álvaro Herrera <[email protected]>
Discussion: https://postgr.es/m/CAHut+PsvQJQnQO0KT0S2oegenkvJ8FUuY-QS5syyqmT24R2xFQ@mail.gmail.com
---
 src/bin/pg_archivecleanup/pg_archivecleanup.c |  4 ++++
 src/bin/pg_basebackup/pg_createsubscriber.c   |  5 +++++
 src/bin/pg_combinebackup/pg_combinebackup.c   |  4 ++++
 src/bin/pg_resetwal/pg_resetwal.c             |  4 ++++
 src/bin/pg_rewind/pg_rewind.c                 | 10 ++++++----
 5 files changed, 23 insertions(+), 4 deletions(-)

diff --git a/src/bin/pg_archivecleanup/pg_archivecleanup.c b/src/bin/pg_archivecleanup/pg_archivecleanup.c
index c25348bcb85..ab686b4748c 100644
--- a/src/bin/pg_archivecleanup/pg_archivecleanup.c
+++ b/src/bin/pg_archivecleanup/pg_archivecleanup.c
@@ -375,6 +375,10 @@ main(int argc, char **argv)
 		exit(2);
 	}
 
+	if (dryrun)
+		pg_log_info("Executing in dry-run mode.\n"
+					"No files will be removed.");
+
 	/*
 	 * Check archive exists and other initialization if required.
 	 */
diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c
index df41836e70f..cc4be5d6ef4 100644
--- a/src/bin/pg_basebackup/pg_createsubscriber.c
+++ b/src/bin/pg_basebackup/pg_createsubscriber.c
@@ -2305,6 +2305,11 @@ main(int argc, char **argv)
 		pg_log_error_hint("Try \"%s --help\" for more information.", progname);
 		exit(1);
 	}
+
+	if (dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
 	pg_log_info("validating publisher connection string");
 	pub_base_conninfo = get_base_conninfo(opt.pub_conninfo_str,
 										  &dbname_conninfo);
diff --git a/src/bin/pg_combinebackup/pg_combinebackup.c b/src/bin/pg_combinebackup/pg_combinebackup.c
index 3a325127209..c9bf0a9e105 100644
--- a/src/bin/pg_combinebackup/pg_combinebackup.c
+++ b/src/bin/pg_combinebackup/pg_combinebackup.c
@@ -242,6 +242,10 @@ main(int argc, char *argv[])
 	if (opt.no_manifest)
 		opt.manifest_checksums = CHECKSUM_TYPE_NONE;
 
+	if (opt.dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
 	/* Check that the platform supports the requested copy method. */
 	if (opt.copy_method == COPY_METHOD_CLONE)
 	{
diff --git a/src/bin/pg_resetwal/pg_resetwal.c b/src/bin/pg_resetwal/pg_resetwal.c
index a89d72fc5cf..dd5d279521e 100644
--- a/src/bin/pg_resetwal/pg_resetwal.c
+++ b/src/bin/pg_resetwal/pg_resetwal.c
@@ -397,6 +397,10 @@ main(int argc, char *argv[])
 		exit(1);
 	}
 
+	if (noupdate)
+		pg_log_info("Executing in dry-run mode.\n"
+					"Nothing will be modified.");
+
 	/*
 	 * Attempt to read the existing pg_control file
 	 */
diff --git a/src/bin/pg_rewind/pg_rewind.c b/src/bin/pg_rewind/pg_rewind.c
index 27c514f934a..e9364d04f76 100644
--- a/src/bin/pg_rewind/pg_rewind.c
+++ b/src/bin/pg_rewind/pg_rewind.c
@@ -300,10 +300,12 @@ main(int argc, char **argv)
 
 	atexit(disconnect_atexit);
 
-	/*
-	 * Ok, we have all the options and we're ready to start. First, connect to
-	 * remote server.
-	 */
+	/* Ok, we have all the options and we're ready to start. */
+	if (dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
+	/* First, connect to remote server. */
 	if (connstr_source)
 	{
 		conn = PQconnectdb(connstr_source);
-- 
2.47.3


--ibfr3ah5qy6tcbhw--





^ permalink  raw  reply  [nested|flat] 126+ messages in thread

* [PATCH v5] Log a note at program start when running in dry-run mode
@ 2025-11-11 08:54 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 126+ messages in thread

From: Álvaro Herrera @ 2025-11-11 08:54 UTC (permalink / raw)

Users might get some peace of mind knowing their data is not being
destroyed or whatever.

Author: Peter Smith <[email protected]>
Reviewed-by: Álvaro Herrera <[email protected]>
Discussion: https://postgr.es/m/CAHut+PsvQJQnQO0KT0S2oegenkvJ8FUuY-QS5syyqmT24R2xFQ@mail.gmail.com
---
 src/bin/pg_archivecleanup/pg_archivecleanup.c |  4 ++++
 src/bin/pg_basebackup/pg_createsubscriber.c   |  5 +++++
 src/bin/pg_combinebackup/pg_combinebackup.c   |  4 ++++
 src/bin/pg_resetwal/pg_resetwal.c             |  4 ++++
 src/bin/pg_rewind/pg_rewind.c                 | 10 ++++++----
 5 files changed, 23 insertions(+), 4 deletions(-)

diff --git a/src/bin/pg_archivecleanup/pg_archivecleanup.c b/src/bin/pg_archivecleanup/pg_archivecleanup.c
index c25348bcb85..ab686b4748c 100644
--- a/src/bin/pg_archivecleanup/pg_archivecleanup.c
+++ b/src/bin/pg_archivecleanup/pg_archivecleanup.c
@@ -375,6 +375,10 @@ main(int argc, char **argv)
 		exit(2);
 	}
 
+	if (dryrun)
+		pg_log_info("Executing in dry-run mode.\n"
+					"No files will be removed.");
+
 	/*
 	 * Check archive exists and other initialization if required.
 	 */
diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c
index df41836e70f..cc4be5d6ef4 100644
--- a/src/bin/pg_basebackup/pg_createsubscriber.c
+++ b/src/bin/pg_basebackup/pg_createsubscriber.c
@@ -2305,6 +2305,11 @@ main(int argc, char **argv)
 		pg_log_error_hint("Try \"%s --help\" for more information.", progname);
 		exit(1);
 	}
+
+	if (dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
 	pg_log_info("validating publisher connection string");
 	pub_base_conninfo = get_base_conninfo(opt.pub_conninfo_str,
 										  &dbname_conninfo);
diff --git a/src/bin/pg_combinebackup/pg_combinebackup.c b/src/bin/pg_combinebackup/pg_combinebackup.c
index 3a325127209..c9bf0a9e105 100644
--- a/src/bin/pg_combinebackup/pg_combinebackup.c
+++ b/src/bin/pg_combinebackup/pg_combinebackup.c
@@ -242,6 +242,10 @@ main(int argc, char *argv[])
 	if (opt.no_manifest)
 		opt.manifest_checksums = CHECKSUM_TYPE_NONE;
 
+	if (opt.dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
 	/* Check that the platform supports the requested copy method. */
 	if (opt.copy_method == COPY_METHOD_CLONE)
 	{
diff --git a/src/bin/pg_resetwal/pg_resetwal.c b/src/bin/pg_resetwal/pg_resetwal.c
index a89d72fc5cf..dd5d279521e 100644
--- a/src/bin/pg_resetwal/pg_resetwal.c
+++ b/src/bin/pg_resetwal/pg_resetwal.c
@@ -397,6 +397,10 @@ main(int argc, char *argv[])
 		exit(1);
 	}
 
+	if (noupdate)
+		pg_log_info("Executing in dry-run mode.\n"
+					"Nothing will be modified.");
+
 	/*
 	 * Attempt to read the existing pg_control file
 	 */
diff --git a/src/bin/pg_rewind/pg_rewind.c b/src/bin/pg_rewind/pg_rewind.c
index 27c514f934a..e9364d04f76 100644
--- a/src/bin/pg_rewind/pg_rewind.c
+++ b/src/bin/pg_rewind/pg_rewind.c
@@ -300,10 +300,12 @@ main(int argc, char **argv)
 
 	atexit(disconnect_atexit);
 
-	/*
-	 * Ok, we have all the options and we're ready to start. First, connect to
-	 * remote server.
-	 */
+	/* Ok, we have all the options and we're ready to start. */
+	if (dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
+	/* First, connect to remote server. */
 	if (connstr_source)
 	{
 		conn = PQconnectdb(connstr_source);
-- 
2.47.3


--ibfr3ah5qy6tcbhw--





^ permalink  raw  reply  [nested|flat] 126+ messages in thread

* [PATCH v5] Log a note at program start when running in dry-run mode
@ 2025-11-11 08:54 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 126+ messages in thread

From: Álvaro Herrera @ 2025-11-11 08:54 UTC (permalink / raw)

Users might get some peace of mind knowing their data is not being
destroyed or whatever.

Author: Peter Smith <[email protected]>
Reviewed-by: Álvaro Herrera <[email protected]>
Discussion: https://postgr.es/m/CAHut+PsvQJQnQO0KT0S2oegenkvJ8FUuY-QS5syyqmT24R2xFQ@mail.gmail.com
---
 src/bin/pg_archivecleanup/pg_archivecleanup.c |  4 ++++
 src/bin/pg_basebackup/pg_createsubscriber.c   |  5 +++++
 src/bin/pg_combinebackup/pg_combinebackup.c   |  4 ++++
 src/bin/pg_resetwal/pg_resetwal.c             |  4 ++++
 src/bin/pg_rewind/pg_rewind.c                 | 10 ++++++----
 5 files changed, 23 insertions(+), 4 deletions(-)

diff --git a/src/bin/pg_archivecleanup/pg_archivecleanup.c b/src/bin/pg_archivecleanup/pg_archivecleanup.c
index c25348bcb85..ab686b4748c 100644
--- a/src/bin/pg_archivecleanup/pg_archivecleanup.c
+++ b/src/bin/pg_archivecleanup/pg_archivecleanup.c
@@ -375,6 +375,10 @@ main(int argc, char **argv)
 		exit(2);
 	}
 
+	if (dryrun)
+		pg_log_info("Executing in dry-run mode.\n"
+					"No files will be removed.");
+
 	/*
 	 * Check archive exists and other initialization if required.
 	 */
diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c
index df41836e70f..cc4be5d6ef4 100644
--- a/src/bin/pg_basebackup/pg_createsubscriber.c
+++ b/src/bin/pg_basebackup/pg_createsubscriber.c
@@ -2305,6 +2305,11 @@ main(int argc, char **argv)
 		pg_log_error_hint("Try \"%s --help\" for more information.", progname);
 		exit(1);
 	}
+
+	if (dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
 	pg_log_info("validating publisher connection string");
 	pub_base_conninfo = get_base_conninfo(opt.pub_conninfo_str,
 										  &dbname_conninfo);
diff --git a/src/bin/pg_combinebackup/pg_combinebackup.c b/src/bin/pg_combinebackup/pg_combinebackup.c
index 3a325127209..c9bf0a9e105 100644
--- a/src/bin/pg_combinebackup/pg_combinebackup.c
+++ b/src/bin/pg_combinebackup/pg_combinebackup.c
@@ -242,6 +242,10 @@ main(int argc, char *argv[])
 	if (opt.no_manifest)
 		opt.manifest_checksums = CHECKSUM_TYPE_NONE;
 
+	if (opt.dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
 	/* Check that the platform supports the requested copy method. */
 	if (opt.copy_method == COPY_METHOD_CLONE)
 	{
diff --git a/src/bin/pg_resetwal/pg_resetwal.c b/src/bin/pg_resetwal/pg_resetwal.c
index a89d72fc5cf..dd5d279521e 100644
--- a/src/bin/pg_resetwal/pg_resetwal.c
+++ b/src/bin/pg_resetwal/pg_resetwal.c
@@ -397,6 +397,10 @@ main(int argc, char *argv[])
 		exit(1);
 	}
 
+	if (noupdate)
+		pg_log_info("Executing in dry-run mode.\n"
+					"Nothing will be modified.");
+
 	/*
 	 * Attempt to read the existing pg_control file
 	 */
diff --git a/src/bin/pg_rewind/pg_rewind.c b/src/bin/pg_rewind/pg_rewind.c
index 27c514f934a..e9364d04f76 100644
--- a/src/bin/pg_rewind/pg_rewind.c
+++ b/src/bin/pg_rewind/pg_rewind.c
@@ -300,10 +300,12 @@ main(int argc, char **argv)
 
 	atexit(disconnect_atexit);
 
-	/*
-	 * Ok, we have all the options and we're ready to start. First, connect to
-	 * remote server.
-	 */
+	/* Ok, we have all the options and we're ready to start. */
+	if (dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
+	/* First, connect to remote server. */
 	if (connstr_source)
 	{
 		conn = PQconnectdb(connstr_source);
-- 
2.47.3


--ibfr3ah5qy6tcbhw--





^ permalink  raw  reply  [nested|flat] 126+ messages in thread

* [PATCH v5] Log a note at program start when running in dry-run mode
@ 2025-11-11 08:54 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 126+ messages in thread

From: Álvaro Herrera @ 2025-11-11 08:54 UTC (permalink / raw)

Users might get some peace of mind knowing their data is not being
destroyed or whatever.

Author: Peter Smith <[email protected]>
Reviewed-by: Álvaro Herrera <[email protected]>
Discussion: https://postgr.es/m/CAHut+PsvQJQnQO0KT0S2oegenkvJ8FUuY-QS5syyqmT24R2xFQ@mail.gmail.com
---
 src/bin/pg_archivecleanup/pg_archivecleanup.c |  4 ++++
 src/bin/pg_basebackup/pg_createsubscriber.c   |  5 +++++
 src/bin/pg_combinebackup/pg_combinebackup.c   |  4 ++++
 src/bin/pg_resetwal/pg_resetwal.c             |  4 ++++
 src/bin/pg_rewind/pg_rewind.c                 | 10 ++++++----
 5 files changed, 23 insertions(+), 4 deletions(-)

diff --git a/src/bin/pg_archivecleanup/pg_archivecleanup.c b/src/bin/pg_archivecleanup/pg_archivecleanup.c
index c25348bcb85..ab686b4748c 100644
--- a/src/bin/pg_archivecleanup/pg_archivecleanup.c
+++ b/src/bin/pg_archivecleanup/pg_archivecleanup.c
@@ -375,6 +375,10 @@ main(int argc, char **argv)
 		exit(2);
 	}
 
+	if (dryrun)
+		pg_log_info("Executing in dry-run mode.\n"
+					"No files will be removed.");
+
 	/*
 	 * Check archive exists and other initialization if required.
 	 */
diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c
index df41836e70f..cc4be5d6ef4 100644
--- a/src/bin/pg_basebackup/pg_createsubscriber.c
+++ b/src/bin/pg_basebackup/pg_createsubscriber.c
@@ -2305,6 +2305,11 @@ main(int argc, char **argv)
 		pg_log_error_hint("Try \"%s --help\" for more information.", progname);
 		exit(1);
 	}
+
+	if (dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
 	pg_log_info("validating publisher connection string");
 	pub_base_conninfo = get_base_conninfo(opt.pub_conninfo_str,
 										  &dbname_conninfo);
diff --git a/src/bin/pg_combinebackup/pg_combinebackup.c b/src/bin/pg_combinebackup/pg_combinebackup.c
index 3a325127209..c9bf0a9e105 100644
--- a/src/bin/pg_combinebackup/pg_combinebackup.c
+++ b/src/bin/pg_combinebackup/pg_combinebackup.c
@@ -242,6 +242,10 @@ main(int argc, char *argv[])
 	if (opt.no_manifest)
 		opt.manifest_checksums = CHECKSUM_TYPE_NONE;
 
+	if (opt.dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
 	/* Check that the platform supports the requested copy method. */
 	if (opt.copy_method == COPY_METHOD_CLONE)
 	{
diff --git a/src/bin/pg_resetwal/pg_resetwal.c b/src/bin/pg_resetwal/pg_resetwal.c
index a89d72fc5cf..dd5d279521e 100644
--- a/src/bin/pg_resetwal/pg_resetwal.c
+++ b/src/bin/pg_resetwal/pg_resetwal.c
@@ -397,6 +397,10 @@ main(int argc, char *argv[])
 		exit(1);
 	}
 
+	if (noupdate)
+		pg_log_info("Executing in dry-run mode.\n"
+					"Nothing will be modified.");
+
 	/*
 	 * Attempt to read the existing pg_control file
 	 */
diff --git a/src/bin/pg_rewind/pg_rewind.c b/src/bin/pg_rewind/pg_rewind.c
index 27c514f934a..e9364d04f76 100644
--- a/src/bin/pg_rewind/pg_rewind.c
+++ b/src/bin/pg_rewind/pg_rewind.c
@@ -300,10 +300,12 @@ main(int argc, char **argv)
 
 	atexit(disconnect_atexit);
 
-	/*
-	 * Ok, we have all the options and we're ready to start. First, connect to
-	 * remote server.
-	 */
+	/* Ok, we have all the options and we're ready to start. */
+	if (dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
+	/* First, connect to remote server. */
 	if (connstr_source)
 	{
 		conn = PQconnectdb(connstr_source);
-- 
2.47.3


--ibfr3ah5qy6tcbhw--





^ permalink  raw  reply  [nested|flat] 126+ messages in thread

* [PATCH v5] Log a note at program start when running in dry-run mode
@ 2025-11-11 08:54 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 126+ messages in thread

From: Álvaro Herrera @ 2025-11-11 08:54 UTC (permalink / raw)

Users might get some peace of mind knowing their data is not being
destroyed or whatever.

Author: Peter Smith <[email protected]>
Reviewed-by: Álvaro Herrera <[email protected]>
Discussion: https://postgr.es/m/CAHut+PsvQJQnQO0KT0S2oegenkvJ8FUuY-QS5syyqmT24R2xFQ@mail.gmail.com
---
 src/bin/pg_archivecleanup/pg_archivecleanup.c |  4 ++++
 src/bin/pg_basebackup/pg_createsubscriber.c   |  5 +++++
 src/bin/pg_combinebackup/pg_combinebackup.c   |  4 ++++
 src/bin/pg_resetwal/pg_resetwal.c             |  4 ++++
 src/bin/pg_rewind/pg_rewind.c                 | 10 ++++++----
 5 files changed, 23 insertions(+), 4 deletions(-)

diff --git a/src/bin/pg_archivecleanup/pg_archivecleanup.c b/src/bin/pg_archivecleanup/pg_archivecleanup.c
index c25348bcb85..ab686b4748c 100644
--- a/src/bin/pg_archivecleanup/pg_archivecleanup.c
+++ b/src/bin/pg_archivecleanup/pg_archivecleanup.c
@@ -375,6 +375,10 @@ main(int argc, char **argv)
 		exit(2);
 	}
 
+	if (dryrun)
+		pg_log_info("Executing in dry-run mode.\n"
+					"No files will be removed.");
+
 	/*
 	 * Check archive exists and other initialization if required.
 	 */
diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c
index df41836e70f..cc4be5d6ef4 100644
--- a/src/bin/pg_basebackup/pg_createsubscriber.c
+++ b/src/bin/pg_basebackup/pg_createsubscriber.c
@@ -2305,6 +2305,11 @@ main(int argc, char **argv)
 		pg_log_error_hint("Try \"%s --help\" for more information.", progname);
 		exit(1);
 	}
+
+	if (dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
 	pg_log_info("validating publisher connection string");
 	pub_base_conninfo = get_base_conninfo(opt.pub_conninfo_str,
 										  &dbname_conninfo);
diff --git a/src/bin/pg_combinebackup/pg_combinebackup.c b/src/bin/pg_combinebackup/pg_combinebackup.c
index 3a325127209..c9bf0a9e105 100644
--- a/src/bin/pg_combinebackup/pg_combinebackup.c
+++ b/src/bin/pg_combinebackup/pg_combinebackup.c
@@ -242,6 +242,10 @@ main(int argc, char *argv[])
 	if (opt.no_manifest)
 		opt.manifest_checksums = CHECKSUM_TYPE_NONE;
 
+	if (opt.dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
 	/* Check that the platform supports the requested copy method. */
 	if (opt.copy_method == COPY_METHOD_CLONE)
 	{
diff --git a/src/bin/pg_resetwal/pg_resetwal.c b/src/bin/pg_resetwal/pg_resetwal.c
index a89d72fc5cf..dd5d279521e 100644
--- a/src/bin/pg_resetwal/pg_resetwal.c
+++ b/src/bin/pg_resetwal/pg_resetwal.c
@@ -397,6 +397,10 @@ main(int argc, char *argv[])
 		exit(1);
 	}
 
+	if (noupdate)
+		pg_log_info("Executing in dry-run mode.\n"
+					"Nothing will be modified.");
+
 	/*
 	 * Attempt to read the existing pg_control file
 	 */
diff --git a/src/bin/pg_rewind/pg_rewind.c b/src/bin/pg_rewind/pg_rewind.c
index 27c514f934a..e9364d04f76 100644
--- a/src/bin/pg_rewind/pg_rewind.c
+++ b/src/bin/pg_rewind/pg_rewind.c
@@ -300,10 +300,12 @@ main(int argc, char **argv)
 
 	atexit(disconnect_atexit);
 
-	/*
-	 * Ok, we have all the options and we're ready to start. First, connect to
-	 * remote server.
-	 */
+	/* Ok, we have all the options and we're ready to start. */
+	if (dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
+	/* First, connect to remote server. */
 	if (connstr_source)
 	{
 		conn = PQconnectdb(connstr_source);
-- 
2.47.3


--ibfr3ah5qy6tcbhw--





^ permalink  raw  reply  [nested|flat] 126+ messages in thread

* [PATCH v5] Log a note at program start when running in dry-run mode
@ 2025-11-11 08:54 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 126+ messages in thread

From: Álvaro Herrera @ 2025-11-11 08:54 UTC (permalink / raw)

Users might get some peace of mind knowing their data is not being
destroyed or whatever.

Author: Peter Smith <[email protected]>
Reviewed-by: Álvaro Herrera <[email protected]>
Discussion: https://postgr.es/m/CAHut+PsvQJQnQO0KT0S2oegenkvJ8FUuY-QS5syyqmT24R2xFQ@mail.gmail.com
---
 src/bin/pg_archivecleanup/pg_archivecleanup.c |  4 ++++
 src/bin/pg_basebackup/pg_createsubscriber.c   |  5 +++++
 src/bin/pg_combinebackup/pg_combinebackup.c   |  4 ++++
 src/bin/pg_resetwal/pg_resetwal.c             |  4 ++++
 src/bin/pg_rewind/pg_rewind.c                 | 10 ++++++----
 5 files changed, 23 insertions(+), 4 deletions(-)

diff --git a/src/bin/pg_archivecleanup/pg_archivecleanup.c b/src/bin/pg_archivecleanup/pg_archivecleanup.c
index c25348bcb85..ab686b4748c 100644
--- a/src/bin/pg_archivecleanup/pg_archivecleanup.c
+++ b/src/bin/pg_archivecleanup/pg_archivecleanup.c
@@ -375,6 +375,10 @@ main(int argc, char **argv)
 		exit(2);
 	}
 
+	if (dryrun)
+		pg_log_info("Executing in dry-run mode.\n"
+					"No files will be removed.");
+
 	/*
 	 * Check archive exists and other initialization if required.
 	 */
diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c
index df41836e70f..cc4be5d6ef4 100644
--- a/src/bin/pg_basebackup/pg_createsubscriber.c
+++ b/src/bin/pg_basebackup/pg_createsubscriber.c
@@ -2305,6 +2305,11 @@ main(int argc, char **argv)
 		pg_log_error_hint("Try \"%s --help\" for more information.", progname);
 		exit(1);
 	}
+
+	if (dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
 	pg_log_info("validating publisher connection string");
 	pub_base_conninfo = get_base_conninfo(opt.pub_conninfo_str,
 										  &dbname_conninfo);
diff --git a/src/bin/pg_combinebackup/pg_combinebackup.c b/src/bin/pg_combinebackup/pg_combinebackup.c
index 3a325127209..c9bf0a9e105 100644
--- a/src/bin/pg_combinebackup/pg_combinebackup.c
+++ b/src/bin/pg_combinebackup/pg_combinebackup.c
@@ -242,6 +242,10 @@ main(int argc, char *argv[])
 	if (opt.no_manifest)
 		opt.manifest_checksums = CHECKSUM_TYPE_NONE;
 
+	if (opt.dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
 	/* Check that the platform supports the requested copy method. */
 	if (opt.copy_method == COPY_METHOD_CLONE)
 	{
diff --git a/src/bin/pg_resetwal/pg_resetwal.c b/src/bin/pg_resetwal/pg_resetwal.c
index a89d72fc5cf..dd5d279521e 100644
--- a/src/bin/pg_resetwal/pg_resetwal.c
+++ b/src/bin/pg_resetwal/pg_resetwal.c
@@ -397,6 +397,10 @@ main(int argc, char *argv[])
 		exit(1);
 	}
 
+	if (noupdate)
+		pg_log_info("Executing in dry-run mode.\n"
+					"Nothing will be modified.");
+
 	/*
 	 * Attempt to read the existing pg_control file
 	 */
diff --git a/src/bin/pg_rewind/pg_rewind.c b/src/bin/pg_rewind/pg_rewind.c
index 27c514f934a..e9364d04f76 100644
--- a/src/bin/pg_rewind/pg_rewind.c
+++ b/src/bin/pg_rewind/pg_rewind.c
@@ -300,10 +300,12 @@ main(int argc, char **argv)
 
 	atexit(disconnect_atexit);
 
-	/*
-	 * Ok, we have all the options and we're ready to start. First, connect to
-	 * remote server.
-	 */
+	/* Ok, we have all the options and we're ready to start. */
+	if (dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
+	/* First, connect to remote server. */
 	if (connstr_source)
 	{
 		conn = PQconnectdb(connstr_source);
-- 
2.47.3


--ibfr3ah5qy6tcbhw--





^ permalink  raw  reply  [nested|flat] 126+ messages in thread

* [PATCH v5] Log a note at program start when running in dry-run mode
@ 2025-11-11 08:54 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 126+ messages in thread

From: Álvaro Herrera @ 2025-11-11 08:54 UTC (permalink / raw)

Users might get some peace of mind knowing their data is not being
destroyed or whatever.

Author: Peter Smith <[email protected]>
Reviewed-by: Álvaro Herrera <[email protected]>
Discussion: https://postgr.es/m/CAHut+PsvQJQnQO0KT0S2oegenkvJ8FUuY-QS5syyqmT24R2xFQ@mail.gmail.com
---
 src/bin/pg_archivecleanup/pg_archivecleanup.c |  4 ++++
 src/bin/pg_basebackup/pg_createsubscriber.c   |  5 +++++
 src/bin/pg_combinebackup/pg_combinebackup.c   |  4 ++++
 src/bin/pg_resetwal/pg_resetwal.c             |  4 ++++
 src/bin/pg_rewind/pg_rewind.c                 | 10 ++++++----
 5 files changed, 23 insertions(+), 4 deletions(-)

diff --git a/src/bin/pg_archivecleanup/pg_archivecleanup.c b/src/bin/pg_archivecleanup/pg_archivecleanup.c
index c25348bcb85..ab686b4748c 100644
--- a/src/bin/pg_archivecleanup/pg_archivecleanup.c
+++ b/src/bin/pg_archivecleanup/pg_archivecleanup.c
@@ -375,6 +375,10 @@ main(int argc, char **argv)
 		exit(2);
 	}
 
+	if (dryrun)
+		pg_log_info("Executing in dry-run mode.\n"
+					"No files will be removed.");
+
 	/*
 	 * Check archive exists and other initialization if required.
 	 */
diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c
index df41836e70f..cc4be5d6ef4 100644
--- a/src/bin/pg_basebackup/pg_createsubscriber.c
+++ b/src/bin/pg_basebackup/pg_createsubscriber.c
@@ -2305,6 +2305,11 @@ main(int argc, char **argv)
 		pg_log_error_hint("Try \"%s --help\" for more information.", progname);
 		exit(1);
 	}
+
+	if (dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
 	pg_log_info("validating publisher connection string");
 	pub_base_conninfo = get_base_conninfo(opt.pub_conninfo_str,
 										  &dbname_conninfo);
diff --git a/src/bin/pg_combinebackup/pg_combinebackup.c b/src/bin/pg_combinebackup/pg_combinebackup.c
index 3a325127209..c9bf0a9e105 100644
--- a/src/bin/pg_combinebackup/pg_combinebackup.c
+++ b/src/bin/pg_combinebackup/pg_combinebackup.c
@@ -242,6 +242,10 @@ main(int argc, char *argv[])
 	if (opt.no_manifest)
 		opt.manifest_checksums = CHECKSUM_TYPE_NONE;
 
+	if (opt.dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
 	/* Check that the platform supports the requested copy method. */
 	if (opt.copy_method == COPY_METHOD_CLONE)
 	{
diff --git a/src/bin/pg_resetwal/pg_resetwal.c b/src/bin/pg_resetwal/pg_resetwal.c
index a89d72fc5cf..dd5d279521e 100644
--- a/src/bin/pg_resetwal/pg_resetwal.c
+++ b/src/bin/pg_resetwal/pg_resetwal.c
@@ -397,6 +397,10 @@ main(int argc, char *argv[])
 		exit(1);
 	}
 
+	if (noupdate)
+		pg_log_info("Executing in dry-run mode.\n"
+					"Nothing will be modified.");
+
 	/*
 	 * Attempt to read the existing pg_control file
 	 */
diff --git a/src/bin/pg_rewind/pg_rewind.c b/src/bin/pg_rewind/pg_rewind.c
index 27c514f934a..e9364d04f76 100644
--- a/src/bin/pg_rewind/pg_rewind.c
+++ b/src/bin/pg_rewind/pg_rewind.c
@@ -300,10 +300,12 @@ main(int argc, char **argv)
 
 	atexit(disconnect_atexit);
 
-	/*
-	 * Ok, we have all the options and we're ready to start. First, connect to
-	 * remote server.
-	 */
+	/* Ok, we have all the options and we're ready to start. */
+	if (dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
+	/* First, connect to remote server. */
 	if (connstr_source)
 	{
 		conn = PQconnectdb(connstr_source);
-- 
2.47.3


--ibfr3ah5qy6tcbhw--





^ permalink  raw  reply  [nested|flat] 126+ messages in thread

* [PATCH v5] Log a note at program start when running in dry-run mode
@ 2025-11-11 08:54 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 126+ messages in thread

From: Álvaro Herrera @ 2025-11-11 08:54 UTC (permalink / raw)

Users might get some peace of mind knowing their data is not being
destroyed or whatever.

Author: Peter Smith <[email protected]>
Reviewed-by: Álvaro Herrera <[email protected]>
Discussion: https://postgr.es/m/CAHut+PsvQJQnQO0KT0S2oegenkvJ8FUuY-QS5syyqmT24R2xFQ@mail.gmail.com
---
 src/bin/pg_archivecleanup/pg_archivecleanup.c |  4 ++++
 src/bin/pg_basebackup/pg_createsubscriber.c   |  5 +++++
 src/bin/pg_combinebackup/pg_combinebackup.c   |  4 ++++
 src/bin/pg_resetwal/pg_resetwal.c             |  4 ++++
 src/bin/pg_rewind/pg_rewind.c                 | 10 ++++++----
 5 files changed, 23 insertions(+), 4 deletions(-)

diff --git a/src/bin/pg_archivecleanup/pg_archivecleanup.c b/src/bin/pg_archivecleanup/pg_archivecleanup.c
index c25348bcb85..ab686b4748c 100644
--- a/src/bin/pg_archivecleanup/pg_archivecleanup.c
+++ b/src/bin/pg_archivecleanup/pg_archivecleanup.c
@@ -375,6 +375,10 @@ main(int argc, char **argv)
 		exit(2);
 	}
 
+	if (dryrun)
+		pg_log_info("Executing in dry-run mode.\n"
+					"No files will be removed.");
+
 	/*
 	 * Check archive exists and other initialization if required.
 	 */
diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c
index df41836e70f..cc4be5d6ef4 100644
--- a/src/bin/pg_basebackup/pg_createsubscriber.c
+++ b/src/bin/pg_basebackup/pg_createsubscriber.c
@@ -2305,6 +2305,11 @@ main(int argc, char **argv)
 		pg_log_error_hint("Try \"%s --help\" for more information.", progname);
 		exit(1);
 	}
+
+	if (dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
 	pg_log_info("validating publisher connection string");
 	pub_base_conninfo = get_base_conninfo(opt.pub_conninfo_str,
 										  &dbname_conninfo);
diff --git a/src/bin/pg_combinebackup/pg_combinebackup.c b/src/bin/pg_combinebackup/pg_combinebackup.c
index 3a325127209..c9bf0a9e105 100644
--- a/src/bin/pg_combinebackup/pg_combinebackup.c
+++ b/src/bin/pg_combinebackup/pg_combinebackup.c
@@ -242,6 +242,10 @@ main(int argc, char *argv[])
 	if (opt.no_manifest)
 		opt.manifest_checksums = CHECKSUM_TYPE_NONE;
 
+	if (opt.dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
 	/* Check that the platform supports the requested copy method. */
 	if (opt.copy_method == COPY_METHOD_CLONE)
 	{
diff --git a/src/bin/pg_resetwal/pg_resetwal.c b/src/bin/pg_resetwal/pg_resetwal.c
index a89d72fc5cf..dd5d279521e 100644
--- a/src/bin/pg_resetwal/pg_resetwal.c
+++ b/src/bin/pg_resetwal/pg_resetwal.c
@@ -397,6 +397,10 @@ main(int argc, char *argv[])
 		exit(1);
 	}
 
+	if (noupdate)
+		pg_log_info("Executing in dry-run mode.\n"
+					"Nothing will be modified.");
+
 	/*
 	 * Attempt to read the existing pg_control file
 	 */
diff --git a/src/bin/pg_rewind/pg_rewind.c b/src/bin/pg_rewind/pg_rewind.c
index 27c514f934a..e9364d04f76 100644
--- a/src/bin/pg_rewind/pg_rewind.c
+++ b/src/bin/pg_rewind/pg_rewind.c
@@ -300,10 +300,12 @@ main(int argc, char **argv)
 
 	atexit(disconnect_atexit);
 
-	/*
-	 * Ok, we have all the options and we're ready to start. First, connect to
-	 * remote server.
-	 */
+	/* Ok, we have all the options and we're ready to start. */
+	if (dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
+	/* First, connect to remote server. */
 	if (connstr_source)
 	{
 		conn = PQconnectdb(connstr_source);
-- 
2.47.3


--ibfr3ah5qy6tcbhw--





^ permalink  raw  reply  [nested|flat] 126+ messages in thread

* [PATCH v5] Log a note at program start when running in dry-run mode
@ 2025-11-11 08:54 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 126+ messages in thread

From: Álvaro Herrera @ 2025-11-11 08:54 UTC (permalink / raw)

Users might get some peace of mind knowing their data is not being
destroyed or whatever.

Author: Peter Smith <[email protected]>
Reviewed-by: Álvaro Herrera <[email protected]>
Discussion: https://postgr.es/m/CAHut+PsvQJQnQO0KT0S2oegenkvJ8FUuY-QS5syyqmT24R2xFQ@mail.gmail.com
---
 src/bin/pg_archivecleanup/pg_archivecleanup.c |  4 ++++
 src/bin/pg_basebackup/pg_createsubscriber.c   |  5 +++++
 src/bin/pg_combinebackup/pg_combinebackup.c   |  4 ++++
 src/bin/pg_resetwal/pg_resetwal.c             |  4 ++++
 src/bin/pg_rewind/pg_rewind.c                 | 10 ++++++----
 5 files changed, 23 insertions(+), 4 deletions(-)

diff --git a/src/bin/pg_archivecleanup/pg_archivecleanup.c b/src/bin/pg_archivecleanup/pg_archivecleanup.c
index c25348bcb85..ab686b4748c 100644
--- a/src/bin/pg_archivecleanup/pg_archivecleanup.c
+++ b/src/bin/pg_archivecleanup/pg_archivecleanup.c
@@ -375,6 +375,10 @@ main(int argc, char **argv)
 		exit(2);
 	}
 
+	if (dryrun)
+		pg_log_info("Executing in dry-run mode.\n"
+					"No files will be removed.");
+
 	/*
 	 * Check archive exists and other initialization if required.
 	 */
diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c
index df41836e70f..cc4be5d6ef4 100644
--- a/src/bin/pg_basebackup/pg_createsubscriber.c
+++ b/src/bin/pg_basebackup/pg_createsubscriber.c
@@ -2305,6 +2305,11 @@ main(int argc, char **argv)
 		pg_log_error_hint("Try \"%s --help\" for more information.", progname);
 		exit(1);
 	}
+
+	if (dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
 	pg_log_info("validating publisher connection string");
 	pub_base_conninfo = get_base_conninfo(opt.pub_conninfo_str,
 										  &dbname_conninfo);
diff --git a/src/bin/pg_combinebackup/pg_combinebackup.c b/src/bin/pg_combinebackup/pg_combinebackup.c
index 3a325127209..c9bf0a9e105 100644
--- a/src/bin/pg_combinebackup/pg_combinebackup.c
+++ b/src/bin/pg_combinebackup/pg_combinebackup.c
@@ -242,6 +242,10 @@ main(int argc, char *argv[])
 	if (opt.no_manifest)
 		opt.manifest_checksums = CHECKSUM_TYPE_NONE;
 
+	if (opt.dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
 	/* Check that the platform supports the requested copy method. */
 	if (opt.copy_method == COPY_METHOD_CLONE)
 	{
diff --git a/src/bin/pg_resetwal/pg_resetwal.c b/src/bin/pg_resetwal/pg_resetwal.c
index a89d72fc5cf..dd5d279521e 100644
--- a/src/bin/pg_resetwal/pg_resetwal.c
+++ b/src/bin/pg_resetwal/pg_resetwal.c
@@ -397,6 +397,10 @@ main(int argc, char *argv[])
 		exit(1);
 	}
 
+	if (noupdate)
+		pg_log_info("Executing in dry-run mode.\n"
+					"Nothing will be modified.");
+
 	/*
 	 * Attempt to read the existing pg_control file
 	 */
diff --git a/src/bin/pg_rewind/pg_rewind.c b/src/bin/pg_rewind/pg_rewind.c
index 27c514f934a..e9364d04f76 100644
--- a/src/bin/pg_rewind/pg_rewind.c
+++ b/src/bin/pg_rewind/pg_rewind.c
@@ -300,10 +300,12 @@ main(int argc, char **argv)
 
 	atexit(disconnect_atexit);
 
-	/*
-	 * Ok, we have all the options and we're ready to start. First, connect to
-	 * remote server.
-	 */
+	/* Ok, we have all the options and we're ready to start. */
+	if (dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
+	/* First, connect to remote server. */
 	if (connstr_source)
 	{
 		conn = PQconnectdb(connstr_source);
-- 
2.47.3


--ibfr3ah5qy6tcbhw--





^ permalink  raw  reply  [nested|flat] 126+ messages in thread

* [PATCH v5] Log a note at program start when running in dry-run mode
@ 2025-11-11 08:54 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 126+ messages in thread

From: Álvaro Herrera @ 2025-11-11 08:54 UTC (permalink / raw)

Users might get some peace of mind knowing their data is not being
destroyed or whatever.

Author: Peter Smith <[email protected]>
Reviewed-by: Álvaro Herrera <[email protected]>
Discussion: https://postgr.es/m/CAHut+PsvQJQnQO0KT0S2oegenkvJ8FUuY-QS5syyqmT24R2xFQ@mail.gmail.com
---
 src/bin/pg_archivecleanup/pg_archivecleanup.c |  4 ++++
 src/bin/pg_basebackup/pg_createsubscriber.c   |  5 +++++
 src/bin/pg_combinebackup/pg_combinebackup.c   |  4 ++++
 src/bin/pg_resetwal/pg_resetwal.c             |  4 ++++
 src/bin/pg_rewind/pg_rewind.c                 | 10 ++++++----
 5 files changed, 23 insertions(+), 4 deletions(-)

diff --git a/src/bin/pg_archivecleanup/pg_archivecleanup.c b/src/bin/pg_archivecleanup/pg_archivecleanup.c
index c25348bcb85..ab686b4748c 100644
--- a/src/bin/pg_archivecleanup/pg_archivecleanup.c
+++ b/src/bin/pg_archivecleanup/pg_archivecleanup.c
@@ -375,6 +375,10 @@ main(int argc, char **argv)
 		exit(2);
 	}
 
+	if (dryrun)
+		pg_log_info("Executing in dry-run mode.\n"
+					"No files will be removed.");
+
 	/*
 	 * Check archive exists and other initialization if required.
 	 */
diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c
index df41836e70f..cc4be5d6ef4 100644
--- a/src/bin/pg_basebackup/pg_createsubscriber.c
+++ b/src/bin/pg_basebackup/pg_createsubscriber.c
@@ -2305,6 +2305,11 @@ main(int argc, char **argv)
 		pg_log_error_hint("Try \"%s --help\" for more information.", progname);
 		exit(1);
 	}
+
+	if (dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
 	pg_log_info("validating publisher connection string");
 	pub_base_conninfo = get_base_conninfo(opt.pub_conninfo_str,
 										  &dbname_conninfo);
diff --git a/src/bin/pg_combinebackup/pg_combinebackup.c b/src/bin/pg_combinebackup/pg_combinebackup.c
index 3a325127209..c9bf0a9e105 100644
--- a/src/bin/pg_combinebackup/pg_combinebackup.c
+++ b/src/bin/pg_combinebackup/pg_combinebackup.c
@@ -242,6 +242,10 @@ main(int argc, char *argv[])
 	if (opt.no_manifest)
 		opt.manifest_checksums = CHECKSUM_TYPE_NONE;
 
+	if (opt.dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
 	/* Check that the platform supports the requested copy method. */
 	if (opt.copy_method == COPY_METHOD_CLONE)
 	{
diff --git a/src/bin/pg_resetwal/pg_resetwal.c b/src/bin/pg_resetwal/pg_resetwal.c
index a89d72fc5cf..dd5d279521e 100644
--- a/src/bin/pg_resetwal/pg_resetwal.c
+++ b/src/bin/pg_resetwal/pg_resetwal.c
@@ -397,6 +397,10 @@ main(int argc, char *argv[])
 		exit(1);
 	}
 
+	if (noupdate)
+		pg_log_info("Executing in dry-run mode.\n"
+					"Nothing will be modified.");
+
 	/*
 	 * Attempt to read the existing pg_control file
 	 */
diff --git a/src/bin/pg_rewind/pg_rewind.c b/src/bin/pg_rewind/pg_rewind.c
index 27c514f934a..e9364d04f76 100644
--- a/src/bin/pg_rewind/pg_rewind.c
+++ b/src/bin/pg_rewind/pg_rewind.c
@@ -300,10 +300,12 @@ main(int argc, char **argv)
 
 	atexit(disconnect_atexit);
 
-	/*
-	 * Ok, we have all the options and we're ready to start. First, connect to
-	 * remote server.
-	 */
+	/* Ok, we have all the options and we're ready to start. */
+	if (dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
+	/* First, connect to remote server. */
 	if (connstr_source)
 	{
 		conn = PQconnectdb(connstr_source);
-- 
2.47.3


--ibfr3ah5qy6tcbhw--





^ permalink  raw  reply  [nested|flat] 126+ messages in thread

* [PATCH v5] Log a note at program start when running in dry-run mode
@ 2025-11-11 08:54 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 126+ messages in thread

From: Álvaro Herrera @ 2025-11-11 08:54 UTC (permalink / raw)

Users might get some peace of mind knowing their data is not being
destroyed or whatever.

Author: Peter Smith <[email protected]>
Reviewed-by: Álvaro Herrera <[email protected]>
Discussion: https://postgr.es/m/CAHut+PsvQJQnQO0KT0S2oegenkvJ8FUuY-QS5syyqmT24R2xFQ@mail.gmail.com
---
 src/bin/pg_archivecleanup/pg_archivecleanup.c |  4 ++++
 src/bin/pg_basebackup/pg_createsubscriber.c   |  5 +++++
 src/bin/pg_combinebackup/pg_combinebackup.c   |  4 ++++
 src/bin/pg_resetwal/pg_resetwal.c             |  4 ++++
 src/bin/pg_rewind/pg_rewind.c                 | 10 ++++++----
 5 files changed, 23 insertions(+), 4 deletions(-)

diff --git a/src/bin/pg_archivecleanup/pg_archivecleanup.c b/src/bin/pg_archivecleanup/pg_archivecleanup.c
index c25348bcb85..ab686b4748c 100644
--- a/src/bin/pg_archivecleanup/pg_archivecleanup.c
+++ b/src/bin/pg_archivecleanup/pg_archivecleanup.c
@@ -375,6 +375,10 @@ main(int argc, char **argv)
 		exit(2);
 	}
 
+	if (dryrun)
+		pg_log_info("Executing in dry-run mode.\n"
+					"No files will be removed.");
+
 	/*
 	 * Check archive exists and other initialization if required.
 	 */
diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c
index df41836e70f..cc4be5d6ef4 100644
--- a/src/bin/pg_basebackup/pg_createsubscriber.c
+++ b/src/bin/pg_basebackup/pg_createsubscriber.c
@@ -2305,6 +2305,11 @@ main(int argc, char **argv)
 		pg_log_error_hint("Try \"%s --help\" for more information.", progname);
 		exit(1);
 	}
+
+	if (dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
 	pg_log_info("validating publisher connection string");
 	pub_base_conninfo = get_base_conninfo(opt.pub_conninfo_str,
 										  &dbname_conninfo);
diff --git a/src/bin/pg_combinebackup/pg_combinebackup.c b/src/bin/pg_combinebackup/pg_combinebackup.c
index 3a325127209..c9bf0a9e105 100644
--- a/src/bin/pg_combinebackup/pg_combinebackup.c
+++ b/src/bin/pg_combinebackup/pg_combinebackup.c
@@ -242,6 +242,10 @@ main(int argc, char *argv[])
 	if (opt.no_manifest)
 		opt.manifest_checksums = CHECKSUM_TYPE_NONE;
 
+	if (opt.dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
 	/* Check that the platform supports the requested copy method. */
 	if (opt.copy_method == COPY_METHOD_CLONE)
 	{
diff --git a/src/bin/pg_resetwal/pg_resetwal.c b/src/bin/pg_resetwal/pg_resetwal.c
index a89d72fc5cf..dd5d279521e 100644
--- a/src/bin/pg_resetwal/pg_resetwal.c
+++ b/src/bin/pg_resetwal/pg_resetwal.c
@@ -397,6 +397,10 @@ main(int argc, char *argv[])
 		exit(1);
 	}
 
+	if (noupdate)
+		pg_log_info("Executing in dry-run mode.\n"
+					"Nothing will be modified.");
+
 	/*
 	 * Attempt to read the existing pg_control file
 	 */
diff --git a/src/bin/pg_rewind/pg_rewind.c b/src/bin/pg_rewind/pg_rewind.c
index 27c514f934a..e9364d04f76 100644
--- a/src/bin/pg_rewind/pg_rewind.c
+++ b/src/bin/pg_rewind/pg_rewind.c
@@ -300,10 +300,12 @@ main(int argc, char **argv)
 
 	atexit(disconnect_atexit);
 
-	/*
-	 * Ok, we have all the options and we're ready to start. First, connect to
-	 * remote server.
-	 */
+	/* Ok, we have all the options and we're ready to start. */
+	if (dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
+	/* First, connect to remote server. */
 	if (connstr_source)
 	{
 		conn = PQconnectdb(connstr_source);
-- 
2.47.3


--ibfr3ah5qy6tcbhw--





^ permalink  raw  reply  [nested|flat] 126+ messages in thread

* [PATCH v5] Log a note at program start when running in dry-run mode
@ 2025-11-11 08:54 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 126+ messages in thread

From: Álvaro Herrera @ 2025-11-11 08:54 UTC (permalink / raw)

Users might get some peace of mind knowing their data is not being
destroyed or whatever.

Author: Peter Smith <[email protected]>
Reviewed-by: Álvaro Herrera <[email protected]>
Discussion: https://postgr.es/m/CAHut+PsvQJQnQO0KT0S2oegenkvJ8FUuY-QS5syyqmT24R2xFQ@mail.gmail.com
---
 src/bin/pg_archivecleanup/pg_archivecleanup.c |  4 ++++
 src/bin/pg_basebackup/pg_createsubscriber.c   |  5 +++++
 src/bin/pg_combinebackup/pg_combinebackup.c   |  4 ++++
 src/bin/pg_resetwal/pg_resetwal.c             |  4 ++++
 src/bin/pg_rewind/pg_rewind.c                 | 10 ++++++----
 5 files changed, 23 insertions(+), 4 deletions(-)

diff --git a/src/bin/pg_archivecleanup/pg_archivecleanup.c b/src/bin/pg_archivecleanup/pg_archivecleanup.c
index c25348bcb85..ab686b4748c 100644
--- a/src/bin/pg_archivecleanup/pg_archivecleanup.c
+++ b/src/bin/pg_archivecleanup/pg_archivecleanup.c
@@ -375,6 +375,10 @@ main(int argc, char **argv)
 		exit(2);
 	}
 
+	if (dryrun)
+		pg_log_info("Executing in dry-run mode.\n"
+					"No files will be removed.");
+
 	/*
 	 * Check archive exists and other initialization if required.
 	 */
diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c
index df41836e70f..cc4be5d6ef4 100644
--- a/src/bin/pg_basebackup/pg_createsubscriber.c
+++ b/src/bin/pg_basebackup/pg_createsubscriber.c
@@ -2305,6 +2305,11 @@ main(int argc, char **argv)
 		pg_log_error_hint("Try \"%s --help\" for more information.", progname);
 		exit(1);
 	}
+
+	if (dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
 	pg_log_info("validating publisher connection string");
 	pub_base_conninfo = get_base_conninfo(opt.pub_conninfo_str,
 										  &dbname_conninfo);
diff --git a/src/bin/pg_combinebackup/pg_combinebackup.c b/src/bin/pg_combinebackup/pg_combinebackup.c
index 3a325127209..c9bf0a9e105 100644
--- a/src/bin/pg_combinebackup/pg_combinebackup.c
+++ b/src/bin/pg_combinebackup/pg_combinebackup.c
@@ -242,6 +242,10 @@ main(int argc, char *argv[])
 	if (opt.no_manifest)
 		opt.manifest_checksums = CHECKSUM_TYPE_NONE;
 
+	if (opt.dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
 	/* Check that the platform supports the requested copy method. */
 	if (opt.copy_method == COPY_METHOD_CLONE)
 	{
diff --git a/src/bin/pg_resetwal/pg_resetwal.c b/src/bin/pg_resetwal/pg_resetwal.c
index a89d72fc5cf..dd5d279521e 100644
--- a/src/bin/pg_resetwal/pg_resetwal.c
+++ b/src/bin/pg_resetwal/pg_resetwal.c
@@ -397,6 +397,10 @@ main(int argc, char *argv[])
 		exit(1);
 	}
 
+	if (noupdate)
+		pg_log_info("Executing in dry-run mode.\n"
+					"Nothing will be modified.");
+
 	/*
 	 * Attempt to read the existing pg_control file
 	 */
diff --git a/src/bin/pg_rewind/pg_rewind.c b/src/bin/pg_rewind/pg_rewind.c
index 27c514f934a..e9364d04f76 100644
--- a/src/bin/pg_rewind/pg_rewind.c
+++ b/src/bin/pg_rewind/pg_rewind.c
@@ -300,10 +300,12 @@ main(int argc, char **argv)
 
 	atexit(disconnect_atexit);
 
-	/*
-	 * Ok, we have all the options and we're ready to start. First, connect to
-	 * remote server.
-	 */
+	/* Ok, we have all the options and we're ready to start. */
+	if (dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
+	/* First, connect to remote server. */
 	if (connstr_source)
 	{
 		conn = PQconnectdb(connstr_source);
-- 
2.47.3


--ibfr3ah5qy6tcbhw--





^ permalink  raw  reply  [nested|flat] 126+ messages in thread

* [PATCH v5] Log a note at program start when running in dry-run mode
@ 2025-11-11 08:54 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 126+ messages in thread

From: Álvaro Herrera @ 2025-11-11 08:54 UTC (permalink / raw)

Users might get some peace of mind knowing their data is not being
destroyed or whatever.

Author: Peter Smith <[email protected]>
Reviewed-by: Álvaro Herrera <[email protected]>
Discussion: https://postgr.es/m/CAHut+PsvQJQnQO0KT0S2oegenkvJ8FUuY-QS5syyqmT24R2xFQ@mail.gmail.com
---
 src/bin/pg_archivecleanup/pg_archivecleanup.c |  4 ++++
 src/bin/pg_basebackup/pg_createsubscriber.c   |  5 +++++
 src/bin/pg_combinebackup/pg_combinebackup.c   |  4 ++++
 src/bin/pg_resetwal/pg_resetwal.c             |  4 ++++
 src/bin/pg_rewind/pg_rewind.c                 | 10 ++++++----
 5 files changed, 23 insertions(+), 4 deletions(-)

diff --git a/src/bin/pg_archivecleanup/pg_archivecleanup.c b/src/bin/pg_archivecleanup/pg_archivecleanup.c
index c25348bcb85..ab686b4748c 100644
--- a/src/bin/pg_archivecleanup/pg_archivecleanup.c
+++ b/src/bin/pg_archivecleanup/pg_archivecleanup.c
@@ -375,6 +375,10 @@ main(int argc, char **argv)
 		exit(2);
 	}
 
+	if (dryrun)
+		pg_log_info("Executing in dry-run mode.\n"
+					"No files will be removed.");
+
 	/*
 	 * Check archive exists and other initialization if required.
 	 */
diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c
index df41836e70f..cc4be5d6ef4 100644
--- a/src/bin/pg_basebackup/pg_createsubscriber.c
+++ b/src/bin/pg_basebackup/pg_createsubscriber.c
@@ -2305,6 +2305,11 @@ main(int argc, char **argv)
 		pg_log_error_hint("Try \"%s --help\" for more information.", progname);
 		exit(1);
 	}
+
+	if (dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
 	pg_log_info("validating publisher connection string");
 	pub_base_conninfo = get_base_conninfo(opt.pub_conninfo_str,
 										  &dbname_conninfo);
diff --git a/src/bin/pg_combinebackup/pg_combinebackup.c b/src/bin/pg_combinebackup/pg_combinebackup.c
index 3a325127209..c9bf0a9e105 100644
--- a/src/bin/pg_combinebackup/pg_combinebackup.c
+++ b/src/bin/pg_combinebackup/pg_combinebackup.c
@@ -242,6 +242,10 @@ main(int argc, char *argv[])
 	if (opt.no_manifest)
 		opt.manifest_checksums = CHECKSUM_TYPE_NONE;
 
+	if (opt.dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
 	/* Check that the platform supports the requested copy method. */
 	if (opt.copy_method == COPY_METHOD_CLONE)
 	{
diff --git a/src/bin/pg_resetwal/pg_resetwal.c b/src/bin/pg_resetwal/pg_resetwal.c
index a89d72fc5cf..dd5d279521e 100644
--- a/src/bin/pg_resetwal/pg_resetwal.c
+++ b/src/bin/pg_resetwal/pg_resetwal.c
@@ -397,6 +397,10 @@ main(int argc, char *argv[])
 		exit(1);
 	}
 
+	if (noupdate)
+		pg_log_info("Executing in dry-run mode.\n"
+					"Nothing will be modified.");
+
 	/*
 	 * Attempt to read the existing pg_control file
 	 */
diff --git a/src/bin/pg_rewind/pg_rewind.c b/src/bin/pg_rewind/pg_rewind.c
index 27c514f934a..e9364d04f76 100644
--- a/src/bin/pg_rewind/pg_rewind.c
+++ b/src/bin/pg_rewind/pg_rewind.c
@@ -300,10 +300,12 @@ main(int argc, char **argv)
 
 	atexit(disconnect_atexit);
 
-	/*
-	 * Ok, we have all the options and we're ready to start. First, connect to
-	 * remote server.
-	 */
+	/* Ok, we have all the options and we're ready to start. */
+	if (dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
+	/* First, connect to remote server. */
 	if (connstr_source)
 	{
 		conn = PQconnectdb(connstr_source);
-- 
2.47.3


--ibfr3ah5qy6tcbhw--





^ permalink  raw  reply  [nested|flat] 126+ messages in thread

* [PATCH v5] Log a note at program start when running in dry-run mode
@ 2025-11-11 08:54 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 126+ messages in thread

From: Álvaro Herrera @ 2025-11-11 08:54 UTC (permalink / raw)

Users might get some peace of mind knowing their data is not being
destroyed or whatever.

Author: Peter Smith <[email protected]>
Reviewed-by: Álvaro Herrera <[email protected]>
Discussion: https://postgr.es/m/CAHut+PsvQJQnQO0KT0S2oegenkvJ8FUuY-QS5syyqmT24R2xFQ@mail.gmail.com
---
 src/bin/pg_archivecleanup/pg_archivecleanup.c |  4 ++++
 src/bin/pg_basebackup/pg_createsubscriber.c   |  5 +++++
 src/bin/pg_combinebackup/pg_combinebackup.c   |  4 ++++
 src/bin/pg_resetwal/pg_resetwal.c             |  4 ++++
 src/bin/pg_rewind/pg_rewind.c                 | 10 ++++++----
 5 files changed, 23 insertions(+), 4 deletions(-)

diff --git a/src/bin/pg_archivecleanup/pg_archivecleanup.c b/src/bin/pg_archivecleanup/pg_archivecleanup.c
index c25348bcb85..ab686b4748c 100644
--- a/src/bin/pg_archivecleanup/pg_archivecleanup.c
+++ b/src/bin/pg_archivecleanup/pg_archivecleanup.c
@@ -375,6 +375,10 @@ main(int argc, char **argv)
 		exit(2);
 	}
 
+	if (dryrun)
+		pg_log_info("Executing in dry-run mode.\n"
+					"No files will be removed.");
+
 	/*
 	 * Check archive exists and other initialization if required.
 	 */
diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c
index df41836e70f..cc4be5d6ef4 100644
--- a/src/bin/pg_basebackup/pg_createsubscriber.c
+++ b/src/bin/pg_basebackup/pg_createsubscriber.c
@@ -2305,6 +2305,11 @@ main(int argc, char **argv)
 		pg_log_error_hint("Try \"%s --help\" for more information.", progname);
 		exit(1);
 	}
+
+	if (dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
 	pg_log_info("validating publisher connection string");
 	pub_base_conninfo = get_base_conninfo(opt.pub_conninfo_str,
 										  &dbname_conninfo);
diff --git a/src/bin/pg_combinebackup/pg_combinebackup.c b/src/bin/pg_combinebackup/pg_combinebackup.c
index 3a325127209..c9bf0a9e105 100644
--- a/src/bin/pg_combinebackup/pg_combinebackup.c
+++ b/src/bin/pg_combinebackup/pg_combinebackup.c
@@ -242,6 +242,10 @@ main(int argc, char *argv[])
 	if (opt.no_manifest)
 		opt.manifest_checksums = CHECKSUM_TYPE_NONE;
 
+	if (opt.dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
 	/* Check that the platform supports the requested copy method. */
 	if (opt.copy_method == COPY_METHOD_CLONE)
 	{
diff --git a/src/bin/pg_resetwal/pg_resetwal.c b/src/bin/pg_resetwal/pg_resetwal.c
index a89d72fc5cf..dd5d279521e 100644
--- a/src/bin/pg_resetwal/pg_resetwal.c
+++ b/src/bin/pg_resetwal/pg_resetwal.c
@@ -397,6 +397,10 @@ main(int argc, char *argv[])
 		exit(1);
 	}
 
+	if (noupdate)
+		pg_log_info("Executing in dry-run mode.\n"
+					"Nothing will be modified.");
+
 	/*
 	 * Attempt to read the existing pg_control file
 	 */
diff --git a/src/bin/pg_rewind/pg_rewind.c b/src/bin/pg_rewind/pg_rewind.c
index 27c514f934a..e9364d04f76 100644
--- a/src/bin/pg_rewind/pg_rewind.c
+++ b/src/bin/pg_rewind/pg_rewind.c
@@ -300,10 +300,12 @@ main(int argc, char **argv)
 
 	atexit(disconnect_atexit);
 
-	/*
-	 * Ok, we have all the options and we're ready to start. First, connect to
-	 * remote server.
-	 */
+	/* Ok, we have all the options and we're ready to start. */
+	if (dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
+	/* First, connect to remote server. */
 	if (connstr_source)
 	{
 		conn = PQconnectdb(connstr_source);
-- 
2.47.3


--ibfr3ah5qy6tcbhw--





^ permalink  raw  reply  [nested|flat] 126+ messages in thread

* [PATCH v5] Log a note at program start when running in dry-run mode
@ 2025-11-11 08:54 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 126+ messages in thread

From: Álvaro Herrera @ 2025-11-11 08:54 UTC (permalink / raw)

Users might get some peace of mind knowing their data is not being
destroyed or whatever.

Author: Peter Smith <[email protected]>
Reviewed-by: Álvaro Herrera <[email protected]>
Discussion: https://postgr.es/m/CAHut+PsvQJQnQO0KT0S2oegenkvJ8FUuY-QS5syyqmT24R2xFQ@mail.gmail.com
---
 src/bin/pg_archivecleanup/pg_archivecleanup.c |  4 ++++
 src/bin/pg_basebackup/pg_createsubscriber.c   |  5 +++++
 src/bin/pg_combinebackup/pg_combinebackup.c   |  4 ++++
 src/bin/pg_resetwal/pg_resetwal.c             |  4 ++++
 src/bin/pg_rewind/pg_rewind.c                 | 10 ++++++----
 5 files changed, 23 insertions(+), 4 deletions(-)

diff --git a/src/bin/pg_archivecleanup/pg_archivecleanup.c b/src/bin/pg_archivecleanup/pg_archivecleanup.c
index c25348bcb85..ab686b4748c 100644
--- a/src/bin/pg_archivecleanup/pg_archivecleanup.c
+++ b/src/bin/pg_archivecleanup/pg_archivecleanup.c
@@ -375,6 +375,10 @@ main(int argc, char **argv)
 		exit(2);
 	}
 
+	if (dryrun)
+		pg_log_info("Executing in dry-run mode.\n"
+					"No files will be removed.");
+
 	/*
 	 * Check archive exists and other initialization if required.
 	 */
diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c
index df41836e70f..cc4be5d6ef4 100644
--- a/src/bin/pg_basebackup/pg_createsubscriber.c
+++ b/src/bin/pg_basebackup/pg_createsubscriber.c
@@ -2305,6 +2305,11 @@ main(int argc, char **argv)
 		pg_log_error_hint("Try \"%s --help\" for more information.", progname);
 		exit(1);
 	}
+
+	if (dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
 	pg_log_info("validating publisher connection string");
 	pub_base_conninfo = get_base_conninfo(opt.pub_conninfo_str,
 										  &dbname_conninfo);
diff --git a/src/bin/pg_combinebackup/pg_combinebackup.c b/src/bin/pg_combinebackup/pg_combinebackup.c
index 3a325127209..c9bf0a9e105 100644
--- a/src/bin/pg_combinebackup/pg_combinebackup.c
+++ b/src/bin/pg_combinebackup/pg_combinebackup.c
@@ -242,6 +242,10 @@ main(int argc, char *argv[])
 	if (opt.no_manifest)
 		opt.manifest_checksums = CHECKSUM_TYPE_NONE;
 
+	if (opt.dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
 	/* Check that the platform supports the requested copy method. */
 	if (opt.copy_method == COPY_METHOD_CLONE)
 	{
diff --git a/src/bin/pg_resetwal/pg_resetwal.c b/src/bin/pg_resetwal/pg_resetwal.c
index a89d72fc5cf..dd5d279521e 100644
--- a/src/bin/pg_resetwal/pg_resetwal.c
+++ b/src/bin/pg_resetwal/pg_resetwal.c
@@ -397,6 +397,10 @@ main(int argc, char *argv[])
 		exit(1);
 	}
 
+	if (noupdate)
+		pg_log_info("Executing in dry-run mode.\n"
+					"Nothing will be modified.");
+
 	/*
 	 * Attempt to read the existing pg_control file
 	 */
diff --git a/src/bin/pg_rewind/pg_rewind.c b/src/bin/pg_rewind/pg_rewind.c
index 27c514f934a..e9364d04f76 100644
--- a/src/bin/pg_rewind/pg_rewind.c
+++ b/src/bin/pg_rewind/pg_rewind.c
@@ -300,10 +300,12 @@ main(int argc, char **argv)
 
 	atexit(disconnect_atexit);
 
-	/*
-	 * Ok, we have all the options and we're ready to start. First, connect to
-	 * remote server.
-	 */
+	/* Ok, we have all the options and we're ready to start. */
+	if (dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
+	/* First, connect to remote server. */
 	if (connstr_source)
 	{
 		conn = PQconnectdb(connstr_source);
-- 
2.47.3


--ibfr3ah5qy6tcbhw--





^ permalink  raw  reply  [nested|flat] 126+ messages in thread

* [PATCH v5] Log a note at program start when running in dry-run mode
@ 2025-11-11 08:54 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 126+ messages in thread

From: Álvaro Herrera @ 2025-11-11 08:54 UTC (permalink / raw)

Users might get some peace of mind knowing their data is not being
destroyed or whatever.

Author: Peter Smith <[email protected]>
Reviewed-by: Álvaro Herrera <[email protected]>
Discussion: https://postgr.es/m/CAHut+PsvQJQnQO0KT0S2oegenkvJ8FUuY-QS5syyqmT24R2xFQ@mail.gmail.com
---
 src/bin/pg_archivecleanup/pg_archivecleanup.c |  4 ++++
 src/bin/pg_basebackup/pg_createsubscriber.c   |  5 +++++
 src/bin/pg_combinebackup/pg_combinebackup.c   |  4 ++++
 src/bin/pg_resetwal/pg_resetwal.c             |  4 ++++
 src/bin/pg_rewind/pg_rewind.c                 | 10 ++++++----
 5 files changed, 23 insertions(+), 4 deletions(-)

diff --git a/src/bin/pg_archivecleanup/pg_archivecleanup.c b/src/bin/pg_archivecleanup/pg_archivecleanup.c
index c25348bcb85..ab686b4748c 100644
--- a/src/bin/pg_archivecleanup/pg_archivecleanup.c
+++ b/src/bin/pg_archivecleanup/pg_archivecleanup.c
@@ -375,6 +375,10 @@ main(int argc, char **argv)
 		exit(2);
 	}
 
+	if (dryrun)
+		pg_log_info("Executing in dry-run mode.\n"
+					"No files will be removed.");
+
 	/*
 	 * Check archive exists and other initialization if required.
 	 */
diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c
index df41836e70f..cc4be5d6ef4 100644
--- a/src/bin/pg_basebackup/pg_createsubscriber.c
+++ b/src/bin/pg_basebackup/pg_createsubscriber.c
@@ -2305,6 +2305,11 @@ main(int argc, char **argv)
 		pg_log_error_hint("Try \"%s --help\" for more information.", progname);
 		exit(1);
 	}
+
+	if (dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
 	pg_log_info("validating publisher connection string");
 	pub_base_conninfo = get_base_conninfo(opt.pub_conninfo_str,
 										  &dbname_conninfo);
diff --git a/src/bin/pg_combinebackup/pg_combinebackup.c b/src/bin/pg_combinebackup/pg_combinebackup.c
index 3a325127209..c9bf0a9e105 100644
--- a/src/bin/pg_combinebackup/pg_combinebackup.c
+++ b/src/bin/pg_combinebackup/pg_combinebackup.c
@@ -242,6 +242,10 @@ main(int argc, char *argv[])
 	if (opt.no_manifest)
 		opt.manifest_checksums = CHECKSUM_TYPE_NONE;
 
+	if (opt.dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
 	/* Check that the platform supports the requested copy method. */
 	if (opt.copy_method == COPY_METHOD_CLONE)
 	{
diff --git a/src/bin/pg_resetwal/pg_resetwal.c b/src/bin/pg_resetwal/pg_resetwal.c
index a89d72fc5cf..dd5d279521e 100644
--- a/src/bin/pg_resetwal/pg_resetwal.c
+++ b/src/bin/pg_resetwal/pg_resetwal.c
@@ -397,6 +397,10 @@ main(int argc, char *argv[])
 		exit(1);
 	}
 
+	if (noupdate)
+		pg_log_info("Executing in dry-run mode.\n"
+					"Nothing will be modified.");
+
 	/*
 	 * Attempt to read the existing pg_control file
 	 */
diff --git a/src/bin/pg_rewind/pg_rewind.c b/src/bin/pg_rewind/pg_rewind.c
index 27c514f934a..e9364d04f76 100644
--- a/src/bin/pg_rewind/pg_rewind.c
+++ b/src/bin/pg_rewind/pg_rewind.c
@@ -300,10 +300,12 @@ main(int argc, char **argv)
 
 	atexit(disconnect_atexit);
 
-	/*
-	 * Ok, we have all the options and we're ready to start. First, connect to
-	 * remote server.
-	 */
+	/* Ok, we have all the options and we're ready to start. */
+	if (dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
+	/* First, connect to remote server. */
 	if (connstr_source)
 	{
 		conn = PQconnectdb(connstr_source);
-- 
2.47.3


--ibfr3ah5qy6tcbhw--





^ permalink  raw  reply  [nested|flat] 126+ messages in thread

* [PATCH v5] Log a note at program start when running in dry-run mode
@ 2025-11-11 08:54 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 126+ messages in thread

From: Álvaro Herrera @ 2025-11-11 08:54 UTC (permalink / raw)

Users might get some peace of mind knowing their data is not being
destroyed or whatever.

Author: Peter Smith <[email protected]>
Reviewed-by: Álvaro Herrera <[email protected]>
Discussion: https://postgr.es/m/CAHut+PsvQJQnQO0KT0S2oegenkvJ8FUuY-QS5syyqmT24R2xFQ@mail.gmail.com
---
 src/bin/pg_archivecleanup/pg_archivecleanup.c |  4 ++++
 src/bin/pg_basebackup/pg_createsubscriber.c   |  5 +++++
 src/bin/pg_combinebackup/pg_combinebackup.c   |  4 ++++
 src/bin/pg_resetwal/pg_resetwal.c             |  4 ++++
 src/bin/pg_rewind/pg_rewind.c                 | 10 ++++++----
 5 files changed, 23 insertions(+), 4 deletions(-)

diff --git a/src/bin/pg_archivecleanup/pg_archivecleanup.c b/src/bin/pg_archivecleanup/pg_archivecleanup.c
index c25348bcb85..ab686b4748c 100644
--- a/src/bin/pg_archivecleanup/pg_archivecleanup.c
+++ b/src/bin/pg_archivecleanup/pg_archivecleanup.c
@@ -375,6 +375,10 @@ main(int argc, char **argv)
 		exit(2);
 	}
 
+	if (dryrun)
+		pg_log_info("Executing in dry-run mode.\n"
+					"No files will be removed.");
+
 	/*
 	 * Check archive exists and other initialization if required.
 	 */
diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c
index df41836e70f..cc4be5d6ef4 100644
--- a/src/bin/pg_basebackup/pg_createsubscriber.c
+++ b/src/bin/pg_basebackup/pg_createsubscriber.c
@@ -2305,6 +2305,11 @@ main(int argc, char **argv)
 		pg_log_error_hint("Try \"%s --help\" for more information.", progname);
 		exit(1);
 	}
+
+	if (dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
 	pg_log_info("validating publisher connection string");
 	pub_base_conninfo = get_base_conninfo(opt.pub_conninfo_str,
 										  &dbname_conninfo);
diff --git a/src/bin/pg_combinebackup/pg_combinebackup.c b/src/bin/pg_combinebackup/pg_combinebackup.c
index 3a325127209..c9bf0a9e105 100644
--- a/src/bin/pg_combinebackup/pg_combinebackup.c
+++ b/src/bin/pg_combinebackup/pg_combinebackup.c
@@ -242,6 +242,10 @@ main(int argc, char *argv[])
 	if (opt.no_manifest)
 		opt.manifest_checksums = CHECKSUM_TYPE_NONE;
 
+	if (opt.dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
 	/* Check that the platform supports the requested copy method. */
 	if (opt.copy_method == COPY_METHOD_CLONE)
 	{
diff --git a/src/bin/pg_resetwal/pg_resetwal.c b/src/bin/pg_resetwal/pg_resetwal.c
index a89d72fc5cf..dd5d279521e 100644
--- a/src/bin/pg_resetwal/pg_resetwal.c
+++ b/src/bin/pg_resetwal/pg_resetwal.c
@@ -397,6 +397,10 @@ main(int argc, char *argv[])
 		exit(1);
 	}
 
+	if (noupdate)
+		pg_log_info("Executing in dry-run mode.\n"
+					"Nothing will be modified.");
+
 	/*
 	 * Attempt to read the existing pg_control file
 	 */
diff --git a/src/bin/pg_rewind/pg_rewind.c b/src/bin/pg_rewind/pg_rewind.c
index 27c514f934a..e9364d04f76 100644
--- a/src/bin/pg_rewind/pg_rewind.c
+++ b/src/bin/pg_rewind/pg_rewind.c
@@ -300,10 +300,12 @@ main(int argc, char **argv)
 
 	atexit(disconnect_atexit);
 
-	/*
-	 * Ok, we have all the options and we're ready to start. First, connect to
-	 * remote server.
-	 */
+	/* Ok, we have all the options and we're ready to start. */
+	if (dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
+	/* First, connect to remote server. */
 	if (connstr_source)
 	{
 		conn = PQconnectdb(connstr_source);
-- 
2.47.3


--ibfr3ah5qy6tcbhw--





^ permalink  raw  reply  [nested|flat] 126+ messages in thread

* [PATCH v5] Log a note at program start when running in dry-run mode
@ 2025-11-11 08:54 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 126+ messages in thread

From: Álvaro Herrera @ 2025-11-11 08:54 UTC (permalink / raw)

Users might get some peace of mind knowing their data is not being
destroyed or whatever.

Author: Peter Smith <[email protected]>
Reviewed-by: Álvaro Herrera <[email protected]>
Discussion: https://postgr.es/m/CAHut+PsvQJQnQO0KT0S2oegenkvJ8FUuY-QS5syyqmT24R2xFQ@mail.gmail.com
---
 src/bin/pg_archivecleanup/pg_archivecleanup.c |  4 ++++
 src/bin/pg_basebackup/pg_createsubscriber.c   |  5 +++++
 src/bin/pg_combinebackup/pg_combinebackup.c   |  4 ++++
 src/bin/pg_resetwal/pg_resetwal.c             |  4 ++++
 src/bin/pg_rewind/pg_rewind.c                 | 10 ++++++----
 5 files changed, 23 insertions(+), 4 deletions(-)

diff --git a/src/bin/pg_archivecleanup/pg_archivecleanup.c b/src/bin/pg_archivecleanup/pg_archivecleanup.c
index c25348bcb85..ab686b4748c 100644
--- a/src/bin/pg_archivecleanup/pg_archivecleanup.c
+++ b/src/bin/pg_archivecleanup/pg_archivecleanup.c
@@ -375,6 +375,10 @@ main(int argc, char **argv)
 		exit(2);
 	}
 
+	if (dryrun)
+		pg_log_info("Executing in dry-run mode.\n"
+					"No files will be removed.");
+
 	/*
 	 * Check archive exists and other initialization if required.
 	 */
diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c
index df41836e70f..cc4be5d6ef4 100644
--- a/src/bin/pg_basebackup/pg_createsubscriber.c
+++ b/src/bin/pg_basebackup/pg_createsubscriber.c
@@ -2305,6 +2305,11 @@ main(int argc, char **argv)
 		pg_log_error_hint("Try \"%s --help\" for more information.", progname);
 		exit(1);
 	}
+
+	if (dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
 	pg_log_info("validating publisher connection string");
 	pub_base_conninfo = get_base_conninfo(opt.pub_conninfo_str,
 										  &dbname_conninfo);
diff --git a/src/bin/pg_combinebackup/pg_combinebackup.c b/src/bin/pg_combinebackup/pg_combinebackup.c
index 3a325127209..c9bf0a9e105 100644
--- a/src/bin/pg_combinebackup/pg_combinebackup.c
+++ b/src/bin/pg_combinebackup/pg_combinebackup.c
@@ -242,6 +242,10 @@ main(int argc, char *argv[])
 	if (opt.no_manifest)
 		opt.manifest_checksums = CHECKSUM_TYPE_NONE;
 
+	if (opt.dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
 	/* Check that the platform supports the requested copy method. */
 	if (opt.copy_method == COPY_METHOD_CLONE)
 	{
diff --git a/src/bin/pg_resetwal/pg_resetwal.c b/src/bin/pg_resetwal/pg_resetwal.c
index a89d72fc5cf..dd5d279521e 100644
--- a/src/bin/pg_resetwal/pg_resetwal.c
+++ b/src/bin/pg_resetwal/pg_resetwal.c
@@ -397,6 +397,10 @@ main(int argc, char *argv[])
 		exit(1);
 	}
 
+	if (noupdate)
+		pg_log_info("Executing in dry-run mode.\n"
+					"Nothing will be modified.");
+
 	/*
 	 * Attempt to read the existing pg_control file
 	 */
diff --git a/src/bin/pg_rewind/pg_rewind.c b/src/bin/pg_rewind/pg_rewind.c
index 27c514f934a..e9364d04f76 100644
--- a/src/bin/pg_rewind/pg_rewind.c
+++ b/src/bin/pg_rewind/pg_rewind.c
@@ -300,10 +300,12 @@ main(int argc, char **argv)
 
 	atexit(disconnect_atexit);
 
-	/*
-	 * Ok, we have all the options and we're ready to start. First, connect to
-	 * remote server.
-	 */
+	/* Ok, we have all the options and we're ready to start. */
+	if (dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
+	/* First, connect to remote server. */
 	if (connstr_source)
 	{
 		conn = PQconnectdb(connstr_source);
-- 
2.47.3


--ibfr3ah5qy6tcbhw--





^ permalink  raw  reply  [nested|flat] 126+ messages in thread

* [PATCH v5] Log a note at program start when running in dry-run mode
@ 2025-11-11 08:54 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 126+ messages in thread

From: Álvaro Herrera @ 2025-11-11 08:54 UTC (permalink / raw)

Users might get some peace of mind knowing their data is not being
destroyed or whatever.

Author: Peter Smith <[email protected]>
Reviewed-by: Álvaro Herrera <[email protected]>
Discussion: https://postgr.es/m/CAHut+PsvQJQnQO0KT0S2oegenkvJ8FUuY-QS5syyqmT24R2xFQ@mail.gmail.com
---
 src/bin/pg_archivecleanup/pg_archivecleanup.c |  4 ++++
 src/bin/pg_basebackup/pg_createsubscriber.c   |  5 +++++
 src/bin/pg_combinebackup/pg_combinebackup.c   |  4 ++++
 src/bin/pg_resetwal/pg_resetwal.c             |  4 ++++
 src/bin/pg_rewind/pg_rewind.c                 | 10 ++++++----
 5 files changed, 23 insertions(+), 4 deletions(-)

diff --git a/src/bin/pg_archivecleanup/pg_archivecleanup.c b/src/bin/pg_archivecleanup/pg_archivecleanup.c
index c25348bcb85..ab686b4748c 100644
--- a/src/bin/pg_archivecleanup/pg_archivecleanup.c
+++ b/src/bin/pg_archivecleanup/pg_archivecleanup.c
@@ -375,6 +375,10 @@ main(int argc, char **argv)
 		exit(2);
 	}
 
+	if (dryrun)
+		pg_log_info("Executing in dry-run mode.\n"
+					"No files will be removed.");
+
 	/*
 	 * Check archive exists and other initialization if required.
 	 */
diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c
index df41836e70f..cc4be5d6ef4 100644
--- a/src/bin/pg_basebackup/pg_createsubscriber.c
+++ b/src/bin/pg_basebackup/pg_createsubscriber.c
@@ -2305,6 +2305,11 @@ main(int argc, char **argv)
 		pg_log_error_hint("Try \"%s --help\" for more information.", progname);
 		exit(1);
 	}
+
+	if (dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
 	pg_log_info("validating publisher connection string");
 	pub_base_conninfo = get_base_conninfo(opt.pub_conninfo_str,
 										  &dbname_conninfo);
diff --git a/src/bin/pg_combinebackup/pg_combinebackup.c b/src/bin/pg_combinebackup/pg_combinebackup.c
index 3a325127209..c9bf0a9e105 100644
--- a/src/bin/pg_combinebackup/pg_combinebackup.c
+++ b/src/bin/pg_combinebackup/pg_combinebackup.c
@@ -242,6 +242,10 @@ main(int argc, char *argv[])
 	if (opt.no_manifest)
 		opt.manifest_checksums = CHECKSUM_TYPE_NONE;
 
+	if (opt.dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
 	/* Check that the platform supports the requested copy method. */
 	if (opt.copy_method == COPY_METHOD_CLONE)
 	{
diff --git a/src/bin/pg_resetwal/pg_resetwal.c b/src/bin/pg_resetwal/pg_resetwal.c
index a89d72fc5cf..dd5d279521e 100644
--- a/src/bin/pg_resetwal/pg_resetwal.c
+++ b/src/bin/pg_resetwal/pg_resetwal.c
@@ -397,6 +397,10 @@ main(int argc, char *argv[])
 		exit(1);
 	}
 
+	if (noupdate)
+		pg_log_info("Executing in dry-run mode.\n"
+					"Nothing will be modified.");
+
 	/*
 	 * Attempt to read the existing pg_control file
 	 */
diff --git a/src/bin/pg_rewind/pg_rewind.c b/src/bin/pg_rewind/pg_rewind.c
index 27c514f934a..e9364d04f76 100644
--- a/src/bin/pg_rewind/pg_rewind.c
+++ b/src/bin/pg_rewind/pg_rewind.c
@@ -300,10 +300,12 @@ main(int argc, char **argv)
 
 	atexit(disconnect_atexit);
 
-	/*
-	 * Ok, we have all the options and we're ready to start. First, connect to
-	 * remote server.
-	 */
+	/* Ok, we have all the options and we're ready to start. */
+	if (dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
+	/* First, connect to remote server. */
 	if (connstr_source)
 	{
 		conn = PQconnectdb(connstr_source);
-- 
2.47.3


--ibfr3ah5qy6tcbhw--





^ permalink  raw  reply  [nested|flat] 126+ messages in thread

* [PATCH v5] Log a note at program start when running in dry-run mode
@ 2025-11-11 08:54 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 126+ messages in thread

From: Álvaro Herrera @ 2025-11-11 08:54 UTC (permalink / raw)

Users might get some peace of mind knowing their data is not being
destroyed or whatever.

Author: Peter Smith <[email protected]>
Reviewed-by: Álvaro Herrera <[email protected]>
Discussion: https://postgr.es/m/CAHut+PsvQJQnQO0KT0S2oegenkvJ8FUuY-QS5syyqmT24R2xFQ@mail.gmail.com
---
 src/bin/pg_archivecleanup/pg_archivecleanup.c |  4 ++++
 src/bin/pg_basebackup/pg_createsubscriber.c   |  5 +++++
 src/bin/pg_combinebackup/pg_combinebackup.c   |  4 ++++
 src/bin/pg_resetwal/pg_resetwal.c             |  4 ++++
 src/bin/pg_rewind/pg_rewind.c                 | 10 ++++++----
 5 files changed, 23 insertions(+), 4 deletions(-)

diff --git a/src/bin/pg_archivecleanup/pg_archivecleanup.c b/src/bin/pg_archivecleanup/pg_archivecleanup.c
index c25348bcb85..ab686b4748c 100644
--- a/src/bin/pg_archivecleanup/pg_archivecleanup.c
+++ b/src/bin/pg_archivecleanup/pg_archivecleanup.c
@@ -375,6 +375,10 @@ main(int argc, char **argv)
 		exit(2);
 	}
 
+	if (dryrun)
+		pg_log_info("Executing in dry-run mode.\n"
+					"No files will be removed.");
+
 	/*
 	 * Check archive exists and other initialization if required.
 	 */
diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c
index df41836e70f..cc4be5d6ef4 100644
--- a/src/bin/pg_basebackup/pg_createsubscriber.c
+++ b/src/bin/pg_basebackup/pg_createsubscriber.c
@@ -2305,6 +2305,11 @@ main(int argc, char **argv)
 		pg_log_error_hint("Try \"%s --help\" for more information.", progname);
 		exit(1);
 	}
+
+	if (dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
 	pg_log_info("validating publisher connection string");
 	pub_base_conninfo = get_base_conninfo(opt.pub_conninfo_str,
 										  &dbname_conninfo);
diff --git a/src/bin/pg_combinebackup/pg_combinebackup.c b/src/bin/pg_combinebackup/pg_combinebackup.c
index 3a325127209..c9bf0a9e105 100644
--- a/src/bin/pg_combinebackup/pg_combinebackup.c
+++ b/src/bin/pg_combinebackup/pg_combinebackup.c
@@ -242,6 +242,10 @@ main(int argc, char *argv[])
 	if (opt.no_manifest)
 		opt.manifest_checksums = CHECKSUM_TYPE_NONE;
 
+	if (opt.dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
 	/* Check that the platform supports the requested copy method. */
 	if (opt.copy_method == COPY_METHOD_CLONE)
 	{
diff --git a/src/bin/pg_resetwal/pg_resetwal.c b/src/bin/pg_resetwal/pg_resetwal.c
index a89d72fc5cf..dd5d279521e 100644
--- a/src/bin/pg_resetwal/pg_resetwal.c
+++ b/src/bin/pg_resetwal/pg_resetwal.c
@@ -397,6 +397,10 @@ main(int argc, char *argv[])
 		exit(1);
 	}
 
+	if (noupdate)
+		pg_log_info("Executing in dry-run mode.\n"
+					"Nothing will be modified.");
+
 	/*
 	 * Attempt to read the existing pg_control file
 	 */
diff --git a/src/bin/pg_rewind/pg_rewind.c b/src/bin/pg_rewind/pg_rewind.c
index 27c514f934a..e9364d04f76 100644
--- a/src/bin/pg_rewind/pg_rewind.c
+++ b/src/bin/pg_rewind/pg_rewind.c
@@ -300,10 +300,12 @@ main(int argc, char **argv)
 
 	atexit(disconnect_atexit);
 
-	/*
-	 * Ok, we have all the options and we're ready to start. First, connect to
-	 * remote server.
-	 */
+	/* Ok, we have all the options and we're ready to start. */
+	if (dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
+	/* First, connect to remote server. */
 	if (connstr_source)
 	{
 		conn = PQconnectdb(connstr_source);
-- 
2.47.3


--ibfr3ah5qy6tcbhw--





^ permalink  raw  reply  [nested|flat] 126+ messages in thread

* [PATCH v5] Log a note at program start when running in dry-run mode
@ 2025-11-11 08:54 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 126+ messages in thread

From: Álvaro Herrera @ 2025-11-11 08:54 UTC (permalink / raw)

Users might get some peace of mind knowing their data is not being
destroyed or whatever.

Author: Peter Smith <[email protected]>
Reviewed-by: Álvaro Herrera <[email protected]>
Discussion: https://postgr.es/m/CAHut+PsvQJQnQO0KT0S2oegenkvJ8FUuY-QS5syyqmT24R2xFQ@mail.gmail.com
---
 src/bin/pg_archivecleanup/pg_archivecleanup.c |  4 ++++
 src/bin/pg_basebackup/pg_createsubscriber.c   |  5 +++++
 src/bin/pg_combinebackup/pg_combinebackup.c   |  4 ++++
 src/bin/pg_resetwal/pg_resetwal.c             |  4 ++++
 src/bin/pg_rewind/pg_rewind.c                 | 10 ++++++----
 5 files changed, 23 insertions(+), 4 deletions(-)

diff --git a/src/bin/pg_archivecleanup/pg_archivecleanup.c b/src/bin/pg_archivecleanup/pg_archivecleanup.c
index c25348bcb85..ab686b4748c 100644
--- a/src/bin/pg_archivecleanup/pg_archivecleanup.c
+++ b/src/bin/pg_archivecleanup/pg_archivecleanup.c
@@ -375,6 +375,10 @@ main(int argc, char **argv)
 		exit(2);
 	}
 
+	if (dryrun)
+		pg_log_info("Executing in dry-run mode.\n"
+					"No files will be removed.");
+
 	/*
 	 * Check archive exists and other initialization if required.
 	 */
diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c
index df41836e70f..cc4be5d6ef4 100644
--- a/src/bin/pg_basebackup/pg_createsubscriber.c
+++ b/src/bin/pg_basebackup/pg_createsubscriber.c
@@ -2305,6 +2305,11 @@ main(int argc, char **argv)
 		pg_log_error_hint("Try \"%s --help\" for more information.", progname);
 		exit(1);
 	}
+
+	if (dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
 	pg_log_info("validating publisher connection string");
 	pub_base_conninfo = get_base_conninfo(opt.pub_conninfo_str,
 										  &dbname_conninfo);
diff --git a/src/bin/pg_combinebackup/pg_combinebackup.c b/src/bin/pg_combinebackup/pg_combinebackup.c
index 3a325127209..c9bf0a9e105 100644
--- a/src/bin/pg_combinebackup/pg_combinebackup.c
+++ b/src/bin/pg_combinebackup/pg_combinebackup.c
@@ -242,6 +242,10 @@ main(int argc, char *argv[])
 	if (opt.no_manifest)
 		opt.manifest_checksums = CHECKSUM_TYPE_NONE;
 
+	if (opt.dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
 	/* Check that the platform supports the requested copy method. */
 	if (opt.copy_method == COPY_METHOD_CLONE)
 	{
diff --git a/src/bin/pg_resetwal/pg_resetwal.c b/src/bin/pg_resetwal/pg_resetwal.c
index a89d72fc5cf..dd5d279521e 100644
--- a/src/bin/pg_resetwal/pg_resetwal.c
+++ b/src/bin/pg_resetwal/pg_resetwal.c
@@ -397,6 +397,10 @@ main(int argc, char *argv[])
 		exit(1);
 	}
 
+	if (noupdate)
+		pg_log_info("Executing in dry-run mode.\n"
+					"Nothing will be modified.");
+
 	/*
 	 * Attempt to read the existing pg_control file
 	 */
diff --git a/src/bin/pg_rewind/pg_rewind.c b/src/bin/pg_rewind/pg_rewind.c
index 27c514f934a..e9364d04f76 100644
--- a/src/bin/pg_rewind/pg_rewind.c
+++ b/src/bin/pg_rewind/pg_rewind.c
@@ -300,10 +300,12 @@ main(int argc, char **argv)
 
 	atexit(disconnect_atexit);
 
-	/*
-	 * Ok, we have all the options and we're ready to start. First, connect to
-	 * remote server.
-	 */
+	/* Ok, we have all the options and we're ready to start. */
+	if (dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
+	/* First, connect to remote server. */
 	if (connstr_source)
 	{
 		conn = PQconnectdb(connstr_source);
-- 
2.47.3


--ibfr3ah5qy6tcbhw--





^ permalink  raw  reply  [nested|flat] 126+ messages in thread

* [PATCH v5] Log a note at program start when running in dry-run mode
@ 2025-11-11 08:54 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 126+ messages in thread

From: Álvaro Herrera @ 2025-11-11 08:54 UTC (permalink / raw)

Users might get some peace of mind knowing their data is not being
destroyed or whatever.

Author: Peter Smith <[email protected]>
Reviewed-by: Álvaro Herrera <[email protected]>
Discussion: https://postgr.es/m/CAHut+PsvQJQnQO0KT0S2oegenkvJ8FUuY-QS5syyqmT24R2xFQ@mail.gmail.com
---
 src/bin/pg_archivecleanup/pg_archivecleanup.c |  4 ++++
 src/bin/pg_basebackup/pg_createsubscriber.c   |  5 +++++
 src/bin/pg_combinebackup/pg_combinebackup.c   |  4 ++++
 src/bin/pg_resetwal/pg_resetwal.c             |  4 ++++
 src/bin/pg_rewind/pg_rewind.c                 | 10 ++++++----
 5 files changed, 23 insertions(+), 4 deletions(-)

diff --git a/src/bin/pg_archivecleanup/pg_archivecleanup.c b/src/bin/pg_archivecleanup/pg_archivecleanup.c
index c25348bcb85..ab686b4748c 100644
--- a/src/bin/pg_archivecleanup/pg_archivecleanup.c
+++ b/src/bin/pg_archivecleanup/pg_archivecleanup.c
@@ -375,6 +375,10 @@ main(int argc, char **argv)
 		exit(2);
 	}
 
+	if (dryrun)
+		pg_log_info("Executing in dry-run mode.\n"
+					"No files will be removed.");
+
 	/*
 	 * Check archive exists and other initialization if required.
 	 */
diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c
index df41836e70f..cc4be5d6ef4 100644
--- a/src/bin/pg_basebackup/pg_createsubscriber.c
+++ b/src/bin/pg_basebackup/pg_createsubscriber.c
@@ -2305,6 +2305,11 @@ main(int argc, char **argv)
 		pg_log_error_hint("Try \"%s --help\" for more information.", progname);
 		exit(1);
 	}
+
+	if (dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
 	pg_log_info("validating publisher connection string");
 	pub_base_conninfo = get_base_conninfo(opt.pub_conninfo_str,
 										  &dbname_conninfo);
diff --git a/src/bin/pg_combinebackup/pg_combinebackup.c b/src/bin/pg_combinebackup/pg_combinebackup.c
index 3a325127209..c9bf0a9e105 100644
--- a/src/bin/pg_combinebackup/pg_combinebackup.c
+++ b/src/bin/pg_combinebackup/pg_combinebackup.c
@@ -242,6 +242,10 @@ main(int argc, char *argv[])
 	if (opt.no_manifest)
 		opt.manifest_checksums = CHECKSUM_TYPE_NONE;
 
+	if (opt.dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
 	/* Check that the platform supports the requested copy method. */
 	if (opt.copy_method == COPY_METHOD_CLONE)
 	{
diff --git a/src/bin/pg_resetwal/pg_resetwal.c b/src/bin/pg_resetwal/pg_resetwal.c
index a89d72fc5cf..dd5d279521e 100644
--- a/src/bin/pg_resetwal/pg_resetwal.c
+++ b/src/bin/pg_resetwal/pg_resetwal.c
@@ -397,6 +397,10 @@ main(int argc, char *argv[])
 		exit(1);
 	}
 
+	if (noupdate)
+		pg_log_info("Executing in dry-run mode.\n"
+					"Nothing will be modified.");
+
 	/*
 	 * Attempt to read the existing pg_control file
 	 */
diff --git a/src/bin/pg_rewind/pg_rewind.c b/src/bin/pg_rewind/pg_rewind.c
index 27c514f934a..e9364d04f76 100644
--- a/src/bin/pg_rewind/pg_rewind.c
+++ b/src/bin/pg_rewind/pg_rewind.c
@@ -300,10 +300,12 @@ main(int argc, char **argv)
 
 	atexit(disconnect_atexit);
 
-	/*
-	 * Ok, we have all the options and we're ready to start. First, connect to
-	 * remote server.
-	 */
+	/* Ok, we have all the options and we're ready to start. */
+	if (dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
+	/* First, connect to remote server. */
 	if (connstr_source)
 	{
 		conn = PQconnectdb(connstr_source);
-- 
2.47.3


--ibfr3ah5qy6tcbhw--





^ permalink  raw  reply  [nested|flat] 126+ messages in thread

* [PATCH v5] Log a note at program start when running in dry-run mode
@ 2025-11-11 08:54 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 126+ messages in thread

From: Álvaro Herrera @ 2025-11-11 08:54 UTC (permalink / raw)

Users might get some peace of mind knowing their data is not being
destroyed or whatever.

Author: Peter Smith <[email protected]>
Reviewed-by: Álvaro Herrera <[email protected]>
Discussion: https://postgr.es/m/CAHut+PsvQJQnQO0KT0S2oegenkvJ8FUuY-QS5syyqmT24R2xFQ@mail.gmail.com
---
 src/bin/pg_archivecleanup/pg_archivecleanup.c |  4 ++++
 src/bin/pg_basebackup/pg_createsubscriber.c   |  5 +++++
 src/bin/pg_combinebackup/pg_combinebackup.c   |  4 ++++
 src/bin/pg_resetwal/pg_resetwal.c             |  4 ++++
 src/bin/pg_rewind/pg_rewind.c                 | 10 ++++++----
 5 files changed, 23 insertions(+), 4 deletions(-)

diff --git a/src/bin/pg_archivecleanup/pg_archivecleanup.c b/src/bin/pg_archivecleanup/pg_archivecleanup.c
index c25348bcb85..ab686b4748c 100644
--- a/src/bin/pg_archivecleanup/pg_archivecleanup.c
+++ b/src/bin/pg_archivecleanup/pg_archivecleanup.c
@@ -375,6 +375,10 @@ main(int argc, char **argv)
 		exit(2);
 	}
 
+	if (dryrun)
+		pg_log_info("Executing in dry-run mode.\n"
+					"No files will be removed.");
+
 	/*
 	 * Check archive exists and other initialization if required.
 	 */
diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c
index df41836e70f..cc4be5d6ef4 100644
--- a/src/bin/pg_basebackup/pg_createsubscriber.c
+++ b/src/bin/pg_basebackup/pg_createsubscriber.c
@@ -2305,6 +2305,11 @@ main(int argc, char **argv)
 		pg_log_error_hint("Try \"%s --help\" for more information.", progname);
 		exit(1);
 	}
+
+	if (dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
 	pg_log_info("validating publisher connection string");
 	pub_base_conninfo = get_base_conninfo(opt.pub_conninfo_str,
 										  &dbname_conninfo);
diff --git a/src/bin/pg_combinebackup/pg_combinebackup.c b/src/bin/pg_combinebackup/pg_combinebackup.c
index 3a325127209..c9bf0a9e105 100644
--- a/src/bin/pg_combinebackup/pg_combinebackup.c
+++ b/src/bin/pg_combinebackup/pg_combinebackup.c
@@ -242,6 +242,10 @@ main(int argc, char *argv[])
 	if (opt.no_manifest)
 		opt.manifest_checksums = CHECKSUM_TYPE_NONE;
 
+	if (opt.dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
 	/* Check that the platform supports the requested copy method. */
 	if (opt.copy_method == COPY_METHOD_CLONE)
 	{
diff --git a/src/bin/pg_resetwal/pg_resetwal.c b/src/bin/pg_resetwal/pg_resetwal.c
index a89d72fc5cf..dd5d279521e 100644
--- a/src/bin/pg_resetwal/pg_resetwal.c
+++ b/src/bin/pg_resetwal/pg_resetwal.c
@@ -397,6 +397,10 @@ main(int argc, char *argv[])
 		exit(1);
 	}
 
+	if (noupdate)
+		pg_log_info("Executing in dry-run mode.\n"
+					"Nothing will be modified.");
+
 	/*
 	 * Attempt to read the existing pg_control file
 	 */
diff --git a/src/bin/pg_rewind/pg_rewind.c b/src/bin/pg_rewind/pg_rewind.c
index 27c514f934a..e9364d04f76 100644
--- a/src/bin/pg_rewind/pg_rewind.c
+++ b/src/bin/pg_rewind/pg_rewind.c
@@ -300,10 +300,12 @@ main(int argc, char **argv)
 
 	atexit(disconnect_atexit);
 
-	/*
-	 * Ok, we have all the options and we're ready to start. First, connect to
-	 * remote server.
-	 */
+	/* Ok, we have all the options and we're ready to start. */
+	if (dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
+	/* First, connect to remote server. */
 	if (connstr_source)
 	{
 		conn = PQconnectdb(connstr_source);
-- 
2.47.3


--ibfr3ah5qy6tcbhw--





^ permalink  raw  reply  [nested|flat] 126+ messages in thread

* [PATCH v5] Log a note at program start when running in dry-run mode
@ 2025-11-11 08:54 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 126+ messages in thread

From: Álvaro Herrera @ 2025-11-11 08:54 UTC (permalink / raw)

Users might get some peace of mind knowing their data is not being
destroyed or whatever.

Author: Peter Smith <[email protected]>
Reviewed-by: Álvaro Herrera <[email protected]>
Discussion: https://postgr.es/m/CAHut+PsvQJQnQO0KT0S2oegenkvJ8FUuY-QS5syyqmT24R2xFQ@mail.gmail.com
---
 src/bin/pg_archivecleanup/pg_archivecleanup.c |  4 ++++
 src/bin/pg_basebackup/pg_createsubscriber.c   |  5 +++++
 src/bin/pg_combinebackup/pg_combinebackup.c   |  4 ++++
 src/bin/pg_resetwal/pg_resetwal.c             |  4 ++++
 src/bin/pg_rewind/pg_rewind.c                 | 10 ++++++----
 5 files changed, 23 insertions(+), 4 deletions(-)

diff --git a/src/bin/pg_archivecleanup/pg_archivecleanup.c b/src/bin/pg_archivecleanup/pg_archivecleanup.c
index c25348bcb85..ab686b4748c 100644
--- a/src/bin/pg_archivecleanup/pg_archivecleanup.c
+++ b/src/bin/pg_archivecleanup/pg_archivecleanup.c
@@ -375,6 +375,10 @@ main(int argc, char **argv)
 		exit(2);
 	}
 
+	if (dryrun)
+		pg_log_info("Executing in dry-run mode.\n"
+					"No files will be removed.");
+
 	/*
 	 * Check archive exists and other initialization if required.
 	 */
diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c
index df41836e70f..cc4be5d6ef4 100644
--- a/src/bin/pg_basebackup/pg_createsubscriber.c
+++ b/src/bin/pg_basebackup/pg_createsubscriber.c
@@ -2305,6 +2305,11 @@ main(int argc, char **argv)
 		pg_log_error_hint("Try \"%s --help\" for more information.", progname);
 		exit(1);
 	}
+
+	if (dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
 	pg_log_info("validating publisher connection string");
 	pub_base_conninfo = get_base_conninfo(opt.pub_conninfo_str,
 										  &dbname_conninfo);
diff --git a/src/bin/pg_combinebackup/pg_combinebackup.c b/src/bin/pg_combinebackup/pg_combinebackup.c
index 3a325127209..c9bf0a9e105 100644
--- a/src/bin/pg_combinebackup/pg_combinebackup.c
+++ b/src/bin/pg_combinebackup/pg_combinebackup.c
@@ -242,6 +242,10 @@ main(int argc, char *argv[])
 	if (opt.no_manifest)
 		opt.manifest_checksums = CHECKSUM_TYPE_NONE;
 
+	if (opt.dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
 	/* Check that the platform supports the requested copy method. */
 	if (opt.copy_method == COPY_METHOD_CLONE)
 	{
diff --git a/src/bin/pg_resetwal/pg_resetwal.c b/src/bin/pg_resetwal/pg_resetwal.c
index a89d72fc5cf..dd5d279521e 100644
--- a/src/bin/pg_resetwal/pg_resetwal.c
+++ b/src/bin/pg_resetwal/pg_resetwal.c
@@ -397,6 +397,10 @@ main(int argc, char *argv[])
 		exit(1);
 	}
 
+	if (noupdate)
+		pg_log_info("Executing in dry-run mode.\n"
+					"Nothing will be modified.");
+
 	/*
 	 * Attempt to read the existing pg_control file
 	 */
diff --git a/src/bin/pg_rewind/pg_rewind.c b/src/bin/pg_rewind/pg_rewind.c
index 27c514f934a..e9364d04f76 100644
--- a/src/bin/pg_rewind/pg_rewind.c
+++ b/src/bin/pg_rewind/pg_rewind.c
@@ -300,10 +300,12 @@ main(int argc, char **argv)
 
 	atexit(disconnect_atexit);
 
-	/*
-	 * Ok, we have all the options and we're ready to start. First, connect to
-	 * remote server.
-	 */
+	/* Ok, we have all the options and we're ready to start. */
+	if (dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
+	/* First, connect to remote server. */
 	if (connstr_source)
 	{
 		conn = PQconnectdb(connstr_source);
-- 
2.47.3


--ibfr3ah5qy6tcbhw--





^ permalink  raw  reply  [nested|flat] 126+ messages in thread

* [PATCH v5] Log a note at program start when running in dry-run mode
@ 2025-11-11 08:54 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 126+ messages in thread

From: Álvaro Herrera @ 2025-11-11 08:54 UTC (permalink / raw)

Users might get some peace of mind knowing their data is not being
destroyed or whatever.

Author: Peter Smith <[email protected]>
Reviewed-by: Álvaro Herrera <[email protected]>
Discussion: https://postgr.es/m/CAHut+PsvQJQnQO0KT0S2oegenkvJ8FUuY-QS5syyqmT24R2xFQ@mail.gmail.com
---
 src/bin/pg_archivecleanup/pg_archivecleanup.c |  4 ++++
 src/bin/pg_basebackup/pg_createsubscriber.c   |  5 +++++
 src/bin/pg_combinebackup/pg_combinebackup.c   |  4 ++++
 src/bin/pg_resetwal/pg_resetwal.c             |  4 ++++
 src/bin/pg_rewind/pg_rewind.c                 | 10 ++++++----
 5 files changed, 23 insertions(+), 4 deletions(-)

diff --git a/src/bin/pg_archivecleanup/pg_archivecleanup.c b/src/bin/pg_archivecleanup/pg_archivecleanup.c
index c25348bcb85..ab686b4748c 100644
--- a/src/bin/pg_archivecleanup/pg_archivecleanup.c
+++ b/src/bin/pg_archivecleanup/pg_archivecleanup.c
@@ -375,6 +375,10 @@ main(int argc, char **argv)
 		exit(2);
 	}
 
+	if (dryrun)
+		pg_log_info("Executing in dry-run mode.\n"
+					"No files will be removed.");
+
 	/*
 	 * Check archive exists and other initialization if required.
 	 */
diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c
index df41836e70f..cc4be5d6ef4 100644
--- a/src/bin/pg_basebackup/pg_createsubscriber.c
+++ b/src/bin/pg_basebackup/pg_createsubscriber.c
@@ -2305,6 +2305,11 @@ main(int argc, char **argv)
 		pg_log_error_hint("Try \"%s --help\" for more information.", progname);
 		exit(1);
 	}
+
+	if (dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
 	pg_log_info("validating publisher connection string");
 	pub_base_conninfo = get_base_conninfo(opt.pub_conninfo_str,
 										  &dbname_conninfo);
diff --git a/src/bin/pg_combinebackup/pg_combinebackup.c b/src/bin/pg_combinebackup/pg_combinebackup.c
index 3a325127209..c9bf0a9e105 100644
--- a/src/bin/pg_combinebackup/pg_combinebackup.c
+++ b/src/bin/pg_combinebackup/pg_combinebackup.c
@@ -242,6 +242,10 @@ main(int argc, char *argv[])
 	if (opt.no_manifest)
 		opt.manifest_checksums = CHECKSUM_TYPE_NONE;
 
+	if (opt.dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
 	/* Check that the platform supports the requested copy method. */
 	if (opt.copy_method == COPY_METHOD_CLONE)
 	{
diff --git a/src/bin/pg_resetwal/pg_resetwal.c b/src/bin/pg_resetwal/pg_resetwal.c
index a89d72fc5cf..dd5d279521e 100644
--- a/src/bin/pg_resetwal/pg_resetwal.c
+++ b/src/bin/pg_resetwal/pg_resetwal.c
@@ -397,6 +397,10 @@ main(int argc, char *argv[])
 		exit(1);
 	}
 
+	if (noupdate)
+		pg_log_info("Executing in dry-run mode.\n"
+					"Nothing will be modified.");
+
 	/*
 	 * Attempt to read the existing pg_control file
 	 */
diff --git a/src/bin/pg_rewind/pg_rewind.c b/src/bin/pg_rewind/pg_rewind.c
index 27c514f934a..e9364d04f76 100644
--- a/src/bin/pg_rewind/pg_rewind.c
+++ b/src/bin/pg_rewind/pg_rewind.c
@@ -300,10 +300,12 @@ main(int argc, char **argv)
 
 	atexit(disconnect_atexit);
 
-	/*
-	 * Ok, we have all the options and we're ready to start. First, connect to
-	 * remote server.
-	 */
+	/* Ok, we have all the options and we're ready to start. */
+	if (dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
+	/* First, connect to remote server. */
 	if (connstr_source)
 	{
 		conn = PQconnectdb(connstr_source);
-- 
2.47.3


--ibfr3ah5qy6tcbhw--





^ permalink  raw  reply  [nested|flat] 126+ messages in thread

* [PATCH v5] Log a note at program start when running in dry-run mode
@ 2025-11-11 08:54 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 126+ messages in thread

From: Álvaro Herrera @ 2025-11-11 08:54 UTC (permalink / raw)

Users might get some peace of mind knowing their data is not being
destroyed or whatever.

Author: Peter Smith <[email protected]>
Reviewed-by: Álvaro Herrera <[email protected]>
Discussion: https://postgr.es/m/CAHut+PsvQJQnQO0KT0S2oegenkvJ8FUuY-QS5syyqmT24R2xFQ@mail.gmail.com
---
 src/bin/pg_archivecleanup/pg_archivecleanup.c |  4 ++++
 src/bin/pg_basebackup/pg_createsubscriber.c   |  5 +++++
 src/bin/pg_combinebackup/pg_combinebackup.c   |  4 ++++
 src/bin/pg_resetwal/pg_resetwal.c             |  4 ++++
 src/bin/pg_rewind/pg_rewind.c                 | 10 ++++++----
 5 files changed, 23 insertions(+), 4 deletions(-)

diff --git a/src/bin/pg_archivecleanup/pg_archivecleanup.c b/src/bin/pg_archivecleanup/pg_archivecleanup.c
index c25348bcb85..ab686b4748c 100644
--- a/src/bin/pg_archivecleanup/pg_archivecleanup.c
+++ b/src/bin/pg_archivecleanup/pg_archivecleanup.c
@@ -375,6 +375,10 @@ main(int argc, char **argv)
 		exit(2);
 	}
 
+	if (dryrun)
+		pg_log_info("Executing in dry-run mode.\n"
+					"No files will be removed.");
+
 	/*
 	 * Check archive exists and other initialization if required.
 	 */
diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c
index df41836e70f..cc4be5d6ef4 100644
--- a/src/bin/pg_basebackup/pg_createsubscriber.c
+++ b/src/bin/pg_basebackup/pg_createsubscriber.c
@@ -2305,6 +2305,11 @@ main(int argc, char **argv)
 		pg_log_error_hint("Try \"%s --help\" for more information.", progname);
 		exit(1);
 	}
+
+	if (dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
 	pg_log_info("validating publisher connection string");
 	pub_base_conninfo = get_base_conninfo(opt.pub_conninfo_str,
 										  &dbname_conninfo);
diff --git a/src/bin/pg_combinebackup/pg_combinebackup.c b/src/bin/pg_combinebackup/pg_combinebackup.c
index 3a325127209..c9bf0a9e105 100644
--- a/src/bin/pg_combinebackup/pg_combinebackup.c
+++ b/src/bin/pg_combinebackup/pg_combinebackup.c
@@ -242,6 +242,10 @@ main(int argc, char *argv[])
 	if (opt.no_manifest)
 		opt.manifest_checksums = CHECKSUM_TYPE_NONE;
 
+	if (opt.dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
 	/* Check that the platform supports the requested copy method. */
 	if (opt.copy_method == COPY_METHOD_CLONE)
 	{
diff --git a/src/bin/pg_resetwal/pg_resetwal.c b/src/bin/pg_resetwal/pg_resetwal.c
index a89d72fc5cf..dd5d279521e 100644
--- a/src/bin/pg_resetwal/pg_resetwal.c
+++ b/src/bin/pg_resetwal/pg_resetwal.c
@@ -397,6 +397,10 @@ main(int argc, char *argv[])
 		exit(1);
 	}
 
+	if (noupdate)
+		pg_log_info("Executing in dry-run mode.\n"
+					"Nothing will be modified.");
+
 	/*
 	 * Attempt to read the existing pg_control file
 	 */
diff --git a/src/bin/pg_rewind/pg_rewind.c b/src/bin/pg_rewind/pg_rewind.c
index 27c514f934a..e9364d04f76 100644
--- a/src/bin/pg_rewind/pg_rewind.c
+++ b/src/bin/pg_rewind/pg_rewind.c
@@ -300,10 +300,12 @@ main(int argc, char **argv)
 
 	atexit(disconnect_atexit);
 
-	/*
-	 * Ok, we have all the options and we're ready to start. First, connect to
-	 * remote server.
-	 */
+	/* Ok, we have all the options and we're ready to start. */
+	if (dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
+	/* First, connect to remote server. */
 	if (connstr_source)
 	{
 		conn = PQconnectdb(connstr_source);
-- 
2.47.3


--ibfr3ah5qy6tcbhw--





^ permalink  raw  reply  [nested|flat] 126+ messages in thread

* [PATCH v5] Log a note at program start when running in dry-run mode
@ 2025-11-11 08:54 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 126+ messages in thread

From: Álvaro Herrera @ 2025-11-11 08:54 UTC (permalink / raw)

Users might get some peace of mind knowing their data is not being
destroyed or whatever.

Author: Peter Smith <[email protected]>
Reviewed-by: Álvaro Herrera <[email protected]>
Discussion: https://postgr.es/m/CAHut+PsvQJQnQO0KT0S2oegenkvJ8FUuY-QS5syyqmT24R2xFQ@mail.gmail.com
---
 src/bin/pg_archivecleanup/pg_archivecleanup.c |  4 ++++
 src/bin/pg_basebackup/pg_createsubscriber.c   |  5 +++++
 src/bin/pg_combinebackup/pg_combinebackup.c   |  4 ++++
 src/bin/pg_resetwal/pg_resetwal.c             |  4 ++++
 src/bin/pg_rewind/pg_rewind.c                 | 10 ++++++----
 5 files changed, 23 insertions(+), 4 deletions(-)

diff --git a/src/bin/pg_archivecleanup/pg_archivecleanup.c b/src/bin/pg_archivecleanup/pg_archivecleanup.c
index c25348bcb85..ab686b4748c 100644
--- a/src/bin/pg_archivecleanup/pg_archivecleanup.c
+++ b/src/bin/pg_archivecleanup/pg_archivecleanup.c
@@ -375,6 +375,10 @@ main(int argc, char **argv)
 		exit(2);
 	}
 
+	if (dryrun)
+		pg_log_info("Executing in dry-run mode.\n"
+					"No files will be removed.");
+
 	/*
 	 * Check archive exists and other initialization if required.
 	 */
diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c
index df41836e70f..cc4be5d6ef4 100644
--- a/src/bin/pg_basebackup/pg_createsubscriber.c
+++ b/src/bin/pg_basebackup/pg_createsubscriber.c
@@ -2305,6 +2305,11 @@ main(int argc, char **argv)
 		pg_log_error_hint("Try \"%s --help\" for more information.", progname);
 		exit(1);
 	}
+
+	if (dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
 	pg_log_info("validating publisher connection string");
 	pub_base_conninfo = get_base_conninfo(opt.pub_conninfo_str,
 										  &dbname_conninfo);
diff --git a/src/bin/pg_combinebackup/pg_combinebackup.c b/src/bin/pg_combinebackup/pg_combinebackup.c
index 3a325127209..c9bf0a9e105 100644
--- a/src/bin/pg_combinebackup/pg_combinebackup.c
+++ b/src/bin/pg_combinebackup/pg_combinebackup.c
@@ -242,6 +242,10 @@ main(int argc, char *argv[])
 	if (opt.no_manifest)
 		opt.manifest_checksums = CHECKSUM_TYPE_NONE;
 
+	if (opt.dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
 	/* Check that the platform supports the requested copy method. */
 	if (opt.copy_method == COPY_METHOD_CLONE)
 	{
diff --git a/src/bin/pg_resetwal/pg_resetwal.c b/src/bin/pg_resetwal/pg_resetwal.c
index a89d72fc5cf..dd5d279521e 100644
--- a/src/bin/pg_resetwal/pg_resetwal.c
+++ b/src/bin/pg_resetwal/pg_resetwal.c
@@ -397,6 +397,10 @@ main(int argc, char *argv[])
 		exit(1);
 	}
 
+	if (noupdate)
+		pg_log_info("Executing in dry-run mode.\n"
+					"Nothing will be modified.");
+
 	/*
 	 * Attempt to read the existing pg_control file
 	 */
diff --git a/src/bin/pg_rewind/pg_rewind.c b/src/bin/pg_rewind/pg_rewind.c
index 27c514f934a..e9364d04f76 100644
--- a/src/bin/pg_rewind/pg_rewind.c
+++ b/src/bin/pg_rewind/pg_rewind.c
@@ -300,10 +300,12 @@ main(int argc, char **argv)
 
 	atexit(disconnect_atexit);
 
-	/*
-	 * Ok, we have all the options and we're ready to start. First, connect to
-	 * remote server.
-	 */
+	/* Ok, we have all the options and we're ready to start. */
+	if (dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
+	/* First, connect to remote server. */
 	if (connstr_source)
 	{
 		conn = PQconnectdb(connstr_source);
-- 
2.47.3


--ibfr3ah5qy6tcbhw--





^ permalink  raw  reply  [nested|flat] 126+ messages in thread

* [PATCH v5] Log a note at program start when running in dry-run mode
@ 2025-11-11 08:54 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 126+ messages in thread

From: Álvaro Herrera @ 2025-11-11 08:54 UTC (permalink / raw)

Users might get some peace of mind knowing their data is not being
destroyed or whatever.

Author: Peter Smith <[email protected]>
Reviewed-by: Álvaro Herrera <[email protected]>
Discussion: https://postgr.es/m/CAHut+PsvQJQnQO0KT0S2oegenkvJ8FUuY-QS5syyqmT24R2xFQ@mail.gmail.com
---
 src/bin/pg_archivecleanup/pg_archivecleanup.c |  4 ++++
 src/bin/pg_basebackup/pg_createsubscriber.c   |  5 +++++
 src/bin/pg_combinebackup/pg_combinebackup.c   |  4 ++++
 src/bin/pg_resetwal/pg_resetwal.c             |  4 ++++
 src/bin/pg_rewind/pg_rewind.c                 | 10 ++++++----
 5 files changed, 23 insertions(+), 4 deletions(-)

diff --git a/src/bin/pg_archivecleanup/pg_archivecleanup.c b/src/bin/pg_archivecleanup/pg_archivecleanup.c
index c25348bcb85..ab686b4748c 100644
--- a/src/bin/pg_archivecleanup/pg_archivecleanup.c
+++ b/src/bin/pg_archivecleanup/pg_archivecleanup.c
@@ -375,6 +375,10 @@ main(int argc, char **argv)
 		exit(2);
 	}
 
+	if (dryrun)
+		pg_log_info("Executing in dry-run mode.\n"
+					"No files will be removed.");
+
 	/*
 	 * Check archive exists and other initialization if required.
 	 */
diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c
index df41836e70f..cc4be5d6ef4 100644
--- a/src/bin/pg_basebackup/pg_createsubscriber.c
+++ b/src/bin/pg_basebackup/pg_createsubscriber.c
@@ -2305,6 +2305,11 @@ main(int argc, char **argv)
 		pg_log_error_hint("Try \"%s --help\" for more information.", progname);
 		exit(1);
 	}
+
+	if (dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
 	pg_log_info("validating publisher connection string");
 	pub_base_conninfo = get_base_conninfo(opt.pub_conninfo_str,
 										  &dbname_conninfo);
diff --git a/src/bin/pg_combinebackup/pg_combinebackup.c b/src/bin/pg_combinebackup/pg_combinebackup.c
index 3a325127209..c9bf0a9e105 100644
--- a/src/bin/pg_combinebackup/pg_combinebackup.c
+++ b/src/bin/pg_combinebackup/pg_combinebackup.c
@@ -242,6 +242,10 @@ main(int argc, char *argv[])
 	if (opt.no_manifest)
 		opt.manifest_checksums = CHECKSUM_TYPE_NONE;
 
+	if (opt.dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
 	/* Check that the platform supports the requested copy method. */
 	if (opt.copy_method == COPY_METHOD_CLONE)
 	{
diff --git a/src/bin/pg_resetwal/pg_resetwal.c b/src/bin/pg_resetwal/pg_resetwal.c
index a89d72fc5cf..dd5d279521e 100644
--- a/src/bin/pg_resetwal/pg_resetwal.c
+++ b/src/bin/pg_resetwal/pg_resetwal.c
@@ -397,6 +397,10 @@ main(int argc, char *argv[])
 		exit(1);
 	}
 
+	if (noupdate)
+		pg_log_info("Executing in dry-run mode.\n"
+					"Nothing will be modified.");
+
 	/*
 	 * Attempt to read the existing pg_control file
 	 */
diff --git a/src/bin/pg_rewind/pg_rewind.c b/src/bin/pg_rewind/pg_rewind.c
index 27c514f934a..e9364d04f76 100644
--- a/src/bin/pg_rewind/pg_rewind.c
+++ b/src/bin/pg_rewind/pg_rewind.c
@@ -300,10 +300,12 @@ main(int argc, char **argv)
 
 	atexit(disconnect_atexit);
 
-	/*
-	 * Ok, we have all the options and we're ready to start. First, connect to
-	 * remote server.
-	 */
+	/* Ok, we have all the options and we're ready to start. */
+	if (dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
+	/* First, connect to remote server. */
 	if (connstr_source)
 	{
 		conn = PQconnectdb(connstr_source);
-- 
2.47.3


--ibfr3ah5qy6tcbhw--





^ permalink  raw  reply  [nested|flat] 126+ messages in thread

* [PATCH v5] Log a note at program start when running in dry-run mode
@ 2025-11-11 08:54 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 126+ messages in thread

From: Álvaro Herrera @ 2025-11-11 08:54 UTC (permalink / raw)

Users might get some peace of mind knowing their data is not being
destroyed or whatever.

Author: Peter Smith <[email protected]>
Reviewed-by: Álvaro Herrera <[email protected]>
Discussion: https://postgr.es/m/CAHut+PsvQJQnQO0KT0S2oegenkvJ8FUuY-QS5syyqmT24R2xFQ@mail.gmail.com
---
 src/bin/pg_archivecleanup/pg_archivecleanup.c |  4 ++++
 src/bin/pg_basebackup/pg_createsubscriber.c   |  5 +++++
 src/bin/pg_combinebackup/pg_combinebackup.c   |  4 ++++
 src/bin/pg_resetwal/pg_resetwal.c             |  4 ++++
 src/bin/pg_rewind/pg_rewind.c                 | 10 ++++++----
 5 files changed, 23 insertions(+), 4 deletions(-)

diff --git a/src/bin/pg_archivecleanup/pg_archivecleanup.c b/src/bin/pg_archivecleanup/pg_archivecleanup.c
index c25348bcb85..ab686b4748c 100644
--- a/src/bin/pg_archivecleanup/pg_archivecleanup.c
+++ b/src/bin/pg_archivecleanup/pg_archivecleanup.c
@@ -375,6 +375,10 @@ main(int argc, char **argv)
 		exit(2);
 	}
 
+	if (dryrun)
+		pg_log_info("Executing in dry-run mode.\n"
+					"No files will be removed.");
+
 	/*
 	 * Check archive exists and other initialization if required.
 	 */
diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c
index df41836e70f..cc4be5d6ef4 100644
--- a/src/bin/pg_basebackup/pg_createsubscriber.c
+++ b/src/bin/pg_basebackup/pg_createsubscriber.c
@@ -2305,6 +2305,11 @@ main(int argc, char **argv)
 		pg_log_error_hint("Try \"%s --help\" for more information.", progname);
 		exit(1);
 	}
+
+	if (dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
 	pg_log_info("validating publisher connection string");
 	pub_base_conninfo = get_base_conninfo(opt.pub_conninfo_str,
 										  &dbname_conninfo);
diff --git a/src/bin/pg_combinebackup/pg_combinebackup.c b/src/bin/pg_combinebackup/pg_combinebackup.c
index 3a325127209..c9bf0a9e105 100644
--- a/src/bin/pg_combinebackup/pg_combinebackup.c
+++ b/src/bin/pg_combinebackup/pg_combinebackup.c
@@ -242,6 +242,10 @@ main(int argc, char *argv[])
 	if (opt.no_manifest)
 		opt.manifest_checksums = CHECKSUM_TYPE_NONE;
 
+	if (opt.dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
 	/* Check that the platform supports the requested copy method. */
 	if (opt.copy_method == COPY_METHOD_CLONE)
 	{
diff --git a/src/bin/pg_resetwal/pg_resetwal.c b/src/bin/pg_resetwal/pg_resetwal.c
index a89d72fc5cf..dd5d279521e 100644
--- a/src/bin/pg_resetwal/pg_resetwal.c
+++ b/src/bin/pg_resetwal/pg_resetwal.c
@@ -397,6 +397,10 @@ main(int argc, char *argv[])
 		exit(1);
 	}
 
+	if (noupdate)
+		pg_log_info("Executing in dry-run mode.\n"
+					"Nothing will be modified.");
+
 	/*
 	 * Attempt to read the existing pg_control file
 	 */
diff --git a/src/bin/pg_rewind/pg_rewind.c b/src/bin/pg_rewind/pg_rewind.c
index 27c514f934a..e9364d04f76 100644
--- a/src/bin/pg_rewind/pg_rewind.c
+++ b/src/bin/pg_rewind/pg_rewind.c
@@ -300,10 +300,12 @@ main(int argc, char **argv)
 
 	atexit(disconnect_atexit);
 
-	/*
-	 * Ok, we have all the options and we're ready to start. First, connect to
-	 * remote server.
-	 */
+	/* Ok, we have all the options and we're ready to start. */
+	if (dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
+	/* First, connect to remote server. */
 	if (connstr_source)
 	{
 		conn = PQconnectdb(connstr_source);
-- 
2.47.3


--ibfr3ah5qy6tcbhw--





^ permalink  raw  reply  [nested|flat] 126+ messages in thread

* [PATCH v5] Log a note at program start when running in dry-run mode
@ 2025-11-11 08:54 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 126+ messages in thread

From: Álvaro Herrera @ 2025-11-11 08:54 UTC (permalink / raw)

Users might get some peace of mind knowing their data is not being
destroyed or whatever.

Author: Peter Smith <[email protected]>
Reviewed-by: Álvaro Herrera <[email protected]>
Discussion: https://postgr.es/m/CAHut+PsvQJQnQO0KT0S2oegenkvJ8FUuY-QS5syyqmT24R2xFQ@mail.gmail.com
---
 src/bin/pg_archivecleanup/pg_archivecleanup.c |  4 ++++
 src/bin/pg_basebackup/pg_createsubscriber.c   |  5 +++++
 src/bin/pg_combinebackup/pg_combinebackup.c   |  4 ++++
 src/bin/pg_resetwal/pg_resetwal.c             |  4 ++++
 src/bin/pg_rewind/pg_rewind.c                 | 10 ++++++----
 5 files changed, 23 insertions(+), 4 deletions(-)

diff --git a/src/bin/pg_archivecleanup/pg_archivecleanup.c b/src/bin/pg_archivecleanup/pg_archivecleanup.c
index c25348bcb85..ab686b4748c 100644
--- a/src/bin/pg_archivecleanup/pg_archivecleanup.c
+++ b/src/bin/pg_archivecleanup/pg_archivecleanup.c
@@ -375,6 +375,10 @@ main(int argc, char **argv)
 		exit(2);
 	}
 
+	if (dryrun)
+		pg_log_info("Executing in dry-run mode.\n"
+					"No files will be removed.");
+
 	/*
 	 * Check archive exists and other initialization if required.
 	 */
diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c
index df41836e70f..cc4be5d6ef4 100644
--- a/src/bin/pg_basebackup/pg_createsubscriber.c
+++ b/src/bin/pg_basebackup/pg_createsubscriber.c
@@ -2305,6 +2305,11 @@ main(int argc, char **argv)
 		pg_log_error_hint("Try \"%s --help\" for more information.", progname);
 		exit(1);
 	}
+
+	if (dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
 	pg_log_info("validating publisher connection string");
 	pub_base_conninfo = get_base_conninfo(opt.pub_conninfo_str,
 										  &dbname_conninfo);
diff --git a/src/bin/pg_combinebackup/pg_combinebackup.c b/src/bin/pg_combinebackup/pg_combinebackup.c
index 3a325127209..c9bf0a9e105 100644
--- a/src/bin/pg_combinebackup/pg_combinebackup.c
+++ b/src/bin/pg_combinebackup/pg_combinebackup.c
@@ -242,6 +242,10 @@ main(int argc, char *argv[])
 	if (opt.no_manifest)
 		opt.manifest_checksums = CHECKSUM_TYPE_NONE;
 
+	if (opt.dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
 	/* Check that the platform supports the requested copy method. */
 	if (opt.copy_method == COPY_METHOD_CLONE)
 	{
diff --git a/src/bin/pg_resetwal/pg_resetwal.c b/src/bin/pg_resetwal/pg_resetwal.c
index a89d72fc5cf..dd5d279521e 100644
--- a/src/bin/pg_resetwal/pg_resetwal.c
+++ b/src/bin/pg_resetwal/pg_resetwal.c
@@ -397,6 +397,10 @@ main(int argc, char *argv[])
 		exit(1);
 	}
 
+	if (noupdate)
+		pg_log_info("Executing in dry-run mode.\n"
+					"Nothing will be modified.");
+
 	/*
 	 * Attempt to read the existing pg_control file
 	 */
diff --git a/src/bin/pg_rewind/pg_rewind.c b/src/bin/pg_rewind/pg_rewind.c
index 27c514f934a..e9364d04f76 100644
--- a/src/bin/pg_rewind/pg_rewind.c
+++ b/src/bin/pg_rewind/pg_rewind.c
@@ -300,10 +300,12 @@ main(int argc, char **argv)
 
 	atexit(disconnect_atexit);
 
-	/*
-	 * Ok, we have all the options and we're ready to start. First, connect to
-	 * remote server.
-	 */
+	/* Ok, we have all the options and we're ready to start. */
+	if (dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
+	/* First, connect to remote server. */
 	if (connstr_source)
 	{
 		conn = PQconnectdb(connstr_source);
-- 
2.47.3


--ibfr3ah5qy6tcbhw--





^ permalink  raw  reply  [nested|flat] 126+ messages in thread

* [PATCH v5] Log a note at program start when running in dry-run mode
@ 2025-11-11 08:54 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 126+ messages in thread

From: Álvaro Herrera @ 2025-11-11 08:54 UTC (permalink / raw)

Users might get some peace of mind knowing their data is not being
destroyed or whatever.

Author: Peter Smith <[email protected]>
Reviewed-by: Álvaro Herrera <[email protected]>
Discussion: https://postgr.es/m/CAHut+PsvQJQnQO0KT0S2oegenkvJ8FUuY-QS5syyqmT24R2xFQ@mail.gmail.com
---
 src/bin/pg_archivecleanup/pg_archivecleanup.c |  4 ++++
 src/bin/pg_basebackup/pg_createsubscriber.c   |  5 +++++
 src/bin/pg_combinebackup/pg_combinebackup.c   |  4 ++++
 src/bin/pg_resetwal/pg_resetwal.c             |  4 ++++
 src/bin/pg_rewind/pg_rewind.c                 | 10 ++++++----
 5 files changed, 23 insertions(+), 4 deletions(-)

diff --git a/src/bin/pg_archivecleanup/pg_archivecleanup.c b/src/bin/pg_archivecleanup/pg_archivecleanup.c
index c25348bcb85..ab686b4748c 100644
--- a/src/bin/pg_archivecleanup/pg_archivecleanup.c
+++ b/src/bin/pg_archivecleanup/pg_archivecleanup.c
@@ -375,6 +375,10 @@ main(int argc, char **argv)
 		exit(2);
 	}
 
+	if (dryrun)
+		pg_log_info("Executing in dry-run mode.\n"
+					"No files will be removed.");
+
 	/*
 	 * Check archive exists and other initialization if required.
 	 */
diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c
index df41836e70f..cc4be5d6ef4 100644
--- a/src/bin/pg_basebackup/pg_createsubscriber.c
+++ b/src/bin/pg_basebackup/pg_createsubscriber.c
@@ -2305,6 +2305,11 @@ main(int argc, char **argv)
 		pg_log_error_hint("Try \"%s --help\" for more information.", progname);
 		exit(1);
 	}
+
+	if (dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
 	pg_log_info("validating publisher connection string");
 	pub_base_conninfo = get_base_conninfo(opt.pub_conninfo_str,
 										  &dbname_conninfo);
diff --git a/src/bin/pg_combinebackup/pg_combinebackup.c b/src/bin/pg_combinebackup/pg_combinebackup.c
index 3a325127209..c9bf0a9e105 100644
--- a/src/bin/pg_combinebackup/pg_combinebackup.c
+++ b/src/bin/pg_combinebackup/pg_combinebackup.c
@@ -242,6 +242,10 @@ main(int argc, char *argv[])
 	if (opt.no_manifest)
 		opt.manifest_checksums = CHECKSUM_TYPE_NONE;
 
+	if (opt.dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
 	/* Check that the platform supports the requested copy method. */
 	if (opt.copy_method == COPY_METHOD_CLONE)
 	{
diff --git a/src/bin/pg_resetwal/pg_resetwal.c b/src/bin/pg_resetwal/pg_resetwal.c
index a89d72fc5cf..dd5d279521e 100644
--- a/src/bin/pg_resetwal/pg_resetwal.c
+++ b/src/bin/pg_resetwal/pg_resetwal.c
@@ -397,6 +397,10 @@ main(int argc, char *argv[])
 		exit(1);
 	}
 
+	if (noupdate)
+		pg_log_info("Executing in dry-run mode.\n"
+					"Nothing will be modified.");
+
 	/*
 	 * Attempt to read the existing pg_control file
 	 */
diff --git a/src/bin/pg_rewind/pg_rewind.c b/src/bin/pg_rewind/pg_rewind.c
index 27c514f934a..e9364d04f76 100644
--- a/src/bin/pg_rewind/pg_rewind.c
+++ b/src/bin/pg_rewind/pg_rewind.c
@@ -300,10 +300,12 @@ main(int argc, char **argv)
 
 	atexit(disconnect_atexit);
 
-	/*
-	 * Ok, we have all the options and we're ready to start. First, connect to
-	 * remote server.
-	 */
+	/* Ok, we have all the options and we're ready to start. */
+	if (dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
+	/* First, connect to remote server. */
 	if (connstr_source)
 	{
 		conn = PQconnectdb(connstr_source);
-- 
2.47.3


--ibfr3ah5qy6tcbhw--





^ permalink  raw  reply  [nested|flat] 126+ messages in thread

* [PATCH v5] Log a note at program start when running in dry-run mode
@ 2025-11-11 08:54 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 126+ messages in thread

From: Álvaro Herrera @ 2025-11-11 08:54 UTC (permalink / raw)

Users might get some peace of mind knowing their data is not being
destroyed or whatever.

Author: Peter Smith <[email protected]>
Reviewed-by: Álvaro Herrera <[email protected]>
Discussion: https://postgr.es/m/CAHut+PsvQJQnQO0KT0S2oegenkvJ8FUuY-QS5syyqmT24R2xFQ@mail.gmail.com
---
 src/bin/pg_archivecleanup/pg_archivecleanup.c |  4 ++++
 src/bin/pg_basebackup/pg_createsubscriber.c   |  5 +++++
 src/bin/pg_combinebackup/pg_combinebackup.c   |  4 ++++
 src/bin/pg_resetwal/pg_resetwal.c             |  4 ++++
 src/bin/pg_rewind/pg_rewind.c                 | 10 ++++++----
 5 files changed, 23 insertions(+), 4 deletions(-)

diff --git a/src/bin/pg_archivecleanup/pg_archivecleanup.c b/src/bin/pg_archivecleanup/pg_archivecleanup.c
index c25348bcb85..ab686b4748c 100644
--- a/src/bin/pg_archivecleanup/pg_archivecleanup.c
+++ b/src/bin/pg_archivecleanup/pg_archivecleanup.c
@@ -375,6 +375,10 @@ main(int argc, char **argv)
 		exit(2);
 	}
 
+	if (dryrun)
+		pg_log_info("Executing in dry-run mode.\n"
+					"No files will be removed.");
+
 	/*
 	 * Check archive exists and other initialization if required.
 	 */
diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c
index df41836e70f..cc4be5d6ef4 100644
--- a/src/bin/pg_basebackup/pg_createsubscriber.c
+++ b/src/bin/pg_basebackup/pg_createsubscriber.c
@@ -2305,6 +2305,11 @@ main(int argc, char **argv)
 		pg_log_error_hint("Try \"%s --help\" for more information.", progname);
 		exit(1);
 	}
+
+	if (dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
 	pg_log_info("validating publisher connection string");
 	pub_base_conninfo = get_base_conninfo(opt.pub_conninfo_str,
 										  &dbname_conninfo);
diff --git a/src/bin/pg_combinebackup/pg_combinebackup.c b/src/bin/pg_combinebackup/pg_combinebackup.c
index 3a325127209..c9bf0a9e105 100644
--- a/src/bin/pg_combinebackup/pg_combinebackup.c
+++ b/src/bin/pg_combinebackup/pg_combinebackup.c
@@ -242,6 +242,10 @@ main(int argc, char *argv[])
 	if (opt.no_manifest)
 		opt.manifest_checksums = CHECKSUM_TYPE_NONE;
 
+	if (opt.dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
 	/* Check that the platform supports the requested copy method. */
 	if (opt.copy_method == COPY_METHOD_CLONE)
 	{
diff --git a/src/bin/pg_resetwal/pg_resetwal.c b/src/bin/pg_resetwal/pg_resetwal.c
index a89d72fc5cf..dd5d279521e 100644
--- a/src/bin/pg_resetwal/pg_resetwal.c
+++ b/src/bin/pg_resetwal/pg_resetwal.c
@@ -397,6 +397,10 @@ main(int argc, char *argv[])
 		exit(1);
 	}
 
+	if (noupdate)
+		pg_log_info("Executing in dry-run mode.\n"
+					"Nothing will be modified.");
+
 	/*
 	 * Attempt to read the existing pg_control file
 	 */
diff --git a/src/bin/pg_rewind/pg_rewind.c b/src/bin/pg_rewind/pg_rewind.c
index 27c514f934a..e9364d04f76 100644
--- a/src/bin/pg_rewind/pg_rewind.c
+++ b/src/bin/pg_rewind/pg_rewind.c
@@ -300,10 +300,12 @@ main(int argc, char **argv)
 
 	atexit(disconnect_atexit);
 
-	/*
-	 * Ok, we have all the options and we're ready to start. First, connect to
-	 * remote server.
-	 */
+	/* Ok, we have all the options and we're ready to start. */
+	if (dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
+	/* First, connect to remote server. */
 	if (connstr_source)
 	{
 		conn = PQconnectdb(connstr_source);
-- 
2.47.3


--ibfr3ah5qy6tcbhw--





^ permalink  raw  reply  [nested|flat] 126+ messages in thread

* [PATCH v5] Log a note at program start when running in dry-run mode
@ 2025-11-11 08:54 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 126+ messages in thread

From: Álvaro Herrera @ 2025-11-11 08:54 UTC (permalink / raw)

Users might get some peace of mind knowing their data is not being
destroyed or whatever.

Author: Peter Smith <[email protected]>
Reviewed-by: Álvaro Herrera <[email protected]>
Discussion: https://postgr.es/m/CAHut+PsvQJQnQO0KT0S2oegenkvJ8FUuY-QS5syyqmT24R2xFQ@mail.gmail.com
---
 src/bin/pg_archivecleanup/pg_archivecleanup.c |  4 ++++
 src/bin/pg_basebackup/pg_createsubscriber.c   |  5 +++++
 src/bin/pg_combinebackup/pg_combinebackup.c   |  4 ++++
 src/bin/pg_resetwal/pg_resetwal.c             |  4 ++++
 src/bin/pg_rewind/pg_rewind.c                 | 10 ++++++----
 5 files changed, 23 insertions(+), 4 deletions(-)

diff --git a/src/bin/pg_archivecleanup/pg_archivecleanup.c b/src/bin/pg_archivecleanup/pg_archivecleanup.c
index c25348bcb85..ab686b4748c 100644
--- a/src/bin/pg_archivecleanup/pg_archivecleanup.c
+++ b/src/bin/pg_archivecleanup/pg_archivecleanup.c
@@ -375,6 +375,10 @@ main(int argc, char **argv)
 		exit(2);
 	}
 
+	if (dryrun)
+		pg_log_info("Executing in dry-run mode.\n"
+					"No files will be removed.");
+
 	/*
 	 * Check archive exists and other initialization if required.
 	 */
diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c
index df41836e70f..cc4be5d6ef4 100644
--- a/src/bin/pg_basebackup/pg_createsubscriber.c
+++ b/src/bin/pg_basebackup/pg_createsubscriber.c
@@ -2305,6 +2305,11 @@ main(int argc, char **argv)
 		pg_log_error_hint("Try \"%s --help\" for more information.", progname);
 		exit(1);
 	}
+
+	if (dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
 	pg_log_info("validating publisher connection string");
 	pub_base_conninfo = get_base_conninfo(opt.pub_conninfo_str,
 										  &dbname_conninfo);
diff --git a/src/bin/pg_combinebackup/pg_combinebackup.c b/src/bin/pg_combinebackup/pg_combinebackup.c
index 3a325127209..c9bf0a9e105 100644
--- a/src/bin/pg_combinebackup/pg_combinebackup.c
+++ b/src/bin/pg_combinebackup/pg_combinebackup.c
@@ -242,6 +242,10 @@ main(int argc, char *argv[])
 	if (opt.no_manifest)
 		opt.manifest_checksums = CHECKSUM_TYPE_NONE;
 
+	if (opt.dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
 	/* Check that the platform supports the requested copy method. */
 	if (opt.copy_method == COPY_METHOD_CLONE)
 	{
diff --git a/src/bin/pg_resetwal/pg_resetwal.c b/src/bin/pg_resetwal/pg_resetwal.c
index a89d72fc5cf..dd5d279521e 100644
--- a/src/bin/pg_resetwal/pg_resetwal.c
+++ b/src/bin/pg_resetwal/pg_resetwal.c
@@ -397,6 +397,10 @@ main(int argc, char *argv[])
 		exit(1);
 	}
 
+	if (noupdate)
+		pg_log_info("Executing in dry-run mode.\n"
+					"Nothing will be modified.");
+
 	/*
 	 * Attempt to read the existing pg_control file
 	 */
diff --git a/src/bin/pg_rewind/pg_rewind.c b/src/bin/pg_rewind/pg_rewind.c
index 27c514f934a..e9364d04f76 100644
--- a/src/bin/pg_rewind/pg_rewind.c
+++ b/src/bin/pg_rewind/pg_rewind.c
@@ -300,10 +300,12 @@ main(int argc, char **argv)
 
 	atexit(disconnect_atexit);
 
-	/*
-	 * Ok, we have all the options and we're ready to start. First, connect to
-	 * remote server.
-	 */
+	/* Ok, we have all the options and we're ready to start. */
+	if (dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
+	/* First, connect to remote server. */
 	if (connstr_source)
 	{
 		conn = PQconnectdb(connstr_source);
-- 
2.47.3


--ibfr3ah5qy6tcbhw--





^ permalink  raw  reply  [nested|flat] 126+ messages in thread

* [PATCH v5] Log a note at program start when running in dry-run mode
@ 2025-11-11 08:54 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 126+ messages in thread

From: Álvaro Herrera @ 2025-11-11 08:54 UTC (permalink / raw)

Users might get some peace of mind knowing their data is not being
destroyed or whatever.

Author: Peter Smith <[email protected]>
Reviewed-by: Álvaro Herrera <[email protected]>
Discussion: https://postgr.es/m/CAHut+PsvQJQnQO0KT0S2oegenkvJ8FUuY-QS5syyqmT24R2xFQ@mail.gmail.com
---
 src/bin/pg_archivecleanup/pg_archivecleanup.c |  4 ++++
 src/bin/pg_basebackup/pg_createsubscriber.c   |  5 +++++
 src/bin/pg_combinebackup/pg_combinebackup.c   |  4 ++++
 src/bin/pg_resetwal/pg_resetwal.c             |  4 ++++
 src/bin/pg_rewind/pg_rewind.c                 | 10 ++++++----
 5 files changed, 23 insertions(+), 4 deletions(-)

diff --git a/src/bin/pg_archivecleanup/pg_archivecleanup.c b/src/bin/pg_archivecleanup/pg_archivecleanup.c
index c25348bcb85..ab686b4748c 100644
--- a/src/bin/pg_archivecleanup/pg_archivecleanup.c
+++ b/src/bin/pg_archivecleanup/pg_archivecleanup.c
@@ -375,6 +375,10 @@ main(int argc, char **argv)
 		exit(2);
 	}
 
+	if (dryrun)
+		pg_log_info("Executing in dry-run mode.\n"
+					"No files will be removed.");
+
 	/*
 	 * Check archive exists and other initialization if required.
 	 */
diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c
index df41836e70f..cc4be5d6ef4 100644
--- a/src/bin/pg_basebackup/pg_createsubscriber.c
+++ b/src/bin/pg_basebackup/pg_createsubscriber.c
@@ -2305,6 +2305,11 @@ main(int argc, char **argv)
 		pg_log_error_hint("Try \"%s --help\" for more information.", progname);
 		exit(1);
 	}
+
+	if (dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
 	pg_log_info("validating publisher connection string");
 	pub_base_conninfo = get_base_conninfo(opt.pub_conninfo_str,
 										  &dbname_conninfo);
diff --git a/src/bin/pg_combinebackup/pg_combinebackup.c b/src/bin/pg_combinebackup/pg_combinebackup.c
index 3a325127209..c9bf0a9e105 100644
--- a/src/bin/pg_combinebackup/pg_combinebackup.c
+++ b/src/bin/pg_combinebackup/pg_combinebackup.c
@@ -242,6 +242,10 @@ main(int argc, char *argv[])
 	if (opt.no_manifest)
 		opt.manifest_checksums = CHECKSUM_TYPE_NONE;
 
+	if (opt.dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
 	/* Check that the platform supports the requested copy method. */
 	if (opt.copy_method == COPY_METHOD_CLONE)
 	{
diff --git a/src/bin/pg_resetwal/pg_resetwal.c b/src/bin/pg_resetwal/pg_resetwal.c
index a89d72fc5cf..dd5d279521e 100644
--- a/src/bin/pg_resetwal/pg_resetwal.c
+++ b/src/bin/pg_resetwal/pg_resetwal.c
@@ -397,6 +397,10 @@ main(int argc, char *argv[])
 		exit(1);
 	}
 
+	if (noupdate)
+		pg_log_info("Executing in dry-run mode.\n"
+					"Nothing will be modified.");
+
 	/*
 	 * Attempt to read the existing pg_control file
 	 */
diff --git a/src/bin/pg_rewind/pg_rewind.c b/src/bin/pg_rewind/pg_rewind.c
index 27c514f934a..e9364d04f76 100644
--- a/src/bin/pg_rewind/pg_rewind.c
+++ b/src/bin/pg_rewind/pg_rewind.c
@@ -300,10 +300,12 @@ main(int argc, char **argv)
 
 	atexit(disconnect_atexit);
 
-	/*
-	 * Ok, we have all the options and we're ready to start. First, connect to
-	 * remote server.
-	 */
+	/* Ok, we have all the options and we're ready to start. */
+	if (dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
+	/* First, connect to remote server. */
 	if (connstr_source)
 	{
 		conn = PQconnectdb(connstr_source);
-- 
2.47.3


--ibfr3ah5qy6tcbhw--





^ permalink  raw  reply  [nested|flat] 126+ messages in thread

* [PATCH v5] Log a note at program start when running in dry-run mode
@ 2025-11-11 08:54 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 126+ messages in thread

From: Álvaro Herrera @ 2025-11-11 08:54 UTC (permalink / raw)

Users might get some peace of mind knowing their data is not being
destroyed or whatever.

Author: Peter Smith <[email protected]>
Reviewed-by: Álvaro Herrera <[email protected]>
Discussion: https://postgr.es/m/CAHut+PsvQJQnQO0KT0S2oegenkvJ8FUuY-QS5syyqmT24R2xFQ@mail.gmail.com
---
 src/bin/pg_archivecleanup/pg_archivecleanup.c |  4 ++++
 src/bin/pg_basebackup/pg_createsubscriber.c   |  5 +++++
 src/bin/pg_combinebackup/pg_combinebackup.c   |  4 ++++
 src/bin/pg_resetwal/pg_resetwal.c             |  4 ++++
 src/bin/pg_rewind/pg_rewind.c                 | 10 ++++++----
 5 files changed, 23 insertions(+), 4 deletions(-)

diff --git a/src/bin/pg_archivecleanup/pg_archivecleanup.c b/src/bin/pg_archivecleanup/pg_archivecleanup.c
index c25348bcb85..ab686b4748c 100644
--- a/src/bin/pg_archivecleanup/pg_archivecleanup.c
+++ b/src/bin/pg_archivecleanup/pg_archivecleanup.c
@@ -375,6 +375,10 @@ main(int argc, char **argv)
 		exit(2);
 	}
 
+	if (dryrun)
+		pg_log_info("Executing in dry-run mode.\n"
+					"No files will be removed.");
+
 	/*
 	 * Check archive exists and other initialization if required.
 	 */
diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c
index df41836e70f..cc4be5d6ef4 100644
--- a/src/bin/pg_basebackup/pg_createsubscriber.c
+++ b/src/bin/pg_basebackup/pg_createsubscriber.c
@@ -2305,6 +2305,11 @@ main(int argc, char **argv)
 		pg_log_error_hint("Try \"%s --help\" for more information.", progname);
 		exit(1);
 	}
+
+	if (dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
 	pg_log_info("validating publisher connection string");
 	pub_base_conninfo = get_base_conninfo(opt.pub_conninfo_str,
 										  &dbname_conninfo);
diff --git a/src/bin/pg_combinebackup/pg_combinebackup.c b/src/bin/pg_combinebackup/pg_combinebackup.c
index 3a325127209..c9bf0a9e105 100644
--- a/src/bin/pg_combinebackup/pg_combinebackup.c
+++ b/src/bin/pg_combinebackup/pg_combinebackup.c
@@ -242,6 +242,10 @@ main(int argc, char *argv[])
 	if (opt.no_manifest)
 		opt.manifest_checksums = CHECKSUM_TYPE_NONE;
 
+	if (opt.dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
 	/* Check that the platform supports the requested copy method. */
 	if (opt.copy_method == COPY_METHOD_CLONE)
 	{
diff --git a/src/bin/pg_resetwal/pg_resetwal.c b/src/bin/pg_resetwal/pg_resetwal.c
index a89d72fc5cf..dd5d279521e 100644
--- a/src/bin/pg_resetwal/pg_resetwal.c
+++ b/src/bin/pg_resetwal/pg_resetwal.c
@@ -397,6 +397,10 @@ main(int argc, char *argv[])
 		exit(1);
 	}
 
+	if (noupdate)
+		pg_log_info("Executing in dry-run mode.\n"
+					"Nothing will be modified.");
+
 	/*
 	 * Attempt to read the existing pg_control file
 	 */
diff --git a/src/bin/pg_rewind/pg_rewind.c b/src/bin/pg_rewind/pg_rewind.c
index 27c514f934a..e9364d04f76 100644
--- a/src/bin/pg_rewind/pg_rewind.c
+++ b/src/bin/pg_rewind/pg_rewind.c
@@ -300,10 +300,12 @@ main(int argc, char **argv)
 
 	atexit(disconnect_atexit);
 
-	/*
-	 * Ok, we have all the options and we're ready to start. First, connect to
-	 * remote server.
-	 */
+	/* Ok, we have all the options and we're ready to start. */
+	if (dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
+	/* First, connect to remote server. */
 	if (connstr_source)
 	{
 		conn = PQconnectdb(connstr_source);
-- 
2.47.3


--ibfr3ah5qy6tcbhw--





^ permalink  raw  reply  [nested|flat] 126+ messages in thread

* [PATCH v5] Log a note at program start when running in dry-run mode
@ 2025-11-11 08:54 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 126+ messages in thread

From: Álvaro Herrera @ 2025-11-11 08:54 UTC (permalink / raw)

Users might get some peace of mind knowing their data is not being
destroyed or whatever.

Author: Peter Smith <[email protected]>
Reviewed-by: Álvaro Herrera <[email protected]>
Discussion: https://postgr.es/m/CAHut+PsvQJQnQO0KT0S2oegenkvJ8FUuY-QS5syyqmT24R2xFQ@mail.gmail.com
---
 src/bin/pg_archivecleanup/pg_archivecleanup.c |  4 ++++
 src/bin/pg_basebackup/pg_createsubscriber.c   |  5 +++++
 src/bin/pg_combinebackup/pg_combinebackup.c   |  4 ++++
 src/bin/pg_resetwal/pg_resetwal.c             |  4 ++++
 src/bin/pg_rewind/pg_rewind.c                 | 10 ++++++----
 5 files changed, 23 insertions(+), 4 deletions(-)

diff --git a/src/bin/pg_archivecleanup/pg_archivecleanup.c b/src/bin/pg_archivecleanup/pg_archivecleanup.c
index c25348bcb85..ab686b4748c 100644
--- a/src/bin/pg_archivecleanup/pg_archivecleanup.c
+++ b/src/bin/pg_archivecleanup/pg_archivecleanup.c
@@ -375,6 +375,10 @@ main(int argc, char **argv)
 		exit(2);
 	}
 
+	if (dryrun)
+		pg_log_info("Executing in dry-run mode.\n"
+					"No files will be removed.");
+
 	/*
 	 * Check archive exists and other initialization if required.
 	 */
diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c
index df41836e70f..cc4be5d6ef4 100644
--- a/src/bin/pg_basebackup/pg_createsubscriber.c
+++ b/src/bin/pg_basebackup/pg_createsubscriber.c
@@ -2305,6 +2305,11 @@ main(int argc, char **argv)
 		pg_log_error_hint("Try \"%s --help\" for more information.", progname);
 		exit(1);
 	}
+
+	if (dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
 	pg_log_info("validating publisher connection string");
 	pub_base_conninfo = get_base_conninfo(opt.pub_conninfo_str,
 										  &dbname_conninfo);
diff --git a/src/bin/pg_combinebackup/pg_combinebackup.c b/src/bin/pg_combinebackup/pg_combinebackup.c
index 3a325127209..c9bf0a9e105 100644
--- a/src/bin/pg_combinebackup/pg_combinebackup.c
+++ b/src/bin/pg_combinebackup/pg_combinebackup.c
@@ -242,6 +242,10 @@ main(int argc, char *argv[])
 	if (opt.no_manifest)
 		opt.manifest_checksums = CHECKSUM_TYPE_NONE;
 
+	if (opt.dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
 	/* Check that the platform supports the requested copy method. */
 	if (opt.copy_method == COPY_METHOD_CLONE)
 	{
diff --git a/src/bin/pg_resetwal/pg_resetwal.c b/src/bin/pg_resetwal/pg_resetwal.c
index a89d72fc5cf..dd5d279521e 100644
--- a/src/bin/pg_resetwal/pg_resetwal.c
+++ b/src/bin/pg_resetwal/pg_resetwal.c
@@ -397,6 +397,10 @@ main(int argc, char *argv[])
 		exit(1);
 	}
 
+	if (noupdate)
+		pg_log_info("Executing in dry-run mode.\n"
+					"Nothing will be modified.");
+
 	/*
 	 * Attempt to read the existing pg_control file
 	 */
diff --git a/src/bin/pg_rewind/pg_rewind.c b/src/bin/pg_rewind/pg_rewind.c
index 27c514f934a..e9364d04f76 100644
--- a/src/bin/pg_rewind/pg_rewind.c
+++ b/src/bin/pg_rewind/pg_rewind.c
@@ -300,10 +300,12 @@ main(int argc, char **argv)
 
 	atexit(disconnect_atexit);
 
-	/*
-	 * Ok, we have all the options and we're ready to start. First, connect to
-	 * remote server.
-	 */
+	/* Ok, we have all the options and we're ready to start. */
+	if (dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
+	/* First, connect to remote server. */
 	if (connstr_source)
 	{
 		conn = PQconnectdb(connstr_source);
-- 
2.47.3


--ibfr3ah5qy6tcbhw--





^ permalink  raw  reply  [nested|flat] 126+ messages in thread

* [PATCH v5] Log a note at program start when running in dry-run mode
@ 2025-11-11 08:54 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 126+ messages in thread

From: Álvaro Herrera @ 2025-11-11 08:54 UTC (permalink / raw)

Users might get some peace of mind knowing their data is not being
destroyed or whatever.

Author: Peter Smith <[email protected]>
Reviewed-by: Álvaro Herrera <[email protected]>
Discussion: https://postgr.es/m/CAHut+PsvQJQnQO0KT0S2oegenkvJ8FUuY-QS5syyqmT24R2xFQ@mail.gmail.com
---
 src/bin/pg_archivecleanup/pg_archivecleanup.c |  4 ++++
 src/bin/pg_basebackup/pg_createsubscriber.c   |  5 +++++
 src/bin/pg_combinebackup/pg_combinebackup.c   |  4 ++++
 src/bin/pg_resetwal/pg_resetwal.c             |  4 ++++
 src/bin/pg_rewind/pg_rewind.c                 | 10 ++++++----
 5 files changed, 23 insertions(+), 4 deletions(-)

diff --git a/src/bin/pg_archivecleanup/pg_archivecleanup.c b/src/bin/pg_archivecleanup/pg_archivecleanup.c
index c25348bcb85..ab686b4748c 100644
--- a/src/bin/pg_archivecleanup/pg_archivecleanup.c
+++ b/src/bin/pg_archivecleanup/pg_archivecleanup.c
@@ -375,6 +375,10 @@ main(int argc, char **argv)
 		exit(2);
 	}
 
+	if (dryrun)
+		pg_log_info("Executing in dry-run mode.\n"
+					"No files will be removed.");
+
 	/*
 	 * Check archive exists and other initialization if required.
 	 */
diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c
index df41836e70f..cc4be5d6ef4 100644
--- a/src/bin/pg_basebackup/pg_createsubscriber.c
+++ b/src/bin/pg_basebackup/pg_createsubscriber.c
@@ -2305,6 +2305,11 @@ main(int argc, char **argv)
 		pg_log_error_hint("Try \"%s --help\" for more information.", progname);
 		exit(1);
 	}
+
+	if (dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
 	pg_log_info("validating publisher connection string");
 	pub_base_conninfo = get_base_conninfo(opt.pub_conninfo_str,
 										  &dbname_conninfo);
diff --git a/src/bin/pg_combinebackup/pg_combinebackup.c b/src/bin/pg_combinebackup/pg_combinebackup.c
index 3a325127209..c9bf0a9e105 100644
--- a/src/bin/pg_combinebackup/pg_combinebackup.c
+++ b/src/bin/pg_combinebackup/pg_combinebackup.c
@@ -242,6 +242,10 @@ main(int argc, char *argv[])
 	if (opt.no_manifest)
 		opt.manifest_checksums = CHECKSUM_TYPE_NONE;
 
+	if (opt.dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
 	/* Check that the platform supports the requested copy method. */
 	if (opt.copy_method == COPY_METHOD_CLONE)
 	{
diff --git a/src/bin/pg_resetwal/pg_resetwal.c b/src/bin/pg_resetwal/pg_resetwal.c
index a89d72fc5cf..dd5d279521e 100644
--- a/src/bin/pg_resetwal/pg_resetwal.c
+++ b/src/bin/pg_resetwal/pg_resetwal.c
@@ -397,6 +397,10 @@ main(int argc, char *argv[])
 		exit(1);
 	}
 
+	if (noupdate)
+		pg_log_info("Executing in dry-run mode.\n"
+					"Nothing will be modified.");
+
 	/*
 	 * Attempt to read the existing pg_control file
 	 */
diff --git a/src/bin/pg_rewind/pg_rewind.c b/src/bin/pg_rewind/pg_rewind.c
index 27c514f934a..e9364d04f76 100644
--- a/src/bin/pg_rewind/pg_rewind.c
+++ b/src/bin/pg_rewind/pg_rewind.c
@@ -300,10 +300,12 @@ main(int argc, char **argv)
 
 	atexit(disconnect_atexit);
 
-	/*
-	 * Ok, we have all the options and we're ready to start. First, connect to
-	 * remote server.
-	 */
+	/* Ok, we have all the options and we're ready to start. */
+	if (dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
+	/* First, connect to remote server. */
 	if (connstr_source)
 	{
 		conn = PQconnectdb(connstr_source);
-- 
2.47.3


--ibfr3ah5qy6tcbhw--





^ permalink  raw  reply  [nested|flat] 126+ messages in thread

* [PATCH v5] Log a note at program start when running in dry-run mode
@ 2025-11-11 08:54 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 126+ messages in thread

From: Álvaro Herrera @ 2025-11-11 08:54 UTC (permalink / raw)

Users might get some peace of mind knowing their data is not being
destroyed or whatever.

Author: Peter Smith <[email protected]>
Reviewed-by: Álvaro Herrera <[email protected]>
Discussion: https://postgr.es/m/CAHut+PsvQJQnQO0KT0S2oegenkvJ8FUuY-QS5syyqmT24R2xFQ@mail.gmail.com
---
 src/bin/pg_archivecleanup/pg_archivecleanup.c |  4 ++++
 src/bin/pg_basebackup/pg_createsubscriber.c   |  5 +++++
 src/bin/pg_combinebackup/pg_combinebackup.c   |  4 ++++
 src/bin/pg_resetwal/pg_resetwal.c             |  4 ++++
 src/bin/pg_rewind/pg_rewind.c                 | 10 ++++++----
 5 files changed, 23 insertions(+), 4 deletions(-)

diff --git a/src/bin/pg_archivecleanup/pg_archivecleanup.c b/src/bin/pg_archivecleanup/pg_archivecleanup.c
index c25348bcb85..ab686b4748c 100644
--- a/src/bin/pg_archivecleanup/pg_archivecleanup.c
+++ b/src/bin/pg_archivecleanup/pg_archivecleanup.c
@@ -375,6 +375,10 @@ main(int argc, char **argv)
 		exit(2);
 	}
 
+	if (dryrun)
+		pg_log_info("Executing in dry-run mode.\n"
+					"No files will be removed.");
+
 	/*
 	 * Check archive exists and other initialization if required.
 	 */
diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c
index df41836e70f..cc4be5d6ef4 100644
--- a/src/bin/pg_basebackup/pg_createsubscriber.c
+++ b/src/bin/pg_basebackup/pg_createsubscriber.c
@@ -2305,6 +2305,11 @@ main(int argc, char **argv)
 		pg_log_error_hint("Try \"%s --help\" for more information.", progname);
 		exit(1);
 	}
+
+	if (dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
 	pg_log_info("validating publisher connection string");
 	pub_base_conninfo = get_base_conninfo(opt.pub_conninfo_str,
 										  &dbname_conninfo);
diff --git a/src/bin/pg_combinebackup/pg_combinebackup.c b/src/bin/pg_combinebackup/pg_combinebackup.c
index 3a325127209..c9bf0a9e105 100644
--- a/src/bin/pg_combinebackup/pg_combinebackup.c
+++ b/src/bin/pg_combinebackup/pg_combinebackup.c
@@ -242,6 +242,10 @@ main(int argc, char *argv[])
 	if (opt.no_manifest)
 		opt.manifest_checksums = CHECKSUM_TYPE_NONE;
 
+	if (opt.dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
 	/* Check that the platform supports the requested copy method. */
 	if (opt.copy_method == COPY_METHOD_CLONE)
 	{
diff --git a/src/bin/pg_resetwal/pg_resetwal.c b/src/bin/pg_resetwal/pg_resetwal.c
index a89d72fc5cf..dd5d279521e 100644
--- a/src/bin/pg_resetwal/pg_resetwal.c
+++ b/src/bin/pg_resetwal/pg_resetwal.c
@@ -397,6 +397,10 @@ main(int argc, char *argv[])
 		exit(1);
 	}
 
+	if (noupdate)
+		pg_log_info("Executing in dry-run mode.\n"
+					"Nothing will be modified.");
+
 	/*
 	 * Attempt to read the existing pg_control file
 	 */
diff --git a/src/bin/pg_rewind/pg_rewind.c b/src/bin/pg_rewind/pg_rewind.c
index 27c514f934a..e9364d04f76 100644
--- a/src/bin/pg_rewind/pg_rewind.c
+++ b/src/bin/pg_rewind/pg_rewind.c
@@ -300,10 +300,12 @@ main(int argc, char **argv)
 
 	atexit(disconnect_atexit);
 
-	/*
-	 * Ok, we have all the options and we're ready to start. First, connect to
-	 * remote server.
-	 */
+	/* Ok, we have all the options and we're ready to start. */
+	if (dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
+	/* First, connect to remote server. */
 	if (connstr_source)
 	{
 		conn = PQconnectdb(connstr_source);
-- 
2.47.3


--ibfr3ah5qy6tcbhw--





^ permalink  raw  reply  [nested|flat] 126+ messages in thread

* [PATCH v5] Log a note at program start when running in dry-run mode
@ 2025-11-11 08:54 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 126+ messages in thread

From: Álvaro Herrera @ 2025-11-11 08:54 UTC (permalink / raw)

Users might get some peace of mind knowing their data is not being
destroyed or whatever.

Author: Peter Smith <[email protected]>
Reviewed-by: Álvaro Herrera <[email protected]>
Discussion: https://postgr.es/m/CAHut+PsvQJQnQO0KT0S2oegenkvJ8FUuY-QS5syyqmT24R2xFQ@mail.gmail.com
---
 src/bin/pg_archivecleanup/pg_archivecleanup.c |  4 ++++
 src/bin/pg_basebackup/pg_createsubscriber.c   |  5 +++++
 src/bin/pg_combinebackup/pg_combinebackup.c   |  4 ++++
 src/bin/pg_resetwal/pg_resetwal.c             |  4 ++++
 src/bin/pg_rewind/pg_rewind.c                 | 10 ++++++----
 5 files changed, 23 insertions(+), 4 deletions(-)

diff --git a/src/bin/pg_archivecleanup/pg_archivecleanup.c b/src/bin/pg_archivecleanup/pg_archivecleanup.c
index c25348bcb85..ab686b4748c 100644
--- a/src/bin/pg_archivecleanup/pg_archivecleanup.c
+++ b/src/bin/pg_archivecleanup/pg_archivecleanup.c
@@ -375,6 +375,10 @@ main(int argc, char **argv)
 		exit(2);
 	}
 
+	if (dryrun)
+		pg_log_info("Executing in dry-run mode.\n"
+					"No files will be removed.");
+
 	/*
 	 * Check archive exists and other initialization if required.
 	 */
diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c
index df41836e70f..cc4be5d6ef4 100644
--- a/src/bin/pg_basebackup/pg_createsubscriber.c
+++ b/src/bin/pg_basebackup/pg_createsubscriber.c
@@ -2305,6 +2305,11 @@ main(int argc, char **argv)
 		pg_log_error_hint("Try \"%s --help\" for more information.", progname);
 		exit(1);
 	}
+
+	if (dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
 	pg_log_info("validating publisher connection string");
 	pub_base_conninfo = get_base_conninfo(opt.pub_conninfo_str,
 										  &dbname_conninfo);
diff --git a/src/bin/pg_combinebackup/pg_combinebackup.c b/src/bin/pg_combinebackup/pg_combinebackup.c
index 3a325127209..c9bf0a9e105 100644
--- a/src/bin/pg_combinebackup/pg_combinebackup.c
+++ b/src/bin/pg_combinebackup/pg_combinebackup.c
@@ -242,6 +242,10 @@ main(int argc, char *argv[])
 	if (opt.no_manifest)
 		opt.manifest_checksums = CHECKSUM_TYPE_NONE;
 
+	if (opt.dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
 	/* Check that the platform supports the requested copy method. */
 	if (opt.copy_method == COPY_METHOD_CLONE)
 	{
diff --git a/src/bin/pg_resetwal/pg_resetwal.c b/src/bin/pg_resetwal/pg_resetwal.c
index a89d72fc5cf..dd5d279521e 100644
--- a/src/bin/pg_resetwal/pg_resetwal.c
+++ b/src/bin/pg_resetwal/pg_resetwal.c
@@ -397,6 +397,10 @@ main(int argc, char *argv[])
 		exit(1);
 	}
 
+	if (noupdate)
+		pg_log_info("Executing in dry-run mode.\n"
+					"Nothing will be modified.");
+
 	/*
 	 * Attempt to read the existing pg_control file
 	 */
diff --git a/src/bin/pg_rewind/pg_rewind.c b/src/bin/pg_rewind/pg_rewind.c
index 27c514f934a..e9364d04f76 100644
--- a/src/bin/pg_rewind/pg_rewind.c
+++ b/src/bin/pg_rewind/pg_rewind.c
@@ -300,10 +300,12 @@ main(int argc, char **argv)
 
 	atexit(disconnect_atexit);
 
-	/*
-	 * Ok, we have all the options and we're ready to start. First, connect to
-	 * remote server.
-	 */
+	/* Ok, we have all the options and we're ready to start. */
+	if (dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
+	/* First, connect to remote server. */
 	if (connstr_source)
 	{
 		conn = PQconnectdb(connstr_source);
-- 
2.47.3


--ibfr3ah5qy6tcbhw--





^ permalink  raw  reply  [nested|flat] 126+ messages in thread

* [PATCH v5] Log a note at program start when running in dry-run mode
@ 2025-11-11 08:54 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 126+ messages in thread

From: Álvaro Herrera @ 2025-11-11 08:54 UTC (permalink / raw)

Users might get some peace of mind knowing their data is not being
destroyed or whatever.

Author: Peter Smith <[email protected]>
Reviewed-by: Álvaro Herrera <[email protected]>
Discussion: https://postgr.es/m/CAHut+PsvQJQnQO0KT0S2oegenkvJ8FUuY-QS5syyqmT24R2xFQ@mail.gmail.com
---
 src/bin/pg_archivecleanup/pg_archivecleanup.c |  4 ++++
 src/bin/pg_basebackup/pg_createsubscriber.c   |  5 +++++
 src/bin/pg_combinebackup/pg_combinebackup.c   |  4 ++++
 src/bin/pg_resetwal/pg_resetwal.c             |  4 ++++
 src/bin/pg_rewind/pg_rewind.c                 | 10 ++++++----
 5 files changed, 23 insertions(+), 4 deletions(-)

diff --git a/src/bin/pg_archivecleanup/pg_archivecleanup.c b/src/bin/pg_archivecleanup/pg_archivecleanup.c
index c25348bcb85..ab686b4748c 100644
--- a/src/bin/pg_archivecleanup/pg_archivecleanup.c
+++ b/src/bin/pg_archivecleanup/pg_archivecleanup.c
@@ -375,6 +375,10 @@ main(int argc, char **argv)
 		exit(2);
 	}
 
+	if (dryrun)
+		pg_log_info("Executing in dry-run mode.\n"
+					"No files will be removed.");
+
 	/*
 	 * Check archive exists and other initialization if required.
 	 */
diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c
index df41836e70f..cc4be5d6ef4 100644
--- a/src/bin/pg_basebackup/pg_createsubscriber.c
+++ b/src/bin/pg_basebackup/pg_createsubscriber.c
@@ -2305,6 +2305,11 @@ main(int argc, char **argv)
 		pg_log_error_hint("Try \"%s --help\" for more information.", progname);
 		exit(1);
 	}
+
+	if (dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
 	pg_log_info("validating publisher connection string");
 	pub_base_conninfo = get_base_conninfo(opt.pub_conninfo_str,
 										  &dbname_conninfo);
diff --git a/src/bin/pg_combinebackup/pg_combinebackup.c b/src/bin/pg_combinebackup/pg_combinebackup.c
index 3a325127209..c9bf0a9e105 100644
--- a/src/bin/pg_combinebackup/pg_combinebackup.c
+++ b/src/bin/pg_combinebackup/pg_combinebackup.c
@@ -242,6 +242,10 @@ main(int argc, char *argv[])
 	if (opt.no_manifest)
 		opt.manifest_checksums = CHECKSUM_TYPE_NONE;
 
+	if (opt.dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
 	/* Check that the platform supports the requested copy method. */
 	if (opt.copy_method == COPY_METHOD_CLONE)
 	{
diff --git a/src/bin/pg_resetwal/pg_resetwal.c b/src/bin/pg_resetwal/pg_resetwal.c
index a89d72fc5cf..dd5d279521e 100644
--- a/src/bin/pg_resetwal/pg_resetwal.c
+++ b/src/bin/pg_resetwal/pg_resetwal.c
@@ -397,6 +397,10 @@ main(int argc, char *argv[])
 		exit(1);
 	}
 
+	if (noupdate)
+		pg_log_info("Executing in dry-run mode.\n"
+					"Nothing will be modified.");
+
 	/*
 	 * Attempt to read the existing pg_control file
 	 */
diff --git a/src/bin/pg_rewind/pg_rewind.c b/src/bin/pg_rewind/pg_rewind.c
index 27c514f934a..e9364d04f76 100644
--- a/src/bin/pg_rewind/pg_rewind.c
+++ b/src/bin/pg_rewind/pg_rewind.c
@@ -300,10 +300,12 @@ main(int argc, char **argv)
 
 	atexit(disconnect_atexit);
 
-	/*
-	 * Ok, we have all the options and we're ready to start. First, connect to
-	 * remote server.
-	 */
+	/* Ok, we have all the options and we're ready to start. */
+	if (dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
+	/* First, connect to remote server. */
 	if (connstr_source)
 	{
 		conn = PQconnectdb(connstr_source);
-- 
2.47.3


--ibfr3ah5qy6tcbhw--





^ permalink  raw  reply  [nested|flat] 126+ messages in thread

* [PATCH v5] Log a note at program start when running in dry-run mode
@ 2025-11-11 08:54 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 126+ messages in thread

From: Álvaro Herrera @ 2025-11-11 08:54 UTC (permalink / raw)

Users might get some peace of mind knowing their data is not being
destroyed or whatever.

Author: Peter Smith <[email protected]>
Reviewed-by: Álvaro Herrera <[email protected]>
Discussion: https://postgr.es/m/CAHut+PsvQJQnQO0KT0S2oegenkvJ8FUuY-QS5syyqmT24R2xFQ@mail.gmail.com
---
 src/bin/pg_archivecleanup/pg_archivecleanup.c |  4 ++++
 src/bin/pg_basebackup/pg_createsubscriber.c   |  5 +++++
 src/bin/pg_combinebackup/pg_combinebackup.c   |  4 ++++
 src/bin/pg_resetwal/pg_resetwal.c             |  4 ++++
 src/bin/pg_rewind/pg_rewind.c                 | 10 ++++++----
 5 files changed, 23 insertions(+), 4 deletions(-)

diff --git a/src/bin/pg_archivecleanup/pg_archivecleanup.c b/src/bin/pg_archivecleanup/pg_archivecleanup.c
index c25348bcb85..ab686b4748c 100644
--- a/src/bin/pg_archivecleanup/pg_archivecleanup.c
+++ b/src/bin/pg_archivecleanup/pg_archivecleanup.c
@@ -375,6 +375,10 @@ main(int argc, char **argv)
 		exit(2);
 	}
 
+	if (dryrun)
+		pg_log_info("Executing in dry-run mode.\n"
+					"No files will be removed.");
+
 	/*
 	 * Check archive exists and other initialization if required.
 	 */
diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c
index df41836e70f..cc4be5d6ef4 100644
--- a/src/bin/pg_basebackup/pg_createsubscriber.c
+++ b/src/bin/pg_basebackup/pg_createsubscriber.c
@@ -2305,6 +2305,11 @@ main(int argc, char **argv)
 		pg_log_error_hint("Try \"%s --help\" for more information.", progname);
 		exit(1);
 	}
+
+	if (dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
 	pg_log_info("validating publisher connection string");
 	pub_base_conninfo = get_base_conninfo(opt.pub_conninfo_str,
 										  &dbname_conninfo);
diff --git a/src/bin/pg_combinebackup/pg_combinebackup.c b/src/bin/pg_combinebackup/pg_combinebackup.c
index 3a325127209..c9bf0a9e105 100644
--- a/src/bin/pg_combinebackup/pg_combinebackup.c
+++ b/src/bin/pg_combinebackup/pg_combinebackup.c
@@ -242,6 +242,10 @@ main(int argc, char *argv[])
 	if (opt.no_manifest)
 		opt.manifest_checksums = CHECKSUM_TYPE_NONE;
 
+	if (opt.dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
 	/* Check that the platform supports the requested copy method. */
 	if (opt.copy_method == COPY_METHOD_CLONE)
 	{
diff --git a/src/bin/pg_resetwal/pg_resetwal.c b/src/bin/pg_resetwal/pg_resetwal.c
index a89d72fc5cf..dd5d279521e 100644
--- a/src/bin/pg_resetwal/pg_resetwal.c
+++ b/src/bin/pg_resetwal/pg_resetwal.c
@@ -397,6 +397,10 @@ main(int argc, char *argv[])
 		exit(1);
 	}
 
+	if (noupdate)
+		pg_log_info("Executing in dry-run mode.\n"
+					"Nothing will be modified.");
+
 	/*
 	 * Attempt to read the existing pg_control file
 	 */
diff --git a/src/bin/pg_rewind/pg_rewind.c b/src/bin/pg_rewind/pg_rewind.c
index 27c514f934a..e9364d04f76 100644
--- a/src/bin/pg_rewind/pg_rewind.c
+++ b/src/bin/pg_rewind/pg_rewind.c
@@ -300,10 +300,12 @@ main(int argc, char **argv)
 
 	atexit(disconnect_atexit);
 
-	/*
-	 * Ok, we have all the options and we're ready to start. First, connect to
-	 * remote server.
-	 */
+	/* Ok, we have all the options and we're ready to start. */
+	if (dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
+	/* First, connect to remote server. */
 	if (connstr_source)
 	{
 		conn = PQconnectdb(connstr_source);
-- 
2.47.3


--ibfr3ah5qy6tcbhw--





^ permalink  raw  reply  [nested|flat] 126+ messages in thread

* [PATCH v5] Log a note at program start when running in dry-run mode
@ 2025-11-11 08:54 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 126+ messages in thread

From: Álvaro Herrera @ 2025-11-11 08:54 UTC (permalink / raw)

Users might get some peace of mind knowing their data is not being
destroyed or whatever.

Author: Peter Smith <[email protected]>
Reviewed-by: Álvaro Herrera <[email protected]>
Discussion: https://postgr.es/m/CAHut+PsvQJQnQO0KT0S2oegenkvJ8FUuY-QS5syyqmT24R2xFQ@mail.gmail.com
---
 src/bin/pg_archivecleanup/pg_archivecleanup.c |  4 ++++
 src/bin/pg_basebackup/pg_createsubscriber.c   |  5 +++++
 src/bin/pg_combinebackup/pg_combinebackup.c   |  4 ++++
 src/bin/pg_resetwal/pg_resetwal.c             |  4 ++++
 src/bin/pg_rewind/pg_rewind.c                 | 10 ++++++----
 5 files changed, 23 insertions(+), 4 deletions(-)

diff --git a/src/bin/pg_archivecleanup/pg_archivecleanup.c b/src/bin/pg_archivecleanup/pg_archivecleanup.c
index c25348bcb85..ab686b4748c 100644
--- a/src/bin/pg_archivecleanup/pg_archivecleanup.c
+++ b/src/bin/pg_archivecleanup/pg_archivecleanup.c
@@ -375,6 +375,10 @@ main(int argc, char **argv)
 		exit(2);
 	}
 
+	if (dryrun)
+		pg_log_info("Executing in dry-run mode.\n"
+					"No files will be removed.");
+
 	/*
 	 * Check archive exists and other initialization if required.
 	 */
diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c
index df41836e70f..cc4be5d6ef4 100644
--- a/src/bin/pg_basebackup/pg_createsubscriber.c
+++ b/src/bin/pg_basebackup/pg_createsubscriber.c
@@ -2305,6 +2305,11 @@ main(int argc, char **argv)
 		pg_log_error_hint("Try \"%s --help\" for more information.", progname);
 		exit(1);
 	}
+
+	if (dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
 	pg_log_info("validating publisher connection string");
 	pub_base_conninfo = get_base_conninfo(opt.pub_conninfo_str,
 										  &dbname_conninfo);
diff --git a/src/bin/pg_combinebackup/pg_combinebackup.c b/src/bin/pg_combinebackup/pg_combinebackup.c
index 3a325127209..c9bf0a9e105 100644
--- a/src/bin/pg_combinebackup/pg_combinebackup.c
+++ b/src/bin/pg_combinebackup/pg_combinebackup.c
@@ -242,6 +242,10 @@ main(int argc, char *argv[])
 	if (opt.no_manifest)
 		opt.manifest_checksums = CHECKSUM_TYPE_NONE;
 
+	if (opt.dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
 	/* Check that the platform supports the requested copy method. */
 	if (opt.copy_method == COPY_METHOD_CLONE)
 	{
diff --git a/src/bin/pg_resetwal/pg_resetwal.c b/src/bin/pg_resetwal/pg_resetwal.c
index a89d72fc5cf..dd5d279521e 100644
--- a/src/bin/pg_resetwal/pg_resetwal.c
+++ b/src/bin/pg_resetwal/pg_resetwal.c
@@ -397,6 +397,10 @@ main(int argc, char *argv[])
 		exit(1);
 	}
 
+	if (noupdate)
+		pg_log_info("Executing in dry-run mode.\n"
+					"Nothing will be modified.");
+
 	/*
 	 * Attempt to read the existing pg_control file
 	 */
diff --git a/src/bin/pg_rewind/pg_rewind.c b/src/bin/pg_rewind/pg_rewind.c
index 27c514f934a..e9364d04f76 100644
--- a/src/bin/pg_rewind/pg_rewind.c
+++ b/src/bin/pg_rewind/pg_rewind.c
@@ -300,10 +300,12 @@ main(int argc, char **argv)
 
 	atexit(disconnect_atexit);
 
-	/*
-	 * Ok, we have all the options and we're ready to start. First, connect to
-	 * remote server.
-	 */
+	/* Ok, we have all the options and we're ready to start. */
+	if (dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
+	/* First, connect to remote server. */
 	if (connstr_source)
 	{
 		conn = PQconnectdb(connstr_source);
-- 
2.47.3


--ibfr3ah5qy6tcbhw--





^ permalink  raw  reply  [nested|flat] 126+ messages in thread

* [PATCH v5] Log a note at program start when running in dry-run mode
@ 2025-11-11 08:54 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 126+ messages in thread

From: Álvaro Herrera @ 2025-11-11 08:54 UTC (permalink / raw)

Users might get some peace of mind knowing their data is not being
destroyed or whatever.

Author: Peter Smith <[email protected]>
Reviewed-by: Álvaro Herrera <[email protected]>
Discussion: https://postgr.es/m/CAHut+PsvQJQnQO0KT0S2oegenkvJ8FUuY-QS5syyqmT24R2xFQ@mail.gmail.com
---
 src/bin/pg_archivecleanup/pg_archivecleanup.c |  4 ++++
 src/bin/pg_basebackup/pg_createsubscriber.c   |  5 +++++
 src/bin/pg_combinebackup/pg_combinebackup.c   |  4 ++++
 src/bin/pg_resetwal/pg_resetwal.c             |  4 ++++
 src/bin/pg_rewind/pg_rewind.c                 | 10 ++++++----
 5 files changed, 23 insertions(+), 4 deletions(-)

diff --git a/src/bin/pg_archivecleanup/pg_archivecleanup.c b/src/bin/pg_archivecleanup/pg_archivecleanup.c
index c25348bcb85..ab686b4748c 100644
--- a/src/bin/pg_archivecleanup/pg_archivecleanup.c
+++ b/src/bin/pg_archivecleanup/pg_archivecleanup.c
@@ -375,6 +375,10 @@ main(int argc, char **argv)
 		exit(2);
 	}
 
+	if (dryrun)
+		pg_log_info("Executing in dry-run mode.\n"
+					"No files will be removed.");
+
 	/*
 	 * Check archive exists and other initialization if required.
 	 */
diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c
index df41836e70f..cc4be5d6ef4 100644
--- a/src/bin/pg_basebackup/pg_createsubscriber.c
+++ b/src/bin/pg_basebackup/pg_createsubscriber.c
@@ -2305,6 +2305,11 @@ main(int argc, char **argv)
 		pg_log_error_hint("Try \"%s --help\" for more information.", progname);
 		exit(1);
 	}
+
+	if (dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
 	pg_log_info("validating publisher connection string");
 	pub_base_conninfo = get_base_conninfo(opt.pub_conninfo_str,
 										  &dbname_conninfo);
diff --git a/src/bin/pg_combinebackup/pg_combinebackup.c b/src/bin/pg_combinebackup/pg_combinebackup.c
index 3a325127209..c9bf0a9e105 100644
--- a/src/bin/pg_combinebackup/pg_combinebackup.c
+++ b/src/bin/pg_combinebackup/pg_combinebackup.c
@@ -242,6 +242,10 @@ main(int argc, char *argv[])
 	if (opt.no_manifest)
 		opt.manifest_checksums = CHECKSUM_TYPE_NONE;
 
+	if (opt.dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
 	/* Check that the platform supports the requested copy method. */
 	if (opt.copy_method == COPY_METHOD_CLONE)
 	{
diff --git a/src/bin/pg_resetwal/pg_resetwal.c b/src/bin/pg_resetwal/pg_resetwal.c
index a89d72fc5cf..dd5d279521e 100644
--- a/src/bin/pg_resetwal/pg_resetwal.c
+++ b/src/bin/pg_resetwal/pg_resetwal.c
@@ -397,6 +397,10 @@ main(int argc, char *argv[])
 		exit(1);
 	}
 
+	if (noupdate)
+		pg_log_info("Executing in dry-run mode.\n"
+					"Nothing will be modified.");
+
 	/*
 	 * Attempt to read the existing pg_control file
 	 */
diff --git a/src/bin/pg_rewind/pg_rewind.c b/src/bin/pg_rewind/pg_rewind.c
index 27c514f934a..e9364d04f76 100644
--- a/src/bin/pg_rewind/pg_rewind.c
+++ b/src/bin/pg_rewind/pg_rewind.c
@@ -300,10 +300,12 @@ main(int argc, char **argv)
 
 	atexit(disconnect_atexit);
 
-	/*
-	 * Ok, we have all the options and we're ready to start. First, connect to
-	 * remote server.
-	 */
+	/* Ok, we have all the options and we're ready to start. */
+	if (dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
+	/* First, connect to remote server. */
 	if (connstr_source)
 	{
 		conn = PQconnectdb(connstr_source);
-- 
2.47.3


--ibfr3ah5qy6tcbhw--





^ permalink  raw  reply  [nested|flat] 126+ messages in thread

* [PATCH v5] Log a note at program start when running in dry-run mode
@ 2025-11-11 08:54 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 126+ messages in thread

From: Álvaro Herrera @ 2025-11-11 08:54 UTC (permalink / raw)

Users might get some peace of mind knowing their data is not being
destroyed or whatever.

Author: Peter Smith <[email protected]>
Reviewed-by: Álvaro Herrera <[email protected]>
Discussion: https://postgr.es/m/CAHut+PsvQJQnQO0KT0S2oegenkvJ8FUuY-QS5syyqmT24R2xFQ@mail.gmail.com
---
 src/bin/pg_archivecleanup/pg_archivecleanup.c |  4 ++++
 src/bin/pg_basebackup/pg_createsubscriber.c   |  5 +++++
 src/bin/pg_combinebackup/pg_combinebackup.c   |  4 ++++
 src/bin/pg_resetwal/pg_resetwal.c             |  4 ++++
 src/bin/pg_rewind/pg_rewind.c                 | 10 ++++++----
 5 files changed, 23 insertions(+), 4 deletions(-)

diff --git a/src/bin/pg_archivecleanup/pg_archivecleanup.c b/src/bin/pg_archivecleanup/pg_archivecleanup.c
index c25348bcb85..ab686b4748c 100644
--- a/src/bin/pg_archivecleanup/pg_archivecleanup.c
+++ b/src/bin/pg_archivecleanup/pg_archivecleanup.c
@@ -375,6 +375,10 @@ main(int argc, char **argv)
 		exit(2);
 	}
 
+	if (dryrun)
+		pg_log_info("Executing in dry-run mode.\n"
+					"No files will be removed.");
+
 	/*
 	 * Check archive exists and other initialization if required.
 	 */
diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c
index df41836e70f..cc4be5d6ef4 100644
--- a/src/bin/pg_basebackup/pg_createsubscriber.c
+++ b/src/bin/pg_basebackup/pg_createsubscriber.c
@@ -2305,6 +2305,11 @@ main(int argc, char **argv)
 		pg_log_error_hint("Try \"%s --help\" for more information.", progname);
 		exit(1);
 	}
+
+	if (dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
 	pg_log_info("validating publisher connection string");
 	pub_base_conninfo = get_base_conninfo(opt.pub_conninfo_str,
 										  &dbname_conninfo);
diff --git a/src/bin/pg_combinebackup/pg_combinebackup.c b/src/bin/pg_combinebackup/pg_combinebackup.c
index 3a325127209..c9bf0a9e105 100644
--- a/src/bin/pg_combinebackup/pg_combinebackup.c
+++ b/src/bin/pg_combinebackup/pg_combinebackup.c
@@ -242,6 +242,10 @@ main(int argc, char *argv[])
 	if (opt.no_manifest)
 		opt.manifest_checksums = CHECKSUM_TYPE_NONE;
 
+	if (opt.dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
 	/* Check that the platform supports the requested copy method. */
 	if (opt.copy_method == COPY_METHOD_CLONE)
 	{
diff --git a/src/bin/pg_resetwal/pg_resetwal.c b/src/bin/pg_resetwal/pg_resetwal.c
index a89d72fc5cf..dd5d279521e 100644
--- a/src/bin/pg_resetwal/pg_resetwal.c
+++ b/src/bin/pg_resetwal/pg_resetwal.c
@@ -397,6 +397,10 @@ main(int argc, char *argv[])
 		exit(1);
 	}
 
+	if (noupdate)
+		pg_log_info("Executing in dry-run mode.\n"
+					"Nothing will be modified.");
+
 	/*
 	 * Attempt to read the existing pg_control file
 	 */
diff --git a/src/bin/pg_rewind/pg_rewind.c b/src/bin/pg_rewind/pg_rewind.c
index 27c514f934a..e9364d04f76 100644
--- a/src/bin/pg_rewind/pg_rewind.c
+++ b/src/bin/pg_rewind/pg_rewind.c
@@ -300,10 +300,12 @@ main(int argc, char **argv)
 
 	atexit(disconnect_atexit);
 
-	/*
-	 * Ok, we have all the options and we're ready to start. First, connect to
-	 * remote server.
-	 */
+	/* Ok, we have all the options and we're ready to start. */
+	if (dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
+	/* First, connect to remote server. */
 	if (connstr_source)
 	{
 		conn = PQconnectdb(connstr_source);
-- 
2.47.3


--ibfr3ah5qy6tcbhw--





^ permalink  raw  reply  [nested|flat] 126+ messages in thread

* [PATCH v5] Log a note at program start when running in dry-run mode
@ 2025-11-11 08:54 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 126+ messages in thread

From: Álvaro Herrera @ 2025-11-11 08:54 UTC (permalink / raw)

Users might get some peace of mind knowing their data is not being
destroyed or whatever.

Author: Peter Smith <[email protected]>
Reviewed-by: Álvaro Herrera <[email protected]>
Discussion: https://postgr.es/m/CAHut+PsvQJQnQO0KT0S2oegenkvJ8FUuY-QS5syyqmT24R2xFQ@mail.gmail.com
---
 src/bin/pg_archivecleanup/pg_archivecleanup.c |  4 ++++
 src/bin/pg_basebackup/pg_createsubscriber.c   |  5 +++++
 src/bin/pg_combinebackup/pg_combinebackup.c   |  4 ++++
 src/bin/pg_resetwal/pg_resetwal.c             |  4 ++++
 src/bin/pg_rewind/pg_rewind.c                 | 10 ++++++----
 5 files changed, 23 insertions(+), 4 deletions(-)

diff --git a/src/bin/pg_archivecleanup/pg_archivecleanup.c b/src/bin/pg_archivecleanup/pg_archivecleanup.c
index c25348bcb85..ab686b4748c 100644
--- a/src/bin/pg_archivecleanup/pg_archivecleanup.c
+++ b/src/bin/pg_archivecleanup/pg_archivecleanup.c
@@ -375,6 +375,10 @@ main(int argc, char **argv)
 		exit(2);
 	}
 
+	if (dryrun)
+		pg_log_info("Executing in dry-run mode.\n"
+					"No files will be removed.");
+
 	/*
 	 * Check archive exists and other initialization if required.
 	 */
diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c
index df41836e70f..cc4be5d6ef4 100644
--- a/src/bin/pg_basebackup/pg_createsubscriber.c
+++ b/src/bin/pg_basebackup/pg_createsubscriber.c
@@ -2305,6 +2305,11 @@ main(int argc, char **argv)
 		pg_log_error_hint("Try \"%s --help\" for more information.", progname);
 		exit(1);
 	}
+
+	if (dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
 	pg_log_info("validating publisher connection string");
 	pub_base_conninfo = get_base_conninfo(opt.pub_conninfo_str,
 										  &dbname_conninfo);
diff --git a/src/bin/pg_combinebackup/pg_combinebackup.c b/src/bin/pg_combinebackup/pg_combinebackup.c
index 3a325127209..c9bf0a9e105 100644
--- a/src/bin/pg_combinebackup/pg_combinebackup.c
+++ b/src/bin/pg_combinebackup/pg_combinebackup.c
@@ -242,6 +242,10 @@ main(int argc, char *argv[])
 	if (opt.no_manifest)
 		opt.manifest_checksums = CHECKSUM_TYPE_NONE;
 
+	if (opt.dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
 	/* Check that the platform supports the requested copy method. */
 	if (opt.copy_method == COPY_METHOD_CLONE)
 	{
diff --git a/src/bin/pg_resetwal/pg_resetwal.c b/src/bin/pg_resetwal/pg_resetwal.c
index a89d72fc5cf..dd5d279521e 100644
--- a/src/bin/pg_resetwal/pg_resetwal.c
+++ b/src/bin/pg_resetwal/pg_resetwal.c
@@ -397,6 +397,10 @@ main(int argc, char *argv[])
 		exit(1);
 	}
 
+	if (noupdate)
+		pg_log_info("Executing in dry-run mode.\n"
+					"Nothing will be modified.");
+
 	/*
 	 * Attempt to read the existing pg_control file
 	 */
diff --git a/src/bin/pg_rewind/pg_rewind.c b/src/bin/pg_rewind/pg_rewind.c
index 27c514f934a..e9364d04f76 100644
--- a/src/bin/pg_rewind/pg_rewind.c
+++ b/src/bin/pg_rewind/pg_rewind.c
@@ -300,10 +300,12 @@ main(int argc, char **argv)
 
 	atexit(disconnect_atexit);
 
-	/*
-	 * Ok, we have all the options and we're ready to start. First, connect to
-	 * remote server.
-	 */
+	/* Ok, we have all the options and we're ready to start. */
+	if (dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
+	/* First, connect to remote server. */
 	if (connstr_source)
 	{
 		conn = PQconnectdb(connstr_source);
-- 
2.47.3


--ibfr3ah5qy6tcbhw--





^ permalink  raw  reply  [nested|flat] 126+ messages in thread

* [PATCH v5] Log a note at program start when running in dry-run mode
@ 2025-11-11 08:54 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 126+ messages in thread

From: Álvaro Herrera @ 2025-11-11 08:54 UTC (permalink / raw)

Users might get some peace of mind knowing their data is not being
destroyed or whatever.

Author: Peter Smith <[email protected]>
Reviewed-by: Álvaro Herrera <[email protected]>
Discussion: https://postgr.es/m/CAHut+PsvQJQnQO0KT0S2oegenkvJ8FUuY-QS5syyqmT24R2xFQ@mail.gmail.com
---
 src/bin/pg_archivecleanup/pg_archivecleanup.c |  4 ++++
 src/bin/pg_basebackup/pg_createsubscriber.c   |  5 +++++
 src/bin/pg_combinebackup/pg_combinebackup.c   |  4 ++++
 src/bin/pg_resetwal/pg_resetwal.c             |  4 ++++
 src/bin/pg_rewind/pg_rewind.c                 | 10 ++++++----
 5 files changed, 23 insertions(+), 4 deletions(-)

diff --git a/src/bin/pg_archivecleanup/pg_archivecleanup.c b/src/bin/pg_archivecleanup/pg_archivecleanup.c
index c25348bcb85..ab686b4748c 100644
--- a/src/bin/pg_archivecleanup/pg_archivecleanup.c
+++ b/src/bin/pg_archivecleanup/pg_archivecleanup.c
@@ -375,6 +375,10 @@ main(int argc, char **argv)
 		exit(2);
 	}
 
+	if (dryrun)
+		pg_log_info("Executing in dry-run mode.\n"
+					"No files will be removed.");
+
 	/*
 	 * Check archive exists and other initialization if required.
 	 */
diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c
index df41836e70f..cc4be5d6ef4 100644
--- a/src/bin/pg_basebackup/pg_createsubscriber.c
+++ b/src/bin/pg_basebackup/pg_createsubscriber.c
@@ -2305,6 +2305,11 @@ main(int argc, char **argv)
 		pg_log_error_hint("Try \"%s --help\" for more information.", progname);
 		exit(1);
 	}
+
+	if (dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
 	pg_log_info("validating publisher connection string");
 	pub_base_conninfo = get_base_conninfo(opt.pub_conninfo_str,
 										  &dbname_conninfo);
diff --git a/src/bin/pg_combinebackup/pg_combinebackup.c b/src/bin/pg_combinebackup/pg_combinebackup.c
index 3a325127209..c9bf0a9e105 100644
--- a/src/bin/pg_combinebackup/pg_combinebackup.c
+++ b/src/bin/pg_combinebackup/pg_combinebackup.c
@@ -242,6 +242,10 @@ main(int argc, char *argv[])
 	if (opt.no_manifest)
 		opt.manifest_checksums = CHECKSUM_TYPE_NONE;
 
+	if (opt.dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
 	/* Check that the platform supports the requested copy method. */
 	if (opt.copy_method == COPY_METHOD_CLONE)
 	{
diff --git a/src/bin/pg_resetwal/pg_resetwal.c b/src/bin/pg_resetwal/pg_resetwal.c
index a89d72fc5cf..dd5d279521e 100644
--- a/src/bin/pg_resetwal/pg_resetwal.c
+++ b/src/bin/pg_resetwal/pg_resetwal.c
@@ -397,6 +397,10 @@ main(int argc, char *argv[])
 		exit(1);
 	}
 
+	if (noupdate)
+		pg_log_info("Executing in dry-run mode.\n"
+					"Nothing will be modified.");
+
 	/*
 	 * Attempt to read the existing pg_control file
 	 */
diff --git a/src/bin/pg_rewind/pg_rewind.c b/src/bin/pg_rewind/pg_rewind.c
index 27c514f934a..e9364d04f76 100644
--- a/src/bin/pg_rewind/pg_rewind.c
+++ b/src/bin/pg_rewind/pg_rewind.c
@@ -300,10 +300,12 @@ main(int argc, char **argv)
 
 	atexit(disconnect_atexit);
 
-	/*
-	 * Ok, we have all the options and we're ready to start. First, connect to
-	 * remote server.
-	 */
+	/* Ok, we have all the options and we're ready to start. */
+	if (dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
+	/* First, connect to remote server. */
 	if (connstr_source)
 	{
 		conn = PQconnectdb(connstr_source);
-- 
2.47.3


--ibfr3ah5qy6tcbhw--





^ permalink  raw  reply  [nested|flat] 126+ messages in thread

* [PATCH v5] Log a note at program start when running in dry-run mode
@ 2025-11-11 08:54 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 126+ messages in thread

From: Álvaro Herrera @ 2025-11-11 08:54 UTC (permalink / raw)

Users might get some peace of mind knowing their data is not being
destroyed or whatever.

Author: Peter Smith <[email protected]>
Reviewed-by: Álvaro Herrera <[email protected]>
Discussion: https://postgr.es/m/CAHut+PsvQJQnQO0KT0S2oegenkvJ8FUuY-QS5syyqmT24R2xFQ@mail.gmail.com
---
 src/bin/pg_archivecleanup/pg_archivecleanup.c |  4 ++++
 src/bin/pg_basebackup/pg_createsubscriber.c   |  5 +++++
 src/bin/pg_combinebackup/pg_combinebackup.c   |  4 ++++
 src/bin/pg_resetwal/pg_resetwal.c             |  4 ++++
 src/bin/pg_rewind/pg_rewind.c                 | 10 ++++++----
 5 files changed, 23 insertions(+), 4 deletions(-)

diff --git a/src/bin/pg_archivecleanup/pg_archivecleanup.c b/src/bin/pg_archivecleanup/pg_archivecleanup.c
index c25348bcb85..ab686b4748c 100644
--- a/src/bin/pg_archivecleanup/pg_archivecleanup.c
+++ b/src/bin/pg_archivecleanup/pg_archivecleanup.c
@@ -375,6 +375,10 @@ main(int argc, char **argv)
 		exit(2);
 	}
 
+	if (dryrun)
+		pg_log_info("Executing in dry-run mode.\n"
+					"No files will be removed.");
+
 	/*
 	 * Check archive exists and other initialization if required.
 	 */
diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c
index df41836e70f..cc4be5d6ef4 100644
--- a/src/bin/pg_basebackup/pg_createsubscriber.c
+++ b/src/bin/pg_basebackup/pg_createsubscriber.c
@@ -2305,6 +2305,11 @@ main(int argc, char **argv)
 		pg_log_error_hint("Try \"%s --help\" for more information.", progname);
 		exit(1);
 	}
+
+	if (dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
 	pg_log_info("validating publisher connection string");
 	pub_base_conninfo = get_base_conninfo(opt.pub_conninfo_str,
 										  &dbname_conninfo);
diff --git a/src/bin/pg_combinebackup/pg_combinebackup.c b/src/bin/pg_combinebackup/pg_combinebackup.c
index 3a325127209..c9bf0a9e105 100644
--- a/src/bin/pg_combinebackup/pg_combinebackup.c
+++ b/src/bin/pg_combinebackup/pg_combinebackup.c
@@ -242,6 +242,10 @@ main(int argc, char *argv[])
 	if (opt.no_manifest)
 		opt.manifest_checksums = CHECKSUM_TYPE_NONE;
 
+	if (opt.dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
 	/* Check that the platform supports the requested copy method. */
 	if (opt.copy_method == COPY_METHOD_CLONE)
 	{
diff --git a/src/bin/pg_resetwal/pg_resetwal.c b/src/bin/pg_resetwal/pg_resetwal.c
index a89d72fc5cf..dd5d279521e 100644
--- a/src/bin/pg_resetwal/pg_resetwal.c
+++ b/src/bin/pg_resetwal/pg_resetwal.c
@@ -397,6 +397,10 @@ main(int argc, char *argv[])
 		exit(1);
 	}
 
+	if (noupdate)
+		pg_log_info("Executing in dry-run mode.\n"
+					"Nothing will be modified.");
+
 	/*
 	 * Attempt to read the existing pg_control file
 	 */
diff --git a/src/bin/pg_rewind/pg_rewind.c b/src/bin/pg_rewind/pg_rewind.c
index 27c514f934a..e9364d04f76 100644
--- a/src/bin/pg_rewind/pg_rewind.c
+++ b/src/bin/pg_rewind/pg_rewind.c
@@ -300,10 +300,12 @@ main(int argc, char **argv)
 
 	atexit(disconnect_atexit);
 
-	/*
-	 * Ok, we have all the options and we're ready to start. First, connect to
-	 * remote server.
-	 */
+	/* Ok, we have all the options and we're ready to start. */
+	if (dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
+	/* First, connect to remote server. */
 	if (connstr_source)
 	{
 		conn = PQconnectdb(connstr_source);
-- 
2.47.3


--ibfr3ah5qy6tcbhw--





^ permalink  raw  reply  [nested|flat] 126+ messages in thread

* [PATCH v5] Log a note at program start when running in dry-run mode
@ 2025-11-11 08:54 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 126+ messages in thread

From: Álvaro Herrera @ 2025-11-11 08:54 UTC (permalink / raw)

Users might get some peace of mind knowing their data is not being
destroyed or whatever.

Author: Peter Smith <[email protected]>
Reviewed-by: Álvaro Herrera <[email protected]>
Discussion: https://postgr.es/m/CAHut+PsvQJQnQO0KT0S2oegenkvJ8FUuY-QS5syyqmT24R2xFQ@mail.gmail.com
---
 src/bin/pg_archivecleanup/pg_archivecleanup.c |  4 ++++
 src/bin/pg_basebackup/pg_createsubscriber.c   |  5 +++++
 src/bin/pg_combinebackup/pg_combinebackup.c   |  4 ++++
 src/bin/pg_resetwal/pg_resetwal.c             |  4 ++++
 src/bin/pg_rewind/pg_rewind.c                 | 10 ++++++----
 5 files changed, 23 insertions(+), 4 deletions(-)

diff --git a/src/bin/pg_archivecleanup/pg_archivecleanup.c b/src/bin/pg_archivecleanup/pg_archivecleanup.c
index c25348bcb85..ab686b4748c 100644
--- a/src/bin/pg_archivecleanup/pg_archivecleanup.c
+++ b/src/bin/pg_archivecleanup/pg_archivecleanup.c
@@ -375,6 +375,10 @@ main(int argc, char **argv)
 		exit(2);
 	}
 
+	if (dryrun)
+		pg_log_info("Executing in dry-run mode.\n"
+					"No files will be removed.");
+
 	/*
 	 * Check archive exists and other initialization if required.
 	 */
diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c
index df41836e70f..cc4be5d6ef4 100644
--- a/src/bin/pg_basebackup/pg_createsubscriber.c
+++ b/src/bin/pg_basebackup/pg_createsubscriber.c
@@ -2305,6 +2305,11 @@ main(int argc, char **argv)
 		pg_log_error_hint("Try \"%s --help\" for more information.", progname);
 		exit(1);
 	}
+
+	if (dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
 	pg_log_info("validating publisher connection string");
 	pub_base_conninfo = get_base_conninfo(opt.pub_conninfo_str,
 										  &dbname_conninfo);
diff --git a/src/bin/pg_combinebackup/pg_combinebackup.c b/src/bin/pg_combinebackup/pg_combinebackup.c
index 3a325127209..c9bf0a9e105 100644
--- a/src/bin/pg_combinebackup/pg_combinebackup.c
+++ b/src/bin/pg_combinebackup/pg_combinebackup.c
@@ -242,6 +242,10 @@ main(int argc, char *argv[])
 	if (opt.no_manifest)
 		opt.manifest_checksums = CHECKSUM_TYPE_NONE;
 
+	if (opt.dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
 	/* Check that the platform supports the requested copy method. */
 	if (opt.copy_method == COPY_METHOD_CLONE)
 	{
diff --git a/src/bin/pg_resetwal/pg_resetwal.c b/src/bin/pg_resetwal/pg_resetwal.c
index a89d72fc5cf..dd5d279521e 100644
--- a/src/bin/pg_resetwal/pg_resetwal.c
+++ b/src/bin/pg_resetwal/pg_resetwal.c
@@ -397,6 +397,10 @@ main(int argc, char *argv[])
 		exit(1);
 	}
 
+	if (noupdate)
+		pg_log_info("Executing in dry-run mode.\n"
+					"Nothing will be modified.");
+
 	/*
 	 * Attempt to read the existing pg_control file
 	 */
diff --git a/src/bin/pg_rewind/pg_rewind.c b/src/bin/pg_rewind/pg_rewind.c
index 27c514f934a..e9364d04f76 100644
--- a/src/bin/pg_rewind/pg_rewind.c
+++ b/src/bin/pg_rewind/pg_rewind.c
@@ -300,10 +300,12 @@ main(int argc, char **argv)
 
 	atexit(disconnect_atexit);
 
-	/*
-	 * Ok, we have all the options and we're ready to start. First, connect to
-	 * remote server.
-	 */
+	/* Ok, we have all the options and we're ready to start. */
+	if (dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
+	/* First, connect to remote server. */
 	if (connstr_source)
 	{
 		conn = PQconnectdb(connstr_source);
-- 
2.47.3


--ibfr3ah5qy6tcbhw--





^ permalink  raw  reply  [nested|flat] 126+ messages in thread

* [PATCH v5] Log a note at program start when running in dry-run mode
@ 2025-11-11 08:54 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 126+ messages in thread

From: Álvaro Herrera @ 2025-11-11 08:54 UTC (permalink / raw)

Users might get some peace of mind knowing their data is not being
destroyed or whatever.

Author: Peter Smith <[email protected]>
Reviewed-by: Álvaro Herrera <[email protected]>
Discussion: https://postgr.es/m/CAHut+PsvQJQnQO0KT0S2oegenkvJ8FUuY-QS5syyqmT24R2xFQ@mail.gmail.com
---
 src/bin/pg_archivecleanup/pg_archivecleanup.c |  4 ++++
 src/bin/pg_basebackup/pg_createsubscriber.c   |  5 +++++
 src/bin/pg_combinebackup/pg_combinebackup.c   |  4 ++++
 src/bin/pg_resetwal/pg_resetwal.c             |  4 ++++
 src/bin/pg_rewind/pg_rewind.c                 | 10 ++++++----
 5 files changed, 23 insertions(+), 4 deletions(-)

diff --git a/src/bin/pg_archivecleanup/pg_archivecleanup.c b/src/bin/pg_archivecleanup/pg_archivecleanup.c
index c25348bcb85..ab686b4748c 100644
--- a/src/bin/pg_archivecleanup/pg_archivecleanup.c
+++ b/src/bin/pg_archivecleanup/pg_archivecleanup.c
@@ -375,6 +375,10 @@ main(int argc, char **argv)
 		exit(2);
 	}
 
+	if (dryrun)
+		pg_log_info("Executing in dry-run mode.\n"
+					"No files will be removed.");
+
 	/*
 	 * Check archive exists and other initialization if required.
 	 */
diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c
index df41836e70f..cc4be5d6ef4 100644
--- a/src/bin/pg_basebackup/pg_createsubscriber.c
+++ b/src/bin/pg_basebackup/pg_createsubscriber.c
@@ -2305,6 +2305,11 @@ main(int argc, char **argv)
 		pg_log_error_hint("Try \"%s --help\" for more information.", progname);
 		exit(1);
 	}
+
+	if (dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
 	pg_log_info("validating publisher connection string");
 	pub_base_conninfo = get_base_conninfo(opt.pub_conninfo_str,
 										  &dbname_conninfo);
diff --git a/src/bin/pg_combinebackup/pg_combinebackup.c b/src/bin/pg_combinebackup/pg_combinebackup.c
index 3a325127209..c9bf0a9e105 100644
--- a/src/bin/pg_combinebackup/pg_combinebackup.c
+++ b/src/bin/pg_combinebackup/pg_combinebackup.c
@@ -242,6 +242,10 @@ main(int argc, char *argv[])
 	if (opt.no_manifest)
 		opt.manifest_checksums = CHECKSUM_TYPE_NONE;
 
+	if (opt.dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
 	/* Check that the platform supports the requested copy method. */
 	if (opt.copy_method == COPY_METHOD_CLONE)
 	{
diff --git a/src/bin/pg_resetwal/pg_resetwal.c b/src/bin/pg_resetwal/pg_resetwal.c
index a89d72fc5cf..dd5d279521e 100644
--- a/src/bin/pg_resetwal/pg_resetwal.c
+++ b/src/bin/pg_resetwal/pg_resetwal.c
@@ -397,6 +397,10 @@ main(int argc, char *argv[])
 		exit(1);
 	}
 
+	if (noupdate)
+		pg_log_info("Executing in dry-run mode.\n"
+					"Nothing will be modified.");
+
 	/*
 	 * Attempt to read the existing pg_control file
 	 */
diff --git a/src/bin/pg_rewind/pg_rewind.c b/src/bin/pg_rewind/pg_rewind.c
index 27c514f934a..e9364d04f76 100644
--- a/src/bin/pg_rewind/pg_rewind.c
+++ b/src/bin/pg_rewind/pg_rewind.c
@@ -300,10 +300,12 @@ main(int argc, char **argv)
 
 	atexit(disconnect_atexit);
 
-	/*
-	 * Ok, we have all the options and we're ready to start. First, connect to
-	 * remote server.
-	 */
+	/* Ok, we have all the options and we're ready to start. */
+	if (dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
+	/* First, connect to remote server. */
 	if (connstr_source)
 	{
 		conn = PQconnectdb(connstr_source);
-- 
2.47.3


--ibfr3ah5qy6tcbhw--





^ permalink  raw  reply  [nested|flat] 126+ messages in thread

* [PATCH v5] Log a note at program start when running in dry-run mode
@ 2025-11-11 08:54 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 126+ messages in thread

From: Álvaro Herrera @ 2025-11-11 08:54 UTC (permalink / raw)

Users might get some peace of mind knowing their data is not being
destroyed or whatever.

Author: Peter Smith <[email protected]>
Reviewed-by: Álvaro Herrera <[email protected]>
Discussion: https://postgr.es/m/CAHut+PsvQJQnQO0KT0S2oegenkvJ8FUuY-QS5syyqmT24R2xFQ@mail.gmail.com
---
 src/bin/pg_archivecleanup/pg_archivecleanup.c |  4 ++++
 src/bin/pg_basebackup/pg_createsubscriber.c   |  5 +++++
 src/bin/pg_combinebackup/pg_combinebackup.c   |  4 ++++
 src/bin/pg_resetwal/pg_resetwal.c             |  4 ++++
 src/bin/pg_rewind/pg_rewind.c                 | 10 ++++++----
 5 files changed, 23 insertions(+), 4 deletions(-)

diff --git a/src/bin/pg_archivecleanup/pg_archivecleanup.c b/src/bin/pg_archivecleanup/pg_archivecleanup.c
index c25348bcb85..ab686b4748c 100644
--- a/src/bin/pg_archivecleanup/pg_archivecleanup.c
+++ b/src/bin/pg_archivecleanup/pg_archivecleanup.c
@@ -375,6 +375,10 @@ main(int argc, char **argv)
 		exit(2);
 	}
 
+	if (dryrun)
+		pg_log_info("Executing in dry-run mode.\n"
+					"No files will be removed.");
+
 	/*
 	 * Check archive exists and other initialization if required.
 	 */
diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c
index df41836e70f..cc4be5d6ef4 100644
--- a/src/bin/pg_basebackup/pg_createsubscriber.c
+++ b/src/bin/pg_basebackup/pg_createsubscriber.c
@@ -2305,6 +2305,11 @@ main(int argc, char **argv)
 		pg_log_error_hint("Try \"%s --help\" for more information.", progname);
 		exit(1);
 	}
+
+	if (dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
 	pg_log_info("validating publisher connection string");
 	pub_base_conninfo = get_base_conninfo(opt.pub_conninfo_str,
 										  &dbname_conninfo);
diff --git a/src/bin/pg_combinebackup/pg_combinebackup.c b/src/bin/pg_combinebackup/pg_combinebackup.c
index 3a325127209..c9bf0a9e105 100644
--- a/src/bin/pg_combinebackup/pg_combinebackup.c
+++ b/src/bin/pg_combinebackup/pg_combinebackup.c
@@ -242,6 +242,10 @@ main(int argc, char *argv[])
 	if (opt.no_manifest)
 		opt.manifest_checksums = CHECKSUM_TYPE_NONE;
 
+	if (opt.dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
 	/* Check that the platform supports the requested copy method. */
 	if (opt.copy_method == COPY_METHOD_CLONE)
 	{
diff --git a/src/bin/pg_resetwal/pg_resetwal.c b/src/bin/pg_resetwal/pg_resetwal.c
index a89d72fc5cf..dd5d279521e 100644
--- a/src/bin/pg_resetwal/pg_resetwal.c
+++ b/src/bin/pg_resetwal/pg_resetwal.c
@@ -397,6 +397,10 @@ main(int argc, char *argv[])
 		exit(1);
 	}
 
+	if (noupdate)
+		pg_log_info("Executing in dry-run mode.\n"
+					"Nothing will be modified.");
+
 	/*
 	 * Attempt to read the existing pg_control file
 	 */
diff --git a/src/bin/pg_rewind/pg_rewind.c b/src/bin/pg_rewind/pg_rewind.c
index 27c514f934a..e9364d04f76 100644
--- a/src/bin/pg_rewind/pg_rewind.c
+++ b/src/bin/pg_rewind/pg_rewind.c
@@ -300,10 +300,12 @@ main(int argc, char **argv)
 
 	atexit(disconnect_atexit);
 
-	/*
-	 * Ok, we have all the options and we're ready to start. First, connect to
-	 * remote server.
-	 */
+	/* Ok, we have all the options and we're ready to start. */
+	if (dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
+	/* First, connect to remote server. */
 	if (connstr_source)
 	{
 		conn = PQconnectdb(connstr_source);
-- 
2.47.3


--ibfr3ah5qy6tcbhw--





^ permalink  raw  reply  [nested|flat] 126+ messages in thread

* [PATCH v5] Log a note at program start when running in dry-run mode
@ 2025-11-11 08:54 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 126+ messages in thread

From: Álvaro Herrera @ 2025-11-11 08:54 UTC (permalink / raw)

Users might get some peace of mind knowing their data is not being
destroyed or whatever.

Author: Peter Smith <[email protected]>
Reviewed-by: Álvaro Herrera <[email protected]>
Discussion: https://postgr.es/m/CAHut+PsvQJQnQO0KT0S2oegenkvJ8FUuY-QS5syyqmT24R2xFQ@mail.gmail.com
---
 src/bin/pg_archivecleanup/pg_archivecleanup.c |  4 ++++
 src/bin/pg_basebackup/pg_createsubscriber.c   |  5 +++++
 src/bin/pg_combinebackup/pg_combinebackup.c   |  4 ++++
 src/bin/pg_resetwal/pg_resetwal.c             |  4 ++++
 src/bin/pg_rewind/pg_rewind.c                 | 10 ++++++----
 5 files changed, 23 insertions(+), 4 deletions(-)

diff --git a/src/bin/pg_archivecleanup/pg_archivecleanup.c b/src/bin/pg_archivecleanup/pg_archivecleanup.c
index c25348bcb85..ab686b4748c 100644
--- a/src/bin/pg_archivecleanup/pg_archivecleanup.c
+++ b/src/bin/pg_archivecleanup/pg_archivecleanup.c
@@ -375,6 +375,10 @@ main(int argc, char **argv)
 		exit(2);
 	}
 
+	if (dryrun)
+		pg_log_info("Executing in dry-run mode.\n"
+					"No files will be removed.");
+
 	/*
 	 * Check archive exists and other initialization if required.
 	 */
diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c
index df41836e70f..cc4be5d6ef4 100644
--- a/src/bin/pg_basebackup/pg_createsubscriber.c
+++ b/src/bin/pg_basebackup/pg_createsubscriber.c
@@ -2305,6 +2305,11 @@ main(int argc, char **argv)
 		pg_log_error_hint("Try \"%s --help\" for more information.", progname);
 		exit(1);
 	}
+
+	if (dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
 	pg_log_info("validating publisher connection string");
 	pub_base_conninfo = get_base_conninfo(opt.pub_conninfo_str,
 										  &dbname_conninfo);
diff --git a/src/bin/pg_combinebackup/pg_combinebackup.c b/src/bin/pg_combinebackup/pg_combinebackup.c
index 3a325127209..c9bf0a9e105 100644
--- a/src/bin/pg_combinebackup/pg_combinebackup.c
+++ b/src/bin/pg_combinebackup/pg_combinebackup.c
@@ -242,6 +242,10 @@ main(int argc, char *argv[])
 	if (opt.no_manifest)
 		opt.manifest_checksums = CHECKSUM_TYPE_NONE;
 
+	if (opt.dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
 	/* Check that the platform supports the requested copy method. */
 	if (opt.copy_method == COPY_METHOD_CLONE)
 	{
diff --git a/src/bin/pg_resetwal/pg_resetwal.c b/src/bin/pg_resetwal/pg_resetwal.c
index a89d72fc5cf..dd5d279521e 100644
--- a/src/bin/pg_resetwal/pg_resetwal.c
+++ b/src/bin/pg_resetwal/pg_resetwal.c
@@ -397,6 +397,10 @@ main(int argc, char *argv[])
 		exit(1);
 	}
 
+	if (noupdate)
+		pg_log_info("Executing in dry-run mode.\n"
+					"Nothing will be modified.");
+
 	/*
 	 * Attempt to read the existing pg_control file
 	 */
diff --git a/src/bin/pg_rewind/pg_rewind.c b/src/bin/pg_rewind/pg_rewind.c
index 27c514f934a..e9364d04f76 100644
--- a/src/bin/pg_rewind/pg_rewind.c
+++ b/src/bin/pg_rewind/pg_rewind.c
@@ -300,10 +300,12 @@ main(int argc, char **argv)
 
 	atexit(disconnect_atexit);
 
-	/*
-	 * Ok, we have all the options and we're ready to start. First, connect to
-	 * remote server.
-	 */
+	/* Ok, we have all the options and we're ready to start. */
+	if (dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
+	/* First, connect to remote server. */
 	if (connstr_source)
 	{
 		conn = PQconnectdb(connstr_source);
-- 
2.47.3


--ibfr3ah5qy6tcbhw--





^ permalink  raw  reply  [nested|flat] 126+ messages in thread

* [PATCH v5] Log a note at program start when running in dry-run mode
@ 2025-11-11 08:54 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 126+ messages in thread

From: Álvaro Herrera @ 2025-11-11 08:54 UTC (permalink / raw)

Users might get some peace of mind knowing their data is not being
destroyed or whatever.

Author: Peter Smith <[email protected]>
Reviewed-by: Álvaro Herrera <[email protected]>
Discussion: https://postgr.es/m/CAHut+PsvQJQnQO0KT0S2oegenkvJ8FUuY-QS5syyqmT24R2xFQ@mail.gmail.com
---
 src/bin/pg_archivecleanup/pg_archivecleanup.c |  4 ++++
 src/bin/pg_basebackup/pg_createsubscriber.c   |  5 +++++
 src/bin/pg_combinebackup/pg_combinebackup.c   |  4 ++++
 src/bin/pg_resetwal/pg_resetwal.c             |  4 ++++
 src/bin/pg_rewind/pg_rewind.c                 | 10 ++++++----
 5 files changed, 23 insertions(+), 4 deletions(-)

diff --git a/src/bin/pg_archivecleanup/pg_archivecleanup.c b/src/bin/pg_archivecleanup/pg_archivecleanup.c
index c25348bcb85..ab686b4748c 100644
--- a/src/bin/pg_archivecleanup/pg_archivecleanup.c
+++ b/src/bin/pg_archivecleanup/pg_archivecleanup.c
@@ -375,6 +375,10 @@ main(int argc, char **argv)
 		exit(2);
 	}
 
+	if (dryrun)
+		pg_log_info("Executing in dry-run mode.\n"
+					"No files will be removed.");
+
 	/*
 	 * Check archive exists and other initialization if required.
 	 */
diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c
index df41836e70f..cc4be5d6ef4 100644
--- a/src/bin/pg_basebackup/pg_createsubscriber.c
+++ b/src/bin/pg_basebackup/pg_createsubscriber.c
@@ -2305,6 +2305,11 @@ main(int argc, char **argv)
 		pg_log_error_hint("Try \"%s --help\" for more information.", progname);
 		exit(1);
 	}
+
+	if (dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
 	pg_log_info("validating publisher connection string");
 	pub_base_conninfo = get_base_conninfo(opt.pub_conninfo_str,
 										  &dbname_conninfo);
diff --git a/src/bin/pg_combinebackup/pg_combinebackup.c b/src/bin/pg_combinebackup/pg_combinebackup.c
index 3a325127209..c9bf0a9e105 100644
--- a/src/bin/pg_combinebackup/pg_combinebackup.c
+++ b/src/bin/pg_combinebackup/pg_combinebackup.c
@@ -242,6 +242,10 @@ main(int argc, char *argv[])
 	if (opt.no_manifest)
 		opt.manifest_checksums = CHECKSUM_TYPE_NONE;
 
+	if (opt.dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
 	/* Check that the platform supports the requested copy method. */
 	if (opt.copy_method == COPY_METHOD_CLONE)
 	{
diff --git a/src/bin/pg_resetwal/pg_resetwal.c b/src/bin/pg_resetwal/pg_resetwal.c
index a89d72fc5cf..dd5d279521e 100644
--- a/src/bin/pg_resetwal/pg_resetwal.c
+++ b/src/bin/pg_resetwal/pg_resetwal.c
@@ -397,6 +397,10 @@ main(int argc, char *argv[])
 		exit(1);
 	}
 
+	if (noupdate)
+		pg_log_info("Executing in dry-run mode.\n"
+					"Nothing will be modified.");
+
 	/*
 	 * Attempt to read the existing pg_control file
 	 */
diff --git a/src/bin/pg_rewind/pg_rewind.c b/src/bin/pg_rewind/pg_rewind.c
index 27c514f934a..e9364d04f76 100644
--- a/src/bin/pg_rewind/pg_rewind.c
+++ b/src/bin/pg_rewind/pg_rewind.c
@@ -300,10 +300,12 @@ main(int argc, char **argv)
 
 	atexit(disconnect_atexit);
 
-	/*
-	 * Ok, we have all the options and we're ready to start. First, connect to
-	 * remote server.
-	 */
+	/* Ok, we have all the options and we're ready to start. */
+	if (dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
+	/* First, connect to remote server. */
 	if (connstr_source)
 	{
 		conn = PQconnectdb(connstr_source);
-- 
2.47.3


--ibfr3ah5qy6tcbhw--





^ permalink  raw  reply  [nested|flat] 126+ messages in thread

* [PATCH v5] Log a note at program start when running in dry-run mode
@ 2025-11-11 08:54 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 126+ messages in thread

From: Álvaro Herrera @ 2025-11-11 08:54 UTC (permalink / raw)

Users might get some peace of mind knowing their data is not being
destroyed or whatever.

Author: Peter Smith <[email protected]>
Reviewed-by: Álvaro Herrera <[email protected]>
Discussion: https://postgr.es/m/CAHut+PsvQJQnQO0KT0S2oegenkvJ8FUuY-QS5syyqmT24R2xFQ@mail.gmail.com
---
 src/bin/pg_archivecleanup/pg_archivecleanup.c |  4 ++++
 src/bin/pg_basebackup/pg_createsubscriber.c   |  5 +++++
 src/bin/pg_combinebackup/pg_combinebackup.c   |  4 ++++
 src/bin/pg_resetwal/pg_resetwal.c             |  4 ++++
 src/bin/pg_rewind/pg_rewind.c                 | 10 ++++++----
 5 files changed, 23 insertions(+), 4 deletions(-)

diff --git a/src/bin/pg_archivecleanup/pg_archivecleanup.c b/src/bin/pg_archivecleanup/pg_archivecleanup.c
index c25348bcb85..ab686b4748c 100644
--- a/src/bin/pg_archivecleanup/pg_archivecleanup.c
+++ b/src/bin/pg_archivecleanup/pg_archivecleanup.c
@@ -375,6 +375,10 @@ main(int argc, char **argv)
 		exit(2);
 	}
 
+	if (dryrun)
+		pg_log_info("Executing in dry-run mode.\n"
+					"No files will be removed.");
+
 	/*
 	 * Check archive exists and other initialization if required.
 	 */
diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c
index df41836e70f..cc4be5d6ef4 100644
--- a/src/bin/pg_basebackup/pg_createsubscriber.c
+++ b/src/bin/pg_basebackup/pg_createsubscriber.c
@@ -2305,6 +2305,11 @@ main(int argc, char **argv)
 		pg_log_error_hint("Try \"%s --help\" for more information.", progname);
 		exit(1);
 	}
+
+	if (dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
 	pg_log_info("validating publisher connection string");
 	pub_base_conninfo = get_base_conninfo(opt.pub_conninfo_str,
 										  &dbname_conninfo);
diff --git a/src/bin/pg_combinebackup/pg_combinebackup.c b/src/bin/pg_combinebackup/pg_combinebackup.c
index 3a325127209..c9bf0a9e105 100644
--- a/src/bin/pg_combinebackup/pg_combinebackup.c
+++ b/src/bin/pg_combinebackup/pg_combinebackup.c
@@ -242,6 +242,10 @@ main(int argc, char *argv[])
 	if (opt.no_manifest)
 		opt.manifest_checksums = CHECKSUM_TYPE_NONE;
 
+	if (opt.dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
 	/* Check that the platform supports the requested copy method. */
 	if (opt.copy_method == COPY_METHOD_CLONE)
 	{
diff --git a/src/bin/pg_resetwal/pg_resetwal.c b/src/bin/pg_resetwal/pg_resetwal.c
index a89d72fc5cf..dd5d279521e 100644
--- a/src/bin/pg_resetwal/pg_resetwal.c
+++ b/src/bin/pg_resetwal/pg_resetwal.c
@@ -397,6 +397,10 @@ main(int argc, char *argv[])
 		exit(1);
 	}
 
+	if (noupdate)
+		pg_log_info("Executing in dry-run mode.\n"
+					"Nothing will be modified.");
+
 	/*
 	 * Attempt to read the existing pg_control file
 	 */
diff --git a/src/bin/pg_rewind/pg_rewind.c b/src/bin/pg_rewind/pg_rewind.c
index 27c514f934a..e9364d04f76 100644
--- a/src/bin/pg_rewind/pg_rewind.c
+++ b/src/bin/pg_rewind/pg_rewind.c
@@ -300,10 +300,12 @@ main(int argc, char **argv)
 
 	atexit(disconnect_atexit);
 
-	/*
-	 * Ok, we have all the options and we're ready to start. First, connect to
-	 * remote server.
-	 */
+	/* Ok, we have all the options and we're ready to start. */
+	if (dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
+	/* First, connect to remote server. */
 	if (connstr_source)
 	{
 		conn = PQconnectdb(connstr_source);
-- 
2.47.3


--ibfr3ah5qy6tcbhw--





^ permalink  raw  reply  [nested|flat] 126+ messages in thread

* [PATCH v5] Log a note at program start when running in dry-run mode
@ 2025-11-11 08:54 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 126+ messages in thread

From: Álvaro Herrera @ 2025-11-11 08:54 UTC (permalink / raw)

Users might get some peace of mind knowing their data is not being
destroyed or whatever.

Author: Peter Smith <[email protected]>
Reviewed-by: Álvaro Herrera <[email protected]>
Discussion: https://postgr.es/m/CAHut+PsvQJQnQO0KT0S2oegenkvJ8FUuY-QS5syyqmT24R2xFQ@mail.gmail.com
---
 src/bin/pg_archivecleanup/pg_archivecleanup.c |  4 ++++
 src/bin/pg_basebackup/pg_createsubscriber.c   |  5 +++++
 src/bin/pg_combinebackup/pg_combinebackup.c   |  4 ++++
 src/bin/pg_resetwal/pg_resetwal.c             |  4 ++++
 src/bin/pg_rewind/pg_rewind.c                 | 10 ++++++----
 5 files changed, 23 insertions(+), 4 deletions(-)

diff --git a/src/bin/pg_archivecleanup/pg_archivecleanup.c b/src/bin/pg_archivecleanup/pg_archivecleanup.c
index c25348bcb85..ab686b4748c 100644
--- a/src/bin/pg_archivecleanup/pg_archivecleanup.c
+++ b/src/bin/pg_archivecleanup/pg_archivecleanup.c
@@ -375,6 +375,10 @@ main(int argc, char **argv)
 		exit(2);
 	}
 
+	if (dryrun)
+		pg_log_info("Executing in dry-run mode.\n"
+					"No files will be removed.");
+
 	/*
 	 * Check archive exists and other initialization if required.
 	 */
diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c
index df41836e70f..cc4be5d6ef4 100644
--- a/src/bin/pg_basebackup/pg_createsubscriber.c
+++ b/src/bin/pg_basebackup/pg_createsubscriber.c
@@ -2305,6 +2305,11 @@ main(int argc, char **argv)
 		pg_log_error_hint("Try \"%s --help\" for more information.", progname);
 		exit(1);
 	}
+
+	if (dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
 	pg_log_info("validating publisher connection string");
 	pub_base_conninfo = get_base_conninfo(opt.pub_conninfo_str,
 										  &dbname_conninfo);
diff --git a/src/bin/pg_combinebackup/pg_combinebackup.c b/src/bin/pg_combinebackup/pg_combinebackup.c
index 3a325127209..c9bf0a9e105 100644
--- a/src/bin/pg_combinebackup/pg_combinebackup.c
+++ b/src/bin/pg_combinebackup/pg_combinebackup.c
@@ -242,6 +242,10 @@ main(int argc, char *argv[])
 	if (opt.no_manifest)
 		opt.manifest_checksums = CHECKSUM_TYPE_NONE;
 
+	if (opt.dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
 	/* Check that the platform supports the requested copy method. */
 	if (opt.copy_method == COPY_METHOD_CLONE)
 	{
diff --git a/src/bin/pg_resetwal/pg_resetwal.c b/src/bin/pg_resetwal/pg_resetwal.c
index a89d72fc5cf..dd5d279521e 100644
--- a/src/bin/pg_resetwal/pg_resetwal.c
+++ b/src/bin/pg_resetwal/pg_resetwal.c
@@ -397,6 +397,10 @@ main(int argc, char *argv[])
 		exit(1);
 	}
 
+	if (noupdate)
+		pg_log_info("Executing in dry-run mode.\n"
+					"Nothing will be modified.");
+
 	/*
 	 * Attempt to read the existing pg_control file
 	 */
diff --git a/src/bin/pg_rewind/pg_rewind.c b/src/bin/pg_rewind/pg_rewind.c
index 27c514f934a..e9364d04f76 100644
--- a/src/bin/pg_rewind/pg_rewind.c
+++ b/src/bin/pg_rewind/pg_rewind.c
@@ -300,10 +300,12 @@ main(int argc, char **argv)
 
 	atexit(disconnect_atexit);
 
-	/*
-	 * Ok, we have all the options and we're ready to start. First, connect to
-	 * remote server.
-	 */
+	/* Ok, we have all the options and we're ready to start. */
+	if (dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
+	/* First, connect to remote server. */
 	if (connstr_source)
 	{
 		conn = PQconnectdb(connstr_source);
-- 
2.47.3


--ibfr3ah5qy6tcbhw--





^ permalink  raw  reply  [nested|flat] 126+ messages in thread

* [PATCH v5] Log a note at program start when running in dry-run mode
@ 2025-11-11 08:54 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 126+ messages in thread

From: Álvaro Herrera @ 2025-11-11 08:54 UTC (permalink / raw)

Users might get some peace of mind knowing their data is not being
destroyed or whatever.

Author: Peter Smith <[email protected]>
Reviewed-by: Álvaro Herrera <[email protected]>
Discussion: https://postgr.es/m/CAHut+PsvQJQnQO0KT0S2oegenkvJ8FUuY-QS5syyqmT24R2xFQ@mail.gmail.com
---
 src/bin/pg_archivecleanup/pg_archivecleanup.c |  4 ++++
 src/bin/pg_basebackup/pg_createsubscriber.c   |  5 +++++
 src/bin/pg_combinebackup/pg_combinebackup.c   |  4 ++++
 src/bin/pg_resetwal/pg_resetwal.c             |  4 ++++
 src/bin/pg_rewind/pg_rewind.c                 | 10 ++++++----
 5 files changed, 23 insertions(+), 4 deletions(-)

diff --git a/src/bin/pg_archivecleanup/pg_archivecleanup.c b/src/bin/pg_archivecleanup/pg_archivecleanup.c
index c25348bcb85..ab686b4748c 100644
--- a/src/bin/pg_archivecleanup/pg_archivecleanup.c
+++ b/src/bin/pg_archivecleanup/pg_archivecleanup.c
@@ -375,6 +375,10 @@ main(int argc, char **argv)
 		exit(2);
 	}
 
+	if (dryrun)
+		pg_log_info("Executing in dry-run mode.\n"
+					"No files will be removed.");
+
 	/*
 	 * Check archive exists and other initialization if required.
 	 */
diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c
index df41836e70f..cc4be5d6ef4 100644
--- a/src/bin/pg_basebackup/pg_createsubscriber.c
+++ b/src/bin/pg_basebackup/pg_createsubscriber.c
@@ -2305,6 +2305,11 @@ main(int argc, char **argv)
 		pg_log_error_hint("Try \"%s --help\" for more information.", progname);
 		exit(1);
 	}
+
+	if (dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
 	pg_log_info("validating publisher connection string");
 	pub_base_conninfo = get_base_conninfo(opt.pub_conninfo_str,
 										  &dbname_conninfo);
diff --git a/src/bin/pg_combinebackup/pg_combinebackup.c b/src/bin/pg_combinebackup/pg_combinebackup.c
index 3a325127209..c9bf0a9e105 100644
--- a/src/bin/pg_combinebackup/pg_combinebackup.c
+++ b/src/bin/pg_combinebackup/pg_combinebackup.c
@@ -242,6 +242,10 @@ main(int argc, char *argv[])
 	if (opt.no_manifest)
 		opt.manifest_checksums = CHECKSUM_TYPE_NONE;
 
+	if (opt.dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
 	/* Check that the platform supports the requested copy method. */
 	if (opt.copy_method == COPY_METHOD_CLONE)
 	{
diff --git a/src/bin/pg_resetwal/pg_resetwal.c b/src/bin/pg_resetwal/pg_resetwal.c
index a89d72fc5cf..dd5d279521e 100644
--- a/src/bin/pg_resetwal/pg_resetwal.c
+++ b/src/bin/pg_resetwal/pg_resetwal.c
@@ -397,6 +397,10 @@ main(int argc, char *argv[])
 		exit(1);
 	}
 
+	if (noupdate)
+		pg_log_info("Executing in dry-run mode.\n"
+					"Nothing will be modified.");
+
 	/*
 	 * Attempt to read the existing pg_control file
 	 */
diff --git a/src/bin/pg_rewind/pg_rewind.c b/src/bin/pg_rewind/pg_rewind.c
index 27c514f934a..e9364d04f76 100644
--- a/src/bin/pg_rewind/pg_rewind.c
+++ b/src/bin/pg_rewind/pg_rewind.c
@@ -300,10 +300,12 @@ main(int argc, char **argv)
 
 	atexit(disconnect_atexit);
 
-	/*
-	 * Ok, we have all the options and we're ready to start. First, connect to
-	 * remote server.
-	 */
+	/* Ok, we have all the options and we're ready to start. */
+	if (dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
+	/* First, connect to remote server. */
 	if (connstr_source)
 	{
 		conn = PQconnectdb(connstr_source);
-- 
2.47.3


--ibfr3ah5qy6tcbhw--





^ permalink  raw  reply  [nested|flat] 126+ messages in thread

* [PATCH v5] Log a note at program start when running in dry-run mode
@ 2025-11-11 08:54 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 126+ messages in thread

From: Álvaro Herrera @ 2025-11-11 08:54 UTC (permalink / raw)

Users might get some peace of mind knowing their data is not being
destroyed or whatever.

Author: Peter Smith <[email protected]>
Reviewed-by: Álvaro Herrera <[email protected]>
Discussion: https://postgr.es/m/CAHut+PsvQJQnQO0KT0S2oegenkvJ8FUuY-QS5syyqmT24R2xFQ@mail.gmail.com
---
 src/bin/pg_archivecleanup/pg_archivecleanup.c |  4 ++++
 src/bin/pg_basebackup/pg_createsubscriber.c   |  5 +++++
 src/bin/pg_combinebackup/pg_combinebackup.c   |  4 ++++
 src/bin/pg_resetwal/pg_resetwal.c             |  4 ++++
 src/bin/pg_rewind/pg_rewind.c                 | 10 ++++++----
 5 files changed, 23 insertions(+), 4 deletions(-)

diff --git a/src/bin/pg_archivecleanup/pg_archivecleanup.c b/src/bin/pg_archivecleanup/pg_archivecleanup.c
index c25348bcb85..ab686b4748c 100644
--- a/src/bin/pg_archivecleanup/pg_archivecleanup.c
+++ b/src/bin/pg_archivecleanup/pg_archivecleanup.c
@@ -375,6 +375,10 @@ main(int argc, char **argv)
 		exit(2);
 	}
 
+	if (dryrun)
+		pg_log_info("Executing in dry-run mode.\n"
+					"No files will be removed.");
+
 	/*
 	 * Check archive exists and other initialization if required.
 	 */
diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c
index df41836e70f..cc4be5d6ef4 100644
--- a/src/bin/pg_basebackup/pg_createsubscriber.c
+++ b/src/bin/pg_basebackup/pg_createsubscriber.c
@@ -2305,6 +2305,11 @@ main(int argc, char **argv)
 		pg_log_error_hint("Try \"%s --help\" for more information.", progname);
 		exit(1);
 	}
+
+	if (dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
 	pg_log_info("validating publisher connection string");
 	pub_base_conninfo = get_base_conninfo(opt.pub_conninfo_str,
 										  &dbname_conninfo);
diff --git a/src/bin/pg_combinebackup/pg_combinebackup.c b/src/bin/pg_combinebackup/pg_combinebackup.c
index 3a325127209..c9bf0a9e105 100644
--- a/src/bin/pg_combinebackup/pg_combinebackup.c
+++ b/src/bin/pg_combinebackup/pg_combinebackup.c
@@ -242,6 +242,10 @@ main(int argc, char *argv[])
 	if (opt.no_manifest)
 		opt.manifest_checksums = CHECKSUM_TYPE_NONE;
 
+	if (opt.dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
 	/* Check that the platform supports the requested copy method. */
 	if (opt.copy_method == COPY_METHOD_CLONE)
 	{
diff --git a/src/bin/pg_resetwal/pg_resetwal.c b/src/bin/pg_resetwal/pg_resetwal.c
index a89d72fc5cf..dd5d279521e 100644
--- a/src/bin/pg_resetwal/pg_resetwal.c
+++ b/src/bin/pg_resetwal/pg_resetwal.c
@@ -397,6 +397,10 @@ main(int argc, char *argv[])
 		exit(1);
 	}
 
+	if (noupdate)
+		pg_log_info("Executing in dry-run mode.\n"
+					"Nothing will be modified.");
+
 	/*
 	 * Attempt to read the existing pg_control file
 	 */
diff --git a/src/bin/pg_rewind/pg_rewind.c b/src/bin/pg_rewind/pg_rewind.c
index 27c514f934a..e9364d04f76 100644
--- a/src/bin/pg_rewind/pg_rewind.c
+++ b/src/bin/pg_rewind/pg_rewind.c
@@ -300,10 +300,12 @@ main(int argc, char **argv)
 
 	atexit(disconnect_atexit);
 
-	/*
-	 * Ok, we have all the options and we're ready to start. First, connect to
-	 * remote server.
-	 */
+	/* Ok, we have all the options and we're ready to start. */
+	if (dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
+	/* First, connect to remote server. */
 	if (connstr_source)
 	{
 		conn = PQconnectdb(connstr_source);
-- 
2.47.3


--ibfr3ah5qy6tcbhw--





^ permalink  raw  reply  [nested|flat] 126+ messages in thread

* [PATCH v5] Log a note at program start when running in dry-run mode
@ 2025-11-11 08:54 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 126+ messages in thread

From: Álvaro Herrera @ 2025-11-11 08:54 UTC (permalink / raw)

Users might get some peace of mind knowing their data is not being
destroyed or whatever.

Author: Peter Smith <[email protected]>
Reviewed-by: Álvaro Herrera <[email protected]>
Discussion: https://postgr.es/m/CAHut+PsvQJQnQO0KT0S2oegenkvJ8FUuY-QS5syyqmT24R2xFQ@mail.gmail.com
---
 src/bin/pg_archivecleanup/pg_archivecleanup.c |  4 ++++
 src/bin/pg_basebackup/pg_createsubscriber.c   |  5 +++++
 src/bin/pg_combinebackup/pg_combinebackup.c   |  4 ++++
 src/bin/pg_resetwal/pg_resetwal.c             |  4 ++++
 src/bin/pg_rewind/pg_rewind.c                 | 10 ++++++----
 5 files changed, 23 insertions(+), 4 deletions(-)

diff --git a/src/bin/pg_archivecleanup/pg_archivecleanup.c b/src/bin/pg_archivecleanup/pg_archivecleanup.c
index c25348bcb85..ab686b4748c 100644
--- a/src/bin/pg_archivecleanup/pg_archivecleanup.c
+++ b/src/bin/pg_archivecleanup/pg_archivecleanup.c
@@ -375,6 +375,10 @@ main(int argc, char **argv)
 		exit(2);
 	}
 
+	if (dryrun)
+		pg_log_info("Executing in dry-run mode.\n"
+					"No files will be removed.");
+
 	/*
 	 * Check archive exists and other initialization if required.
 	 */
diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c
index df41836e70f..cc4be5d6ef4 100644
--- a/src/bin/pg_basebackup/pg_createsubscriber.c
+++ b/src/bin/pg_basebackup/pg_createsubscriber.c
@@ -2305,6 +2305,11 @@ main(int argc, char **argv)
 		pg_log_error_hint("Try \"%s --help\" for more information.", progname);
 		exit(1);
 	}
+
+	if (dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
 	pg_log_info("validating publisher connection string");
 	pub_base_conninfo = get_base_conninfo(opt.pub_conninfo_str,
 										  &dbname_conninfo);
diff --git a/src/bin/pg_combinebackup/pg_combinebackup.c b/src/bin/pg_combinebackup/pg_combinebackup.c
index 3a325127209..c9bf0a9e105 100644
--- a/src/bin/pg_combinebackup/pg_combinebackup.c
+++ b/src/bin/pg_combinebackup/pg_combinebackup.c
@@ -242,6 +242,10 @@ main(int argc, char *argv[])
 	if (opt.no_manifest)
 		opt.manifest_checksums = CHECKSUM_TYPE_NONE;
 
+	if (opt.dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
 	/* Check that the platform supports the requested copy method. */
 	if (opt.copy_method == COPY_METHOD_CLONE)
 	{
diff --git a/src/bin/pg_resetwal/pg_resetwal.c b/src/bin/pg_resetwal/pg_resetwal.c
index a89d72fc5cf..dd5d279521e 100644
--- a/src/bin/pg_resetwal/pg_resetwal.c
+++ b/src/bin/pg_resetwal/pg_resetwal.c
@@ -397,6 +397,10 @@ main(int argc, char *argv[])
 		exit(1);
 	}
 
+	if (noupdate)
+		pg_log_info("Executing in dry-run mode.\n"
+					"Nothing will be modified.");
+
 	/*
 	 * Attempt to read the existing pg_control file
 	 */
diff --git a/src/bin/pg_rewind/pg_rewind.c b/src/bin/pg_rewind/pg_rewind.c
index 27c514f934a..e9364d04f76 100644
--- a/src/bin/pg_rewind/pg_rewind.c
+++ b/src/bin/pg_rewind/pg_rewind.c
@@ -300,10 +300,12 @@ main(int argc, char **argv)
 
 	atexit(disconnect_atexit);
 
-	/*
-	 * Ok, we have all the options and we're ready to start. First, connect to
-	 * remote server.
-	 */
+	/* Ok, we have all the options and we're ready to start. */
+	if (dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
+	/* First, connect to remote server. */
 	if (connstr_source)
 	{
 		conn = PQconnectdb(connstr_source);
-- 
2.47.3


--ibfr3ah5qy6tcbhw--





^ permalink  raw  reply  [nested|flat] 126+ messages in thread

* [PATCH v5] Log a note at program start when running in dry-run mode
@ 2025-11-11 08:54 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 126+ messages in thread

From: Álvaro Herrera @ 2025-11-11 08:54 UTC (permalink / raw)

Users might get some peace of mind knowing their data is not being
destroyed or whatever.

Author: Peter Smith <[email protected]>
Reviewed-by: Álvaro Herrera <[email protected]>
Discussion: https://postgr.es/m/CAHut+PsvQJQnQO0KT0S2oegenkvJ8FUuY-QS5syyqmT24R2xFQ@mail.gmail.com
---
 src/bin/pg_archivecleanup/pg_archivecleanup.c |  4 ++++
 src/bin/pg_basebackup/pg_createsubscriber.c   |  5 +++++
 src/bin/pg_combinebackup/pg_combinebackup.c   |  4 ++++
 src/bin/pg_resetwal/pg_resetwal.c             |  4 ++++
 src/bin/pg_rewind/pg_rewind.c                 | 10 ++++++----
 5 files changed, 23 insertions(+), 4 deletions(-)

diff --git a/src/bin/pg_archivecleanup/pg_archivecleanup.c b/src/bin/pg_archivecleanup/pg_archivecleanup.c
index c25348bcb85..ab686b4748c 100644
--- a/src/bin/pg_archivecleanup/pg_archivecleanup.c
+++ b/src/bin/pg_archivecleanup/pg_archivecleanup.c
@@ -375,6 +375,10 @@ main(int argc, char **argv)
 		exit(2);
 	}
 
+	if (dryrun)
+		pg_log_info("Executing in dry-run mode.\n"
+					"No files will be removed.");
+
 	/*
 	 * Check archive exists and other initialization if required.
 	 */
diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c
index df41836e70f..cc4be5d6ef4 100644
--- a/src/bin/pg_basebackup/pg_createsubscriber.c
+++ b/src/bin/pg_basebackup/pg_createsubscriber.c
@@ -2305,6 +2305,11 @@ main(int argc, char **argv)
 		pg_log_error_hint("Try \"%s --help\" for more information.", progname);
 		exit(1);
 	}
+
+	if (dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
 	pg_log_info("validating publisher connection string");
 	pub_base_conninfo = get_base_conninfo(opt.pub_conninfo_str,
 										  &dbname_conninfo);
diff --git a/src/bin/pg_combinebackup/pg_combinebackup.c b/src/bin/pg_combinebackup/pg_combinebackup.c
index 3a325127209..c9bf0a9e105 100644
--- a/src/bin/pg_combinebackup/pg_combinebackup.c
+++ b/src/bin/pg_combinebackup/pg_combinebackup.c
@@ -242,6 +242,10 @@ main(int argc, char *argv[])
 	if (opt.no_manifest)
 		opt.manifest_checksums = CHECKSUM_TYPE_NONE;
 
+	if (opt.dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
 	/* Check that the platform supports the requested copy method. */
 	if (opt.copy_method == COPY_METHOD_CLONE)
 	{
diff --git a/src/bin/pg_resetwal/pg_resetwal.c b/src/bin/pg_resetwal/pg_resetwal.c
index a89d72fc5cf..dd5d279521e 100644
--- a/src/bin/pg_resetwal/pg_resetwal.c
+++ b/src/bin/pg_resetwal/pg_resetwal.c
@@ -397,6 +397,10 @@ main(int argc, char *argv[])
 		exit(1);
 	}
 
+	if (noupdate)
+		pg_log_info("Executing in dry-run mode.\n"
+					"Nothing will be modified.");
+
 	/*
 	 * Attempt to read the existing pg_control file
 	 */
diff --git a/src/bin/pg_rewind/pg_rewind.c b/src/bin/pg_rewind/pg_rewind.c
index 27c514f934a..e9364d04f76 100644
--- a/src/bin/pg_rewind/pg_rewind.c
+++ b/src/bin/pg_rewind/pg_rewind.c
@@ -300,10 +300,12 @@ main(int argc, char **argv)
 
 	atexit(disconnect_atexit);
 
-	/*
-	 * Ok, we have all the options and we're ready to start. First, connect to
-	 * remote server.
-	 */
+	/* Ok, we have all the options and we're ready to start. */
+	if (dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
+	/* First, connect to remote server. */
 	if (connstr_source)
 	{
 		conn = PQconnectdb(connstr_source);
-- 
2.47.3


--ibfr3ah5qy6tcbhw--





^ permalink  raw  reply  [nested|flat] 126+ messages in thread

* [PATCH v5] Log a note at program start when running in dry-run mode
@ 2025-11-11 08:54 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 126+ messages in thread

From: Álvaro Herrera @ 2025-11-11 08:54 UTC (permalink / raw)

Users might get some peace of mind knowing their data is not being
destroyed or whatever.

Author: Peter Smith <[email protected]>
Reviewed-by: Álvaro Herrera <[email protected]>
Discussion: https://postgr.es/m/CAHut+PsvQJQnQO0KT0S2oegenkvJ8FUuY-QS5syyqmT24R2xFQ@mail.gmail.com
---
 src/bin/pg_archivecleanup/pg_archivecleanup.c |  4 ++++
 src/bin/pg_basebackup/pg_createsubscriber.c   |  5 +++++
 src/bin/pg_combinebackup/pg_combinebackup.c   |  4 ++++
 src/bin/pg_resetwal/pg_resetwal.c             |  4 ++++
 src/bin/pg_rewind/pg_rewind.c                 | 10 ++++++----
 5 files changed, 23 insertions(+), 4 deletions(-)

diff --git a/src/bin/pg_archivecleanup/pg_archivecleanup.c b/src/bin/pg_archivecleanup/pg_archivecleanup.c
index c25348bcb85..ab686b4748c 100644
--- a/src/bin/pg_archivecleanup/pg_archivecleanup.c
+++ b/src/bin/pg_archivecleanup/pg_archivecleanup.c
@@ -375,6 +375,10 @@ main(int argc, char **argv)
 		exit(2);
 	}
 
+	if (dryrun)
+		pg_log_info("Executing in dry-run mode.\n"
+					"No files will be removed.");
+
 	/*
 	 * Check archive exists and other initialization if required.
 	 */
diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c
index df41836e70f..cc4be5d6ef4 100644
--- a/src/bin/pg_basebackup/pg_createsubscriber.c
+++ b/src/bin/pg_basebackup/pg_createsubscriber.c
@@ -2305,6 +2305,11 @@ main(int argc, char **argv)
 		pg_log_error_hint("Try \"%s --help\" for more information.", progname);
 		exit(1);
 	}
+
+	if (dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
 	pg_log_info("validating publisher connection string");
 	pub_base_conninfo = get_base_conninfo(opt.pub_conninfo_str,
 										  &dbname_conninfo);
diff --git a/src/bin/pg_combinebackup/pg_combinebackup.c b/src/bin/pg_combinebackup/pg_combinebackup.c
index 3a325127209..c9bf0a9e105 100644
--- a/src/bin/pg_combinebackup/pg_combinebackup.c
+++ b/src/bin/pg_combinebackup/pg_combinebackup.c
@@ -242,6 +242,10 @@ main(int argc, char *argv[])
 	if (opt.no_manifest)
 		opt.manifest_checksums = CHECKSUM_TYPE_NONE;
 
+	if (opt.dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
 	/* Check that the platform supports the requested copy method. */
 	if (opt.copy_method == COPY_METHOD_CLONE)
 	{
diff --git a/src/bin/pg_resetwal/pg_resetwal.c b/src/bin/pg_resetwal/pg_resetwal.c
index a89d72fc5cf..dd5d279521e 100644
--- a/src/bin/pg_resetwal/pg_resetwal.c
+++ b/src/bin/pg_resetwal/pg_resetwal.c
@@ -397,6 +397,10 @@ main(int argc, char *argv[])
 		exit(1);
 	}
 
+	if (noupdate)
+		pg_log_info("Executing in dry-run mode.\n"
+					"Nothing will be modified.");
+
 	/*
 	 * Attempt to read the existing pg_control file
 	 */
diff --git a/src/bin/pg_rewind/pg_rewind.c b/src/bin/pg_rewind/pg_rewind.c
index 27c514f934a..e9364d04f76 100644
--- a/src/bin/pg_rewind/pg_rewind.c
+++ b/src/bin/pg_rewind/pg_rewind.c
@@ -300,10 +300,12 @@ main(int argc, char **argv)
 
 	atexit(disconnect_atexit);
 
-	/*
-	 * Ok, we have all the options and we're ready to start. First, connect to
-	 * remote server.
-	 */
+	/* Ok, we have all the options and we're ready to start. */
+	if (dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
+	/* First, connect to remote server. */
 	if (connstr_source)
 	{
 		conn = PQconnectdb(connstr_source);
-- 
2.47.3


--ibfr3ah5qy6tcbhw--





^ permalink  raw  reply  [nested|flat] 126+ messages in thread

* [PATCH v5] Log a note at program start when running in dry-run mode
@ 2025-11-11 08:54 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 126+ messages in thread

From: Álvaro Herrera @ 2025-11-11 08:54 UTC (permalink / raw)

Users might get some peace of mind knowing their data is not being
destroyed or whatever.

Author: Peter Smith <[email protected]>
Reviewed-by: Álvaro Herrera <[email protected]>
Discussion: https://postgr.es/m/CAHut+PsvQJQnQO0KT0S2oegenkvJ8FUuY-QS5syyqmT24R2xFQ@mail.gmail.com
---
 src/bin/pg_archivecleanup/pg_archivecleanup.c |  4 ++++
 src/bin/pg_basebackup/pg_createsubscriber.c   |  5 +++++
 src/bin/pg_combinebackup/pg_combinebackup.c   |  4 ++++
 src/bin/pg_resetwal/pg_resetwal.c             |  4 ++++
 src/bin/pg_rewind/pg_rewind.c                 | 10 ++++++----
 5 files changed, 23 insertions(+), 4 deletions(-)

diff --git a/src/bin/pg_archivecleanup/pg_archivecleanup.c b/src/bin/pg_archivecleanup/pg_archivecleanup.c
index c25348bcb85..ab686b4748c 100644
--- a/src/bin/pg_archivecleanup/pg_archivecleanup.c
+++ b/src/bin/pg_archivecleanup/pg_archivecleanup.c
@@ -375,6 +375,10 @@ main(int argc, char **argv)
 		exit(2);
 	}
 
+	if (dryrun)
+		pg_log_info("Executing in dry-run mode.\n"
+					"No files will be removed.");
+
 	/*
 	 * Check archive exists and other initialization if required.
 	 */
diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c
index df41836e70f..cc4be5d6ef4 100644
--- a/src/bin/pg_basebackup/pg_createsubscriber.c
+++ b/src/bin/pg_basebackup/pg_createsubscriber.c
@@ -2305,6 +2305,11 @@ main(int argc, char **argv)
 		pg_log_error_hint("Try \"%s --help\" for more information.", progname);
 		exit(1);
 	}
+
+	if (dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
 	pg_log_info("validating publisher connection string");
 	pub_base_conninfo = get_base_conninfo(opt.pub_conninfo_str,
 										  &dbname_conninfo);
diff --git a/src/bin/pg_combinebackup/pg_combinebackup.c b/src/bin/pg_combinebackup/pg_combinebackup.c
index 3a325127209..c9bf0a9e105 100644
--- a/src/bin/pg_combinebackup/pg_combinebackup.c
+++ b/src/bin/pg_combinebackup/pg_combinebackup.c
@@ -242,6 +242,10 @@ main(int argc, char *argv[])
 	if (opt.no_manifest)
 		opt.manifest_checksums = CHECKSUM_TYPE_NONE;
 
+	if (opt.dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
 	/* Check that the platform supports the requested copy method. */
 	if (opt.copy_method == COPY_METHOD_CLONE)
 	{
diff --git a/src/bin/pg_resetwal/pg_resetwal.c b/src/bin/pg_resetwal/pg_resetwal.c
index a89d72fc5cf..dd5d279521e 100644
--- a/src/bin/pg_resetwal/pg_resetwal.c
+++ b/src/bin/pg_resetwal/pg_resetwal.c
@@ -397,6 +397,10 @@ main(int argc, char *argv[])
 		exit(1);
 	}
 
+	if (noupdate)
+		pg_log_info("Executing in dry-run mode.\n"
+					"Nothing will be modified.");
+
 	/*
 	 * Attempt to read the existing pg_control file
 	 */
diff --git a/src/bin/pg_rewind/pg_rewind.c b/src/bin/pg_rewind/pg_rewind.c
index 27c514f934a..e9364d04f76 100644
--- a/src/bin/pg_rewind/pg_rewind.c
+++ b/src/bin/pg_rewind/pg_rewind.c
@@ -300,10 +300,12 @@ main(int argc, char **argv)
 
 	atexit(disconnect_atexit);
 
-	/*
-	 * Ok, we have all the options and we're ready to start. First, connect to
-	 * remote server.
-	 */
+	/* Ok, we have all the options and we're ready to start. */
+	if (dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
+	/* First, connect to remote server. */
 	if (connstr_source)
 	{
 		conn = PQconnectdb(connstr_source);
-- 
2.47.3


--ibfr3ah5qy6tcbhw--





^ permalink  raw  reply  [nested|flat] 126+ messages in thread

* [PATCH v5] Log a note at program start when running in dry-run mode
@ 2025-11-11 08:54 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 126+ messages in thread

From: Álvaro Herrera @ 2025-11-11 08:54 UTC (permalink / raw)

Users might get some peace of mind knowing their data is not being
destroyed or whatever.

Author: Peter Smith <[email protected]>
Reviewed-by: Álvaro Herrera <[email protected]>
Discussion: https://postgr.es/m/CAHut+PsvQJQnQO0KT0S2oegenkvJ8FUuY-QS5syyqmT24R2xFQ@mail.gmail.com
---
 src/bin/pg_archivecleanup/pg_archivecleanup.c |  4 ++++
 src/bin/pg_basebackup/pg_createsubscriber.c   |  5 +++++
 src/bin/pg_combinebackup/pg_combinebackup.c   |  4 ++++
 src/bin/pg_resetwal/pg_resetwal.c             |  4 ++++
 src/bin/pg_rewind/pg_rewind.c                 | 10 ++++++----
 5 files changed, 23 insertions(+), 4 deletions(-)

diff --git a/src/bin/pg_archivecleanup/pg_archivecleanup.c b/src/bin/pg_archivecleanup/pg_archivecleanup.c
index c25348bcb85..ab686b4748c 100644
--- a/src/bin/pg_archivecleanup/pg_archivecleanup.c
+++ b/src/bin/pg_archivecleanup/pg_archivecleanup.c
@@ -375,6 +375,10 @@ main(int argc, char **argv)
 		exit(2);
 	}
 
+	if (dryrun)
+		pg_log_info("Executing in dry-run mode.\n"
+					"No files will be removed.");
+
 	/*
 	 * Check archive exists and other initialization if required.
 	 */
diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c
index df41836e70f..cc4be5d6ef4 100644
--- a/src/bin/pg_basebackup/pg_createsubscriber.c
+++ b/src/bin/pg_basebackup/pg_createsubscriber.c
@@ -2305,6 +2305,11 @@ main(int argc, char **argv)
 		pg_log_error_hint("Try \"%s --help\" for more information.", progname);
 		exit(1);
 	}
+
+	if (dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
 	pg_log_info("validating publisher connection string");
 	pub_base_conninfo = get_base_conninfo(opt.pub_conninfo_str,
 										  &dbname_conninfo);
diff --git a/src/bin/pg_combinebackup/pg_combinebackup.c b/src/bin/pg_combinebackup/pg_combinebackup.c
index 3a325127209..c9bf0a9e105 100644
--- a/src/bin/pg_combinebackup/pg_combinebackup.c
+++ b/src/bin/pg_combinebackup/pg_combinebackup.c
@@ -242,6 +242,10 @@ main(int argc, char *argv[])
 	if (opt.no_manifest)
 		opt.manifest_checksums = CHECKSUM_TYPE_NONE;
 
+	if (opt.dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
 	/* Check that the platform supports the requested copy method. */
 	if (opt.copy_method == COPY_METHOD_CLONE)
 	{
diff --git a/src/bin/pg_resetwal/pg_resetwal.c b/src/bin/pg_resetwal/pg_resetwal.c
index a89d72fc5cf..dd5d279521e 100644
--- a/src/bin/pg_resetwal/pg_resetwal.c
+++ b/src/bin/pg_resetwal/pg_resetwal.c
@@ -397,6 +397,10 @@ main(int argc, char *argv[])
 		exit(1);
 	}
 
+	if (noupdate)
+		pg_log_info("Executing in dry-run mode.\n"
+					"Nothing will be modified.");
+
 	/*
 	 * Attempt to read the existing pg_control file
 	 */
diff --git a/src/bin/pg_rewind/pg_rewind.c b/src/bin/pg_rewind/pg_rewind.c
index 27c514f934a..e9364d04f76 100644
--- a/src/bin/pg_rewind/pg_rewind.c
+++ b/src/bin/pg_rewind/pg_rewind.c
@@ -300,10 +300,12 @@ main(int argc, char **argv)
 
 	atexit(disconnect_atexit);
 
-	/*
-	 * Ok, we have all the options and we're ready to start. First, connect to
-	 * remote server.
-	 */
+	/* Ok, we have all the options and we're ready to start. */
+	if (dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
+	/* First, connect to remote server. */
 	if (connstr_source)
 	{
 		conn = PQconnectdb(connstr_source);
-- 
2.47.3


--ibfr3ah5qy6tcbhw--





^ permalink  raw  reply  [nested|flat] 126+ messages in thread

* [PATCH v5] Log a note at program start when running in dry-run mode
@ 2025-11-11 08:54 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 126+ messages in thread

From: Álvaro Herrera @ 2025-11-11 08:54 UTC (permalink / raw)

Users might get some peace of mind knowing their data is not being
destroyed or whatever.

Author: Peter Smith <[email protected]>
Reviewed-by: Álvaro Herrera <[email protected]>
Discussion: https://postgr.es/m/CAHut+PsvQJQnQO0KT0S2oegenkvJ8FUuY-QS5syyqmT24R2xFQ@mail.gmail.com
---
 src/bin/pg_archivecleanup/pg_archivecleanup.c |  4 ++++
 src/bin/pg_basebackup/pg_createsubscriber.c   |  5 +++++
 src/bin/pg_combinebackup/pg_combinebackup.c   |  4 ++++
 src/bin/pg_resetwal/pg_resetwal.c             |  4 ++++
 src/bin/pg_rewind/pg_rewind.c                 | 10 ++++++----
 5 files changed, 23 insertions(+), 4 deletions(-)

diff --git a/src/bin/pg_archivecleanup/pg_archivecleanup.c b/src/bin/pg_archivecleanup/pg_archivecleanup.c
index c25348bcb85..ab686b4748c 100644
--- a/src/bin/pg_archivecleanup/pg_archivecleanup.c
+++ b/src/bin/pg_archivecleanup/pg_archivecleanup.c
@@ -375,6 +375,10 @@ main(int argc, char **argv)
 		exit(2);
 	}
 
+	if (dryrun)
+		pg_log_info("Executing in dry-run mode.\n"
+					"No files will be removed.");
+
 	/*
 	 * Check archive exists and other initialization if required.
 	 */
diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c
index df41836e70f..cc4be5d6ef4 100644
--- a/src/bin/pg_basebackup/pg_createsubscriber.c
+++ b/src/bin/pg_basebackup/pg_createsubscriber.c
@@ -2305,6 +2305,11 @@ main(int argc, char **argv)
 		pg_log_error_hint("Try \"%s --help\" for more information.", progname);
 		exit(1);
 	}
+
+	if (dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
 	pg_log_info("validating publisher connection string");
 	pub_base_conninfo = get_base_conninfo(opt.pub_conninfo_str,
 										  &dbname_conninfo);
diff --git a/src/bin/pg_combinebackup/pg_combinebackup.c b/src/bin/pg_combinebackup/pg_combinebackup.c
index 3a325127209..c9bf0a9e105 100644
--- a/src/bin/pg_combinebackup/pg_combinebackup.c
+++ b/src/bin/pg_combinebackup/pg_combinebackup.c
@@ -242,6 +242,10 @@ main(int argc, char *argv[])
 	if (opt.no_manifest)
 		opt.manifest_checksums = CHECKSUM_TYPE_NONE;
 
+	if (opt.dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
 	/* Check that the platform supports the requested copy method. */
 	if (opt.copy_method == COPY_METHOD_CLONE)
 	{
diff --git a/src/bin/pg_resetwal/pg_resetwal.c b/src/bin/pg_resetwal/pg_resetwal.c
index a89d72fc5cf..dd5d279521e 100644
--- a/src/bin/pg_resetwal/pg_resetwal.c
+++ b/src/bin/pg_resetwal/pg_resetwal.c
@@ -397,6 +397,10 @@ main(int argc, char *argv[])
 		exit(1);
 	}
 
+	if (noupdate)
+		pg_log_info("Executing in dry-run mode.\n"
+					"Nothing will be modified.");
+
 	/*
 	 * Attempt to read the existing pg_control file
 	 */
diff --git a/src/bin/pg_rewind/pg_rewind.c b/src/bin/pg_rewind/pg_rewind.c
index 27c514f934a..e9364d04f76 100644
--- a/src/bin/pg_rewind/pg_rewind.c
+++ b/src/bin/pg_rewind/pg_rewind.c
@@ -300,10 +300,12 @@ main(int argc, char **argv)
 
 	atexit(disconnect_atexit);
 
-	/*
-	 * Ok, we have all the options and we're ready to start. First, connect to
-	 * remote server.
-	 */
+	/* Ok, we have all the options and we're ready to start. */
+	if (dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
+	/* First, connect to remote server. */
 	if (connstr_source)
 	{
 		conn = PQconnectdb(connstr_source);
-- 
2.47.3


--ibfr3ah5qy6tcbhw--





^ permalink  raw  reply  [nested|flat] 126+ messages in thread

* [PATCH v5] Log a note at program start when running in dry-run mode
@ 2025-11-11 08:54 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 126+ messages in thread

From: Álvaro Herrera @ 2025-11-11 08:54 UTC (permalink / raw)

Users might get some peace of mind knowing their data is not being
destroyed or whatever.

Author: Peter Smith <[email protected]>
Reviewed-by: Álvaro Herrera <[email protected]>
Discussion: https://postgr.es/m/CAHut+PsvQJQnQO0KT0S2oegenkvJ8FUuY-QS5syyqmT24R2xFQ@mail.gmail.com
---
 src/bin/pg_archivecleanup/pg_archivecleanup.c |  4 ++++
 src/bin/pg_basebackup/pg_createsubscriber.c   |  5 +++++
 src/bin/pg_combinebackup/pg_combinebackup.c   |  4 ++++
 src/bin/pg_resetwal/pg_resetwal.c             |  4 ++++
 src/bin/pg_rewind/pg_rewind.c                 | 10 ++++++----
 5 files changed, 23 insertions(+), 4 deletions(-)

diff --git a/src/bin/pg_archivecleanup/pg_archivecleanup.c b/src/bin/pg_archivecleanup/pg_archivecleanup.c
index c25348bcb85..ab686b4748c 100644
--- a/src/bin/pg_archivecleanup/pg_archivecleanup.c
+++ b/src/bin/pg_archivecleanup/pg_archivecleanup.c
@@ -375,6 +375,10 @@ main(int argc, char **argv)
 		exit(2);
 	}
 
+	if (dryrun)
+		pg_log_info("Executing in dry-run mode.\n"
+					"No files will be removed.");
+
 	/*
 	 * Check archive exists and other initialization if required.
 	 */
diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c
index df41836e70f..cc4be5d6ef4 100644
--- a/src/bin/pg_basebackup/pg_createsubscriber.c
+++ b/src/bin/pg_basebackup/pg_createsubscriber.c
@@ -2305,6 +2305,11 @@ main(int argc, char **argv)
 		pg_log_error_hint("Try \"%s --help\" for more information.", progname);
 		exit(1);
 	}
+
+	if (dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
 	pg_log_info("validating publisher connection string");
 	pub_base_conninfo = get_base_conninfo(opt.pub_conninfo_str,
 										  &dbname_conninfo);
diff --git a/src/bin/pg_combinebackup/pg_combinebackup.c b/src/bin/pg_combinebackup/pg_combinebackup.c
index 3a325127209..c9bf0a9e105 100644
--- a/src/bin/pg_combinebackup/pg_combinebackup.c
+++ b/src/bin/pg_combinebackup/pg_combinebackup.c
@@ -242,6 +242,10 @@ main(int argc, char *argv[])
 	if (opt.no_manifest)
 		opt.manifest_checksums = CHECKSUM_TYPE_NONE;
 
+	if (opt.dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
 	/* Check that the platform supports the requested copy method. */
 	if (opt.copy_method == COPY_METHOD_CLONE)
 	{
diff --git a/src/bin/pg_resetwal/pg_resetwal.c b/src/bin/pg_resetwal/pg_resetwal.c
index a89d72fc5cf..dd5d279521e 100644
--- a/src/bin/pg_resetwal/pg_resetwal.c
+++ b/src/bin/pg_resetwal/pg_resetwal.c
@@ -397,6 +397,10 @@ main(int argc, char *argv[])
 		exit(1);
 	}
 
+	if (noupdate)
+		pg_log_info("Executing in dry-run mode.\n"
+					"Nothing will be modified.");
+
 	/*
 	 * Attempt to read the existing pg_control file
 	 */
diff --git a/src/bin/pg_rewind/pg_rewind.c b/src/bin/pg_rewind/pg_rewind.c
index 27c514f934a..e9364d04f76 100644
--- a/src/bin/pg_rewind/pg_rewind.c
+++ b/src/bin/pg_rewind/pg_rewind.c
@@ -300,10 +300,12 @@ main(int argc, char **argv)
 
 	atexit(disconnect_atexit);
 
-	/*
-	 * Ok, we have all the options and we're ready to start. First, connect to
-	 * remote server.
-	 */
+	/* Ok, we have all the options and we're ready to start. */
+	if (dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
+	/* First, connect to remote server. */
 	if (connstr_source)
 	{
 		conn = PQconnectdb(connstr_source);
-- 
2.47.3


--ibfr3ah5qy6tcbhw--





^ permalink  raw  reply  [nested|flat] 126+ messages in thread

* [PATCH v5] Log a note at program start when running in dry-run mode
@ 2025-11-11 08:54 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 126+ messages in thread

From: Álvaro Herrera @ 2025-11-11 08:54 UTC (permalink / raw)

Users might get some peace of mind knowing their data is not being
destroyed or whatever.

Author: Peter Smith <[email protected]>
Reviewed-by: Álvaro Herrera <[email protected]>
Discussion: https://postgr.es/m/CAHut+PsvQJQnQO0KT0S2oegenkvJ8FUuY-QS5syyqmT24R2xFQ@mail.gmail.com
---
 src/bin/pg_archivecleanup/pg_archivecleanup.c |  4 ++++
 src/bin/pg_basebackup/pg_createsubscriber.c   |  5 +++++
 src/bin/pg_combinebackup/pg_combinebackup.c   |  4 ++++
 src/bin/pg_resetwal/pg_resetwal.c             |  4 ++++
 src/bin/pg_rewind/pg_rewind.c                 | 10 ++++++----
 5 files changed, 23 insertions(+), 4 deletions(-)

diff --git a/src/bin/pg_archivecleanup/pg_archivecleanup.c b/src/bin/pg_archivecleanup/pg_archivecleanup.c
index c25348bcb85..ab686b4748c 100644
--- a/src/bin/pg_archivecleanup/pg_archivecleanup.c
+++ b/src/bin/pg_archivecleanup/pg_archivecleanup.c
@@ -375,6 +375,10 @@ main(int argc, char **argv)
 		exit(2);
 	}
 
+	if (dryrun)
+		pg_log_info("Executing in dry-run mode.\n"
+					"No files will be removed.");
+
 	/*
 	 * Check archive exists and other initialization if required.
 	 */
diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c
index df41836e70f..cc4be5d6ef4 100644
--- a/src/bin/pg_basebackup/pg_createsubscriber.c
+++ b/src/bin/pg_basebackup/pg_createsubscriber.c
@@ -2305,6 +2305,11 @@ main(int argc, char **argv)
 		pg_log_error_hint("Try \"%s --help\" for more information.", progname);
 		exit(1);
 	}
+
+	if (dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
 	pg_log_info("validating publisher connection string");
 	pub_base_conninfo = get_base_conninfo(opt.pub_conninfo_str,
 										  &dbname_conninfo);
diff --git a/src/bin/pg_combinebackup/pg_combinebackup.c b/src/bin/pg_combinebackup/pg_combinebackup.c
index 3a325127209..c9bf0a9e105 100644
--- a/src/bin/pg_combinebackup/pg_combinebackup.c
+++ b/src/bin/pg_combinebackup/pg_combinebackup.c
@@ -242,6 +242,10 @@ main(int argc, char *argv[])
 	if (opt.no_manifest)
 		opt.manifest_checksums = CHECKSUM_TYPE_NONE;
 
+	if (opt.dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
 	/* Check that the platform supports the requested copy method. */
 	if (opt.copy_method == COPY_METHOD_CLONE)
 	{
diff --git a/src/bin/pg_resetwal/pg_resetwal.c b/src/bin/pg_resetwal/pg_resetwal.c
index a89d72fc5cf..dd5d279521e 100644
--- a/src/bin/pg_resetwal/pg_resetwal.c
+++ b/src/bin/pg_resetwal/pg_resetwal.c
@@ -397,6 +397,10 @@ main(int argc, char *argv[])
 		exit(1);
 	}
 
+	if (noupdate)
+		pg_log_info("Executing in dry-run mode.\n"
+					"Nothing will be modified.");
+
 	/*
 	 * Attempt to read the existing pg_control file
 	 */
diff --git a/src/bin/pg_rewind/pg_rewind.c b/src/bin/pg_rewind/pg_rewind.c
index 27c514f934a..e9364d04f76 100644
--- a/src/bin/pg_rewind/pg_rewind.c
+++ b/src/bin/pg_rewind/pg_rewind.c
@@ -300,10 +300,12 @@ main(int argc, char **argv)
 
 	atexit(disconnect_atexit);
 
-	/*
-	 * Ok, we have all the options and we're ready to start. First, connect to
-	 * remote server.
-	 */
+	/* Ok, we have all the options and we're ready to start. */
+	if (dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
+	/* First, connect to remote server. */
 	if (connstr_source)
 	{
 		conn = PQconnectdb(connstr_source);
-- 
2.47.3


--ibfr3ah5qy6tcbhw--





^ permalink  raw  reply  [nested|flat] 126+ messages in thread

* [PATCH v5] Log a note at program start when running in dry-run mode
@ 2025-11-11 08:54 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 126+ messages in thread

From: Álvaro Herrera @ 2025-11-11 08:54 UTC (permalink / raw)

Users might get some peace of mind knowing their data is not being
destroyed or whatever.

Author: Peter Smith <[email protected]>
Reviewed-by: Álvaro Herrera <[email protected]>
Discussion: https://postgr.es/m/CAHut+PsvQJQnQO0KT0S2oegenkvJ8FUuY-QS5syyqmT24R2xFQ@mail.gmail.com
---
 src/bin/pg_archivecleanup/pg_archivecleanup.c |  4 ++++
 src/bin/pg_basebackup/pg_createsubscriber.c   |  5 +++++
 src/bin/pg_combinebackup/pg_combinebackup.c   |  4 ++++
 src/bin/pg_resetwal/pg_resetwal.c             |  4 ++++
 src/bin/pg_rewind/pg_rewind.c                 | 10 ++++++----
 5 files changed, 23 insertions(+), 4 deletions(-)

diff --git a/src/bin/pg_archivecleanup/pg_archivecleanup.c b/src/bin/pg_archivecleanup/pg_archivecleanup.c
index c25348bcb85..ab686b4748c 100644
--- a/src/bin/pg_archivecleanup/pg_archivecleanup.c
+++ b/src/bin/pg_archivecleanup/pg_archivecleanup.c
@@ -375,6 +375,10 @@ main(int argc, char **argv)
 		exit(2);
 	}
 
+	if (dryrun)
+		pg_log_info("Executing in dry-run mode.\n"
+					"No files will be removed.");
+
 	/*
 	 * Check archive exists and other initialization if required.
 	 */
diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c
index df41836e70f..cc4be5d6ef4 100644
--- a/src/bin/pg_basebackup/pg_createsubscriber.c
+++ b/src/bin/pg_basebackup/pg_createsubscriber.c
@@ -2305,6 +2305,11 @@ main(int argc, char **argv)
 		pg_log_error_hint("Try \"%s --help\" for more information.", progname);
 		exit(1);
 	}
+
+	if (dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
 	pg_log_info("validating publisher connection string");
 	pub_base_conninfo = get_base_conninfo(opt.pub_conninfo_str,
 										  &dbname_conninfo);
diff --git a/src/bin/pg_combinebackup/pg_combinebackup.c b/src/bin/pg_combinebackup/pg_combinebackup.c
index 3a325127209..c9bf0a9e105 100644
--- a/src/bin/pg_combinebackup/pg_combinebackup.c
+++ b/src/bin/pg_combinebackup/pg_combinebackup.c
@@ -242,6 +242,10 @@ main(int argc, char *argv[])
 	if (opt.no_manifest)
 		opt.manifest_checksums = CHECKSUM_TYPE_NONE;
 
+	if (opt.dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
 	/* Check that the platform supports the requested copy method. */
 	if (opt.copy_method == COPY_METHOD_CLONE)
 	{
diff --git a/src/bin/pg_resetwal/pg_resetwal.c b/src/bin/pg_resetwal/pg_resetwal.c
index a89d72fc5cf..dd5d279521e 100644
--- a/src/bin/pg_resetwal/pg_resetwal.c
+++ b/src/bin/pg_resetwal/pg_resetwal.c
@@ -397,6 +397,10 @@ main(int argc, char *argv[])
 		exit(1);
 	}
 
+	if (noupdate)
+		pg_log_info("Executing in dry-run mode.\n"
+					"Nothing will be modified.");
+
 	/*
 	 * Attempt to read the existing pg_control file
 	 */
diff --git a/src/bin/pg_rewind/pg_rewind.c b/src/bin/pg_rewind/pg_rewind.c
index 27c514f934a..e9364d04f76 100644
--- a/src/bin/pg_rewind/pg_rewind.c
+++ b/src/bin/pg_rewind/pg_rewind.c
@@ -300,10 +300,12 @@ main(int argc, char **argv)
 
 	atexit(disconnect_atexit);
 
-	/*
-	 * Ok, we have all the options and we're ready to start. First, connect to
-	 * remote server.
-	 */
+	/* Ok, we have all the options and we're ready to start. */
+	if (dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
+	/* First, connect to remote server. */
 	if (connstr_source)
 	{
 		conn = PQconnectdb(connstr_source);
-- 
2.47.3


--ibfr3ah5qy6tcbhw--





^ permalink  raw  reply  [nested|flat] 126+ messages in thread

* [PATCH v5] Log a note at program start when running in dry-run mode
@ 2025-11-11 08:54 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 126+ messages in thread

From: Álvaro Herrera @ 2025-11-11 08:54 UTC (permalink / raw)

Users might get some peace of mind knowing their data is not being
destroyed or whatever.

Author: Peter Smith <[email protected]>
Reviewed-by: Álvaro Herrera <[email protected]>
Discussion: https://postgr.es/m/CAHut+PsvQJQnQO0KT0S2oegenkvJ8FUuY-QS5syyqmT24R2xFQ@mail.gmail.com
---
 src/bin/pg_archivecleanup/pg_archivecleanup.c |  4 ++++
 src/bin/pg_basebackup/pg_createsubscriber.c   |  5 +++++
 src/bin/pg_combinebackup/pg_combinebackup.c   |  4 ++++
 src/bin/pg_resetwal/pg_resetwal.c             |  4 ++++
 src/bin/pg_rewind/pg_rewind.c                 | 10 ++++++----
 5 files changed, 23 insertions(+), 4 deletions(-)

diff --git a/src/bin/pg_archivecleanup/pg_archivecleanup.c b/src/bin/pg_archivecleanup/pg_archivecleanup.c
index c25348bcb85..ab686b4748c 100644
--- a/src/bin/pg_archivecleanup/pg_archivecleanup.c
+++ b/src/bin/pg_archivecleanup/pg_archivecleanup.c
@@ -375,6 +375,10 @@ main(int argc, char **argv)
 		exit(2);
 	}
 
+	if (dryrun)
+		pg_log_info("Executing in dry-run mode.\n"
+					"No files will be removed.");
+
 	/*
 	 * Check archive exists and other initialization if required.
 	 */
diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c
index df41836e70f..cc4be5d6ef4 100644
--- a/src/bin/pg_basebackup/pg_createsubscriber.c
+++ b/src/bin/pg_basebackup/pg_createsubscriber.c
@@ -2305,6 +2305,11 @@ main(int argc, char **argv)
 		pg_log_error_hint("Try \"%s --help\" for more information.", progname);
 		exit(1);
 	}
+
+	if (dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
 	pg_log_info("validating publisher connection string");
 	pub_base_conninfo = get_base_conninfo(opt.pub_conninfo_str,
 										  &dbname_conninfo);
diff --git a/src/bin/pg_combinebackup/pg_combinebackup.c b/src/bin/pg_combinebackup/pg_combinebackup.c
index 3a325127209..c9bf0a9e105 100644
--- a/src/bin/pg_combinebackup/pg_combinebackup.c
+++ b/src/bin/pg_combinebackup/pg_combinebackup.c
@@ -242,6 +242,10 @@ main(int argc, char *argv[])
 	if (opt.no_manifest)
 		opt.manifest_checksums = CHECKSUM_TYPE_NONE;
 
+	if (opt.dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
 	/* Check that the platform supports the requested copy method. */
 	if (opt.copy_method == COPY_METHOD_CLONE)
 	{
diff --git a/src/bin/pg_resetwal/pg_resetwal.c b/src/bin/pg_resetwal/pg_resetwal.c
index a89d72fc5cf..dd5d279521e 100644
--- a/src/bin/pg_resetwal/pg_resetwal.c
+++ b/src/bin/pg_resetwal/pg_resetwal.c
@@ -397,6 +397,10 @@ main(int argc, char *argv[])
 		exit(1);
 	}
 
+	if (noupdate)
+		pg_log_info("Executing in dry-run mode.\n"
+					"Nothing will be modified.");
+
 	/*
 	 * Attempt to read the existing pg_control file
 	 */
diff --git a/src/bin/pg_rewind/pg_rewind.c b/src/bin/pg_rewind/pg_rewind.c
index 27c514f934a..e9364d04f76 100644
--- a/src/bin/pg_rewind/pg_rewind.c
+++ b/src/bin/pg_rewind/pg_rewind.c
@@ -300,10 +300,12 @@ main(int argc, char **argv)
 
 	atexit(disconnect_atexit);
 
-	/*
-	 * Ok, we have all the options and we're ready to start. First, connect to
-	 * remote server.
-	 */
+	/* Ok, we have all the options and we're ready to start. */
+	if (dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
+	/* First, connect to remote server. */
 	if (connstr_source)
 	{
 		conn = PQconnectdb(connstr_source);
-- 
2.47.3


--ibfr3ah5qy6tcbhw--





^ permalink  raw  reply  [nested|flat] 126+ messages in thread

* [PATCH v5] Log a note at program start when running in dry-run mode
@ 2025-11-11 08:54 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 126+ messages in thread

From: Álvaro Herrera @ 2025-11-11 08:54 UTC (permalink / raw)

Users might get some peace of mind knowing their data is not being
destroyed or whatever.

Author: Peter Smith <[email protected]>
Reviewed-by: Álvaro Herrera <[email protected]>
Discussion: https://postgr.es/m/CAHut+PsvQJQnQO0KT0S2oegenkvJ8FUuY-QS5syyqmT24R2xFQ@mail.gmail.com
---
 src/bin/pg_archivecleanup/pg_archivecleanup.c |  4 ++++
 src/bin/pg_basebackup/pg_createsubscriber.c   |  5 +++++
 src/bin/pg_combinebackup/pg_combinebackup.c   |  4 ++++
 src/bin/pg_resetwal/pg_resetwal.c             |  4 ++++
 src/bin/pg_rewind/pg_rewind.c                 | 10 ++++++----
 5 files changed, 23 insertions(+), 4 deletions(-)

diff --git a/src/bin/pg_archivecleanup/pg_archivecleanup.c b/src/bin/pg_archivecleanup/pg_archivecleanup.c
index c25348bcb85..ab686b4748c 100644
--- a/src/bin/pg_archivecleanup/pg_archivecleanup.c
+++ b/src/bin/pg_archivecleanup/pg_archivecleanup.c
@@ -375,6 +375,10 @@ main(int argc, char **argv)
 		exit(2);
 	}
 
+	if (dryrun)
+		pg_log_info("Executing in dry-run mode.\n"
+					"No files will be removed.");
+
 	/*
 	 * Check archive exists and other initialization if required.
 	 */
diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c
index df41836e70f..cc4be5d6ef4 100644
--- a/src/bin/pg_basebackup/pg_createsubscriber.c
+++ b/src/bin/pg_basebackup/pg_createsubscriber.c
@@ -2305,6 +2305,11 @@ main(int argc, char **argv)
 		pg_log_error_hint("Try \"%s --help\" for more information.", progname);
 		exit(1);
 	}
+
+	if (dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
 	pg_log_info("validating publisher connection string");
 	pub_base_conninfo = get_base_conninfo(opt.pub_conninfo_str,
 										  &dbname_conninfo);
diff --git a/src/bin/pg_combinebackup/pg_combinebackup.c b/src/bin/pg_combinebackup/pg_combinebackup.c
index 3a325127209..c9bf0a9e105 100644
--- a/src/bin/pg_combinebackup/pg_combinebackup.c
+++ b/src/bin/pg_combinebackup/pg_combinebackup.c
@@ -242,6 +242,10 @@ main(int argc, char *argv[])
 	if (opt.no_manifest)
 		opt.manifest_checksums = CHECKSUM_TYPE_NONE;
 
+	if (opt.dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
 	/* Check that the platform supports the requested copy method. */
 	if (opt.copy_method == COPY_METHOD_CLONE)
 	{
diff --git a/src/bin/pg_resetwal/pg_resetwal.c b/src/bin/pg_resetwal/pg_resetwal.c
index a89d72fc5cf..dd5d279521e 100644
--- a/src/bin/pg_resetwal/pg_resetwal.c
+++ b/src/bin/pg_resetwal/pg_resetwal.c
@@ -397,6 +397,10 @@ main(int argc, char *argv[])
 		exit(1);
 	}
 
+	if (noupdate)
+		pg_log_info("Executing in dry-run mode.\n"
+					"Nothing will be modified.");
+
 	/*
 	 * Attempt to read the existing pg_control file
 	 */
diff --git a/src/bin/pg_rewind/pg_rewind.c b/src/bin/pg_rewind/pg_rewind.c
index 27c514f934a..e9364d04f76 100644
--- a/src/bin/pg_rewind/pg_rewind.c
+++ b/src/bin/pg_rewind/pg_rewind.c
@@ -300,10 +300,12 @@ main(int argc, char **argv)
 
 	atexit(disconnect_atexit);
 
-	/*
-	 * Ok, we have all the options and we're ready to start. First, connect to
-	 * remote server.
-	 */
+	/* Ok, we have all the options and we're ready to start. */
+	if (dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
+	/* First, connect to remote server. */
 	if (connstr_source)
 	{
 		conn = PQconnectdb(connstr_source);
-- 
2.47.3


--ibfr3ah5qy6tcbhw--





^ permalink  raw  reply  [nested|flat] 126+ messages in thread

* [PATCH v5] Log a note at program start when running in dry-run mode
@ 2025-11-11 08:54 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 126+ messages in thread

From: Álvaro Herrera @ 2025-11-11 08:54 UTC (permalink / raw)

Users might get some peace of mind knowing their data is not being
destroyed or whatever.

Author: Peter Smith <[email protected]>
Reviewed-by: Álvaro Herrera <[email protected]>
Discussion: https://postgr.es/m/CAHut+PsvQJQnQO0KT0S2oegenkvJ8FUuY-QS5syyqmT24R2xFQ@mail.gmail.com
---
 src/bin/pg_archivecleanup/pg_archivecleanup.c |  4 ++++
 src/bin/pg_basebackup/pg_createsubscriber.c   |  5 +++++
 src/bin/pg_combinebackup/pg_combinebackup.c   |  4 ++++
 src/bin/pg_resetwal/pg_resetwal.c             |  4 ++++
 src/bin/pg_rewind/pg_rewind.c                 | 10 ++++++----
 5 files changed, 23 insertions(+), 4 deletions(-)

diff --git a/src/bin/pg_archivecleanup/pg_archivecleanup.c b/src/bin/pg_archivecleanup/pg_archivecleanup.c
index c25348bcb85..ab686b4748c 100644
--- a/src/bin/pg_archivecleanup/pg_archivecleanup.c
+++ b/src/bin/pg_archivecleanup/pg_archivecleanup.c
@@ -375,6 +375,10 @@ main(int argc, char **argv)
 		exit(2);
 	}
 
+	if (dryrun)
+		pg_log_info("Executing in dry-run mode.\n"
+					"No files will be removed.");
+
 	/*
 	 * Check archive exists and other initialization if required.
 	 */
diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c
index df41836e70f..cc4be5d6ef4 100644
--- a/src/bin/pg_basebackup/pg_createsubscriber.c
+++ b/src/bin/pg_basebackup/pg_createsubscriber.c
@@ -2305,6 +2305,11 @@ main(int argc, char **argv)
 		pg_log_error_hint("Try \"%s --help\" for more information.", progname);
 		exit(1);
 	}
+
+	if (dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
 	pg_log_info("validating publisher connection string");
 	pub_base_conninfo = get_base_conninfo(opt.pub_conninfo_str,
 										  &dbname_conninfo);
diff --git a/src/bin/pg_combinebackup/pg_combinebackup.c b/src/bin/pg_combinebackup/pg_combinebackup.c
index 3a325127209..c9bf0a9e105 100644
--- a/src/bin/pg_combinebackup/pg_combinebackup.c
+++ b/src/bin/pg_combinebackup/pg_combinebackup.c
@@ -242,6 +242,10 @@ main(int argc, char *argv[])
 	if (opt.no_manifest)
 		opt.manifest_checksums = CHECKSUM_TYPE_NONE;
 
+	if (opt.dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
 	/* Check that the platform supports the requested copy method. */
 	if (opt.copy_method == COPY_METHOD_CLONE)
 	{
diff --git a/src/bin/pg_resetwal/pg_resetwal.c b/src/bin/pg_resetwal/pg_resetwal.c
index a89d72fc5cf..dd5d279521e 100644
--- a/src/bin/pg_resetwal/pg_resetwal.c
+++ b/src/bin/pg_resetwal/pg_resetwal.c
@@ -397,6 +397,10 @@ main(int argc, char *argv[])
 		exit(1);
 	}
 
+	if (noupdate)
+		pg_log_info("Executing in dry-run mode.\n"
+					"Nothing will be modified.");
+
 	/*
 	 * Attempt to read the existing pg_control file
 	 */
diff --git a/src/bin/pg_rewind/pg_rewind.c b/src/bin/pg_rewind/pg_rewind.c
index 27c514f934a..e9364d04f76 100644
--- a/src/bin/pg_rewind/pg_rewind.c
+++ b/src/bin/pg_rewind/pg_rewind.c
@@ -300,10 +300,12 @@ main(int argc, char **argv)
 
 	atexit(disconnect_atexit);
 
-	/*
-	 * Ok, we have all the options and we're ready to start. First, connect to
-	 * remote server.
-	 */
+	/* Ok, we have all the options and we're ready to start. */
+	if (dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
+	/* First, connect to remote server. */
 	if (connstr_source)
 	{
 		conn = PQconnectdb(connstr_source);
-- 
2.47.3


--ibfr3ah5qy6tcbhw--





^ permalink  raw  reply  [nested|flat] 126+ messages in thread

* [PATCH v5] Log a note at program start when running in dry-run mode
@ 2025-11-11 08:54 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 126+ messages in thread

From: Álvaro Herrera @ 2025-11-11 08:54 UTC (permalink / raw)

Users might get some peace of mind knowing their data is not being
destroyed or whatever.

Author: Peter Smith <[email protected]>
Reviewed-by: Álvaro Herrera <[email protected]>
Discussion: https://postgr.es/m/CAHut+PsvQJQnQO0KT0S2oegenkvJ8FUuY-QS5syyqmT24R2xFQ@mail.gmail.com
---
 src/bin/pg_archivecleanup/pg_archivecleanup.c |  4 ++++
 src/bin/pg_basebackup/pg_createsubscriber.c   |  5 +++++
 src/bin/pg_combinebackup/pg_combinebackup.c   |  4 ++++
 src/bin/pg_resetwal/pg_resetwal.c             |  4 ++++
 src/bin/pg_rewind/pg_rewind.c                 | 10 ++++++----
 5 files changed, 23 insertions(+), 4 deletions(-)

diff --git a/src/bin/pg_archivecleanup/pg_archivecleanup.c b/src/bin/pg_archivecleanup/pg_archivecleanup.c
index c25348bcb85..ab686b4748c 100644
--- a/src/bin/pg_archivecleanup/pg_archivecleanup.c
+++ b/src/bin/pg_archivecleanup/pg_archivecleanup.c
@@ -375,6 +375,10 @@ main(int argc, char **argv)
 		exit(2);
 	}
 
+	if (dryrun)
+		pg_log_info("Executing in dry-run mode.\n"
+					"No files will be removed.");
+
 	/*
 	 * Check archive exists and other initialization if required.
 	 */
diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c
index df41836e70f..cc4be5d6ef4 100644
--- a/src/bin/pg_basebackup/pg_createsubscriber.c
+++ b/src/bin/pg_basebackup/pg_createsubscriber.c
@@ -2305,6 +2305,11 @@ main(int argc, char **argv)
 		pg_log_error_hint("Try \"%s --help\" for more information.", progname);
 		exit(1);
 	}
+
+	if (dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
 	pg_log_info("validating publisher connection string");
 	pub_base_conninfo = get_base_conninfo(opt.pub_conninfo_str,
 										  &dbname_conninfo);
diff --git a/src/bin/pg_combinebackup/pg_combinebackup.c b/src/bin/pg_combinebackup/pg_combinebackup.c
index 3a325127209..c9bf0a9e105 100644
--- a/src/bin/pg_combinebackup/pg_combinebackup.c
+++ b/src/bin/pg_combinebackup/pg_combinebackup.c
@@ -242,6 +242,10 @@ main(int argc, char *argv[])
 	if (opt.no_manifest)
 		opt.manifest_checksums = CHECKSUM_TYPE_NONE;
 
+	if (opt.dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
 	/* Check that the platform supports the requested copy method. */
 	if (opt.copy_method == COPY_METHOD_CLONE)
 	{
diff --git a/src/bin/pg_resetwal/pg_resetwal.c b/src/bin/pg_resetwal/pg_resetwal.c
index a89d72fc5cf..dd5d279521e 100644
--- a/src/bin/pg_resetwal/pg_resetwal.c
+++ b/src/bin/pg_resetwal/pg_resetwal.c
@@ -397,6 +397,10 @@ main(int argc, char *argv[])
 		exit(1);
 	}
 
+	if (noupdate)
+		pg_log_info("Executing in dry-run mode.\n"
+					"Nothing will be modified.");
+
 	/*
 	 * Attempt to read the existing pg_control file
 	 */
diff --git a/src/bin/pg_rewind/pg_rewind.c b/src/bin/pg_rewind/pg_rewind.c
index 27c514f934a..e9364d04f76 100644
--- a/src/bin/pg_rewind/pg_rewind.c
+++ b/src/bin/pg_rewind/pg_rewind.c
@@ -300,10 +300,12 @@ main(int argc, char **argv)
 
 	atexit(disconnect_atexit);
 
-	/*
-	 * Ok, we have all the options and we're ready to start. First, connect to
-	 * remote server.
-	 */
+	/* Ok, we have all the options and we're ready to start. */
+	if (dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
+	/* First, connect to remote server. */
 	if (connstr_source)
 	{
 		conn = PQconnectdb(connstr_source);
-- 
2.47.3


--ibfr3ah5qy6tcbhw--





^ permalink  raw  reply  [nested|flat] 126+ messages in thread

* [PATCH v5] Log a note at program start when running in dry-run mode
@ 2025-11-11 08:54 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 126+ messages in thread

From: Álvaro Herrera @ 2025-11-11 08:54 UTC (permalink / raw)

Users might get some peace of mind knowing their data is not being
destroyed or whatever.

Author: Peter Smith <[email protected]>
Reviewed-by: Álvaro Herrera <[email protected]>
Discussion: https://postgr.es/m/CAHut+PsvQJQnQO0KT0S2oegenkvJ8FUuY-QS5syyqmT24R2xFQ@mail.gmail.com
---
 src/bin/pg_archivecleanup/pg_archivecleanup.c |  4 ++++
 src/bin/pg_basebackup/pg_createsubscriber.c   |  5 +++++
 src/bin/pg_combinebackup/pg_combinebackup.c   |  4 ++++
 src/bin/pg_resetwal/pg_resetwal.c             |  4 ++++
 src/bin/pg_rewind/pg_rewind.c                 | 10 ++++++----
 5 files changed, 23 insertions(+), 4 deletions(-)

diff --git a/src/bin/pg_archivecleanup/pg_archivecleanup.c b/src/bin/pg_archivecleanup/pg_archivecleanup.c
index c25348bcb85..ab686b4748c 100644
--- a/src/bin/pg_archivecleanup/pg_archivecleanup.c
+++ b/src/bin/pg_archivecleanup/pg_archivecleanup.c
@@ -375,6 +375,10 @@ main(int argc, char **argv)
 		exit(2);
 	}
 
+	if (dryrun)
+		pg_log_info("Executing in dry-run mode.\n"
+					"No files will be removed.");
+
 	/*
 	 * Check archive exists and other initialization if required.
 	 */
diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c
index df41836e70f..cc4be5d6ef4 100644
--- a/src/bin/pg_basebackup/pg_createsubscriber.c
+++ b/src/bin/pg_basebackup/pg_createsubscriber.c
@@ -2305,6 +2305,11 @@ main(int argc, char **argv)
 		pg_log_error_hint("Try \"%s --help\" for more information.", progname);
 		exit(1);
 	}
+
+	if (dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
 	pg_log_info("validating publisher connection string");
 	pub_base_conninfo = get_base_conninfo(opt.pub_conninfo_str,
 										  &dbname_conninfo);
diff --git a/src/bin/pg_combinebackup/pg_combinebackup.c b/src/bin/pg_combinebackup/pg_combinebackup.c
index 3a325127209..c9bf0a9e105 100644
--- a/src/bin/pg_combinebackup/pg_combinebackup.c
+++ b/src/bin/pg_combinebackup/pg_combinebackup.c
@@ -242,6 +242,10 @@ main(int argc, char *argv[])
 	if (opt.no_manifest)
 		opt.manifest_checksums = CHECKSUM_TYPE_NONE;
 
+	if (opt.dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
 	/* Check that the platform supports the requested copy method. */
 	if (opt.copy_method == COPY_METHOD_CLONE)
 	{
diff --git a/src/bin/pg_resetwal/pg_resetwal.c b/src/bin/pg_resetwal/pg_resetwal.c
index a89d72fc5cf..dd5d279521e 100644
--- a/src/bin/pg_resetwal/pg_resetwal.c
+++ b/src/bin/pg_resetwal/pg_resetwal.c
@@ -397,6 +397,10 @@ main(int argc, char *argv[])
 		exit(1);
 	}
 
+	if (noupdate)
+		pg_log_info("Executing in dry-run mode.\n"
+					"Nothing will be modified.");
+
 	/*
 	 * Attempt to read the existing pg_control file
 	 */
diff --git a/src/bin/pg_rewind/pg_rewind.c b/src/bin/pg_rewind/pg_rewind.c
index 27c514f934a..e9364d04f76 100644
--- a/src/bin/pg_rewind/pg_rewind.c
+++ b/src/bin/pg_rewind/pg_rewind.c
@@ -300,10 +300,12 @@ main(int argc, char **argv)
 
 	atexit(disconnect_atexit);
 
-	/*
-	 * Ok, we have all the options and we're ready to start. First, connect to
-	 * remote server.
-	 */
+	/* Ok, we have all the options and we're ready to start. */
+	if (dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
+	/* First, connect to remote server. */
 	if (connstr_source)
 	{
 		conn = PQconnectdb(connstr_source);
-- 
2.47.3


--ibfr3ah5qy6tcbhw--





^ permalink  raw  reply  [nested|flat] 126+ messages in thread

* [PATCH v5] Log a note at program start when running in dry-run mode
@ 2025-11-11 08:54 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 126+ messages in thread

From: Álvaro Herrera @ 2025-11-11 08:54 UTC (permalink / raw)

Users might get some peace of mind knowing their data is not being
destroyed or whatever.

Author: Peter Smith <[email protected]>
Reviewed-by: Álvaro Herrera <[email protected]>
Discussion: https://postgr.es/m/CAHut+PsvQJQnQO0KT0S2oegenkvJ8FUuY-QS5syyqmT24R2xFQ@mail.gmail.com
---
 src/bin/pg_archivecleanup/pg_archivecleanup.c |  4 ++++
 src/bin/pg_basebackup/pg_createsubscriber.c   |  5 +++++
 src/bin/pg_combinebackup/pg_combinebackup.c   |  4 ++++
 src/bin/pg_resetwal/pg_resetwal.c             |  4 ++++
 src/bin/pg_rewind/pg_rewind.c                 | 10 ++++++----
 5 files changed, 23 insertions(+), 4 deletions(-)

diff --git a/src/bin/pg_archivecleanup/pg_archivecleanup.c b/src/bin/pg_archivecleanup/pg_archivecleanup.c
index c25348bcb85..ab686b4748c 100644
--- a/src/bin/pg_archivecleanup/pg_archivecleanup.c
+++ b/src/bin/pg_archivecleanup/pg_archivecleanup.c
@@ -375,6 +375,10 @@ main(int argc, char **argv)
 		exit(2);
 	}
 
+	if (dryrun)
+		pg_log_info("Executing in dry-run mode.\n"
+					"No files will be removed.");
+
 	/*
 	 * Check archive exists and other initialization if required.
 	 */
diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c
index df41836e70f..cc4be5d6ef4 100644
--- a/src/bin/pg_basebackup/pg_createsubscriber.c
+++ b/src/bin/pg_basebackup/pg_createsubscriber.c
@@ -2305,6 +2305,11 @@ main(int argc, char **argv)
 		pg_log_error_hint("Try \"%s --help\" for more information.", progname);
 		exit(1);
 	}
+
+	if (dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
 	pg_log_info("validating publisher connection string");
 	pub_base_conninfo = get_base_conninfo(opt.pub_conninfo_str,
 										  &dbname_conninfo);
diff --git a/src/bin/pg_combinebackup/pg_combinebackup.c b/src/bin/pg_combinebackup/pg_combinebackup.c
index 3a325127209..c9bf0a9e105 100644
--- a/src/bin/pg_combinebackup/pg_combinebackup.c
+++ b/src/bin/pg_combinebackup/pg_combinebackup.c
@@ -242,6 +242,10 @@ main(int argc, char *argv[])
 	if (opt.no_manifest)
 		opt.manifest_checksums = CHECKSUM_TYPE_NONE;
 
+	if (opt.dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
 	/* Check that the platform supports the requested copy method. */
 	if (opt.copy_method == COPY_METHOD_CLONE)
 	{
diff --git a/src/bin/pg_resetwal/pg_resetwal.c b/src/bin/pg_resetwal/pg_resetwal.c
index a89d72fc5cf..dd5d279521e 100644
--- a/src/bin/pg_resetwal/pg_resetwal.c
+++ b/src/bin/pg_resetwal/pg_resetwal.c
@@ -397,6 +397,10 @@ main(int argc, char *argv[])
 		exit(1);
 	}
 
+	if (noupdate)
+		pg_log_info("Executing in dry-run mode.\n"
+					"Nothing will be modified.");
+
 	/*
 	 * Attempt to read the existing pg_control file
 	 */
diff --git a/src/bin/pg_rewind/pg_rewind.c b/src/bin/pg_rewind/pg_rewind.c
index 27c514f934a..e9364d04f76 100644
--- a/src/bin/pg_rewind/pg_rewind.c
+++ b/src/bin/pg_rewind/pg_rewind.c
@@ -300,10 +300,12 @@ main(int argc, char **argv)
 
 	atexit(disconnect_atexit);
 
-	/*
-	 * Ok, we have all the options and we're ready to start. First, connect to
-	 * remote server.
-	 */
+	/* Ok, we have all the options and we're ready to start. */
+	if (dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
+	/* First, connect to remote server. */
 	if (connstr_source)
 	{
 		conn = PQconnectdb(connstr_source);
-- 
2.47.3


--ibfr3ah5qy6tcbhw--





^ permalink  raw  reply  [nested|flat] 126+ messages in thread

* [PATCH v5] Log a note at program start when running in dry-run mode
@ 2025-11-11 08:54 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 126+ messages in thread

From: Álvaro Herrera @ 2025-11-11 08:54 UTC (permalink / raw)

Users might get some peace of mind knowing their data is not being
destroyed or whatever.

Author: Peter Smith <[email protected]>
Reviewed-by: Álvaro Herrera <[email protected]>
Discussion: https://postgr.es/m/CAHut+PsvQJQnQO0KT0S2oegenkvJ8FUuY-QS5syyqmT24R2xFQ@mail.gmail.com
---
 src/bin/pg_archivecleanup/pg_archivecleanup.c |  4 ++++
 src/bin/pg_basebackup/pg_createsubscriber.c   |  5 +++++
 src/bin/pg_combinebackup/pg_combinebackup.c   |  4 ++++
 src/bin/pg_resetwal/pg_resetwal.c             |  4 ++++
 src/bin/pg_rewind/pg_rewind.c                 | 10 ++++++----
 5 files changed, 23 insertions(+), 4 deletions(-)

diff --git a/src/bin/pg_archivecleanup/pg_archivecleanup.c b/src/bin/pg_archivecleanup/pg_archivecleanup.c
index c25348bcb85..ab686b4748c 100644
--- a/src/bin/pg_archivecleanup/pg_archivecleanup.c
+++ b/src/bin/pg_archivecleanup/pg_archivecleanup.c
@@ -375,6 +375,10 @@ main(int argc, char **argv)
 		exit(2);
 	}
 
+	if (dryrun)
+		pg_log_info("Executing in dry-run mode.\n"
+					"No files will be removed.");
+
 	/*
 	 * Check archive exists and other initialization if required.
 	 */
diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c
index df41836e70f..cc4be5d6ef4 100644
--- a/src/bin/pg_basebackup/pg_createsubscriber.c
+++ b/src/bin/pg_basebackup/pg_createsubscriber.c
@@ -2305,6 +2305,11 @@ main(int argc, char **argv)
 		pg_log_error_hint("Try \"%s --help\" for more information.", progname);
 		exit(1);
 	}
+
+	if (dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
 	pg_log_info("validating publisher connection string");
 	pub_base_conninfo = get_base_conninfo(opt.pub_conninfo_str,
 										  &dbname_conninfo);
diff --git a/src/bin/pg_combinebackup/pg_combinebackup.c b/src/bin/pg_combinebackup/pg_combinebackup.c
index 3a325127209..c9bf0a9e105 100644
--- a/src/bin/pg_combinebackup/pg_combinebackup.c
+++ b/src/bin/pg_combinebackup/pg_combinebackup.c
@@ -242,6 +242,10 @@ main(int argc, char *argv[])
 	if (opt.no_manifest)
 		opt.manifest_checksums = CHECKSUM_TYPE_NONE;
 
+	if (opt.dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
 	/* Check that the platform supports the requested copy method. */
 	if (opt.copy_method == COPY_METHOD_CLONE)
 	{
diff --git a/src/bin/pg_resetwal/pg_resetwal.c b/src/bin/pg_resetwal/pg_resetwal.c
index a89d72fc5cf..dd5d279521e 100644
--- a/src/bin/pg_resetwal/pg_resetwal.c
+++ b/src/bin/pg_resetwal/pg_resetwal.c
@@ -397,6 +397,10 @@ main(int argc, char *argv[])
 		exit(1);
 	}
 
+	if (noupdate)
+		pg_log_info("Executing in dry-run mode.\n"
+					"Nothing will be modified.");
+
 	/*
 	 * Attempt to read the existing pg_control file
 	 */
diff --git a/src/bin/pg_rewind/pg_rewind.c b/src/bin/pg_rewind/pg_rewind.c
index 27c514f934a..e9364d04f76 100644
--- a/src/bin/pg_rewind/pg_rewind.c
+++ b/src/bin/pg_rewind/pg_rewind.c
@@ -300,10 +300,12 @@ main(int argc, char **argv)
 
 	atexit(disconnect_atexit);
 
-	/*
-	 * Ok, we have all the options and we're ready to start. First, connect to
-	 * remote server.
-	 */
+	/* Ok, we have all the options and we're ready to start. */
+	if (dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
+	/* First, connect to remote server. */
 	if (connstr_source)
 	{
 		conn = PQconnectdb(connstr_source);
-- 
2.47.3


--ibfr3ah5qy6tcbhw--





^ permalink  raw  reply  [nested|flat] 126+ messages in thread

* [PATCH v5] Log a note at program start when running in dry-run mode
@ 2025-11-11 08:54 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 126+ messages in thread

From: Álvaro Herrera @ 2025-11-11 08:54 UTC (permalink / raw)

Users might get some peace of mind knowing their data is not being
destroyed or whatever.

Author: Peter Smith <[email protected]>
Reviewed-by: Álvaro Herrera <[email protected]>
Discussion: https://postgr.es/m/CAHut+PsvQJQnQO0KT0S2oegenkvJ8FUuY-QS5syyqmT24R2xFQ@mail.gmail.com
---
 src/bin/pg_archivecleanup/pg_archivecleanup.c |  4 ++++
 src/bin/pg_basebackup/pg_createsubscriber.c   |  5 +++++
 src/bin/pg_combinebackup/pg_combinebackup.c   |  4 ++++
 src/bin/pg_resetwal/pg_resetwal.c             |  4 ++++
 src/bin/pg_rewind/pg_rewind.c                 | 10 ++++++----
 5 files changed, 23 insertions(+), 4 deletions(-)

diff --git a/src/bin/pg_archivecleanup/pg_archivecleanup.c b/src/bin/pg_archivecleanup/pg_archivecleanup.c
index c25348bcb85..ab686b4748c 100644
--- a/src/bin/pg_archivecleanup/pg_archivecleanup.c
+++ b/src/bin/pg_archivecleanup/pg_archivecleanup.c
@@ -375,6 +375,10 @@ main(int argc, char **argv)
 		exit(2);
 	}
 
+	if (dryrun)
+		pg_log_info("Executing in dry-run mode.\n"
+					"No files will be removed.");
+
 	/*
 	 * Check archive exists and other initialization if required.
 	 */
diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c
index df41836e70f..cc4be5d6ef4 100644
--- a/src/bin/pg_basebackup/pg_createsubscriber.c
+++ b/src/bin/pg_basebackup/pg_createsubscriber.c
@@ -2305,6 +2305,11 @@ main(int argc, char **argv)
 		pg_log_error_hint("Try \"%s --help\" for more information.", progname);
 		exit(1);
 	}
+
+	if (dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
 	pg_log_info("validating publisher connection string");
 	pub_base_conninfo = get_base_conninfo(opt.pub_conninfo_str,
 										  &dbname_conninfo);
diff --git a/src/bin/pg_combinebackup/pg_combinebackup.c b/src/bin/pg_combinebackup/pg_combinebackup.c
index 3a325127209..c9bf0a9e105 100644
--- a/src/bin/pg_combinebackup/pg_combinebackup.c
+++ b/src/bin/pg_combinebackup/pg_combinebackup.c
@@ -242,6 +242,10 @@ main(int argc, char *argv[])
 	if (opt.no_manifest)
 		opt.manifest_checksums = CHECKSUM_TYPE_NONE;
 
+	if (opt.dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
 	/* Check that the platform supports the requested copy method. */
 	if (opt.copy_method == COPY_METHOD_CLONE)
 	{
diff --git a/src/bin/pg_resetwal/pg_resetwal.c b/src/bin/pg_resetwal/pg_resetwal.c
index a89d72fc5cf..dd5d279521e 100644
--- a/src/bin/pg_resetwal/pg_resetwal.c
+++ b/src/bin/pg_resetwal/pg_resetwal.c
@@ -397,6 +397,10 @@ main(int argc, char *argv[])
 		exit(1);
 	}
 
+	if (noupdate)
+		pg_log_info("Executing in dry-run mode.\n"
+					"Nothing will be modified.");
+
 	/*
 	 * Attempt to read the existing pg_control file
 	 */
diff --git a/src/bin/pg_rewind/pg_rewind.c b/src/bin/pg_rewind/pg_rewind.c
index 27c514f934a..e9364d04f76 100644
--- a/src/bin/pg_rewind/pg_rewind.c
+++ b/src/bin/pg_rewind/pg_rewind.c
@@ -300,10 +300,12 @@ main(int argc, char **argv)
 
 	atexit(disconnect_atexit);
 
-	/*
-	 * Ok, we have all the options and we're ready to start. First, connect to
-	 * remote server.
-	 */
+	/* Ok, we have all the options and we're ready to start. */
+	if (dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
+	/* First, connect to remote server. */
 	if (connstr_source)
 	{
 		conn = PQconnectdb(connstr_source);
-- 
2.47.3


--ibfr3ah5qy6tcbhw--





^ permalink  raw  reply  [nested|flat] 126+ messages in thread

* [PATCH v5] Log a note at program start when running in dry-run mode
@ 2025-11-11 08:54 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 126+ messages in thread

From: Álvaro Herrera @ 2025-11-11 08:54 UTC (permalink / raw)

Users might get some peace of mind knowing their data is not being
destroyed or whatever.

Author: Peter Smith <[email protected]>
Reviewed-by: Álvaro Herrera <[email protected]>
Discussion: https://postgr.es/m/CAHut+PsvQJQnQO0KT0S2oegenkvJ8FUuY-QS5syyqmT24R2xFQ@mail.gmail.com
---
 src/bin/pg_archivecleanup/pg_archivecleanup.c |  4 ++++
 src/bin/pg_basebackup/pg_createsubscriber.c   |  5 +++++
 src/bin/pg_combinebackup/pg_combinebackup.c   |  4 ++++
 src/bin/pg_resetwal/pg_resetwal.c             |  4 ++++
 src/bin/pg_rewind/pg_rewind.c                 | 10 ++++++----
 5 files changed, 23 insertions(+), 4 deletions(-)

diff --git a/src/bin/pg_archivecleanup/pg_archivecleanup.c b/src/bin/pg_archivecleanup/pg_archivecleanup.c
index c25348bcb85..ab686b4748c 100644
--- a/src/bin/pg_archivecleanup/pg_archivecleanup.c
+++ b/src/bin/pg_archivecleanup/pg_archivecleanup.c
@@ -375,6 +375,10 @@ main(int argc, char **argv)
 		exit(2);
 	}
 
+	if (dryrun)
+		pg_log_info("Executing in dry-run mode.\n"
+					"No files will be removed.");
+
 	/*
 	 * Check archive exists and other initialization if required.
 	 */
diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c
index df41836e70f..cc4be5d6ef4 100644
--- a/src/bin/pg_basebackup/pg_createsubscriber.c
+++ b/src/bin/pg_basebackup/pg_createsubscriber.c
@@ -2305,6 +2305,11 @@ main(int argc, char **argv)
 		pg_log_error_hint("Try \"%s --help\" for more information.", progname);
 		exit(1);
 	}
+
+	if (dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
 	pg_log_info("validating publisher connection string");
 	pub_base_conninfo = get_base_conninfo(opt.pub_conninfo_str,
 										  &dbname_conninfo);
diff --git a/src/bin/pg_combinebackup/pg_combinebackup.c b/src/bin/pg_combinebackup/pg_combinebackup.c
index 3a325127209..c9bf0a9e105 100644
--- a/src/bin/pg_combinebackup/pg_combinebackup.c
+++ b/src/bin/pg_combinebackup/pg_combinebackup.c
@@ -242,6 +242,10 @@ main(int argc, char *argv[])
 	if (opt.no_manifest)
 		opt.manifest_checksums = CHECKSUM_TYPE_NONE;
 
+	if (opt.dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
 	/* Check that the platform supports the requested copy method. */
 	if (opt.copy_method == COPY_METHOD_CLONE)
 	{
diff --git a/src/bin/pg_resetwal/pg_resetwal.c b/src/bin/pg_resetwal/pg_resetwal.c
index a89d72fc5cf..dd5d279521e 100644
--- a/src/bin/pg_resetwal/pg_resetwal.c
+++ b/src/bin/pg_resetwal/pg_resetwal.c
@@ -397,6 +397,10 @@ main(int argc, char *argv[])
 		exit(1);
 	}
 
+	if (noupdate)
+		pg_log_info("Executing in dry-run mode.\n"
+					"Nothing will be modified.");
+
 	/*
 	 * Attempt to read the existing pg_control file
 	 */
diff --git a/src/bin/pg_rewind/pg_rewind.c b/src/bin/pg_rewind/pg_rewind.c
index 27c514f934a..e9364d04f76 100644
--- a/src/bin/pg_rewind/pg_rewind.c
+++ b/src/bin/pg_rewind/pg_rewind.c
@@ -300,10 +300,12 @@ main(int argc, char **argv)
 
 	atexit(disconnect_atexit);
 
-	/*
-	 * Ok, we have all the options and we're ready to start. First, connect to
-	 * remote server.
-	 */
+	/* Ok, we have all the options and we're ready to start. */
+	if (dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
+	/* First, connect to remote server. */
 	if (connstr_source)
 	{
 		conn = PQconnectdb(connstr_source);
-- 
2.47.3


--ibfr3ah5qy6tcbhw--





^ permalink  raw  reply  [nested|flat] 126+ messages in thread

* [PATCH v5] Log a note at program start when running in dry-run mode
@ 2025-11-11 08:54 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 126+ messages in thread

From: Álvaro Herrera @ 2025-11-11 08:54 UTC (permalink / raw)

Users might get some peace of mind knowing their data is not being
destroyed or whatever.

Author: Peter Smith <[email protected]>
Reviewed-by: Álvaro Herrera <[email protected]>
Discussion: https://postgr.es/m/CAHut+PsvQJQnQO0KT0S2oegenkvJ8FUuY-QS5syyqmT24R2xFQ@mail.gmail.com
---
 src/bin/pg_archivecleanup/pg_archivecleanup.c |  4 ++++
 src/bin/pg_basebackup/pg_createsubscriber.c   |  5 +++++
 src/bin/pg_combinebackup/pg_combinebackup.c   |  4 ++++
 src/bin/pg_resetwal/pg_resetwal.c             |  4 ++++
 src/bin/pg_rewind/pg_rewind.c                 | 10 ++++++----
 5 files changed, 23 insertions(+), 4 deletions(-)

diff --git a/src/bin/pg_archivecleanup/pg_archivecleanup.c b/src/bin/pg_archivecleanup/pg_archivecleanup.c
index c25348bcb85..ab686b4748c 100644
--- a/src/bin/pg_archivecleanup/pg_archivecleanup.c
+++ b/src/bin/pg_archivecleanup/pg_archivecleanup.c
@@ -375,6 +375,10 @@ main(int argc, char **argv)
 		exit(2);
 	}
 
+	if (dryrun)
+		pg_log_info("Executing in dry-run mode.\n"
+					"No files will be removed.");
+
 	/*
 	 * Check archive exists and other initialization if required.
 	 */
diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c
index df41836e70f..cc4be5d6ef4 100644
--- a/src/bin/pg_basebackup/pg_createsubscriber.c
+++ b/src/bin/pg_basebackup/pg_createsubscriber.c
@@ -2305,6 +2305,11 @@ main(int argc, char **argv)
 		pg_log_error_hint("Try \"%s --help\" for more information.", progname);
 		exit(1);
 	}
+
+	if (dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
 	pg_log_info("validating publisher connection string");
 	pub_base_conninfo = get_base_conninfo(opt.pub_conninfo_str,
 										  &dbname_conninfo);
diff --git a/src/bin/pg_combinebackup/pg_combinebackup.c b/src/bin/pg_combinebackup/pg_combinebackup.c
index 3a325127209..c9bf0a9e105 100644
--- a/src/bin/pg_combinebackup/pg_combinebackup.c
+++ b/src/bin/pg_combinebackup/pg_combinebackup.c
@@ -242,6 +242,10 @@ main(int argc, char *argv[])
 	if (opt.no_manifest)
 		opt.manifest_checksums = CHECKSUM_TYPE_NONE;
 
+	if (opt.dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
 	/* Check that the platform supports the requested copy method. */
 	if (opt.copy_method == COPY_METHOD_CLONE)
 	{
diff --git a/src/bin/pg_resetwal/pg_resetwal.c b/src/bin/pg_resetwal/pg_resetwal.c
index a89d72fc5cf..dd5d279521e 100644
--- a/src/bin/pg_resetwal/pg_resetwal.c
+++ b/src/bin/pg_resetwal/pg_resetwal.c
@@ -397,6 +397,10 @@ main(int argc, char *argv[])
 		exit(1);
 	}
 
+	if (noupdate)
+		pg_log_info("Executing in dry-run mode.\n"
+					"Nothing will be modified.");
+
 	/*
 	 * Attempt to read the existing pg_control file
 	 */
diff --git a/src/bin/pg_rewind/pg_rewind.c b/src/bin/pg_rewind/pg_rewind.c
index 27c514f934a..e9364d04f76 100644
--- a/src/bin/pg_rewind/pg_rewind.c
+++ b/src/bin/pg_rewind/pg_rewind.c
@@ -300,10 +300,12 @@ main(int argc, char **argv)
 
 	atexit(disconnect_atexit);
 
-	/*
-	 * Ok, we have all the options and we're ready to start. First, connect to
-	 * remote server.
-	 */
+	/* Ok, we have all the options and we're ready to start. */
+	if (dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
+	/* First, connect to remote server. */
 	if (connstr_source)
 	{
 		conn = PQconnectdb(connstr_source);
-- 
2.47.3


--ibfr3ah5qy6tcbhw--





^ permalink  raw  reply  [nested|flat] 126+ messages in thread

* [PATCH v5] Log a note at program start when running in dry-run mode
@ 2025-11-11 08:54 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 126+ messages in thread

From: Álvaro Herrera @ 2025-11-11 08:54 UTC (permalink / raw)

Users might get some peace of mind knowing their data is not being
destroyed or whatever.

Author: Peter Smith <[email protected]>
Reviewed-by: Álvaro Herrera <[email protected]>
Discussion: https://postgr.es/m/CAHut+PsvQJQnQO0KT0S2oegenkvJ8FUuY-QS5syyqmT24R2xFQ@mail.gmail.com
---
 src/bin/pg_archivecleanup/pg_archivecleanup.c |  4 ++++
 src/bin/pg_basebackup/pg_createsubscriber.c   |  5 +++++
 src/bin/pg_combinebackup/pg_combinebackup.c   |  4 ++++
 src/bin/pg_resetwal/pg_resetwal.c             |  4 ++++
 src/bin/pg_rewind/pg_rewind.c                 | 10 ++++++----
 5 files changed, 23 insertions(+), 4 deletions(-)

diff --git a/src/bin/pg_archivecleanup/pg_archivecleanup.c b/src/bin/pg_archivecleanup/pg_archivecleanup.c
index c25348bcb85..ab686b4748c 100644
--- a/src/bin/pg_archivecleanup/pg_archivecleanup.c
+++ b/src/bin/pg_archivecleanup/pg_archivecleanup.c
@@ -375,6 +375,10 @@ main(int argc, char **argv)
 		exit(2);
 	}
 
+	if (dryrun)
+		pg_log_info("Executing in dry-run mode.\n"
+					"No files will be removed.");
+
 	/*
 	 * Check archive exists and other initialization if required.
 	 */
diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c
index df41836e70f..cc4be5d6ef4 100644
--- a/src/bin/pg_basebackup/pg_createsubscriber.c
+++ b/src/bin/pg_basebackup/pg_createsubscriber.c
@@ -2305,6 +2305,11 @@ main(int argc, char **argv)
 		pg_log_error_hint("Try \"%s --help\" for more information.", progname);
 		exit(1);
 	}
+
+	if (dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
 	pg_log_info("validating publisher connection string");
 	pub_base_conninfo = get_base_conninfo(opt.pub_conninfo_str,
 										  &dbname_conninfo);
diff --git a/src/bin/pg_combinebackup/pg_combinebackup.c b/src/bin/pg_combinebackup/pg_combinebackup.c
index 3a325127209..c9bf0a9e105 100644
--- a/src/bin/pg_combinebackup/pg_combinebackup.c
+++ b/src/bin/pg_combinebackup/pg_combinebackup.c
@@ -242,6 +242,10 @@ main(int argc, char *argv[])
 	if (opt.no_manifest)
 		opt.manifest_checksums = CHECKSUM_TYPE_NONE;
 
+	if (opt.dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
 	/* Check that the platform supports the requested copy method. */
 	if (opt.copy_method == COPY_METHOD_CLONE)
 	{
diff --git a/src/bin/pg_resetwal/pg_resetwal.c b/src/bin/pg_resetwal/pg_resetwal.c
index a89d72fc5cf..dd5d279521e 100644
--- a/src/bin/pg_resetwal/pg_resetwal.c
+++ b/src/bin/pg_resetwal/pg_resetwal.c
@@ -397,6 +397,10 @@ main(int argc, char *argv[])
 		exit(1);
 	}
 
+	if (noupdate)
+		pg_log_info("Executing in dry-run mode.\n"
+					"Nothing will be modified.");
+
 	/*
 	 * Attempt to read the existing pg_control file
 	 */
diff --git a/src/bin/pg_rewind/pg_rewind.c b/src/bin/pg_rewind/pg_rewind.c
index 27c514f934a..e9364d04f76 100644
--- a/src/bin/pg_rewind/pg_rewind.c
+++ b/src/bin/pg_rewind/pg_rewind.c
@@ -300,10 +300,12 @@ main(int argc, char **argv)
 
 	atexit(disconnect_atexit);
 
-	/*
-	 * Ok, we have all the options and we're ready to start. First, connect to
-	 * remote server.
-	 */
+	/* Ok, we have all the options and we're ready to start. */
+	if (dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
+	/* First, connect to remote server. */
 	if (connstr_source)
 	{
 		conn = PQconnectdb(connstr_source);
-- 
2.47.3


--ibfr3ah5qy6tcbhw--





^ permalink  raw  reply  [nested|flat] 126+ messages in thread

* [PATCH v5] Log a note at program start when running in dry-run mode
@ 2025-11-11 08:54 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 126+ messages in thread

From: Álvaro Herrera @ 2025-11-11 08:54 UTC (permalink / raw)

Users might get some peace of mind knowing their data is not being
destroyed or whatever.

Author: Peter Smith <[email protected]>
Reviewed-by: Álvaro Herrera <[email protected]>
Discussion: https://postgr.es/m/CAHut+PsvQJQnQO0KT0S2oegenkvJ8FUuY-QS5syyqmT24R2xFQ@mail.gmail.com
---
 src/bin/pg_archivecleanup/pg_archivecleanup.c |  4 ++++
 src/bin/pg_basebackup/pg_createsubscriber.c   |  5 +++++
 src/bin/pg_combinebackup/pg_combinebackup.c   |  4 ++++
 src/bin/pg_resetwal/pg_resetwal.c             |  4 ++++
 src/bin/pg_rewind/pg_rewind.c                 | 10 ++++++----
 5 files changed, 23 insertions(+), 4 deletions(-)

diff --git a/src/bin/pg_archivecleanup/pg_archivecleanup.c b/src/bin/pg_archivecleanup/pg_archivecleanup.c
index c25348bcb85..ab686b4748c 100644
--- a/src/bin/pg_archivecleanup/pg_archivecleanup.c
+++ b/src/bin/pg_archivecleanup/pg_archivecleanup.c
@@ -375,6 +375,10 @@ main(int argc, char **argv)
 		exit(2);
 	}
 
+	if (dryrun)
+		pg_log_info("Executing in dry-run mode.\n"
+					"No files will be removed.");
+
 	/*
 	 * Check archive exists and other initialization if required.
 	 */
diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c
index df41836e70f..cc4be5d6ef4 100644
--- a/src/bin/pg_basebackup/pg_createsubscriber.c
+++ b/src/bin/pg_basebackup/pg_createsubscriber.c
@@ -2305,6 +2305,11 @@ main(int argc, char **argv)
 		pg_log_error_hint("Try \"%s --help\" for more information.", progname);
 		exit(1);
 	}
+
+	if (dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
 	pg_log_info("validating publisher connection string");
 	pub_base_conninfo = get_base_conninfo(opt.pub_conninfo_str,
 										  &dbname_conninfo);
diff --git a/src/bin/pg_combinebackup/pg_combinebackup.c b/src/bin/pg_combinebackup/pg_combinebackup.c
index 3a325127209..c9bf0a9e105 100644
--- a/src/bin/pg_combinebackup/pg_combinebackup.c
+++ b/src/bin/pg_combinebackup/pg_combinebackup.c
@@ -242,6 +242,10 @@ main(int argc, char *argv[])
 	if (opt.no_manifest)
 		opt.manifest_checksums = CHECKSUM_TYPE_NONE;
 
+	if (opt.dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
 	/* Check that the platform supports the requested copy method. */
 	if (opt.copy_method == COPY_METHOD_CLONE)
 	{
diff --git a/src/bin/pg_resetwal/pg_resetwal.c b/src/bin/pg_resetwal/pg_resetwal.c
index a89d72fc5cf..dd5d279521e 100644
--- a/src/bin/pg_resetwal/pg_resetwal.c
+++ b/src/bin/pg_resetwal/pg_resetwal.c
@@ -397,6 +397,10 @@ main(int argc, char *argv[])
 		exit(1);
 	}
 
+	if (noupdate)
+		pg_log_info("Executing in dry-run mode.\n"
+					"Nothing will be modified.");
+
 	/*
 	 * Attempt to read the existing pg_control file
 	 */
diff --git a/src/bin/pg_rewind/pg_rewind.c b/src/bin/pg_rewind/pg_rewind.c
index 27c514f934a..e9364d04f76 100644
--- a/src/bin/pg_rewind/pg_rewind.c
+++ b/src/bin/pg_rewind/pg_rewind.c
@@ -300,10 +300,12 @@ main(int argc, char **argv)
 
 	atexit(disconnect_atexit);
 
-	/*
-	 * Ok, we have all the options and we're ready to start. First, connect to
-	 * remote server.
-	 */
+	/* Ok, we have all the options and we're ready to start. */
+	if (dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
+	/* First, connect to remote server. */
 	if (connstr_source)
 	{
 		conn = PQconnectdb(connstr_source);
-- 
2.47.3


--ibfr3ah5qy6tcbhw--





^ permalink  raw  reply  [nested|flat] 126+ messages in thread

* [PATCH v5] Log a note at program start when running in dry-run mode
@ 2025-11-11 08:54 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 126+ messages in thread

From: Álvaro Herrera @ 2025-11-11 08:54 UTC (permalink / raw)

Users might get some peace of mind knowing their data is not being
destroyed or whatever.

Author: Peter Smith <[email protected]>
Reviewed-by: Álvaro Herrera <[email protected]>
Discussion: https://postgr.es/m/CAHut+PsvQJQnQO0KT0S2oegenkvJ8FUuY-QS5syyqmT24R2xFQ@mail.gmail.com
---
 src/bin/pg_archivecleanup/pg_archivecleanup.c |  4 ++++
 src/bin/pg_basebackup/pg_createsubscriber.c   |  5 +++++
 src/bin/pg_combinebackup/pg_combinebackup.c   |  4 ++++
 src/bin/pg_resetwal/pg_resetwal.c             |  4 ++++
 src/bin/pg_rewind/pg_rewind.c                 | 10 ++++++----
 5 files changed, 23 insertions(+), 4 deletions(-)

diff --git a/src/bin/pg_archivecleanup/pg_archivecleanup.c b/src/bin/pg_archivecleanup/pg_archivecleanup.c
index c25348bcb85..ab686b4748c 100644
--- a/src/bin/pg_archivecleanup/pg_archivecleanup.c
+++ b/src/bin/pg_archivecleanup/pg_archivecleanup.c
@@ -375,6 +375,10 @@ main(int argc, char **argv)
 		exit(2);
 	}
 
+	if (dryrun)
+		pg_log_info("Executing in dry-run mode.\n"
+					"No files will be removed.");
+
 	/*
 	 * Check archive exists and other initialization if required.
 	 */
diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c
index df41836e70f..cc4be5d6ef4 100644
--- a/src/bin/pg_basebackup/pg_createsubscriber.c
+++ b/src/bin/pg_basebackup/pg_createsubscriber.c
@@ -2305,6 +2305,11 @@ main(int argc, char **argv)
 		pg_log_error_hint("Try \"%s --help\" for more information.", progname);
 		exit(1);
 	}
+
+	if (dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
 	pg_log_info("validating publisher connection string");
 	pub_base_conninfo = get_base_conninfo(opt.pub_conninfo_str,
 										  &dbname_conninfo);
diff --git a/src/bin/pg_combinebackup/pg_combinebackup.c b/src/bin/pg_combinebackup/pg_combinebackup.c
index 3a325127209..c9bf0a9e105 100644
--- a/src/bin/pg_combinebackup/pg_combinebackup.c
+++ b/src/bin/pg_combinebackup/pg_combinebackup.c
@@ -242,6 +242,10 @@ main(int argc, char *argv[])
 	if (opt.no_manifest)
 		opt.manifest_checksums = CHECKSUM_TYPE_NONE;
 
+	if (opt.dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
 	/* Check that the platform supports the requested copy method. */
 	if (opt.copy_method == COPY_METHOD_CLONE)
 	{
diff --git a/src/bin/pg_resetwal/pg_resetwal.c b/src/bin/pg_resetwal/pg_resetwal.c
index a89d72fc5cf..dd5d279521e 100644
--- a/src/bin/pg_resetwal/pg_resetwal.c
+++ b/src/bin/pg_resetwal/pg_resetwal.c
@@ -397,6 +397,10 @@ main(int argc, char *argv[])
 		exit(1);
 	}
 
+	if (noupdate)
+		pg_log_info("Executing in dry-run mode.\n"
+					"Nothing will be modified.");
+
 	/*
 	 * Attempt to read the existing pg_control file
 	 */
diff --git a/src/bin/pg_rewind/pg_rewind.c b/src/bin/pg_rewind/pg_rewind.c
index 27c514f934a..e9364d04f76 100644
--- a/src/bin/pg_rewind/pg_rewind.c
+++ b/src/bin/pg_rewind/pg_rewind.c
@@ -300,10 +300,12 @@ main(int argc, char **argv)
 
 	atexit(disconnect_atexit);
 
-	/*
-	 * Ok, we have all the options and we're ready to start. First, connect to
-	 * remote server.
-	 */
+	/* Ok, we have all the options and we're ready to start. */
+	if (dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
+	/* First, connect to remote server. */
 	if (connstr_source)
 	{
 		conn = PQconnectdb(connstr_source);
-- 
2.47.3


--ibfr3ah5qy6tcbhw--





^ permalink  raw  reply  [nested|flat] 126+ messages in thread

* [PATCH v5] Log a note at program start when running in dry-run mode
@ 2025-11-11 08:54 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 126+ messages in thread

From: Álvaro Herrera @ 2025-11-11 08:54 UTC (permalink / raw)

Users might get some peace of mind knowing their data is not being
destroyed or whatever.

Author: Peter Smith <[email protected]>
Reviewed-by: Álvaro Herrera <[email protected]>
Discussion: https://postgr.es/m/CAHut+PsvQJQnQO0KT0S2oegenkvJ8FUuY-QS5syyqmT24R2xFQ@mail.gmail.com
---
 src/bin/pg_archivecleanup/pg_archivecleanup.c |  4 ++++
 src/bin/pg_basebackup/pg_createsubscriber.c   |  5 +++++
 src/bin/pg_combinebackup/pg_combinebackup.c   |  4 ++++
 src/bin/pg_resetwal/pg_resetwal.c             |  4 ++++
 src/bin/pg_rewind/pg_rewind.c                 | 10 ++++++----
 5 files changed, 23 insertions(+), 4 deletions(-)

diff --git a/src/bin/pg_archivecleanup/pg_archivecleanup.c b/src/bin/pg_archivecleanup/pg_archivecleanup.c
index c25348bcb85..ab686b4748c 100644
--- a/src/bin/pg_archivecleanup/pg_archivecleanup.c
+++ b/src/bin/pg_archivecleanup/pg_archivecleanup.c
@@ -375,6 +375,10 @@ main(int argc, char **argv)
 		exit(2);
 	}
 
+	if (dryrun)
+		pg_log_info("Executing in dry-run mode.\n"
+					"No files will be removed.");
+
 	/*
 	 * Check archive exists and other initialization if required.
 	 */
diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c
index df41836e70f..cc4be5d6ef4 100644
--- a/src/bin/pg_basebackup/pg_createsubscriber.c
+++ b/src/bin/pg_basebackup/pg_createsubscriber.c
@@ -2305,6 +2305,11 @@ main(int argc, char **argv)
 		pg_log_error_hint("Try \"%s --help\" for more information.", progname);
 		exit(1);
 	}
+
+	if (dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
 	pg_log_info("validating publisher connection string");
 	pub_base_conninfo = get_base_conninfo(opt.pub_conninfo_str,
 										  &dbname_conninfo);
diff --git a/src/bin/pg_combinebackup/pg_combinebackup.c b/src/bin/pg_combinebackup/pg_combinebackup.c
index 3a325127209..c9bf0a9e105 100644
--- a/src/bin/pg_combinebackup/pg_combinebackup.c
+++ b/src/bin/pg_combinebackup/pg_combinebackup.c
@@ -242,6 +242,10 @@ main(int argc, char *argv[])
 	if (opt.no_manifest)
 		opt.manifest_checksums = CHECKSUM_TYPE_NONE;
 
+	if (opt.dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
 	/* Check that the platform supports the requested copy method. */
 	if (opt.copy_method == COPY_METHOD_CLONE)
 	{
diff --git a/src/bin/pg_resetwal/pg_resetwal.c b/src/bin/pg_resetwal/pg_resetwal.c
index a89d72fc5cf..dd5d279521e 100644
--- a/src/bin/pg_resetwal/pg_resetwal.c
+++ b/src/bin/pg_resetwal/pg_resetwal.c
@@ -397,6 +397,10 @@ main(int argc, char *argv[])
 		exit(1);
 	}
 
+	if (noupdate)
+		pg_log_info("Executing in dry-run mode.\n"
+					"Nothing will be modified.");
+
 	/*
 	 * Attempt to read the existing pg_control file
 	 */
diff --git a/src/bin/pg_rewind/pg_rewind.c b/src/bin/pg_rewind/pg_rewind.c
index 27c514f934a..e9364d04f76 100644
--- a/src/bin/pg_rewind/pg_rewind.c
+++ b/src/bin/pg_rewind/pg_rewind.c
@@ -300,10 +300,12 @@ main(int argc, char **argv)
 
 	atexit(disconnect_atexit);
 
-	/*
-	 * Ok, we have all the options and we're ready to start. First, connect to
-	 * remote server.
-	 */
+	/* Ok, we have all the options and we're ready to start. */
+	if (dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
+	/* First, connect to remote server. */
 	if (connstr_source)
 	{
 		conn = PQconnectdb(connstr_source);
-- 
2.47.3


--ibfr3ah5qy6tcbhw--





^ permalink  raw  reply  [nested|flat] 126+ messages in thread

* [PATCH v5] Log a note at program start when running in dry-run mode
@ 2025-11-11 08:54 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 126+ messages in thread

From: Álvaro Herrera @ 2025-11-11 08:54 UTC (permalink / raw)

Users might get some peace of mind knowing their data is not being
destroyed or whatever.

Author: Peter Smith <[email protected]>
Reviewed-by: Álvaro Herrera <[email protected]>
Discussion: https://postgr.es/m/CAHut+PsvQJQnQO0KT0S2oegenkvJ8FUuY-QS5syyqmT24R2xFQ@mail.gmail.com
---
 src/bin/pg_archivecleanup/pg_archivecleanup.c |  4 ++++
 src/bin/pg_basebackup/pg_createsubscriber.c   |  5 +++++
 src/bin/pg_combinebackup/pg_combinebackup.c   |  4 ++++
 src/bin/pg_resetwal/pg_resetwal.c             |  4 ++++
 src/bin/pg_rewind/pg_rewind.c                 | 10 ++++++----
 5 files changed, 23 insertions(+), 4 deletions(-)

diff --git a/src/bin/pg_archivecleanup/pg_archivecleanup.c b/src/bin/pg_archivecleanup/pg_archivecleanup.c
index c25348bcb85..ab686b4748c 100644
--- a/src/bin/pg_archivecleanup/pg_archivecleanup.c
+++ b/src/bin/pg_archivecleanup/pg_archivecleanup.c
@@ -375,6 +375,10 @@ main(int argc, char **argv)
 		exit(2);
 	}
 
+	if (dryrun)
+		pg_log_info("Executing in dry-run mode.\n"
+					"No files will be removed.");
+
 	/*
 	 * Check archive exists and other initialization if required.
 	 */
diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c
index df41836e70f..cc4be5d6ef4 100644
--- a/src/bin/pg_basebackup/pg_createsubscriber.c
+++ b/src/bin/pg_basebackup/pg_createsubscriber.c
@@ -2305,6 +2305,11 @@ main(int argc, char **argv)
 		pg_log_error_hint("Try \"%s --help\" for more information.", progname);
 		exit(1);
 	}
+
+	if (dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
 	pg_log_info("validating publisher connection string");
 	pub_base_conninfo = get_base_conninfo(opt.pub_conninfo_str,
 										  &dbname_conninfo);
diff --git a/src/bin/pg_combinebackup/pg_combinebackup.c b/src/bin/pg_combinebackup/pg_combinebackup.c
index 3a325127209..c9bf0a9e105 100644
--- a/src/bin/pg_combinebackup/pg_combinebackup.c
+++ b/src/bin/pg_combinebackup/pg_combinebackup.c
@@ -242,6 +242,10 @@ main(int argc, char *argv[])
 	if (opt.no_manifest)
 		opt.manifest_checksums = CHECKSUM_TYPE_NONE;
 
+	if (opt.dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
 	/* Check that the platform supports the requested copy method. */
 	if (opt.copy_method == COPY_METHOD_CLONE)
 	{
diff --git a/src/bin/pg_resetwal/pg_resetwal.c b/src/bin/pg_resetwal/pg_resetwal.c
index a89d72fc5cf..dd5d279521e 100644
--- a/src/bin/pg_resetwal/pg_resetwal.c
+++ b/src/bin/pg_resetwal/pg_resetwal.c
@@ -397,6 +397,10 @@ main(int argc, char *argv[])
 		exit(1);
 	}
 
+	if (noupdate)
+		pg_log_info("Executing in dry-run mode.\n"
+					"Nothing will be modified.");
+
 	/*
 	 * Attempt to read the existing pg_control file
 	 */
diff --git a/src/bin/pg_rewind/pg_rewind.c b/src/bin/pg_rewind/pg_rewind.c
index 27c514f934a..e9364d04f76 100644
--- a/src/bin/pg_rewind/pg_rewind.c
+++ b/src/bin/pg_rewind/pg_rewind.c
@@ -300,10 +300,12 @@ main(int argc, char **argv)
 
 	atexit(disconnect_atexit);
 
-	/*
-	 * Ok, we have all the options and we're ready to start. First, connect to
-	 * remote server.
-	 */
+	/* Ok, we have all the options and we're ready to start. */
+	if (dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
+	/* First, connect to remote server. */
 	if (connstr_source)
 	{
 		conn = PQconnectdb(connstr_source);
-- 
2.47.3


--ibfr3ah5qy6tcbhw--





^ permalink  raw  reply  [nested|flat] 126+ messages in thread

* [PATCH v5] Log a note at program start when running in dry-run mode
@ 2025-11-11 08:54 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 126+ messages in thread

From: Álvaro Herrera @ 2025-11-11 08:54 UTC (permalink / raw)

Users might get some peace of mind knowing their data is not being
destroyed or whatever.

Author: Peter Smith <[email protected]>
Reviewed-by: Álvaro Herrera <[email protected]>
Discussion: https://postgr.es/m/CAHut+PsvQJQnQO0KT0S2oegenkvJ8FUuY-QS5syyqmT24R2xFQ@mail.gmail.com
---
 src/bin/pg_archivecleanup/pg_archivecleanup.c |  4 ++++
 src/bin/pg_basebackup/pg_createsubscriber.c   |  5 +++++
 src/bin/pg_combinebackup/pg_combinebackup.c   |  4 ++++
 src/bin/pg_resetwal/pg_resetwal.c             |  4 ++++
 src/bin/pg_rewind/pg_rewind.c                 | 10 ++++++----
 5 files changed, 23 insertions(+), 4 deletions(-)

diff --git a/src/bin/pg_archivecleanup/pg_archivecleanup.c b/src/bin/pg_archivecleanup/pg_archivecleanup.c
index c25348bcb85..ab686b4748c 100644
--- a/src/bin/pg_archivecleanup/pg_archivecleanup.c
+++ b/src/bin/pg_archivecleanup/pg_archivecleanup.c
@@ -375,6 +375,10 @@ main(int argc, char **argv)
 		exit(2);
 	}
 
+	if (dryrun)
+		pg_log_info("Executing in dry-run mode.\n"
+					"No files will be removed.");
+
 	/*
 	 * Check archive exists and other initialization if required.
 	 */
diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c
index df41836e70f..cc4be5d6ef4 100644
--- a/src/bin/pg_basebackup/pg_createsubscriber.c
+++ b/src/bin/pg_basebackup/pg_createsubscriber.c
@@ -2305,6 +2305,11 @@ main(int argc, char **argv)
 		pg_log_error_hint("Try \"%s --help\" for more information.", progname);
 		exit(1);
 	}
+
+	if (dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
 	pg_log_info("validating publisher connection string");
 	pub_base_conninfo = get_base_conninfo(opt.pub_conninfo_str,
 										  &dbname_conninfo);
diff --git a/src/bin/pg_combinebackup/pg_combinebackup.c b/src/bin/pg_combinebackup/pg_combinebackup.c
index 3a325127209..c9bf0a9e105 100644
--- a/src/bin/pg_combinebackup/pg_combinebackup.c
+++ b/src/bin/pg_combinebackup/pg_combinebackup.c
@@ -242,6 +242,10 @@ main(int argc, char *argv[])
 	if (opt.no_manifest)
 		opt.manifest_checksums = CHECKSUM_TYPE_NONE;
 
+	if (opt.dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
 	/* Check that the platform supports the requested copy method. */
 	if (opt.copy_method == COPY_METHOD_CLONE)
 	{
diff --git a/src/bin/pg_resetwal/pg_resetwal.c b/src/bin/pg_resetwal/pg_resetwal.c
index a89d72fc5cf..dd5d279521e 100644
--- a/src/bin/pg_resetwal/pg_resetwal.c
+++ b/src/bin/pg_resetwal/pg_resetwal.c
@@ -397,6 +397,10 @@ main(int argc, char *argv[])
 		exit(1);
 	}
 
+	if (noupdate)
+		pg_log_info("Executing in dry-run mode.\n"
+					"Nothing will be modified.");
+
 	/*
 	 * Attempt to read the existing pg_control file
 	 */
diff --git a/src/bin/pg_rewind/pg_rewind.c b/src/bin/pg_rewind/pg_rewind.c
index 27c514f934a..e9364d04f76 100644
--- a/src/bin/pg_rewind/pg_rewind.c
+++ b/src/bin/pg_rewind/pg_rewind.c
@@ -300,10 +300,12 @@ main(int argc, char **argv)
 
 	atexit(disconnect_atexit);
 
-	/*
-	 * Ok, we have all the options and we're ready to start. First, connect to
-	 * remote server.
-	 */
+	/* Ok, we have all the options and we're ready to start. */
+	if (dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
+	/* First, connect to remote server. */
 	if (connstr_source)
 	{
 		conn = PQconnectdb(connstr_source);
-- 
2.47.3


--ibfr3ah5qy6tcbhw--





^ permalink  raw  reply  [nested|flat] 126+ messages in thread

* [PATCH v5] Log a note at program start when running in dry-run mode
@ 2025-11-11 08:54 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 126+ messages in thread

From: Álvaro Herrera @ 2025-11-11 08:54 UTC (permalink / raw)

Users might get some peace of mind knowing their data is not being
destroyed or whatever.

Author: Peter Smith <[email protected]>
Reviewed-by: Álvaro Herrera <[email protected]>
Discussion: https://postgr.es/m/CAHut+PsvQJQnQO0KT0S2oegenkvJ8FUuY-QS5syyqmT24R2xFQ@mail.gmail.com
---
 src/bin/pg_archivecleanup/pg_archivecleanup.c |  4 ++++
 src/bin/pg_basebackup/pg_createsubscriber.c   |  5 +++++
 src/bin/pg_combinebackup/pg_combinebackup.c   |  4 ++++
 src/bin/pg_resetwal/pg_resetwal.c             |  4 ++++
 src/bin/pg_rewind/pg_rewind.c                 | 10 ++++++----
 5 files changed, 23 insertions(+), 4 deletions(-)

diff --git a/src/bin/pg_archivecleanup/pg_archivecleanup.c b/src/bin/pg_archivecleanup/pg_archivecleanup.c
index c25348bcb85..ab686b4748c 100644
--- a/src/bin/pg_archivecleanup/pg_archivecleanup.c
+++ b/src/bin/pg_archivecleanup/pg_archivecleanup.c
@@ -375,6 +375,10 @@ main(int argc, char **argv)
 		exit(2);
 	}
 
+	if (dryrun)
+		pg_log_info("Executing in dry-run mode.\n"
+					"No files will be removed.");
+
 	/*
 	 * Check archive exists and other initialization if required.
 	 */
diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c
index df41836e70f..cc4be5d6ef4 100644
--- a/src/bin/pg_basebackup/pg_createsubscriber.c
+++ b/src/bin/pg_basebackup/pg_createsubscriber.c
@@ -2305,6 +2305,11 @@ main(int argc, char **argv)
 		pg_log_error_hint("Try \"%s --help\" for more information.", progname);
 		exit(1);
 	}
+
+	if (dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
 	pg_log_info("validating publisher connection string");
 	pub_base_conninfo = get_base_conninfo(opt.pub_conninfo_str,
 										  &dbname_conninfo);
diff --git a/src/bin/pg_combinebackup/pg_combinebackup.c b/src/bin/pg_combinebackup/pg_combinebackup.c
index 3a325127209..c9bf0a9e105 100644
--- a/src/bin/pg_combinebackup/pg_combinebackup.c
+++ b/src/bin/pg_combinebackup/pg_combinebackup.c
@@ -242,6 +242,10 @@ main(int argc, char *argv[])
 	if (opt.no_manifest)
 		opt.manifest_checksums = CHECKSUM_TYPE_NONE;
 
+	if (opt.dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
 	/* Check that the platform supports the requested copy method. */
 	if (opt.copy_method == COPY_METHOD_CLONE)
 	{
diff --git a/src/bin/pg_resetwal/pg_resetwal.c b/src/bin/pg_resetwal/pg_resetwal.c
index a89d72fc5cf..dd5d279521e 100644
--- a/src/bin/pg_resetwal/pg_resetwal.c
+++ b/src/bin/pg_resetwal/pg_resetwal.c
@@ -397,6 +397,10 @@ main(int argc, char *argv[])
 		exit(1);
 	}
 
+	if (noupdate)
+		pg_log_info("Executing in dry-run mode.\n"
+					"Nothing will be modified.");
+
 	/*
 	 * Attempt to read the existing pg_control file
 	 */
diff --git a/src/bin/pg_rewind/pg_rewind.c b/src/bin/pg_rewind/pg_rewind.c
index 27c514f934a..e9364d04f76 100644
--- a/src/bin/pg_rewind/pg_rewind.c
+++ b/src/bin/pg_rewind/pg_rewind.c
@@ -300,10 +300,12 @@ main(int argc, char **argv)
 
 	atexit(disconnect_atexit);
 
-	/*
-	 * Ok, we have all the options and we're ready to start. First, connect to
-	 * remote server.
-	 */
+	/* Ok, we have all the options and we're ready to start. */
+	if (dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
+	/* First, connect to remote server. */
 	if (connstr_source)
 	{
 		conn = PQconnectdb(connstr_source);
-- 
2.47.3


--ibfr3ah5qy6tcbhw--





^ permalink  raw  reply  [nested|flat] 126+ messages in thread

* [PATCH v5] Log a note at program start when running in dry-run mode
@ 2025-11-11 08:54 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 126+ messages in thread

From: Álvaro Herrera @ 2025-11-11 08:54 UTC (permalink / raw)

Users might get some peace of mind knowing their data is not being
destroyed or whatever.

Author: Peter Smith <[email protected]>
Reviewed-by: Álvaro Herrera <[email protected]>
Discussion: https://postgr.es/m/CAHut+PsvQJQnQO0KT0S2oegenkvJ8FUuY-QS5syyqmT24R2xFQ@mail.gmail.com
---
 src/bin/pg_archivecleanup/pg_archivecleanup.c |  4 ++++
 src/bin/pg_basebackup/pg_createsubscriber.c   |  5 +++++
 src/bin/pg_combinebackup/pg_combinebackup.c   |  4 ++++
 src/bin/pg_resetwal/pg_resetwal.c             |  4 ++++
 src/bin/pg_rewind/pg_rewind.c                 | 10 ++++++----
 5 files changed, 23 insertions(+), 4 deletions(-)

diff --git a/src/bin/pg_archivecleanup/pg_archivecleanup.c b/src/bin/pg_archivecleanup/pg_archivecleanup.c
index c25348bcb85..ab686b4748c 100644
--- a/src/bin/pg_archivecleanup/pg_archivecleanup.c
+++ b/src/bin/pg_archivecleanup/pg_archivecleanup.c
@@ -375,6 +375,10 @@ main(int argc, char **argv)
 		exit(2);
 	}
 
+	if (dryrun)
+		pg_log_info("Executing in dry-run mode.\n"
+					"No files will be removed.");
+
 	/*
 	 * Check archive exists and other initialization if required.
 	 */
diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c
index df41836e70f..cc4be5d6ef4 100644
--- a/src/bin/pg_basebackup/pg_createsubscriber.c
+++ b/src/bin/pg_basebackup/pg_createsubscriber.c
@@ -2305,6 +2305,11 @@ main(int argc, char **argv)
 		pg_log_error_hint("Try \"%s --help\" for more information.", progname);
 		exit(1);
 	}
+
+	if (dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
 	pg_log_info("validating publisher connection string");
 	pub_base_conninfo = get_base_conninfo(opt.pub_conninfo_str,
 										  &dbname_conninfo);
diff --git a/src/bin/pg_combinebackup/pg_combinebackup.c b/src/bin/pg_combinebackup/pg_combinebackup.c
index 3a325127209..c9bf0a9e105 100644
--- a/src/bin/pg_combinebackup/pg_combinebackup.c
+++ b/src/bin/pg_combinebackup/pg_combinebackup.c
@@ -242,6 +242,10 @@ main(int argc, char *argv[])
 	if (opt.no_manifest)
 		opt.manifest_checksums = CHECKSUM_TYPE_NONE;
 
+	if (opt.dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
 	/* Check that the platform supports the requested copy method. */
 	if (opt.copy_method == COPY_METHOD_CLONE)
 	{
diff --git a/src/bin/pg_resetwal/pg_resetwal.c b/src/bin/pg_resetwal/pg_resetwal.c
index a89d72fc5cf..dd5d279521e 100644
--- a/src/bin/pg_resetwal/pg_resetwal.c
+++ b/src/bin/pg_resetwal/pg_resetwal.c
@@ -397,6 +397,10 @@ main(int argc, char *argv[])
 		exit(1);
 	}
 
+	if (noupdate)
+		pg_log_info("Executing in dry-run mode.\n"
+					"Nothing will be modified.");
+
 	/*
 	 * Attempt to read the existing pg_control file
 	 */
diff --git a/src/bin/pg_rewind/pg_rewind.c b/src/bin/pg_rewind/pg_rewind.c
index 27c514f934a..e9364d04f76 100644
--- a/src/bin/pg_rewind/pg_rewind.c
+++ b/src/bin/pg_rewind/pg_rewind.c
@@ -300,10 +300,12 @@ main(int argc, char **argv)
 
 	atexit(disconnect_atexit);
 
-	/*
-	 * Ok, we have all the options and we're ready to start. First, connect to
-	 * remote server.
-	 */
+	/* Ok, we have all the options and we're ready to start. */
+	if (dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
+	/* First, connect to remote server. */
 	if (connstr_source)
 	{
 		conn = PQconnectdb(connstr_source);
-- 
2.47.3


--ibfr3ah5qy6tcbhw--





^ permalink  raw  reply  [nested|flat] 126+ messages in thread

* [PATCH v5] Log a note at program start when running in dry-run mode
@ 2025-11-11 08:54 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 126+ messages in thread

From: Álvaro Herrera @ 2025-11-11 08:54 UTC (permalink / raw)

Users might get some peace of mind knowing their data is not being
destroyed or whatever.

Author: Peter Smith <[email protected]>
Reviewed-by: Álvaro Herrera <[email protected]>
Discussion: https://postgr.es/m/CAHut+PsvQJQnQO0KT0S2oegenkvJ8FUuY-QS5syyqmT24R2xFQ@mail.gmail.com
---
 src/bin/pg_archivecleanup/pg_archivecleanup.c |  4 ++++
 src/bin/pg_basebackup/pg_createsubscriber.c   |  5 +++++
 src/bin/pg_combinebackup/pg_combinebackup.c   |  4 ++++
 src/bin/pg_resetwal/pg_resetwal.c             |  4 ++++
 src/bin/pg_rewind/pg_rewind.c                 | 10 ++++++----
 5 files changed, 23 insertions(+), 4 deletions(-)

diff --git a/src/bin/pg_archivecleanup/pg_archivecleanup.c b/src/bin/pg_archivecleanup/pg_archivecleanup.c
index c25348bcb85..ab686b4748c 100644
--- a/src/bin/pg_archivecleanup/pg_archivecleanup.c
+++ b/src/bin/pg_archivecleanup/pg_archivecleanup.c
@@ -375,6 +375,10 @@ main(int argc, char **argv)
 		exit(2);
 	}
 
+	if (dryrun)
+		pg_log_info("Executing in dry-run mode.\n"
+					"No files will be removed.");
+
 	/*
 	 * Check archive exists and other initialization if required.
 	 */
diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c
index df41836e70f..cc4be5d6ef4 100644
--- a/src/bin/pg_basebackup/pg_createsubscriber.c
+++ b/src/bin/pg_basebackup/pg_createsubscriber.c
@@ -2305,6 +2305,11 @@ main(int argc, char **argv)
 		pg_log_error_hint("Try \"%s --help\" for more information.", progname);
 		exit(1);
 	}
+
+	if (dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
 	pg_log_info("validating publisher connection string");
 	pub_base_conninfo = get_base_conninfo(opt.pub_conninfo_str,
 										  &dbname_conninfo);
diff --git a/src/bin/pg_combinebackup/pg_combinebackup.c b/src/bin/pg_combinebackup/pg_combinebackup.c
index 3a325127209..c9bf0a9e105 100644
--- a/src/bin/pg_combinebackup/pg_combinebackup.c
+++ b/src/bin/pg_combinebackup/pg_combinebackup.c
@@ -242,6 +242,10 @@ main(int argc, char *argv[])
 	if (opt.no_manifest)
 		opt.manifest_checksums = CHECKSUM_TYPE_NONE;
 
+	if (opt.dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
 	/* Check that the platform supports the requested copy method. */
 	if (opt.copy_method == COPY_METHOD_CLONE)
 	{
diff --git a/src/bin/pg_resetwal/pg_resetwal.c b/src/bin/pg_resetwal/pg_resetwal.c
index a89d72fc5cf..dd5d279521e 100644
--- a/src/bin/pg_resetwal/pg_resetwal.c
+++ b/src/bin/pg_resetwal/pg_resetwal.c
@@ -397,6 +397,10 @@ main(int argc, char *argv[])
 		exit(1);
 	}
 
+	if (noupdate)
+		pg_log_info("Executing in dry-run mode.\n"
+					"Nothing will be modified.");
+
 	/*
 	 * Attempt to read the existing pg_control file
 	 */
diff --git a/src/bin/pg_rewind/pg_rewind.c b/src/bin/pg_rewind/pg_rewind.c
index 27c514f934a..e9364d04f76 100644
--- a/src/bin/pg_rewind/pg_rewind.c
+++ b/src/bin/pg_rewind/pg_rewind.c
@@ -300,10 +300,12 @@ main(int argc, char **argv)
 
 	atexit(disconnect_atexit);
 
-	/*
-	 * Ok, we have all the options and we're ready to start. First, connect to
-	 * remote server.
-	 */
+	/* Ok, we have all the options and we're ready to start. */
+	if (dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
+	/* First, connect to remote server. */
 	if (connstr_source)
 	{
 		conn = PQconnectdb(connstr_source);
-- 
2.47.3


--ibfr3ah5qy6tcbhw--





^ permalink  raw  reply  [nested|flat] 126+ messages in thread

* [PATCH v5] Log a note at program start when running in dry-run mode
@ 2025-11-11 08:54 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 126+ messages in thread

From: Álvaro Herrera @ 2025-11-11 08:54 UTC (permalink / raw)

Users might get some peace of mind knowing their data is not being
destroyed or whatever.

Author: Peter Smith <[email protected]>
Reviewed-by: Álvaro Herrera <[email protected]>
Discussion: https://postgr.es/m/CAHut+PsvQJQnQO0KT0S2oegenkvJ8FUuY-QS5syyqmT24R2xFQ@mail.gmail.com
---
 src/bin/pg_archivecleanup/pg_archivecleanup.c |  4 ++++
 src/bin/pg_basebackup/pg_createsubscriber.c   |  5 +++++
 src/bin/pg_combinebackup/pg_combinebackup.c   |  4 ++++
 src/bin/pg_resetwal/pg_resetwal.c             |  4 ++++
 src/bin/pg_rewind/pg_rewind.c                 | 10 ++++++----
 5 files changed, 23 insertions(+), 4 deletions(-)

diff --git a/src/bin/pg_archivecleanup/pg_archivecleanup.c b/src/bin/pg_archivecleanup/pg_archivecleanup.c
index c25348bcb85..ab686b4748c 100644
--- a/src/bin/pg_archivecleanup/pg_archivecleanup.c
+++ b/src/bin/pg_archivecleanup/pg_archivecleanup.c
@@ -375,6 +375,10 @@ main(int argc, char **argv)
 		exit(2);
 	}
 
+	if (dryrun)
+		pg_log_info("Executing in dry-run mode.\n"
+					"No files will be removed.");
+
 	/*
 	 * Check archive exists and other initialization if required.
 	 */
diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c
index df41836e70f..cc4be5d6ef4 100644
--- a/src/bin/pg_basebackup/pg_createsubscriber.c
+++ b/src/bin/pg_basebackup/pg_createsubscriber.c
@@ -2305,6 +2305,11 @@ main(int argc, char **argv)
 		pg_log_error_hint("Try \"%s --help\" for more information.", progname);
 		exit(1);
 	}
+
+	if (dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
 	pg_log_info("validating publisher connection string");
 	pub_base_conninfo = get_base_conninfo(opt.pub_conninfo_str,
 										  &dbname_conninfo);
diff --git a/src/bin/pg_combinebackup/pg_combinebackup.c b/src/bin/pg_combinebackup/pg_combinebackup.c
index 3a325127209..c9bf0a9e105 100644
--- a/src/bin/pg_combinebackup/pg_combinebackup.c
+++ b/src/bin/pg_combinebackup/pg_combinebackup.c
@@ -242,6 +242,10 @@ main(int argc, char *argv[])
 	if (opt.no_manifest)
 		opt.manifest_checksums = CHECKSUM_TYPE_NONE;
 
+	if (opt.dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
 	/* Check that the platform supports the requested copy method. */
 	if (opt.copy_method == COPY_METHOD_CLONE)
 	{
diff --git a/src/bin/pg_resetwal/pg_resetwal.c b/src/bin/pg_resetwal/pg_resetwal.c
index a89d72fc5cf..dd5d279521e 100644
--- a/src/bin/pg_resetwal/pg_resetwal.c
+++ b/src/bin/pg_resetwal/pg_resetwal.c
@@ -397,6 +397,10 @@ main(int argc, char *argv[])
 		exit(1);
 	}
 
+	if (noupdate)
+		pg_log_info("Executing in dry-run mode.\n"
+					"Nothing will be modified.");
+
 	/*
 	 * Attempt to read the existing pg_control file
 	 */
diff --git a/src/bin/pg_rewind/pg_rewind.c b/src/bin/pg_rewind/pg_rewind.c
index 27c514f934a..e9364d04f76 100644
--- a/src/bin/pg_rewind/pg_rewind.c
+++ b/src/bin/pg_rewind/pg_rewind.c
@@ -300,10 +300,12 @@ main(int argc, char **argv)
 
 	atexit(disconnect_atexit);
 
-	/*
-	 * Ok, we have all the options and we're ready to start. First, connect to
-	 * remote server.
-	 */
+	/* Ok, we have all the options and we're ready to start. */
+	if (dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
+	/* First, connect to remote server. */
 	if (connstr_source)
 	{
 		conn = PQconnectdb(connstr_source);
-- 
2.47.3


--ibfr3ah5qy6tcbhw--





^ permalink  raw  reply  [nested|flat] 126+ messages in thread

* [PATCH v5] Log a note at program start when running in dry-run mode
@ 2025-11-11 08:54 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 126+ messages in thread

From: Álvaro Herrera @ 2025-11-11 08:54 UTC (permalink / raw)

Users might get some peace of mind knowing their data is not being
destroyed or whatever.

Author: Peter Smith <[email protected]>
Reviewed-by: Álvaro Herrera <[email protected]>
Discussion: https://postgr.es/m/CAHut+PsvQJQnQO0KT0S2oegenkvJ8FUuY-QS5syyqmT24R2xFQ@mail.gmail.com
---
 src/bin/pg_archivecleanup/pg_archivecleanup.c |  4 ++++
 src/bin/pg_basebackup/pg_createsubscriber.c   |  5 +++++
 src/bin/pg_combinebackup/pg_combinebackup.c   |  4 ++++
 src/bin/pg_resetwal/pg_resetwal.c             |  4 ++++
 src/bin/pg_rewind/pg_rewind.c                 | 10 ++++++----
 5 files changed, 23 insertions(+), 4 deletions(-)

diff --git a/src/bin/pg_archivecleanup/pg_archivecleanup.c b/src/bin/pg_archivecleanup/pg_archivecleanup.c
index c25348bcb85..ab686b4748c 100644
--- a/src/bin/pg_archivecleanup/pg_archivecleanup.c
+++ b/src/bin/pg_archivecleanup/pg_archivecleanup.c
@@ -375,6 +375,10 @@ main(int argc, char **argv)
 		exit(2);
 	}
 
+	if (dryrun)
+		pg_log_info("Executing in dry-run mode.\n"
+					"No files will be removed.");
+
 	/*
 	 * Check archive exists and other initialization if required.
 	 */
diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c
index df41836e70f..cc4be5d6ef4 100644
--- a/src/bin/pg_basebackup/pg_createsubscriber.c
+++ b/src/bin/pg_basebackup/pg_createsubscriber.c
@@ -2305,6 +2305,11 @@ main(int argc, char **argv)
 		pg_log_error_hint("Try \"%s --help\" for more information.", progname);
 		exit(1);
 	}
+
+	if (dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
 	pg_log_info("validating publisher connection string");
 	pub_base_conninfo = get_base_conninfo(opt.pub_conninfo_str,
 										  &dbname_conninfo);
diff --git a/src/bin/pg_combinebackup/pg_combinebackup.c b/src/bin/pg_combinebackup/pg_combinebackup.c
index 3a325127209..c9bf0a9e105 100644
--- a/src/bin/pg_combinebackup/pg_combinebackup.c
+++ b/src/bin/pg_combinebackup/pg_combinebackup.c
@@ -242,6 +242,10 @@ main(int argc, char *argv[])
 	if (opt.no_manifest)
 		opt.manifest_checksums = CHECKSUM_TYPE_NONE;
 
+	if (opt.dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
 	/* Check that the platform supports the requested copy method. */
 	if (opt.copy_method == COPY_METHOD_CLONE)
 	{
diff --git a/src/bin/pg_resetwal/pg_resetwal.c b/src/bin/pg_resetwal/pg_resetwal.c
index a89d72fc5cf..dd5d279521e 100644
--- a/src/bin/pg_resetwal/pg_resetwal.c
+++ b/src/bin/pg_resetwal/pg_resetwal.c
@@ -397,6 +397,10 @@ main(int argc, char *argv[])
 		exit(1);
 	}
 
+	if (noupdate)
+		pg_log_info("Executing in dry-run mode.\n"
+					"Nothing will be modified.");
+
 	/*
 	 * Attempt to read the existing pg_control file
 	 */
diff --git a/src/bin/pg_rewind/pg_rewind.c b/src/bin/pg_rewind/pg_rewind.c
index 27c514f934a..e9364d04f76 100644
--- a/src/bin/pg_rewind/pg_rewind.c
+++ b/src/bin/pg_rewind/pg_rewind.c
@@ -300,10 +300,12 @@ main(int argc, char **argv)
 
 	atexit(disconnect_atexit);
 
-	/*
-	 * Ok, we have all the options and we're ready to start. First, connect to
-	 * remote server.
-	 */
+	/* Ok, we have all the options and we're ready to start. */
+	if (dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
+	/* First, connect to remote server. */
 	if (connstr_source)
 	{
 		conn = PQconnectdb(connstr_source);
-- 
2.47.3


--ibfr3ah5qy6tcbhw--





^ permalink  raw  reply  [nested|flat] 126+ messages in thread

* [PATCH v5] Log a note at program start when running in dry-run mode
@ 2025-11-11 08:54 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 126+ messages in thread

From: Álvaro Herrera @ 2025-11-11 08:54 UTC (permalink / raw)

Users might get some peace of mind knowing their data is not being
destroyed or whatever.

Author: Peter Smith <[email protected]>
Reviewed-by: Álvaro Herrera <[email protected]>
Discussion: https://postgr.es/m/CAHut+PsvQJQnQO0KT0S2oegenkvJ8FUuY-QS5syyqmT24R2xFQ@mail.gmail.com
---
 src/bin/pg_archivecleanup/pg_archivecleanup.c |  4 ++++
 src/bin/pg_basebackup/pg_createsubscriber.c   |  5 +++++
 src/bin/pg_combinebackup/pg_combinebackup.c   |  4 ++++
 src/bin/pg_resetwal/pg_resetwal.c             |  4 ++++
 src/bin/pg_rewind/pg_rewind.c                 | 10 ++++++----
 5 files changed, 23 insertions(+), 4 deletions(-)

diff --git a/src/bin/pg_archivecleanup/pg_archivecleanup.c b/src/bin/pg_archivecleanup/pg_archivecleanup.c
index c25348bcb85..ab686b4748c 100644
--- a/src/bin/pg_archivecleanup/pg_archivecleanup.c
+++ b/src/bin/pg_archivecleanup/pg_archivecleanup.c
@@ -375,6 +375,10 @@ main(int argc, char **argv)
 		exit(2);
 	}
 
+	if (dryrun)
+		pg_log_info("Executing in dry-run mode.\n"
+					"No files will be removed.");
+
 	/*
 	 * Check archive exists and other initialization if required.
 	 */
diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c
index df41836e70f..cc4be5d6ef4 100644
--- a/src/bin/pg_basebackup/pg_createsubscriber.c
+++ b/src/bin/pg_basebackup/pg_createsubscriber.c
@@ -2305,6 +2305,11 @@ main(int argc, char **argv)
 		pg_log_error_hint("Try \"%s --help\" for more information.", progname);
 		exit(1);
 	}
+
+	if (dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
 	pg_log_info("validating publisher connection string");
 	pub_base_conninfo = get_base_conninfo(opt.pub_conninfo_str,
 										  &dbname_conninfo);
diff --git a/src/bin/pg_combinebackup/pg_combinebackup.c b/src/bin/pg_combinebackup/pg_combinebackup.c
index 3a325127209..c9bf0a9e105 100644
--- a/src/bin/pg_combinebackup/pg_combinebackup.c
+++ b/src/bin/pg_combinebackup/pg_combinebackup.c
@@ -242,6 +242,10 @@ main(int argc, char *argv[])
 	if (opt.no_manifest)
 		opt.manifest_checksums = CHECKSUM_TYPE_NONE;
 
+	if (opt.dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
 	/* Check that the platform supports the requested copy method. */
 	if (opt.copy_method == COPY_METHOD_CLONE)
 	{
diff --git a/src/bin/pg_resetwal/pg_resetwal.c b/src/bin/pg_resetwal/pg_resetwal.c
index a89d72fc5cf..dd5d279521e 100644
--- a/src/bin/pg_resetwal/pg_resetwal.c
+++ b/src/bin/pg_resetwal/pg_resetwal.c
@@ -397,6 +397,10 @@ main(int argc, char *argv[])
 		exit(1);
 	}
 
+	if (noupdate)
+		pg_log_info("Executing in dry-run mode.\n"
+					"Nothing will be modified.");
+
 	/*
 	 * Attempt to read the existing pg_control file
 	 */
diff --git a/src/bin/pg_rewind/pg_rewind.c b/src/bin/pg_rewind/pg_rewind.c
index 27c514f934a..e9364d04f76 100644
--- a/src/bin/pg_rewind/pg_rewind.c
+++ b/src/bin/pg_rewind/pg_rewind.c
@@ -300,10 +300,12 @@ main(int argc, char **argv)
 
 	atexit(disconnect_atexit);
 
-	/*
-	 * Ok, we have all the options and we're ready to start. First, connect to
-	 * remote server.
-	 */
+	/* Ok, we have all the options and we're ready to start. */
+	if (dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
+	/* First, connect to remote server. */
 	if (connstr_source)
 	{
 		conn = PQconnectdb(connstr_source);
-- 
2.47.3


--ibfr3ah5qy6tcbhw--





^ permalink  raw  reply  [nested|flat] 126+ messages in thread

* [PATCH v5] Log a note at program start when running in dry-run mode
@ 2025-11-11 08:54 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 126+ messages in thread

From: Álvaro Herrera @ 2025-11-11 08:54 UTC (permalink / raw)

Users might get some peace of mind knowing their data is not being
destroyed or whatever.

Author: Peter Smith <[email protected]>
Reviewed-by: Álvaro Herrera <[email protected]>
Discussion: https://postgr.es/m/CAHut+PsvQJQnQO0KT0S2oegenkvJ8FUuY-QS5syyqmT24R2xFQ@mail.gmail.com
---
 src/bin/pg_archivecleanup/pg_archivecleanup.c |  4 ++++
 src/bin/pg_basebackup/pg_createsubscriber.c   |  5 +++++
 src/bin/pg_combinebackup/pg_combinebackup.c   |  4 ++++
 src/bin/pg_resetwal/pg_resetwal.c             |  4 ++++
 src/bin/pg_rewind/pg_rewind.c                 | 10 ++++++----
 5 files changed, 23 insertions(+), 4 deletions(-)

diff --git a/src/bin/pg_archivecleanup/pg_archivecleanup.c b/src/bin/pg_archivecleanup/pg_archivecleanup.c
index c25348bcb85..ab686b4748c 100644
--- a/src/bin/pg_archivecleanup/pg_archivecleanup.c
+++ b/src/bin/pg_archivecleanup/pg_archivecleanup.c
@@ -375,6 +375,10 @@ main(int argc, char **argv)
 		exit(2);
 	}
 
+	if (dryrun)
+		pg_log_info("Executing in dry-run mode.\n"
+					"No files will be removed.");
+
 	/*
 	 * Check archive exists and other initialization if required.
 	 */
diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c
index df41836e70f..cc4be5d6ef4 100644
--- a/src/bin/pg_basebackup/pg_createsubscriber.c
+++ b/src/bin/pg_basebackup/pg_createsubscriber.c
@@ -2305,6 +2305,11 @@ main(int argc, char **argv)
 		pg_log_error_hint("Try \"%s --help\" for more information.", progname);
 		exit(1);
 	}
+
+	if (dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
 	pg_log_info("validating publisher connection string");
 	pub_base_conninfo = get_base_conninfo(opt.pub_conninfo_str,
 										  &dbname_conninfo);
diff --git a/src/bin/pg_combinebackup/pg_combinebackup.c b/src/bin/pg_combinebackup/pg_combinebackup.c
index 3a325127209..c9bf0a9e105 100644
--- a/src/bin/pg_combinebackup/pg_combinebackup.c
+++ b/src/bin/pg_combinebackup/pg_combinebackup.c
@@ -242,6 +242,10 @@ main(int argc, char *argv[])
 	if (opt.no_manifest)
 		opt.manifest_checksums = CHECKSUM_TYPE_NONE;
 
+	if (opt.dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
 	/* Check that the platform supports the requested copy method. */
 	if (opt.copy_method == COPY_METHOD_CLONE)
 	{
diff --git a/src/bin/pg_resetwal/pg_resetwal.c b/src/bin/pg_resetwal/pg_resetwal.c
index a89d72fc5cf..dd5d279521e 100644
--- a/src/bin/pg_resetwal/pg_resetwal.c
+++ b/src/bin/pg_resetwal/pg_resetwal.c
@@ -397,6 +397,10 @@ main(int argc, char *argv[])
 		exit(1);
 	}
 
+	if (noupdate)
+		pg_log_info("Executing in dry-run mode.\n"
+					"Nothing will be modified.");
+
 	/*
 	 * Attempt to read the existing pg_control file
 	 */
diff --git a/src/bin/pg_rewind/pg_rewind.c b/src/bin/pg_rewind/pg_rewind.c
index 27c514f934a..e9364d04f76 100644
--- a/src/bin/pg_rewind/pg_rewind.c
+++ b/src/bin/pg_rewind/pg_rewind.c
@@ -300,10 +300,12 @@ main(int argc, char **argv)
 
 	atexit(disconnect_atexit);
 
-	/*
-	 * Ok, we have all the options and we're ready to start. First, connect to
-	 * remote server.
-	 */
+	/* Ok, we have all the options and we're ready to start. */
+	if (dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
+	/* First, connect to remote server. */
 	if (connstr_source)
 	{
 		conn = PQconnectdb(connstr_source);
-- 
2.47.3


--ibfr3ah5qy6tcbhw--





^ permalink  raw  reply  [nested|flat] 126+ messages in thread

* [PATCH v5] Log a note at program start when running in dry-run mode
@ 2025-11-11 08:54 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 126+ messages in thread

From: Álvaro Herrera @ 2025-11-11 08:54 UTC (permalink / raw)

Users might get some peace of mind knowing their data is not being
destroyed or whatever.

Author: Peter Smith <[email protected]>
Reviewed-by: Álvaro Herrera <[email protected]>
Discussion: https://postgr.es/m/CAHut+PsvQJQnQO0KT0S2oegenkvJ8FUuY-QS5syyqmT24R2xFQ@mail.gmail.com
---
 src/bin/pg_archivecleanup/pg_archivecleanup.c |  4 ++++
 src/bin/pg_basebackup/pg_createsubscriber.c   |  5 +++++
 src/bin/pg_combinebackup/pg_combinebackup.c   |  4 ++++
 src/bin/pg_resetwal/pg_resetwal.c             |  4 ++++
 src/bin/pg_rewind/pg_rewind.c                 | 10 ++++++----
 5 files changed, 23 insertions(+), 4 deletions(-)

diff --git a/src/bin/pg_archivecleanup/pg_archivecleanup.c b/src/bin/pg_archivecleanup/pg_archivecleanup.c
index c25348bcb85..ab686b4748c 100644
--- a/src/bin/pg_archivecleanup/pg_archivecleanup.c
+++ b/src/bin/pg_archivecleanup/pg_archivecleanup.c
@@ -375,6 +375,10 @@ main(int argc, char **argv)
 		exit(2);
 	}
 
+	if (dryrun)
+		pg_log_info("Executing in dry-run mode.\n"
+					"No files will be removed.");
+
 	/*
 	 * Check archive exists and other initialization if required.
 	 */
diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c
index df41836e70f..cc4be5d6ef4 100644
--- a/src/bin/pg_basebackup/pg_createsubscriber.c
+++ b/src/bin/pg_basebackup/pg_createsubscriber.c
@@ -2305,6 +2305,11 @@ main(int argc, char **argv)
 		pg_log_error_hint("Try \"%s --help\" for more information.", progname);
 		exit(1);
 	}
+
+	if (dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
 	pg_log_info("validating publisher connection string");
 	pub_base_conninfo = get_base_conninfo(opt.pub_conninfo_str,
 										  &dbname_conninfo);
diff --git a/src/bin/pg_combinebackup/pg_combinebackup.c b/src/bin/pg_combinebackup/pg_combinebackup.c
index 3a325127209..c9bf0a9e105 100644
--- a/src/bin/pg_combinebackup/pg_combinebackup.c
+++ b/src/bin/pg_combinebackup/pg_combinebackup.c
@@ -242,6 +242,10 @@ main(int argc, char *argv[])
 	if (opt.no_manifest)
 		opt.manifest_checksums = CHECKSUM_TYPE_NONE;
 
+	if (opt.dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
 	/* Check that the platform supports the requested copy method. */
 	if (opt.copy_method == COPY_METHOD_CLONE)
 	{
diff --git a/src/bin/pg_resetwal/pg_resetwal.c b/src/bin/pg_resetwal/pg_resetwal.c
index a89d72fc5cf..dd5d279521e 100644
--- a/src/bin/pg_resetwal/pg_resetwal.c
+++ b/src/bin/pg_resetwal/pg_resetwal.c
@@ -397,6 +397,10 @@ main(int argc, char *argv[])
 		exit(1);
 	}
 
+	if (noupdate)
+		pg_log_info("Executing in dry-run mode.\n"
+					"Nothing will be modified.");
+
 	/*
 	 * Attempt to read the existing pg_control file
 	 */
diff --git a/src/bin/pg_rewind/pg_rewind.c b/src/bin/pg_rewind/pg_rewind.c
index 27c514f934a..e9364d04f76 100644
--- a/src/bin/pg_rewind/pg_rewind.c
+++ b/src/bin/pg_rewind/pg_rewind.c
@@ -300,10 +300,12 @@ main(int argc, char **argv)
 
 	atexit(disconnect_atexit);
 
-	/*
-	 * Ok, we have all the options and we're ready to start. First, connect to
-	 * remote server.
-	 */
+	/* Ok, we have all the options and we're ready to start. */
+	if (dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
+	/* First, connect to remote server. */
 	if (connstr_source)
 	{
 		conn = PQconnectdb(connstr_source);
-- 
2.47.3


--ibfr3ah5qy6tcbhw--





^ permalink  raw  reply  [nested|flat] 126+ messages in thread

* [PATCH v5] Log a note at program start when running in dry-run mode
@ 2025-11-11 08:54 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 126+ messages in thread

From: Álvaro Herrera @ 2025-11-11 08:54 UTC (permalink / raw)

Users might get some peace of mind knowing their data is not being
destroyed or whatever.

Author: Peter Smith <[email protected]>
Reviewed-by: Álvaro Herrera <[email protected]>
Discussion: https://postgr.es/m/CAHut+PsvQJQnQO0KT0S2oegenkvJ8FUuY-QS5syyqmT24R2xFQ@mail.gmail.com
---
 src/bin/pg_archivecleanup/pg_archivecleanup.c |  4 ++++
 src/bin/pg_basebackup/pg_createsubscriber.c   |  5 +++++
 src/bin/pg_combinebackup/pg_combinebackup.c   |  4 ++++
 src/bin/pg_resetwal/pg_resetwal.c             |  4 ++++
 src/bin/pg_rewind/pg_rewind.c                 | 10 ++++++----
 5 files changed, 23 insertions(+), 4 deletions(-)

diff --git a/src/bin/pg_archivecleanup/pg_archivecleanup.c b/src/bin/pg_archivecleanup/pg_archivecleanup.c
index c25348bcb85..ab686b4748c 100644
--- a/src/bin/pg_archivecleanup/pg_archivecleanup.c
+++ b/src/bin/pg_archivecleanup/pg_archivecleanup.c
@@ -375,6 +375,10 @@ main(int argc, char **argv)
 		exit(2);
 	}
 
+	if (dryrun)
+		pg_log_info("Executing in dry-run mode.\n"
+					"No files will be removed.");
+
 	/*
 	 * Check archive exists and other initialization if required.
 	 */
diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c
index df41836e70f..cc4be5d6ef4 100644
--- a/src/bin/pg_basebackup/pg_createsubscriber.c
+++ b/src/bin/pg_basebackup/pg_createsubscriber.c
@@ -2305,6 +2305,11 @@ main(int argc, char **argv)
 		pg_log_error_hint("Try \"%s --help\" for more information.", progname);
 		exit(1);
 	}
+
+	if (dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
 	pg_log_info("validating publisher connection string");
 	pub_base_conninfo = get_base_conninfo(opt.pub_conninfo_str,
 										  &dbname_conninfo);
diff --git a/src/bin/pg_combinebackup/pg_combinebackup.c b/src/bin/pg_combinebackup/pg_combinebackup.c
index 3a325127209..c9bf0a9e105 100644
--- a/src/bin/pg_combinebackup/pg_combinebackup.c
+++ b/src/bin/pg_combinebackup/pg_combinebackup.c
@@ -242,6 +242,10 @@ main(int argc, char *argv[])
 	if (opt.no_manifest)
 		opt.manifest_checksums = CHECKSUM_TYPE_NONE;
 
+	if (opt.dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
 	/* Check that the platform supports the requested copy method. */
 	if (opt.copy_method == COPY_METHOD_CLONE)
 	{
diff --git a/src/bin/pg_resetwal/pg_resetwal.c b/src/bin/pg_resetwal/pg_resetwal.c
index a89d72fc5cf..dd5d279521e 100644
--- a/src/bin/pg_resetwal/pg_resetwal.c
+++ b/src/bin/pg_resetwal/pg_resetwal.c
@@ -397,6 +397,10 @@ main(int argc, char *argv[])
 		exit(1);
 	}
 
+	if (noupdate)
+		pg_log_info("Executing in dry-run mode.\n"
+					"Nothing will be modified.");
+
 	/*
 	 * Attempt to read the existing pg_control file
 	 */
diff --git a/src/bin/pg_rewind/pg_rewind.c b/src/bin/pg_rewind/pg_rewind.c
index 27c514f934a..e9364d04f76 100644
--- a/src/bin/pg_rewind/pg_rewind.c
+++ b/src/bin/pg_rewind/pg_rewind.c
@@ -300,10 +300,12 @@ main(int argc, char **argv)
 
 	atexit(disconnect_atexit);
 
-	/*
-	 * Ok, we have all the options and we're ready to start. First, connect to
-	 * remote server.
-	 */
+	/* Ok, we have all the options and we're ready to start. */
+	if (dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
+	/* First, connect to remote server. */
 	if (connstr_source)
 	{
 		conn = PQconnectdb(connstr_source);
-- 
2.47.3


--ibfr3ah5qy6tcbhw--





^ permalink  raw  reply  [nested|flat] 126+ messages in thread

* [PATCH v5] Log a note at program start when running in dry-run mode
@ 2025-11-11 08:54 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 126+ messages in thread

From: Álvaro Herrera @ 2025-11-11 08:54 UTC (permalink / raw)

Users might get some peace of mind knowing their data is not being
destroyed or whatever.

Author: Peter Smith <[email protected]>
Reviewed-by: Álvaro Herrera <[email protected]>
Discussion: https://postgr.es/m/CAHut+PsvQJQnQO0KT0S2oegenkvJ8FUuY-QS5syyqmT24R2xFQ@mail.gmail.com
---
 src/bin/pg_archivecleanup/pg_archivecleanup.c |  4 ++++
 src/bin/pg_basebackup/pg_createsubscriber.c   |  5 +++++
 src/bin/pg_combinebackup/pg_combinebackup.c   |  4 ++++
 src/bin/pg_resetwal/pg_resetwal.c             |  4 ++++
 src/bin/pg_rewind/pg_rewind.c                 | 10 ++++++----
 5 files changed, 23 insertions(+), 4 deletions(-)

diff --git a/src/bin/pg_archivecleanup/pg_archivecleanup.c b/src/bin/pg_archivecleanup/pg_archivecleanup.c
index c25348bcb85..ab686b4748c 100644
--- a/src/bin/pg_archivecleanup/pg_archivecleanup.c
+++ b/src/bin/pg_archivecleanup/pg_archivecleanup.c
@@ -375,6 +375,10 @@ main(int argc, char **argv)
 		exit(2);
 	}
 
+	if (dryrun)
+		pg_log_info("Executing in dry-run mode.\n"
+					"No files will be removed.");
+
 	/*
 	 * Check archive exists and other initialization if required.
 	 */
diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c
index df41836e70f..cc4be5d6ef4 100644
--- a/src/bin/pg_basebackup/pg_createsubscriber.c
+++ b/src/bin/pg_basebackup/pg_createsubscriber.c
@@ -2305,6 +2305,11 @@ main(int argc, char **argv)
 		pg_log_error_hint("Try \"%s --help\" for more information.", progname);
 		exit(1);
 	}
+
+	if (dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
 	pg_log_info("validating publisher connection string");
 	pub_base_conninfo = get_base_conninfo(opt.pub_conninfo_str,
 										  &dbname_conninfo);
diff --git a/src/bin/pg_combinebackup/pg_combinebackup.c b/src/bin/pg_combinebackup/pg_combinebackup.c
index 3a325127209..c9bf0a9e105 100644
--- a/src/bin/pg_combinebackup/pg_combinebackup.c
+++ b/src/bin/pg_combinebackup/pg_combinebackup.c
@@ -242,6 +242,10 @@ main(int argc, char *argv[])
 	if (opt.no_manifest)
 		opt.manifest_checksums = CHECKSUM_TYPE_NONE;
 
+	if (opt.dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
 	/* Check that the platform supports the requested copy method. */
 	if (opt.copy_method == COPY_METHOD_CLONE)
 	{
diff --git a/src/bin/pg_resetwal/pg_resetwal.c b/src/bin/pg_resetwal/pg_resetwal.c
index a89d72fc5cf..dd5d279521e 100644
--- a/src/bin/pg_resetwal/pg_resetwal.c
+++ b/src/bin/pg_resetwal/pg_resetwal.c
@@ -397,6 +397,10 @@ main(int argc, char *argv[])
 		exit(1);
 	}
 
+	if (noupdate)
+		pg_log_info("Executing in dry-run mode.\n"
+					"Nothing will be modified.");
+
 	/*
 	 * Attempt to read the existing pg_control file
 	 */
diff --git a/src/bin/pg_rewind/pg_rewind.c b/src/bin/pg_rewind/pg_rewind.c
index 27c514f934a..e9364d04f76 100644
--- a/src/bin/pg_rewind/pg_rewind.c
+++ b/src/bin/pg_rewind/pg_rewind.c
@@ -300,10 +300,12 @@ main(int argc, char **argv)
 
 	atexit(disconnect_atexit);
 
-	/*
-	 * Ok, we have all the options and we're ready to start. First, connect to
-	 * remote server.
-	 */
+	/* Ok, we have all the options and we're ready to start. */
+	if (dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
+	/* First, connect to remote server. */
 	if (connstr_source)
 	{
 		conn = PQconnectdb(connstr_source);
-- 
2.47.3


--ibfr3ah5qy6tcbhw--





^ permalink  raw  reply  [nested|flat] 126+ messages in thread

* [PATCH v5] Log a note at program start when running in dry-run mode
@ 2025-11-11 08:54 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 126+ messages in thread

From: Álvaro Herrera @ 2025-11-11 08:54 UTC (permalink / raw)

Users might get some peace of mind knowing their data is not being
destroyed or whatever.

Author: Peter Smith <[email protected]>
Reviewed-by: Álvaro Herrera <[email protected]>
Discussion: https://postgr.es/m/CAHut+PsvQJQnQO0KT0S2oegenkvJ8FUuY-QS5syyqmT24R2xFQ@mail.gmail.com
---
 src/bin/pg_archivecleanup/pg_archivecleanup.c |  4 ++++
 src/bin/pg_basebackup/pg_createsubscriber.c   |  5 +++++
 src/bin/pg_combinebackup/pg_combinebackup.c   |  4 ++++
 src/bin/pg_resetwal/pg_resetwal.c             |  4 ++++
 src/bin/pg_rewind/pg_rewind.c                 | 10 ++++++----
 5 files changed, 23 insertions(+), 4 deletions(-)

diff --git a/src/bin/pg_archivecleanup/pg_archivecleanup.c b/src/bin/pg_archivecleanup/pg_archivecleanup.c
index c25348bcb85..ab686b4748c 100644
--- a/src/bin/pg_archivecleanup/pg_archivecleanup.c
+++ b/src/bin/pg_archivecleanup/pg_archivecleanup.c
@@ -375,6 +375,10 @@ main(int argc, char **argv)
 		exit(2);
 	}
 
+	if (dryrun)
+		pg_log_info("Executing in dry-run mode.\n"
+					"No files will be removed.");
+
 	/*
 	 * Check archive exists and other initialization if required.
 	 */
diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c
index df41836e70f..cc4be5d6ef4 100644
--- a/src/bin/pg_basebackup/pg_createsubscriber.c
+++ b/src/bin/pg_basebackup/pg_createsubscriber.c
@@ -2305,6 +2305,11 @@ main(int argc, char **argv)
 		pg_log_error_hint("Try \"%s --help\" for more information.", progname);
 		exit(1);
 	}
+
+	if (dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
 	pg_log_info("validating publisher connection string");
 	pub_base_conninfo = get_base_conninfo(opt.pub_conninfo_str,
 										  &dbname_conninfo);
diff --git a/src/bin/pg_combinebackup/pg_combinebackup.c b/src/bin/pg_combinebackup/pg_combinebackup.c
index 3a325127209..c9bf0a9e105 100644
--- a/src/bin/pg_combinebackup/pg_combinebackup.c
+++ b/src/bin/pg_combinebackup/pg_combinebackup.c
@@ -242,6 +242,10 @@ main(int argc, char *argv[])
 	if (opt.no_manifest)
 		opt.manifest_checksums = CHECKSUM_TYPE_NONE;
 
+	if (opt.dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
 	/* Check that the platform supports the requested copy method. */
 	if (opt.copy_method == COPY_METHOD_CLONE)
 	{
diff --git a/src/bin/pg_resetwal/pg_resetwal.c b/src/bin/pg_resetwal/pg_resetwal.c
index a89d72fc5cf..dd5d279521e 100644
--- a/src/bin/pg_resetwal/pg_resetwal.c
+++ b/src/bin/pg_resetwal/pg_resetwal.c
@@ -397,6 +397,10 @@ main(int argc, char *argv[])
 		exit(1);
 	}
 
+	if (noupdate)
+		pg_log_info("Executing in dry-run mode.\n"
+					"Nothing will be modified.");
+
 	/*
 	 * Attempt to read the existing pg_control file
 	 */
diff --git a/src/bin/pg_rewind/pg_rewind.c b/src/bin/pg_rewind/pg_rewind.c
index 27c514f934a..e9364d04f76 100644
--- a/src/bin/pg_rewind/pg_rewind.c
+++ b/src/bin/pg_rewind/pg_rewind.c
@@ -300,10 +300,12 @@ main(int argc, char **argv)
 
 	atexit(disconnect_atexit);
 
-	/*
-	 * Ok, we have all the options and we're ready to start. First, connect to
-	 * remote server.
-	 */
+	/* Ok, we have all the options and we're ready to start. */
+	if (dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
+	/* First, connect to remote server. */
 	if (connstr_source)
 	{
 		conn = PQconnectdb(connstr_source);
-- 
2.47.3


--ibfr3ah5qy6tcbhw--





^ permalink  raw  reply  [nested|flat] 126+ messages in thread

* [PATCH v5] Log a note at program start when running in dry-run mode
@ 2025-11-11 08:54 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 126+ messages in thread

From: Álvaro Herrera @ 2025-11-11 08:54 UTC (permalink / raw)

Users might get some peace of mind knowing their data is not being
destroyed or whatever.

Author: Peter Smith <[email protected]>
Reviewed-by: Álvaro Herrera <[email protected]>
Discussion: https://postgr.es/m/CAHut+PsvQJQnQO0KT0S2oegenkvJ8FUuY-QS5syyqmT24R2xFQ@mail.gmail.com
---
 src/bin/pg_archivecleanup/pg_archivecleanup.c |  4 ++++
 src/bin/pg_basebackup/pg_createsubscriber.c   |  5 +++++
 src/bin/pg_combinebackup/pg_combinebackup.c   |  4 ++++
 src/bin/pg_resetwal/pg_resetwal.c             |  4 ++++
 src/bin/pg_rewind/pg_rewind.c                 | 10 ++++++----
 5 files changed, 23 insertions(+), 4 deletions(-)

diff --git a/src/bin/pg_archivecleanup/pg_archivecleanup.c b/src/bin/pg_archivecleanup/pg_archivecleanup.c
index c25348bcb85..ab686b4748c 100644
--- a/src/bin/pg_archivecleanup/pg_archivecleanup.c
+++ b/src/bin/pg_archivecleanup/pg_archivecleanup.c
@@ -375,6 +375,10 @@ main(int argc, char **argv)
 		exit(2);
 	}
 
+	if (dryrun)
+		pg_log_info("Executing in dry-run mode.\n"
+					"No files will be removed.");
+
 	/*
 	 * Check archive exists and other initialization if required.
 	 */
diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c
index df41836e70f..cc4be5d6ef4 100644
--- a/src/bin/pg_basebackup/pg_createsubscriber.c
+++ b/src/bin/pg_basebackup/pg_createsubscriber.c
@@ -2305,6 +2305,11 @@ main(int argc, char **argv)
 		pg_log_error_hint("Try \"%s --help\" for more information.", progname);
 		exit(1);
 	}
+
+	if (dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
 	pg_log_info("validating publisher connection string");
 	pub_base_conninfo = get_base_conninfo(opt.pub_conninfo_str,
 										  &dbname_conninfo);
diff --git a/src/bin/pg_combinebackup/pg_combinebackup.c b/src/bin/pg_combinebackup/pg_combinebackup.c
index 3a325127209..c9bf0a9e105 100644
--- a/src/bin/pg_combinebackup/pg_combinebackup.c
+++ b/src/bin/pg_combinebackup/pg_combinebackup.c
@@ -242,6 +242,10 @@ main(int argc, char *argv[])
 	if (opt.no_manifest)
 		opt.manifest_checksums = CHECKSUM_TYPE_NONE;
 
+	if (opt.dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
 	/* Check that the platform supports the requested copy method. */
 	if (opt.copy_method == COPY_METHOD_CLONE)
 	{
diff --git a/src/bin/pg_resetwal/pg_resetwal.c b/src/bin/pg_resetwal/pg_resetwal.c
index a89d72fc5cf..dd5d279521e 100644
--- a/src/bin/pg_resetwal/pg_resetwal.c
+++ b/src/bin/pg_resetwal/pg_resetwal.c
@@ -397,6 +397,10 @@ main(int argc, char *argv[])
 		exit(1);
 	}
 
+	if (noupdate)
+		pg_log_info("Executing in dry-run mode.\n"
+					"Nothing will be modified.");
+
 	/*
 	 * Attempt to read the existing pg_control file
 	 */
diff --git a/src/bin/pg_rewind/pg_rewind.c b/src/bin/pg_rewind/pg_rewind.c
index 27c514f934a..e9364d04f76 100644
--- a/src/bin/pg_rewind/pg_rewind.c
+++ b/src/bin/pg_rewind/pg_rewind.c
@@ -300,10 +300,12 @@ main(int argc, char **argv)
 
 	atexit(disconnect_atexit);
 
-	/*
-	 * Ok, we have all the options and we're ready to start. First, connect to
-	 * remote server.
-	 */
+	/* Ok, we have all the options and we're ready to start. */
+	if (dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
+	/* First, connect to remote server. */
 	if (connstr_source)
 	{
 		conn = PQconnectdb(connstr_source);
-- 
2.47.3


--ibfr3ah5qy6tcbhw--





^ permalink  raw  reply  [nested|flat] 126+ messages in thread

* [PATCH v5] Log a note at program start when running in dry-run mode
@ 2025-11-11 08:54 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 126+ messages in thread

From: Álvaro Herrera @ 2025-11-11 08:54 UTC (permalink / raw)

Users might get some peace of mind knowing their data is not being
destroyed or whatever.

Author: Peter Smith <[email protected]>
Reviewed-by: Álvaro Herrera <[email protected]>
Discussion: https://postgr.es/m/CAHut+PsvQJQnQO0KT0S2oegenkvJ8FUuY-QS5syyqmT24R2xFQ@mail.gmail.com
---
 src/bin/pg_archivecleanup/pg_archivecleanup.c |  4 ++++
 src/bin/pg_basebackup/pg_createsubscriber.c   |  5 +++++
 src/bin/pg_combinebackup/pg_combinebackup.c   |  4 ++++
 src/bin/pg_resetwal/pg_resetwal.c             |  4 ++++
 src/bin/pg_rewind/pg_rewind.c                 | 10 ++++++----
 5 files changed, 23 insertions(+), 4 deletions(-)

diff --git a/src/bin/pg_archivecleanup/pg_archivecleanup.c b/src/bin/pg_archivecleanup/pg_archivecleanup.c
index c25348bcb85..ab686b4748c 100644
--- a/src/bin/pg_archivecleanup/pg_archivecleanup.c
+++ b/src/bin/pg_archivecleanup/pg_archivecleanup.c
@@ -375,6 +375,10 @@ main(int argc, char **argv)
 		exit(2);
 	}
 
+	if (dryrun)
+		pg_log_info("Executing in dry-run mode.\n"
+					"No files will be removed.");
+
 	/*
 	 * Check archive exists and other initialization if required.
 	 */
diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c
index df41836e70f..cc4be5d6ef4 100644
--- a/src/bin/pg_basebackup/pg_createsubscriber.c
+++ b/src/bin/pg_basebackup/pg_createsubscriber.c
@@ -2305,6 +2305,11 @@ main(int argc, char **argv)
 		pg_log_error_hint("Try \"%s --help\" for more information.", progname);
 		exit(1);
 	}
+
+	if (dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
 	pg_log_info("validating publisher connection string");
 	pub_base_conninfo = get_base_conninfo(opt.pub_conninfo_str,
 										  &dbname_conninfo);
diff --git a/src/bin/pg_combinebackup/pg_combinebackup.c b/src/bin/pg_combinebackup/pg_combinebackup.c
index 3a325127209..c9bf0a9e105 100644
--- a/src/bin/pg_combinebackup/pg_combinebackup.c
+++ b/src/bin/pg_combinebackup/pg_combinebackup.c
@@ -242,6 +242,10 @@ main(int argc, char *argv[])
 	if (opt.no_manifest)
 		opt.manifest_checksums = CHECKSUM_TYPE_NONE;
 
+	if (opt.dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
 	/* Check that the platform supports the requested copy method. */
 	if (opt.copy_method == COPY_METHOD_CLONE)
 	{
diff --git a/src/bin/pg_resetwal/pg_resetwal.c b/src/bin/pg_resetwal/pg_resetwal.c
index a89d72fc5cf..dd5d279521e 100644
--- a/src/bin/pg_resetwal/pg_resetwal.c
+++ b/src/bin/pg_resetwal/pg_resetwal.c
@@ -397,6 +397,10 @@ main(int argc, char *argv[])
 		exit(1);
 	}
 
+	if (noupdate)
+		pg_log_info("Executing in dry-run mode.\n"
+					"Nothing will be modified.");
+
 	/*
 	 * Attempt to read the existing pg_control file
 	 */
diff --git a/src/bin/pg_rewind/pg_rewind.c b/src/bin/pg_rewind/pg_rewind.c
index 27c514f934a..e9364d04f76 100644
--- a/src/bin/pg_rewind/pg_rewind.c
+++ b/src/bin/pg_rewind/pg_rewind.c
@@ -300,10 +300,12 @@ main(int argc, char **argv)
 
 	atexit(disconnect_atexit);
 
-	/*
-	 * Ok, we have all the options and we're ready to start. First, connect to
-	 * remote server.
-	 */
+	/* Ok, we have all the options and we're ready to start. */
+	if (dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
+	/* First, connect to remote server. */
 	if (connstr_source)
 	{
 		conn = PQconnectdb(connstr_source);
-- 
2.47.3


--ibfr3ah5qy6tcbhw--





^ permalink  raw  reply  [nested|flat] 126+ messages in thread

* [PATCH v5] Log a note at program start when running in dry-run mode
@ 2025-11-11 08:54 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 126+ messages in thread

From: Álvaro Herrera @ 2025-11-11 08:54 UTC (permalink / raw)

Users might get some peace of mind knowing their data is not being
destroyed or whatever.

Author: Peter Smith <[email protected]>
Reviewed-by: Álvaro Herrera <[email protected]>
Discussion: https://postgr.es/m/CAHut+PsvQJQnQO0KT0S2oegenkvJ8FUuY-QS5syyqmT24R2xFQ@mail.gmail.com
---
 src/bin/pg_archivecleanup/pg_archivecleanup.c |  4 ++++
 src/bin/pg_basebackup/pg_createsubscriber.c   |  5 +++++
 src/bin/pg_combinebackup/pg_combinebackup.c   |  4 ++++
 src/bin/pg_resetwal/pg_resetwal.c             |  4 ++++
 src/bin/pg_rewind/pg_rewind.c                 | 10 ++++++----
 5 files changed, 23 insertions(+), 4 deletions(-)

diff --git a/src/bin/pg_archivecleanup/pg_archivecleanup.c b/src/bin/pg_archivecleanup/pg_archivecleanup.c
index c25348bcb85..ab686b4748c 100644
--- a/src/bin/pg_archivecleanup/pg_archivecleanup.c
+++ b/src/bin/pg_archivecleanup/pg_archivecleanup.c
@@ -375,6 +375,10 @@ main(int argc, char **argv)
 		exit(2);
 	}
 
+	if (dryrun)
+		pg_log_info("Executing in dry-run mode.\n"
+					"No files will be removed.");
+
 	/*
 	 * Check archive exists and other initialization if required.
 	 */
diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c
index df41836e70f..cc4be5d6ef4 100644
--- a/src/bin/pg_basebackup/pg_createsubscriber.c
+++ b/src/bin/pg_basebackup/pg_createsubscriber.c
@@ -2305,6 +2305,11 @@ main(int argc, char **argv)
 		pg_log_error_hint("Try \"%s --help\" for more information.", progname);
 		exit(1);
 	}
+
+	if (dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
 	pg_log_info("validating publisher connection string");
 	pub_base_conninfo = get_base_conninfo(opt.pub_conninfo_str,
 										  &dbname_conninfo);
diff --git a/src/bin/pg_combinebackup/pg_combinebackup.c b/src/bin/pg_combinebackup/pg_combinebackup.c
index 3a325127209..c9bf0a9e105 100644
--- a/src/bin/pg_combinebackup/pg_combinebackup.c
+++ b/src/bin/pg_combinebackup/pg_combinebackup.c
@@ -242,6 +242,10 @@ main(int argc, char *argv[])
 	if (opt.no_manifest)
 		opt.manifest_checksums = CHECKSUM_TYPE_NONE;
 
+	if (opt.dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
 	/* Check that the platform supports the requested copy method. */
 	if (opt.copy_method == COPY_METHOD_CLONE)
 	{
diff --git a/src/bin/pg_resetwal/pg_resetwal.c b/src/bin/pg_resetwal/pg_resetwal.c
index a89d72fc5cf..dd5d279521e 100644
--- a/src/bin/pg_resetwal/pg_resetwal.c
+++ b/src/bin/pg_resetwal/pg_resetwal.c
@@ -397,6 +397,10 @@ main(int argc, char *argv[])
 		exit(1);
 	}
 
+	if (noupdate)
+		pg_log_info("Executing in dry-run mode.\n"
+					"Nothing will be modified.");
+
 	/*
 	 * Attempt to read the existing pg_control file
 	 */
diff --git a/src/bin/pg_rewind/pg_rewind.c b/src/bin/pg_rewind/pg_rewind.c
index 27c514f934a..e9364d04f76 100644
--- a/src/bin/pg_rewind/pg_rewind.c
+++ b/src/bin/pg_rewind/pg_rewind.c
@@ -300,10 +300,12 @@ main(int argc, char **argv)
 
 	atexit(disconnect_atexit);
 
-	/*
-	 * Ok, we have all the options and we're ready to start. First, connect to
-	 * remote server.
-	 */
+	/* Ok, we have all the options and we're ready to start. */
+	if (dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
+	/* First, connect to remote server. */
 	if (connstr_source)
 	{
 		conn = PQconnectdb(connstr_source);
-- 
2.47.3


--ibfr3ah5qy6tcbhw--





^ permalink  raw  reply  [nested|flat] 126+ messages in thread

* [PATCH v5] Log a note at program start when running in dry-run mode
@ 2025-11-11 08:54 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 126+ messages in thread

From: Álvaro Herrera @ 2025-11-11 08:54 UTC (permalink / raw)

Users might get some peace of mind knowing their data is not being
destroyed or whatever.

Author: Peter Smith <[email protected]>
Reviewed-by: Álvaro Herrera <[email protected]>
Discussion: https://postgr.es/m/CAHut+PsvQJQnQO0KT0S2oegenkvJ8FUuY-QS5syyqmT24R2xFQ@mail.gmail.com
---
 src/bin/pg_archivecleanup/pg_archivecleanup.c |  4 ++++
 src/bin/pg_basebackup/pg_createsubscriber.c   |  5 +++++
 src/bin/pg_combinebackup/pg_combinebackup.c   |  4 ++++
 src/bin/pg_resetwal/pg_resetwal.c             |  4 ++++
 src/bin/pg_rewind/pg_rewind.c                 | 10 ++++++----
 5 files changed, 23 insertions(+), 4 deletions(-)

diff --git a/src/bin/pg_archivecleanup/pg_archivecleanup.c b/src/bin/pg_archivecleanup/pg_archivecleanup.c
index c25348bcb85..ab686b4748c 100644
--- a/src/bin/pg_archivecleanup/pg_archivecleanup.c
+++ b/src/bin/pg_archivecleanup/pg_archivecleanup.c
@@ -375,6 +375,10 @@ main(int argc, char **argv)
 		exit(2);
 	}
 
+	if (dryrun)
+		pg_log_info("Executing in dry-run mode.\n"
+					"No files will be removed.");
+
 	/*
 	 * Check archive exists and other initialization if required.
 	 */
diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c
index df41836e70f..cc4be5d6ef4 100644
--- a/src/bin/pg_basebackup/pg_createsubscriber.c
+++ b/src/bin/pg_basebackup/pg_createsubscriber.c
@@ -2305,6 +2305,11 @@ main(int argc, char **argv)
 		pg_log_error_hint("Try \"%s --help\" for more information.", progname);
 		exit(1);
 	}
+
+	if (dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
 	pg_log_info("validating publisher connection string");
 	pub_base_conninfo = get_base_conninfo(opt.pub_conninfo_str,
 										  &dbname_conninfo);
diff --git a/src/bin/pg_combinebackup/pg_combinebackup.c b/src/bin/pg_combinebackup/pg_combinebackup.c
index 3a325127209..c9bf0a9e105 100644
--- a/src/bin/pg_combinebackup/pg_combinebackup.c
+++ b/src/bin/pg_combinebackup/pg_combinebackup.c
@@ -242,6 +242,10 @@ main(int argc, char *argv[])
 	if (opt.no_manifest)
 		opt.manifest_checksums = CHECKSUM_TYPE_NONE;
 
+	if (opt.dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
 	/* Check that the platform supports the requested copy method. */
 	if (opt.copy_method == COPY_METHOD_CLONE)
 	{
diff --git a/src/bin/pg_resetwal/pg_resetwal.c b/src/bin/pg_resetwal/pg_resetwal.c
index a89d72fc5cf..dd5d279521e 100644
--- a/src/bin/pg_resetwal/pg_resetwal.c
+++ b/src/bin/pg_resetwal/pg_resetwal.c
@@ -397,6 +397,10 @@ main(int argc, char *argv[])
 		exit(1);
 	}
 
+	if (noupdate)
+		pg_log_info("Executing in dry-run mode.\n"
+					"Nothing will be modified.");
+
 	/*
 	 * Attempt to read the existing pg_control file
 	 */
diff --git a/src/bin/pg_rewind/pg_rewind.c b/src/bin/pg_rewind/pg_rewind.c
index 27c514f934a..e9364d04f76 100644
--- a/src/bin/pg_rewind/pg_rewind.c
+++ b/src/bin/pg_rewind/pg_rewind.c
@@ -300,10 +300,12 @@ main(int argc, char **argv)
 
 	atexit(disconnect_atexit);
 
-	/*
-	 * Ok, we have all the options and we're ready to start. First, connect to
-	 * remote server.
-	 */
+	/* Ok, we have all the options and we're ready to start. */
+	if (dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
+	/* First, connect to remote server. */
 	if (connstr_source)
 	{
 		conn = PQconnectdb(connstr_source);
-- 
2.47.3


--ibfr3ah5qy6tcbhw--





^ permalink  raw  reply  [nested|flat] 126+ messages in thread

* [PATCH v5] Log a note at program start when running in dry-run mode
@ 2025-11-11 08:54 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 126+ messages in thread

From: Álvaro Herrera @ 2025-11-11 08:54 UTC (permalink / raw)

Users might get some peace of mind knowing their data is not being
destroyed or whatever.

Author: Peter Smith <[email protected]>
Reviewed-by: Álvaro Herrera <[email protected]>
Discussion: https://postgr.es/m/CAHut+PsvQJQnQO0KT0S2oegenkvJ8FUuY-QS5syyqmT24R2xFQ@mail.gmail.com
---
 src/bin/pg_archivecleanup/pg_archivecleanup.c |  4 ++++
 src/bin/pg_basebackup/pg_createsubscriber.c   |  5 +++++
 src/bin/pg_combinebackup/pg_combinebackup.c   |  4 ++++
 src/bin/pg_resetwal/pg_resetwal.c             |  4 ++++
 src/bin/pg_rewind/pg_rewind.c                 | 10 ++++++----
 5 files changed, 23 insertions(+), 4 deletions(-)

diff --git a/src/bin/pg_archivecleanup/pg_archivecleanup.c b/src/bin/pg_archivecleanup/pg_archivecleanup.c
index c25348bcb85..ab686b4748c 100644
--- a/src/bin/pg_archivecleanup/pg_archivecleanup.c
+++ b/src/bin/pg_archivecleanup/pg_archivecleanup.c
@@ -375,6 +375,10 @@ main(int argc, char **argv)
 		exit(2);
 	}
 
+	if (dryrun)
+		pg_log_info("Executing in dry-run mode.\n"
+					"No files will be removed.");
+
 	/*
 	 * Check archive exists and other initialization if required.
 	 */
diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c
index df41836e70f..cc4be5d6ef4 100644
--- a/src/bin/pg_basebackup/pg_createsubscriber.c
+++ b/src/bin/pg_basebackup/pg_createsubscriber.c
@@ -2305,6 +2305,11 @@ main(int argc, char **argv)
 		pg_log_error_hint("Try \"%s --help\" for more information.", progname);
 		exit(1);
 	}
+
+	if (dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
 	pg_log_info("validating publisher connection string");
 	pub_base_conninfo = get_base_conninfo(opt.pub_conninfo_str,
 										  &dbname_conninfo);
diff --git a/src/bin/pg_combinebackup/pg_combinebackup.c b/src/bin/pg_combinebackup/pg_combinebackup.c
index 3a325127209..c9bf0a9e105 100644
--- a/src/bin/pg_combinebackup/pg_combinebackup.c
+++ b/src/bin/pg_combinebackup/pg_combinebackup.c
@@ -242,6 +242,10 @@ main(int argc, char *argv[])
 	if (opt.no_manifest)
 		opt.manifest_checksums = CHECKSUM_TYPE_NONE;
 
+	if (opt.dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
 	/* Check that the platform supports the requested copy method. */
 	if (opt.copy_method == COPY_METHOD_CLONE)
 	{
diff --git a/src/bin/pg_resetwal/pg_resetwal.c b/src/bin/pg_resetwal/pg_resetwal.c
index a89d72fc5cf..dd5d279521e 100644
--- a/src/bin/pg_resetwal/pg_resetwal.c
+++ b/src/bin/pg_resetwal/pg_resetwal.c
@@ -397,6 +397,10 @@ main(int argc, char *argv[])
 		exit(1);
 	}
 
+	if (noupdate)
+		pg_log_info("Executing in dry-run mode.\n"
+					"Nothing will be modified.");
+
 	/*
 	 * Attempt to read the existing pg_control file
 	 */
diff --git a/src/bin/pg_rewind/pg_rewind.c b/src/bin/pg_rewind/pg_rewind.c
index 27c514f934a..e9364d04f76 100644
--- a/src/bin/pg_rewind/pg_rewind.c
+++ b/src/bin/pg_rewind/pg_rewind.c
@@ -300,10 +300,12 @@ main(int argc, char **argv)
 
 	atexit(disconnect_atexit);
 
-	/*
-	 * Ok, we have all the options and we're ready to start. First, connect to
-	 * remote server.
-	 */
+	/* Ok, we have all the options and we're ready to start. */
+	if (dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
+	/* First, connect to remote server. */
 	if (connstr_source)
 	{
 		conn = PQconnectdb(connstr_source);
-- 
2.47.3


--ibfr3ah5qy6tcbhw--





^ permalink  raw  reply  [nested|flat] 126+ messages in thread

* [PATCH v5] Log a note at program start when running in dry-run mode
@ 2025-11-11 08:54 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 126+ messages in thread

From: Álvaro Herrera @ 2025-11-11 08:54 UTC (permalink / raw)

Users might get some peace of mind knowing their data is not being
destroyed or whatever.

Author: Peter Smith <[email protected]>
Reviewed-by: Álvaro Herrera <[email protected]>
Discussion: https://postgr.es/m/CAHut+PsvQJQnQO0KT0S2oegenkvJ8FUuY-QS5syyqmT24R2xFQ@mail.gmail.com
---
 src/bin/pg_archivecleanup/pg_archivecleanup.c |  4 ++++
 src/bin/pg_basebackup/pg_createsubscriber.c   |  5 +++++
 src/bin/pg_combinebackup/pg_combinebackup.c   |  4 ++++
 src/bin/pg_resetwal/pg_resetwal.c             |  4 ++++
 src/bin/pg_rewind/pg_rewind.c                 | 10 ++++++----
 5 files changed, 23 insertions(+), 4 deletions(-)

diff --git a/src/bin/pg_archivecleanup/pg_archivecleanup.c b/src/bin/pg_archivecleanup/pg_archivecleanup.c
index c25348bcb85..ab686b4748c 100644
--- a/src/bin/pg_archivecleanup/pg_archivecleanup.c
+++ b/src/bin/pg_archivecleanup/pg_archivecleanup.c
@@ -375,6 +375,10 @@ main(int argc, char **argv)
 		exit(2);
 	}
 
+	if (dryrun)
+		pg_log_info("Executing in dry-run mode.\n"
+					"No files will be removed.");
+
 	/*
 	 * Check archive exists and other initialization if required.
 	 */
diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c
index df41836e70f..cc4be5d6ef4 100644
--- a/src/bin/pg_basebackup/pg_createsubscriber.c
+++ b/src/bin/pg_basebackup/pg_createsubscriber.c
@@ -2305,6 +2305,11 @@ main(int argc, char **argv)
 		pg_log_error_hint("Try \"%s --help\" for more information.", progname);
 		exit(1);
 	}
+
+	if (dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
 	pg_log_info("validating publisher connection string");
 	pub_base_conninfo = get_base_conninfo(opt.pub_conninfo_str,
 										  &dbname_conninfo);
diff --git a/src/bin/pg_combinebackup/pg_combinebackup.c b/src/bin/pg_combinebackup/pg_combinebackup.c
index 3a325127209..c9bf0a9e105 100644
--- a/src/bin/pg_combinebackup/pg_combinebackup.c
+++ b/src/bin/pg_combinebackup/pg_combinebackup.c
@@ -242,6 +242,10 @@ main(int argc, char *argv[])
 	if (opt.no_manifest)
 		opt.manifest_checksums = CHECKSUM_TYPE_NONE;
 
+	if (opt.dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
 	/* Check that the platform supports the requested copy method. */
 	if (opt.copy_method == COPY_METHOD_CLONE)
 	{
diff --git a/src/bin/pg_resetwal/pg_resetwal.c b/src/bin/pg_resetwal/pg_resetwal.c
index a89d72fc5cf..dd5d279521e 100644
--- a/src/bin/pg_resetwal/pg_resetwal.c
+++ b/src/bin/pg_resetwal/pg_resetwal.c
@@ -397,6 +397,10 @@ main(int argc, char *argv[])
 		exit(1);
 	}
 
+	if (noupdate)
+		pg_log_info("Executing in dry-run mode.\n"
+					"Nothing will be modified.");
+
 	/*
 	 * Attempt to read the existing pg_control file
 	 */
diff --git a/src/bin/pg_rewind/pg_rewind.c b/src/bin/pg_rewind/pg_rewind.c
index 27c514f934a..e9364d04f76 100644
--- a/src/bin/pg_rewind/pg_rewind.c
+++ b/src/bin/pg_rewind/pg_rewind.c
@@ -300,10 +300,12 @@ main(int argc, char **argv)
 
 	atexit(disconnect_atexit);
 
-	/*
-	 * Ok, we have all the options and we're ready to start. First, connect to
-	 * remote server.
-	 */
+	/* Ok, we have all the options and we're ready to start. */
+	if (dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
+	/* First, connect to remote server. */
 	if (connstr_source)
 	{
 		conn = PQconnectdb(connstr_source);
-- 
2.47.3


--ibfr3ah5qy6tcbhw--





^ permalink  raw  reply  [nested|flat] 126+ messages in thread

* [PATCH v5] Log a note at program start when running in dry-run mode
@ 2025-11-11 08:54 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 126+ messages in thread

From: Álvaro Herrera @ 2025-11-11 08:54 UTC (permalink / raw)

Users might get some peace of mind knowing their data is not being
destroyed or whatever.

Author: Peter Smith <[email protected]>
Reviewed-by: Álvaro Herrera <[email protected]>
Discussion: https://postgr.es/m/CAHut+PsvQJQnQO0KT0S2oegenkvJ8FUuY-QS5syyqmT24R2xFQ@mail.gmail.com
---
 src/bin/pg_archivecleanup/pg_archivecleanup.c |  4 ++++
 src/bin/pg_basebackup/pg_createsubscriber.c   |  5 +++++
 src/bin/pg_combinebackup/pg_combinebackup.c   |  4 ++++
 src/bin/pg_resetwal/pg_resetwal.c             |  4 ++++
 src/bin/pg_rewind/pg_rewind.c                 | 10 ++++++----
 5 files changed, 23 insertions(+), 4 deletions(-)

diff --git a/src/bin/pg_archivecleanup/pg_archivecleanup.c b/src/bin/pg_archivecleanup/pg_archivecleanup.c
index c25348bcb85..ab686b4748c 100644
--- a/src/bin/pg_archivecleanup/pg_archivecleanup.c
+++ b/src/bin/pg_archivecleanup/pg_archivecleanup.c
@@ -375,6 +375,10 @@ main(int argc, char **argv)
 		exit(2);
 	}
 
+	if (dryrun)
+		pg_log_info("Executing in dry-run mode.\n"
+					"No files will be removed.");
+
 	/*
 	 * Check archive exists and other initialization if required.
 	 */
diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c
index df41836e70f..cc4be5d6ef4 100644
--- a/src/bin/pg_basebackup/pg_createsubscriber.c
+++ b/src/bin/pg_basebackup/pg_createsubscriber.c
@@ -2305,6 +2305,11 @@ main(int argc, char **argv)
 		pg_log_error_hint("Try \"%s --help\" for more information.", progname);
 		exit(1);
 	}
+
+	if (dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
 	pg_log_info("validating publisher connection string");
 	pub_base_conninfo = get_base_conninfo(opt.pub_conninfo_str,
 										  &dbname_conninfo);
diff --git a/src/bin/pg_combinebackup/pg_combinebackup.c b/src/bin/pg_combinebackup/pg_combinebackup.c
index 3a325127209..c9bf0a9e105 100644
--- a/src/bin/pg_combinebackup/pg_combinebackup.c
+++ b/src/bin/pg_combinebackup/pg_combinebackup.c
@@ -242,6 +242,10 @@ main(int argc, char *argv[])
 	if (opt.no_manifest)
 		opt.manifest_checksums = CHECKSUM_TYPE_NONE;
 
+	if (opt.dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
 	/* Check that the platform supports the requested copy method. */
 	if (opt.copy_method == COPY_METHOD_CLONE)
 	{
diff --git a/src/bin/pg_resetwal/pg_resetwal.c b/src/bin/pg_resetwal/pg_resetwal.c
index a89d72fc5cf..dd5d279521e 100644
--- a/src/bin/pg_resetwal/pg_resetwal.c
+++ b/src/bin/pg_resetwal/pg_resetwal.c
@@ -397,6 +397,10 @@ main(int argc, char *argv[])
 		exit(1);
 	}
 
+	if (noupdate)
+		pg_log_info("Executing in dry-run mode.\n"
+					"Nothing will be modified.");
+
 	/*
 	 * Attempt to read the existing pg_control file
 	 */
diff --git a/src/bin/pg_rewind/pg_rewind.c b/src/bin/pg_rewind/pg_rewind.c
index 27c514f934a..e9364d04f76 100644
--- a/src/bin/pg_rewind/pg_rewind.c
+++ b/src/bin/pg_rewind/pg_rewind.c
@@ -300,10 +300,12 @@ main(int argc, char **argv)
 
 	atexit(disconnect_atexit);
 
-	/*
-	 * Ok, we have all the options and we're ready to start. First, connect to
-	 * remote server.
-	 */
+	/* Ok, we have all the options and we're ready to start. */
+	if (dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
+	/* First, connect to remote server. */
 	if (connstr_source)
 	{
 		conn = PQconnectdb(connstr_source);
-- 
2.47.3


--ibfr3ah5qy6tcbhw--





^ permalink  raw  reply  [nested|flat] 126+ messages in thread

* [PATCH v5] Log a note at program start when running in dry-run mode
@ 2025-11-11 08:54 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 126+ messages in thread

From: Álvaro Herrera @ 2025-11-11 08:54 UTC (permalink / raw)

Users might get some peace of mind knowing their data is not being
destroyed or whatever.

Author: Peter Smith <[email protected]>
Reviewed-by: Álvaro Herrera <[email protected]>
Discussion: https://postgr.es/m/CAHut+PsvQJQnQO0KT0S2oegenkvJ8FUuY-QS5syyqmT24R2xFQ@mail.gmail.com
---
 src/bin/pg_archivecleanup/pg_archivecleanup.c |  4 ++++
 src/bin/pg_basebackup/pg_createsubscriber.c   |  5 +++++
 src/bin/pg_combinebackup/pg_combinebackup.c   |  4 ++++
 src/bin/pg_resetwal/pg_resetwal.c             |  4 ++++
 src/bin/pg_rewind/pg_rewind.c                 | 10 ++++++----
 5 files changed, 23 insertions(+), 4 deletions(-)

diff --git a/src/bin/pg_archivecleanup/pg_archivecleanup.c b/src/bin/pg_archivecleanup/pg_archivecleanup.c
index c25348bcb85..ab686b4748c 100644
--- a/src/bin/pg_archivecleanup/pg_archivecleanup.c
+++ b/src/bin/pg_archivecleanup/pg_archivecleanup.c
@@ -375,6 +375,10 @@ main(int argc, char **argv)
 		exit(2);
 	}
 
+	if (dryrun)
+		pg_log_info("Executing in dry-run mode.\n"
+					"No files will be removed.");
+
 	/*
 	 * Check archive exists and other initialization if required.
 	 */
diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c
index df41836e70f..cc4be5d6ef4 100644
--- a/src/bin/pg_basebackup/pg_createsubscriber.c
+++ b/src/bin/pg_basebackup/pg_createsubscriber.c
@@ -2305,6 +2305,11 @@ main(int argc, char **argv)
 		pg_log_error_hint("Try \"%s --help\" for more information.", progname);
 		exit(1);
 	}
+
+	if (dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
 	pg_log_info("validating publisher connection string");
 	pub_base_conninfo = get_base_conninfo(opt.pub_conninfo_str,
 										  &dbname_conninfo);
diff --git a/src/bin/pg_combinebackup/pg_combinebackup.c b/src/bin/pg_combinebackup/pg_combinebackup.c
index 3a325127209..c9bf0a9e105 100644
--- a/src/bin/pg_combinebackup/pg_combinebackup.c
+++ b/src/bin/pg_combinebackup/pg_combinebackup.c
@@ -242,6 +242,10 @@ main(int argc, char *argv[])
 	if (opt.no_manifest)
 		opt.manifest_checksums = CHECKSUM_TYPE_NONE;
 
+	if (opt.dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
 	/* Check that the platform supports the requested copy method. */
 	if (opt.copy_method == COPY_METHOD_CLONE)
 	{
diff --git a/src/bin/pg_resetwal/pg_resetwal.c b/src/bin/pg_resetwal/pg_resetwal.c
index a89d72fc5cf..dd5d279521e 100644
--- a/src/bin/pg_resetwal/pg_resetwal.c
+++ b/src/bin/pg_resetwal/pg_resetwal.c
@@ -397,6 +397,10 @@ main(int argc, char *argv[])
 		exit(1);
 	}
 
+	if (noupdate)
+		pg_log_info("Executing in dry-run mode.\n"
+					"Nothing will be modified.");
+
 	/*
 	 * Attempt to read the existing pg_control file
 	 */
diff --git a/src/bin/pg_rewind/pg_rewind.c b/src/bin/pg_rewind/pg_rewind.c
index 27c514f934a..e9364d04f76 100644
--- a/src/bin/pg_rewind/pg_rewind.c
+++ b/src/bin/pg_rewind/pg_rewind.c
@@ -300,10 +300,12 @@ main(int argc, char **argv)
 
 	atexit(disconnect_atexit);
 
-	/*
-	 * Ok, we have all the options and we're ready to start. First, connect to
-	 * remote server.
-	 */
+	/* Ok, we have all the options and we're ready to start. */
+	if (dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
+	/* First, connect to remote server. */
 	if (connstr_source)
 	{
 		conn = PQconnectdb(connstr_source);
-- 
2.47.3


--ibfr3ah5qy6tcbhw--





^ permalink  raw  reply  [nested|flat] 126+ messages in thread

* [PATCH v5] Log a note at program start when running in dry-run mode
@ 2025-11-11 08:54 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 126+ messages in thread

From: Álvaro Herrera @ 2025-11-11 08:54 UTC (permalink / raw)

Users might get some peace of mind knowing their data is not being
destroyed or whatever.

Author: Peter Smith <[email protected]>
Reviewed-by: Álvaro Herrera <[email protected]>
Discussion: https://postgr.es/m/CAHut+PsvQJQnQO0KT0S2oegenkvJ8FUuY-QS5syyqmT24R2xFQ@mail.gmail.com
---
 src/bin/pg_archivecleanup/pg_archivecleanup.c |  4 ++++
 src/bin/pg_basebackup/pg_createsubscriber.c   |  5 +++++
 src/bin/pg_combinebackup/pg_combinebackup.c   |  4 ++++
 src/bin/pg_resetwal/pg_resetwal.c             |  4 ++++
 src/bin/pg_rewind/pg_rewind.c                 | 10 ++++++----
 5 files changed, 23 insertions(+), 4 deletions(-)

diff --git a/src/bin/pg_archivecleanup/pg_archivecleanup.c b/src/bin/pg_archivecleanup/pg_archivecleanup.c
index c25348bcb85..ab686b4748c 100644
--- a/src/bin/pg_archivecleanup/pg_archivecleanup.c
+++ b/src/bin/pg_archivecleanup/pg_archivecleanup.c
@@ -375,6 +375,10 @@ main(int argc, char **argv)
 		exit(2);
 	}
 
+	if (dryrun)
+		pg_log_info("Executing in dry-run mode.\n"
+					"No files will be removed.");
+
 	/*
 	 * Check archive exists and other initialization if required.
 	 */
diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c
index df41836e70f..cc4be5d6ef4 100644
--- a/src/bin/pg_basebackup/pg_createsubscriber.c
+++ b/src/bin/pg_basebackup/pg_createsubscriber.c
@@ -2305,6 +2305,11 @@ main(int argc, char **argv)
 		pg_log_error_hint("Try \"%s --help\" for more information.", progname);
 		exit(1);
 	}
+
+	if (dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
 	pg_log_info("validating publisher connection string");
 	pub_base_conninfo = get_base_conninfo(opt.pub_conninfo_str,
 										  &dbname_conninfo);
diff --git a/src/bin/pg_combinebackup/pg_combinebackup.c b/src/bin/pg_combinebackup/pg_combinebackup.c
index 3a325127209..c9bf0a9e105 100644
--- a/src/bin/pg_combinebackup/pg_combinebackup.c
+++ b/src/bin/pg_combinebackup/pg_combinebackup.c
@@ -242,6 +242,10 @@ main(int argc, char *argv[])
 	if (opt.no_manifest)
 		opt.manifest_checksums = CHECKSUM_TYPE_NONE;
 
+	if (opt.dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
 	/* Check that the platform supports the requested copy method. */
 	if (opt.copy_method == COPY_METHOD_CLONE)
 	{
diff --git a/src/bin/pg_resetwal/pg_resetwal.c b/src/bin/pg_resetwal/pg_resetwal.c
index a89d72fc5cf..dd5d279521e 100644
--- a/src/bin/pg_resetwal/pg_resetwal.c
+++ b/src/bin/pg_resetwal/pg_resetwal.c
@@ -397,6 +397,10 @@ main(int argc, char *argv[])
 		exit(1);
 	}
 
+	if (noupdate)
+		pg_log_info("Executing in dry-run mode.\n"
+					"Nothing will be modified.");
+
 	/*
 	 * Attempt to read the existing pg_control file
 	 */
diff --git a/src/bin/pg_rewind/pg_rewind.c b/src/bin/pg_rewind/pg_rewind.c
index 27c514f934a..e9364d04f76 100644
--- a/src/bin/pg_rewind/pg_rewind.c
+++ b/src/bin/pg_rewind/pg_rewind.c
@@ -300,10 +300,12 @@ main(int argc, char **argv)
 
 	atexit(disconnect_atexit);
 
-	/*
-	 * Ok, we have all the options and we're ready to start. First, connect to
-	 * remote server.
-	 */
+	/* Ok, we have all the options and we're ready to start. */
+	if (dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
+	/* First, connect to remote server. */
 	if (connstr_source)
 	{
 		conn = PQconnectdb(connstr_source);
-- 
2.47.3


--ibfr3ah5qy6tcbhw--





^ permalink  raw  reply  [nested|flat] 126+ messages in thread

* [PATCH v5] Log a note at program start when running in dry-run mode
@ 2025-11-11 08:54 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 126+ messages in thread

From: Álvaro Herrera @ 2025-11-11 08:54 UTC (permalink / raw)

Users might get some peace of mind knowing their data is not being
destroyed or whatever.

Author: Peter Smith <[email protected]>
Reviewed-by: Álvaro Herrera <[email protected]>
Discussion: https://postgr.es/m/CAHut+PsvQJQnQO0KT0S2oegenkvJ8FUuY-QS5syyqmT24R2xFQ@mail.gmail.com
---
 src/bin/pg_archivecleanup/pg_archivecleanup.c |  4 ++++
 src/bin/pg_basebackup/pg_createsubscriber.c   |  5 +++++
 src/bin/pg_combinebackup/pg_combinebackup.c   |  4 ++++
 src/bin/pg_resetwal/pg_resetwal.c             |  4 ++++
 src/bin/pg_rewind/pg_rewind.c                 | 10 ++++++----
 5 files changed, 23 insertions(+), 4 deletions(-)

diff --git a/src/bin/pg_archivecleanup/pg_archivecleanup.c b/src/bin/pg_archivecleanup/pg_archivecleanup.c
index c25348bcb85..ab686b4748c 100644
--- a/src/bin/pg_archivecleanup/pg_archivecleanup.c
+++ b/src/bin/pg_archivecleanup/pg_archivecleanup.c
@@ -375,6 +375,10 @@ main(int argc, char **argv)
 		exit(2);
 	}
 
+	if (dryrun)
+		pg_log_info("Executing in dry-run mode.\n"
+					"No files will be removed.");
+
 	/*
 	 * Check archive exists and other initialization if required.
 	 */
diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c
index df41836e70f..cc4be5d6ef4 100644
--- a/src/bin/pg_basebackup/pg_createsubscriber.c
+++ b/src/bin/pg_basebackup/pg_createsubscriber.c
@@ -2305,6 +2305,11 @@ main(int argc, char **argv)
 		pg_log_error_hint("Try \"%s --help\" for more information.", progname);
 		exit(1);
 	}
+
+	if (dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
 	pg_log_info("validating publisher connection string");
 	pub_base_conninfo = get_base_conninfo(opt.pub_conninfo_str,
 										  &dbname_conninfo);
diff --git a/src/bin/pg_combinebackup/pg_combinebackup.c b/src/bin/pg_combinebackup/pg_combinebackup.c
index 3a325127209..c9bf0a9e105 100644
--- a/src/bin/pg_combinebackup/pg_combinebackup.c
+++ b/src/bin/pg_combinebackup/pg_combinebackup.c
@@ -242,6 +242,10 @@ main(int argc, char *argv[])
 	if (opt.no_manifest)
 		opt.manifest_checksums = CHECKSUM_TYPE_NONE;
 
+	if (opt.dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
 	/* Check that the platform supports the requested copy method. */
 	if (opt.copy_method == COPY_METHOD_CLONE)
 	{
diff --git a/src/bin/pg_resetwal/pg_resetwal.c b/src/bin/pg_resetwal/pg_resetwal.c
index a89d72fc5cf..dd5d279521e 100644
--- a/src/bin/pg_resetwal/pg_resetwal.c
+++ b/src/bin/pg_resetwal/pg_resetwal.c
@@ -397,6 +397,10 @@ main(int argc, char *argv[])
 		exit(1);
 	}
 
+	if (noupdate)
+		pg_log_info("Executing in dry-run mode.\n"
+					"Nothing will be modified.");
+
 	/*
 	 * Attempt to read the existing pg_control file
 	 */
diff --git a/src/bin/pg_rewind/pg_rewind.c b/src/bin/pg_rewind/pg_rewind.c
index 27c514f934a..e9364d04f76 100644
--- a/src/bin/pg_rewind/pg_rewind.c
+++ b/src/bin/pg_rewind/pg_rewind.c
@@ -300,10 +300,12 @@ main(int argc, char **argv)
 
 	atexit(disconnect_atexit);
 
-	/*
-	 * Ok, we have all the options and we're ready to start. First, connect to
-	 * remote server.
-	 */
+	/* Ok, we have all the options and we're ready to start. */
+	if (dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
+	/* First, connect to remote server. */
 	if (connstr_source)
 	{
 		conn = PQconnectdb(connstr_source);
-- 
2.47.3


--ibfr3ah5qy6tcbhw--





^ permalink  raw  reply  [nested|flat] 126+ messages in thread

* [PATCH v5] Log a note at program start when running in dry-run mode
@ 2025-11-11 08:54 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 126+ messages in thread

From: Álvaro Herrera @ 2025-11-11 08:54 UTC (permalink / raw)

Users might get some peace of mind knowing their data is not being
destroyed or whatever.

Author: Peter Smith <[email protected]>
Reviewed-by: Álvaro Herrera <[email protected]>
Discussion: https://postgr.es/m/CAHut+PsvQJQnQO0KT0S2oegenkvJ8FUuY-QS5syyqmT24R2xFQ@mail.gmail.com
---
 src/bin/pg_archivecleanup/pg_archivecleanup.c |  4 ++++
 src/bin/pg_basebackup/pg_createsubscriber.c   |  5 +++++
 src/bin/pg_combinebackup/pg_combinebackup.c   |  4 ++++
 src/bin/pg_resetwal/pg_resetwal.c             |  4 ++++
 src/bin/pg_rewind/pg_rewind.c                 | 10 ++++++----
 5 files changed, 23 insertions(+), 4 deletions(-)

diff --git a/src/bin/pg_archivecleanup/pg_archivecleanup.c b/src/bin/pg_archivecleanup/pg_archivecleanup.c
index c25348bcb85..ab686b4748c 100644
--- a/src/bin/pg_archivecleanup/pg_archivecleanup.c
+++ b/src/bin/pg_archivecleanup/pg_archivecleanup.c
@@ -375,6 +375,10 @@ main(int argc, char **argv)
 		exit(2);
 	}
 
+	if (dryrun)
+		pg_log_info("Executing in dry-run mode.\n"
+					"No files will be removed.");
+
 	/*
 	 * Check archive exists and other initialization if required.
 	 */
diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c
index df41836e70f..cc4be5d6ef4 100644
--- a/src/bin/pg_basebackup/pg_createsubscriber.c
+++ b/src/bin/pg_basebackup/pg_createsubscriber.c
@@ -2305,6 +2305,11 @@ main(int argc, char **argv)
 		pg_log_error_hint("Try \"%s --help\" for more information.", progname);
 		exit(1);
 	}
+
+	if (dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
 	pg_log_info("validating publisher connection string");
 	pub_base_conninfo = get_base_conninfo(opt.pub_conninfo_str,
 										  &dbname_conninfo);
diff --git a/src/bin/pg_combinebackup/pg_combinebackup.c b/src/bin/pg_combinebackup/pg_combinebackup.c
index 3a325127209..c9bf0a9e105 100644
--- a/src/bin/pg_combinebackup/pg_combinebackup.c
+++ b/src/bin/pg_combinebackup/pg_combinebackup.c
@@ -242,6 +242,10 @@ main(int argc, char *argv[])
 	if (opt.no_manifest)
 		opt.manifest_checksums = CHECKSUM_TYPE_NONE;
 
+	if (opt.dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
 	/* Check that the platform supports the requested copy method. */
 	if (opt.copy_method == COPY_METHOD_CLONE)
 	{
diff --git a/src/bin/pg_resetwal/pg_resetwal.c b/src/bin/pg_resetwal/pg_resetwal.c
index a89d72fc5cf..dd5d279521e 100644
--- a/src/bin/pg_resetwal/pg_resetwal.c
+++ b/src/bin/pg_resetwal/pg_resetwal.c
@@ -397,6 +397,10 @@ main(int argc, char *argv[])
 		exit(1);
 	}
 
+	if (noupdate)
+		pg_log_info("Executing in dry-run mode.\n"
+					"Nothing will be modified.");
+
 	/*
 	 * Attempt to read the existing pg_control file
 	 */
diff --git a/src/bin/pg_rewind/pg_rewind.c b/src/bin/pg_rewind/pg_rewind.c
index 27c514f934a..e9364d04f76 100644
--- a/src/bin/pg_rewind/pg_rewind.c
+++ b/src/bin/pg_rewind/pg_rewind.c
@@ -300,10 +300,12 @@ main(int argc, char **argv)
 
 	atexit(disconnect_atexit);
 
-	/*
-	 * Ok, we have all the options and we're ready to start. First, connect to
-	 * remote server.
-	 */
+	/* Ok, we have all the options and we're ready to start. */
+	if (dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
+	/* First, connect to remote server. */
 	if (connstr_source)
 	{
 		conn = PQconnectdb(connstr_source);
-- 
2.47.3


--ibfr3ah5qy6tcbhw--





^ permalink  raw  reply  [nested|flat] 126+ messages in thread

* [PATCH v5] Log a note at program start when running in dry-run mode
@ 2025-11-11 08:54 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 126+ messages in thread

From: Álvaro Herrera @ 2025-11-11 08:54 UTC (permalink / raw)

Users might get some peace of mind knowing their data is not being
destroyed or whatever.

Author: Peter Smith <[email protected]>
Reviewed-by: Álvaro Herrera <[email protected]>
Discussion: https://postgr.es/m/CAHut+PsvQJQnQO0KT0S2oegenkvJ8FUuY-QS5syyqmT24R2xFQ@mail.gmail.com
---
 src/bin/pg_archivecleanup/pg_archivecleanup.c |  4 ++++
 src/bin/pg_basebackup/pg_createsubscriber.c   |  5 +++++
 src/bin/pg_combinebackup/pg_combinebackup.c   |  4 ++++
 src/bin/pg_resetwal/pg_resetwal.c             |  4 ++++
 src/bin/pg_rewind/pg_rewind.c                 | 10 ++++++----
 5 files changed, 23 insertions(+), 4 deletions(-)

diff --git a/src/bin/pg_archivecleanup/pg_archivecleanup.c b/src/bin/pg_archivecleanup/pg_archivecleanup.c
index c25348bcb85..ab686b4748c 100644
--- a/src/bin/pg_archivecleanup/pg_archivecleanup.c
+++ b/src/bin/pg_archivecleanup/pg_archivecleanup.c
@@ -375,6 +375,10 @@ main(int argc, char **argv)
 		exit(2);
 	}
 
+	if (dryrun)
+		pg_log_info("Executing in dry-run mode.\n"
+					"No files will be removed.");
+
 	/*
 	 * Check archive exists and other initialization if required.
 	 */
diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c
index df41836e70f..cc4be5d6ef4 100644
--- a/src/bin/pg_basebackup/pg_createsubscriber.c
+++ b/src/bin/pg_basebackup/pg_createsubscriber.c
@@ -2305,6 +2305,11 @@ main(int argc, char **argv)
 		pg_log_error_hint("Try \"%s --help\" for more information.", progname);
 		exit(1);
 	}
+
+	if (dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
 	pg_log_info("validating publisher connection string");
 	pub_base_conninfo = get_base_conninfo(opt.pub_conninfo_str,
 										  &dbname_conninfo);
diff --git a/src/bin/pg_combinebackup/pg_combinebackup.c b/src/bin/pg_combinebackup/pg_combinebackup.c
index 3a325127209..c9bf0a9e105 100644
--- a/src/bin/pg_combinebackup/pg_combinebackup.c
+++ b/src/bin/pg_combinebackup/pg_combinebackup.c
@@ -242,6 +242,10 @@ main(int argc, char *argv[])
 	if (opt.no_manifest)
 		opt.manifest_checksums = CHECKSUM_TYPE_NONE;
 
+	if (opt.dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
 	/* Check that the platform supports the requested copy method. */
 	if (opt.copy_method == COPY_METHOD_CLONE)
 	{
diff --git a/src/bin/pg_resetwal/pg_resetwal.c b/src/bin/pg_resetwal/pg_resetwal.c
index a89d72fc5cf..dd5d279521e 100644
--- a/src/bin/pg_resetwal/pg_resetwal.c
+++ b/src/bin/pg_resetwal/pg_resetwal.c
@@ -397,6 +397,10 @@ main(int argc, char *argv[])
 		exit(1);
 	}
 
+	if (noupdate)
+		pg_log_info("Executing in dry-run mode.\n"
+					"Nothing will be modified.");
+
 	/*
 	 * Attempt to read the existing pg_control file
 	 */
diff --git a/src/bin/pg_rewind/pg_rewind.c b/src/bin/pg_rewind/pg_rewind.c
index 27c514f934a..e9364d04f76 100644
--- a/src/bin/pg_rewind/pg_rewind.c
+++ b/src/bin/pg_rewind/pg_rewind.c
@@ -300,10 +300,12 @@ main(int argc, char **argv)
 
 	atexit(disconnect_atexit);
 
-	/*
-	 * Ok, we have all the options and we're ready to start. First, connect to
-	 * remote server.
-	 */
+	/* Ok, we have all the options and we're ready to start. */
+	if (dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
+	/* First, connect to remote server. */
 	if (connstr_source)
 	{
 		conn = PQconnectdb(connstr_source);
-- 
2.47.3


--ibfr3ah5qy6tcbhw--





^ permalink  raw  reply  [nested|flat] 126+ messages in thread

* [PATCH v5] Log a note at program start when running in dry-run mode
@ 2025-11-11 08:54 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 126+ messages in thread

From: Álvaro Herrera @ 2025-11-11 08:54 UTC (permalink / raw)

Users might get some peace of mind knowing their data is not being
destroyed or whatever.

Author: Peter Smith <[email protected]>
Reviewed-by: Álvaro Herrera <[email protected]>
Discussion: https://postgr.es/m/CAHut+PsvQJQnQO0KT0S2oegenkvJ8FUuY-QS5syyqmT24R2xFQ@mail.gmail.com
---
 src/bin/pg_archivecleanup/pg_archivecleanup.c |  4 ++++
 src/bin/pg_basebackup/pg_createsubscriber.c   |  5 +++++
 src/bin/pg_combinebackup/pg_combinebackup.c   |  4 ++++
 src/bin/pg_resetwal/pg_resetwal.c             |  4 ++++
 src/bin/pg_rewind/pg_rewind.c                 | 10 ++++++----
 5 files changed, 23 insertions(+), 4 deletions(-)

diff --git a/src/bin/pg_archivecleanup/pg_archivecleanup.c b/src/bin/pg_archivecleanup/pg_archivecleanup.c
index c25348bcb85..ab686b4748c 100644
--- a/src/bin/pg_archivecleanup/pg_archivecleanup.c
+++ b/src/bin/pg_archivecleanup/pg_archivecleanup.c
@@ -375,6 +375,10 @@ main(int argc, char **argv)
 		exit(2);
 	}
 
+	if (dryrun)
+		pg_log_info("Executing in dry-run mode.\n"
+					"No files will be removed.");
+
 	/*
 	 * Check archive exists and other initialization if required.
 	 */
diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c
index df41836e70f..cc4be5d6ef4 100644
--- a/src/bin/pg_basebackup/pg_createsubscriber.c
+++ b/src/bin/pg_basebackup/pg_createsubscriber.c
@@ -2305,6 +2305,11 @@ main(int argc, char **argv)
 		pg_log_error_hint("Try \"%s --help\" for more information.", progname);
 		exit(1);
 	}
+
+	if (dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
 	pg_log_info("validating publisher connection string");
 	pub_base_conninfo = get_base_conninfo(opt.pub_conninfo_str,
 										  &dbname_conninfo);
diff --git a/src/bin/pg_combinebackup/pg_combinebackup.c b/src/bin/pg_combinebackup/pg_combinebackup.c
index 3a325127209..c9bf0a9e105 100644
--- a/src/bin/pg_combinebackup/pg_combinebackup.c
+++ b/src/bin/pg_combinebackup/pg_combinebackup.c
@@ -242,6 +242,10 @@ main(int argc, char *argv[])
 	if (opt.no_manifest)
 		opt.manifest_checksums = CHECKSUM_TYPE_NONE;
 
+	if (opt.dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
 	/* Check that the platform supports the requested copy method. */
 	if (opt.copy_method == COPY_METHOD_CLONE)
 	{
diff --git a/src/bin/pg_resetwal/pg_resetwal.c b/src/bin/pg_resetwal/pg_resetwal.c
index a89d72fc5cf..dd5d279521e 100644
--- a/src/bin/pg_resetwal/pg_resetwal.c
+++ b/src/bin/pg_resetwal/pg_resetwal.c
@@ -397,6 +397,10 @@ main(int argc, char *argv[])
 		exit(1);
 	}
 
+	if (noupdate)
+		pg_log_info("Executing in dry-run mode.\n"
+					"Nothing will be modified.");
+
 	/*
 	 * Attempt to read the existing pg_control file
 	 */
diff --git a/src/bin/pg_rewind/pg_rewind.c b/src/bin/pg_rewind/pg_rewind.c
index 27c514f934a..e9364d04f76 100644
--- a/src/bin/pg_rewind/pg_rewind.c
+++ b/src/bin/pg_rewind/pg_rewind.c
@@ -300,10 +300,12 @@ main(int argc, char **argv)
 
 	atexit(disconnect_atexit);
 
-	/*
-	 * Ok, we have all the options and we're ready to start. First, connect to
-	 * remote server.
-	 */
+	/* Ok, we have all the options and we're ready to start. */
+	if (dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
+	/* First, connect to remote server. */
 	if (connstr_source)
 	{
 		conn = PQconnectdb(connstr_source);
-- 
2.47.3


--ibfr3ah5qy6tcbhw--





^ permalink  raw  reply  [nested|flat] 126+ messages in thread

* [PATCH v5] Log a note at program start when running in dry-run mode
@ 2025-11-11 08:54 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 126+ messages in thread

From: Álvaro Herrera @ 2025-11-11 08:54 UTC (permalink / raw)

Users might get some peace of mind knowing their data is not being
destroyed or whatever.

Author: Peter Smith <[email protected]>
Reviewed-by: Álvaro Herrera <[email protected]>
Discussion: https://postgr.es/m/CAHut+PsvQJQnQO0KT0S2oegenkvJ8FUuY-QS5syyqmT24R2xFQ@mail.gmail.com
---
 src/bin/pg_archivecleanup/pg_archivecleanup.c |  4 ++++
 src/bin/pg_basebackup/pg_createsubscriber.c   |  5 +++++
 src/bin/pg_combinebackup/pg_combinebackup.c   |  4 ++++
 src/bin/pg_resetwal/pg_resetwal.c             |  4 ++++
 src/bin/pg_rewind/pg_rewind.c                 | 10 ++++++----
 5 files changed, 23 insertions(+), 4 deletions(-)

diff --git a/src/bin/pg_archivecleanup/pg_archivecleanup.c b/src/bin/pg_archivecleanup/pg_archivecleanup.c
index c25348bcb85..ab686b4748c 100644
--- a/src/bin/pg_archivecleanup/pg_archivecleanup.c
+++ b/src/bin/pg_archivecleanup/pg_archivecleanup.c
@@ -375,6 +375,10 @@ main(int argc, char **argv)
 		exit(2);
 	}
 
+	if (dryrun)
+		pg_log_info("Executing in dry-run mode.\n"
+					"No files will be removed.");
+
 	/*
 	 * Check archive exists and other initialization if required.
 	 */
diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c
index df41836e70f..cc4be5d6ef4 100644
--- a/src/bin/pg_basebackup/pg_createsubscriber.c
+++ b/src/bin/pg_basebackup/pg_createsubscriber.c
@@ -2305,6 +2305,11 @@ main(int argc, char **argv)
 		pg_log_error_hint("Try \"%s --help\" for more information.", progname);
 		exit(1);
 	}
+
+	if (dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
 	pg_log_info("validating publisher connection string");
 	pub_base_conninfo = get_base_conninfo(opt.pub_conninfo_str,
 										  &dbname_conninfo);
diff --git a/src/bin/pg_combinebackup/pg_combinebackup.c b/src/bin/pg_combinebackup/pg_combinebackup.c
index 3a325127209..c9bf0a9e105 100644
--- a/src/bin/pg_combinebackup/pg_combinebackup.c
+++ b/src/bin/pg_combinebackup/pg_combinebackup.c
@@ -242,6 +242,10 @@ main(int argc, char *argv[])
 	if (opt.no_manifest)
 		opt.manifest_checksums = CHECKSUM_TYPE_NONE;
 
+	if (opt.dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
 	/* Check that the platform supports the requested copy method. */
 	if (opt.copy_method == COPY_METHOD_CLONE)
 	{
diff --git a/src/bin/pg_resetwal/pg_resetwal.c b/src/bin/pg_resetwal/pg_resetwal.c
index a89d72fc5cf..dd5d279521e 100644
--- a/src/bin/pg_resetwal/pg_resetwal.c
+++ b/src/bin/pg_resetwal/pg_resetwal.c
@@ -397,6 +397,10 @@ main(int argc, char *argv[])
 		exit(1);
 	}
 
+	if (noupdate)
+		pg_log_info("Executing in dry-run mode.\n"
+					"Nothing will be modified.");
+
 	/*
 	 * Attempt to read the existing pg_control file
 	 */
diff --git a/src/bin/pg_rewind/pg_rewind.c b/src/bin/pg_rewind/pg_rewind.c
index 27c514f934a..e9364d04f76 100644
--- a/src/bin/pg_rewind/pg_rewind.c
+++ b/src/bin/pg_rewind/pg_rewind.c
@@ -300,10 +300,12 @@ main(int argc, char **argv)
 
 	atexit(disconnect_atexit);
 
-	/*
-	 * Ok, we have all the options and we're ready to start. First, connect to
-	 * remote server.
-	 */
+	/* Ok, we have all the options and we're ready to start. */
+	if (dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
+	/* First, connect to remote server. */
 	if (connstr_source)
 	{
 		conn = PQconnectdb(connstr_source);
-- 
2.47.3


--ibfr3ah5qy6tcbhw--





^ permalink  raw  reply  [nested|flat] 126+ messages in thread

* [PATCH v5] Log a note at program start when running in dry-run mode
@ 2025-11-11 08:54 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 126+ messages in thread

From: Álvaro Herrera @ 2025-11-11 08:54 UTC (permalink / raw)

Users might get some peace of mind knowing their data is not being
destroyed or whatever.

Author: Peter Smith <[email protected]>
Reviewed-by: Álvaro Herrera <[email protected]>
Discussion: https://postgr.es/m/CAHut+PsvQJQnQO0KT0S2oegenkvJ8FUuY-QS5syyqmT24R2xFQ@mail.gmail.com
---
 src/bin/pg_archivecleanup/pg_archivecleanup.c |  4 ++++
 src/bin/pg_basebackup/pg_createsubscriber.c   |  5 +++++
 src/bin/pg_combinebackup/pg_combinebackup.c   |  4 ++++
 src/bin/pg_resetwal/pg_resetwal.c             |  4 ++++
 src/bin/pg_rewind/pg_rewind.c                 | 10 ++++++----
 5 files changed, 23 insertions(+), 4 deletions(-)

diff --git a/src/bin/pg_archivecleanup/pg_archivecleanup.c b/src/bin/pg_archivecleanup/pg_archivecleanup.c
index c25348bcb85..ab686b4748c 100644
--- a/src/bin/pg_archivecleanup/pg_archivecleanup.c
+++ b/src/bin/pg_archivecleanup/pg_archivecleanup.c
@@ -375,6 +375,10 @@ main(int argc, char **argv)
 		exit(2);
 	}
 
+	if (dryrun)
+		pg_log_info("Executing in dry-run mode.\n"
+					"No files will be removed.");
+
 	/*
 	 * Check archive exists and other initialization if required.
 	 */
diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c
index df41836e70f..cc4be5d6ef4 100644
--- a/src/bin/pg_basebackup/pg_createsubscriber.c
+++ b/src/bin/pg_basebackup/pg_createsubscriber.c
@@ -2305,6 +2305,11 @@ main(int argc, char **argv)
 		pg_log_error_hint("Try \"%s --help\" for more information.", progname);
 		exit(1);
 	}
+
+	if (dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
 	pg_log_info("validating publisher connection string");
 	pub_base_conninfo = get_base_conninfo(opt.pub_conninfo_str,
 										  &dbname_conninfo);
diff --git a/src/bin/pg_combinebackup/pg_combinebackup.c b/src/bin/pg_combinebackup/pg_combinebackup.c
index 3a325127209..c9bf0a9e105 100644
--- a/src/bin/pg_combinebackup/pg_combinebackup.c
+++ b/src/bin/pg_combinebackup/pg_combinebackup.c
@@ -242,6 +242,10 @@ main(int argc, char *argv[])
 	if (opt.no_manifest)
 		opt.manifest_checksums = CHECKSUM_TYPE_NONE;
 
+	if (opt.dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
 	/* Check that the platform supports the requested copy method. */
 	if (opt.copy_method == COPY_METHOD_CLONE)
 	{
diff --git a/src/bin/pg_resetwal/pg_resetwal.c b/src/bin/pg_resetwal/pg_resetwal.c
index a89d72fc5cf..dd5d279521e 100644
--- a/src/bin/pg_resetwal/pg_resetwal.c
+++ b/src/bin/pg_resetwal/pg_resetwal.c
@@ -397,6 +397,10 @@ main(int argc, char *argv[])
 		exit(1);
 	}
 
+	if (noupdate)
+		pg_log_info("Executing in dry-run mode.\n"
+					"Nothing will be modified.");
+
 	/*
 	 * Attempt to read the existing pg_control file
 	 */
diff --git a/src/bin/pg_rewind/pg_rewind.c b/src/bin/pg_rewind/pg_rewind.c
index 27c514f934a..e9364d04f76 100644
--- a/src/bin/pg_rewind/pg_rewind.c
+++ b/src/bin/pg_rewind/pg_rewind.c
@@ -300,10 +300,12 @@ main(int argc, char **argv)
 
 	atexit(disconnect_atexit);
 
-	/*
-	 * Ok, we have all the options and we're ready to start. First, connect to
-	 * remote server.
-	 */
+	/* Ok, we have all the options and we're ready to start. */
+	if (dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
+	/* First, connect to remote server. */
 	if (connstr_source)
 	{
 		conn = PQconnectdb(connstr_source);
-- 
2.47.3


--ibfr3ah5qy6tcbhw--





^ permalink  raw  reply  [nested|flat] 126+ messages in thread

* [PATCH v5] Log a note at program start when running in dry-run mode
@ 2025-11-11 08:54 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 126+ messages in thread

From: Álvaro Herrera @ 2025-11-11 08:54 UTC (permalink / raw)

Users might get some peace of mind knowing their data is not being
destroyed or whatever.

Author: Peter Smith <[email protected]>
Reviewed-by: Álvaro Herrera <[email protected]>
Discussion: https://postgr.es/m/CAHut+PsvQJQnQO0KT0S2oegenkvJ8FUuY-QS5syyqmT24R2xFQ@mail.gmail.com
---
 src/bin/pg_archivecleanup/pg_archivecleanup.c |  4 ++++
 src/bin/pg_basebackup/pg_createsubscriber.c   |  5 +++++
 src/bin/pg_combinebackup/pg_combinebackup.c   |  4 ++++
 src/bin/pg_resetwal/pg_resetwal.c             |  4 ++++
 src/bin/pg_rewind/pg_rewind.c                 | 10 ++++++----
 5 files changed, 23 insertions(+), 4 deletions(-)

diff --git a/src/bin/pg_archivecleanup/pg_archivecleanup.c b/src/bin/pg_archivecleanup/pg_archivecleanup.c
index c25348bcb85..ab686b4748c 100644
--- a/src/bin/pg_archivecleanup/pg_archivecleanup.c
+++ b/src/bin/pg_archivecleanup/pg_archivecleanup.c
@@ -375,6 +375,10 @@ main(int argc, char **argv)
 		exit(2);
 	}
 
+	if (dryrun)
+		pg_log_info("Executing in dry-run mode.\n"
+					"No files will be removed.");
+
 	/*
 	 * Check archive exists and other initialization if required.
 	 */
diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c
index df41836e70f..cc4be5d6ef4 100644
--- a/src/bin/pg_basebackup/pg_createsubscriber.c
+++ b/src/bin/pg_basebackup/pg_createsubscriber.c
@@ -2305,6 +2305,11 @@ main(int argc, char **argv)
 		pg_log_error_hint("Try \"%s --help\" for more information.", progname);
 		exit(1);
 	}
+
+	if (dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
 	pg_log_info("validating publisher connection string");
 	pub_base_conninfo = get_base_conninfo(opt.pub_conninfo_str,
 										  &dbname_conninfo);
diff --git a/src/bin/pg_combinebackup/pg_combinebackup.c b/src/bin/pg_combinebackup/pg_combinebackup.c
index 3a325127209..c9bf0a9e105 100644
--- a/src/bin/pg_combinebackup/pg_combinebackup.c
+++ b/src/bin/pg_combinebackup/pg_combinebackup.c
@@ -242,6 +242,10 @@ main(int argc, char *argv[])
 	if (opt.no_manifest)
 		opt.manifest_checksums = CHECKSUM_TYPE_NONE;
 
+	if (opt.dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
 	/* Check that the platform supports the requested copy method. */
 	if (opt.copy_method == COPY_METHOD_CLONE)
 	{
diff --git a/src/bin/pg_resetwal/pg_resetwal.c b/src/bin/pg_resetwal/pg_resetwal.c
index a89d72fc5cf..dd5d279521e 100644
--- a/src/bin/pg_resetwal/pg_resetwal.c
+++ b/src/bin/pg_resetwal/pg_resetwal.c
@@ -397,6 +397,10 @@ main(int argc, char *argv[])
 		exit(1);
 	}
 
+	if (noupdate)
+		pg_log_info("Executing in dry-run mode.\n"
+					"Nothing will be modified.");
+
 	/*
 	 * Attempt to read the existing pg_control file
 	 */
diff --git a/src/bin/pg_rewind/pg_rewind.c b/src/bin/pg_rewind/pg_rewind.c
index 27c514f934a..e9364d04f76 100644
--- a/src/bin/pg_rewind/pg_rewind.c
+++ b/src/bin/pg_rewind/pg_rewind.c
@@ -300,10 +300,12 @@ main(int argc, char **argv)
 
 	atexit(disconnect_atexit);
 
-	/*
-	 * Ok, we have all the options and we're ready to start. First, connect to
-	 * remote server.
-	 */
+	/* Ok, we have all the options and we're ready to start. */
+	if (dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
+	/* First, connect to remote server. */
 	if (connstr_source)
 	{
 		conn = PQconnectdb(connstr_source);
-- 
2.47.3


--ibfr3ah5qy6tcbhw--





^ permalink  raw  reply  [nested|flat] 126+ messages in thread

* [PATCH v5] Log a note at program start when running in dry-run mode
@ 2025-11-11 08:54 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 126+ messages in thread

From: Álvaro Herrera @ 2025-11-11 08:54 UTC (permalink / raw)

Users might get some peace of mind knowing their data is not being
destroyed or whatever.

Author: Peter Smith <[email protected]>
Reviewed-by: Álvaro Herrera <[email protected]>
Discussion: https://postgr.es/m/CAHut+PsvQJQnQO0KT0S2oegenkvJ8FUuY-QS5syyqmT24R2xFQ@mail.gmail.com
---
 src/bin/pg_archivecleanup/pg_archivecleanup.c |  4 ++++
 src/bin/pg_basebackup/pg_createsubscriber.c   |  5 +++++
 src/bin/pg_combinebackup/pg_combinebackup.c   |  4 ++++
 src/bin/pg_resetwal/pg_resetwal.c             |  4 ++++
 src/bin/pg_rewind/pg_rewind.c                 | 10 ++++++----
 5 files changed, 23 insertions(+), 4 deletions(-)

diff --git a/src/bin/pg_archivecleanup/pg_archivecleanup.c b/src/bin/pg_archivecleanup/pg_archivecleanup.c
index c25348bcb85..ab686b4748c 100644
--- a/src/bin/pg_archivecleanup/pg_archivecleanup.c
+++ b/src/bin/pg_archivecleanup/pg_archivecleanup.c
@@ -375,6 +375,10 @@ main(int argc, char **argv)
 		exit(2);
 	}
 
+	if (dryrun)
+		pg_log_info("Executing in dry-run mode.\n"
+					"No files will be removed.");
+
 	/*
 	 * Check archive exists and other initialization if required.
 	 */
diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c
index df41836e70f..cc4be5d6ef4 100644
--- a/src/bin/pg_basebackup/pg_createsubscriber.c
+++ b/src/bin/pg_basebackup/pg_createsubscriber.c
@@ -2305,6 +2305,11 @@ main(int argc, char **argv)
 		pg_log_error_hint("Try \"%s --help\" for more information.", progname);
 		exit(1);
 	}
+
+	if (dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
 	pg_log_info("validating publisher connection string");
 	pub_base_conninfo = get_base_conninfo(opt.pub_conninfo_str,
 										  &dbname_conninfo);
diff --git a/src/bin/pg_combinebackup/pg_combinebackup.c b/src/bin/pg_combinebackup/pg_combinebackup.c
index 3a325127209..c9bf0a9e105 100644
--- a/src/bin/pg_combinebackup/pg_combinebackup.c
+++ b/src/bin/pg_combinebackup/pg_combinebackup.c
@@ -242,6 +242,10 @@ main(int argc, char *argv[])
 	if (opt.no_manifest)
 		opt.manifest_checksums = CHECKSUM_TYPE_NONE;
 
+	if (opt.dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
 	/* Check that the platform supports the requested copy method. */
 	if (opt.copy_method == COPY_METHOD_CLONE)
 	{
diff --git a/src/bin/pg_resetwal/pg_resetwal.c b/src/bin/pg_resetwal/pg_resetwal.c
index a89d72fc5cf..dd5d279521e 100644
--- a/src/bin/pg_resetwal/pg_resetwal.c
+++ b/src/bin/pg_resetwal/pg_resetwal.c
@@ -397,6 +397,10 @@ main(int argc, char *argv[])
 		exit(1);
 	}
 
+	if (noupdate)
+		pg_log_info("Executing in dry-run mode.\n"
+					"Nothing will be modified.");
+
 	/*
 	 * Attempt to read the existing pg_control file
 	 */
diff --git a/src/bin/pg_rewind/pg_rewind.c b/src/bin/pg_rewind/pg_rewind.c
index 27c514f934a..e9364d04f76 100644
--- a/src/bin/pg_rewind/pg_rewind.c
+++ b/src/bin/pg_rewind/pg_rewind.c
@@ -300,10 +300,12 @@ main(int argc, char **argv)
 
 	atexit(disconnect_atexit);
 
-	/*
-	 * Ok, we have all the options and we're ready to start. First, connect to
-	 * remote server.
-	 */
+	/* Ok, we have all the options and we're ready to start. */
+	if (dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
+	/* First, connect to remote server. */
 	if (connstr_source)
 	{
 		conn = PQconnectdb(connstr_source);
-- 
2.47.3


--ibfr3ah5qy6tcbhw--





^ permalink  raw  reply  [nested|flat] 126+ messages in thread

* [PATCH v5] Log a note at program start when running in dry-run mode
@ 2025-11-11 08:54 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 126+ messages in thread

From: Álvaro Herrera @ 2025-11-11 08:54 UTC (permalink / raw)

Users might get some peace of mind knowing their data is not being
destroyed or whatever.

Author: Peter Smith <[email protected]>
Reviewed-by: Álvaro Herrera <[email protected]>
Discussion: https://postgr.es/m/CAHut+PsvQJQnQO0KT0S2oegenkvJ8FUuY-QS5syyqmT24R2xFQ@mail.gmail.com
---
 src/bin/pg_archivecleanup/pg_archivecleanup.c |  4 ++++
 src/bin/pg_basebackup/pg_createsubscriber.c   |  5 +++++
 src/bin/pg_combinebackup/pg_combinebackup.c   |  4 ++++
 src/bin/pg_resetwal/pg_resetwal.c             |  4 ++++
 src/bin/pg_rewind/pg_rewind.c                 | 10 ++++++----
 5 files changed, 23 insertions(+), 4 deletions(-)

diff --git a/src/bin/pg_archivecleanup/pg_archivecleanup.c b/src/bin/pg_archivecleanup/pg_archivecleanup.c
index c25348bcb85..ab686b4748c 100644
--- a/src/bin/pg_archivecleanup/pg_archivecleanup.c
+++ b/src/bin/pg_archivecleanup/pg_archivecleanup.c
@@ -375,6 +375,10 @@ main(int argc, char **argv)
 		exit(2);
 	}
 
+	if (dryrun)
+		pg_log_info("Executing in dry-run mode.\n"
+					"No files will be removed.");
+
 	/*
 	 * Check archive exists and other initialization if required.
 	 */
diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c
index df41836e70f..cc4be5d6ef4 100644
--- a/src/bin/pg_basebackup/pg_createsubscriber.c
+++ b/src/bin/pg_basebackup/pg_createsubscriber.c
@@ -2305,6 +2305,11 @@ main(int argc, char **argv)
 		pg_log_error_hint("Try \"%s --help\" for more information.", progname);
 		exit(1);
 	}
+
+	if (dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
 	pg_log_info("validating publisher connection string");
 	pub_base_conninfo = get_base_conninfo(opt.pub_conninfo_str,
 										  &dbname_conninfo);
diff --git a/src/bin/pg_combinebackup/pg_combinebackup.c b/src/bin/pg_combinebackup/pg_combinebackup.c
index 3a325127209..c9bf0a9e105 100644
--- a/src/bin/pg_combinebackup/pg_combinebackup.c
+++ b/src/bin/pg_combinebackup/pg_combinebackup.c
@@ -242,6 +242,10 @@ main(int argc, char *argv[])
 	if (opt.no_manifest)
 		opt.manifest_checksums = CHECKSUM_TYPE_NONE;
 
+	if (opt.dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
 	/* Check that the platform supports the requested copy method. */
 	if (opt.copy_method == COPY_METHOD_CLONE)
 	{
diff --git a/src/bin/pg_resetwal/pg_resetwal.c b/src/bin/pg_resetwal/pg_resetwal.c
index a89d72fc5cf..dd5d279521e 100644
--- a/src/bin/pg_resetwal/pg_resetwal.c
+++ b/src/bin/pg_resetwal/pg_resetwal.c
@@ -397,6 +397,10 @@ main(int argc, char *argv[])
 		exit(1);
 	}
 
+	if (noupdate)
+		pg_log_info("Executing in dry-run mode.\n"
+					"Nothing will be modified.");
+
 	/*
 	 * Attempt to read the existing pg_control file
 	 */
diff --git a/src/bin/pg_rewind/pg_rewind.c b/src/bin/pg_rewind/pg_rewind.c
index 27c514f934a..e9364d04f76 100644
--- a/src/bin/pg_rewind/pg_rewind.c
+++ b/src/bin/pg_rewind/pg_rewind.c
@@ -300,10 +300,12 @@ main(int argc, char **argv)
 
 	atexit(disconnect_atexit);
 
-	/*
-	 * Ok, we have all the options and we're ready to start. First, connect to
-	 * remote server.
-	 */
+	/* Ok, we have all the options and we're ready to start. */
+	if (dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
+	/* First, connect to remote server. */
 	if (connstr_source)
 	{
 		conn = PQconnectdb(connstr_source);
-- 
2.47.3


--ibfr3ah5qy6tcbhw--





^ permalink  raw  reply  [nested|flat] 126+ messages in thread

* [PATCH v5] Log a note at program start when running in dry-run mode
@ 2025-11-11 08:54 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 126+ messages in thread

From: Álvaro Herrera @ 2025-11-11 08:54 UTC (permalink / raw)

Users might get some peace of mind knowing their data is not being
destroyed or whatever.

Author: Peter Smith <[email protected]>
Reviewed-by: Álvaro Herrera <[email protected]>
Discussion: https://postgr.es/m/CAHut+PsvQJQnQO0KT0S2oegenkvJ8FUuY-QS5syyqmT24R2xFQ@mail.gmail.com
---
 src/bin/pg_archivecleanup/pg_archivecleanup.c |  4 ++++
 src/bin/pg_basebackup/pg_createsubscriber.c   |  5 +++++
 src/bin/pg_combinebackup/pg_combinebackup.c   |  4 ++++
 src/bin/pg_resetwal/pg_resetwal.c             |  4 ++++
 src/bin/pg_rewind/pg_rewind.c                 | 10 ++++++----
 5 files changed, 23 insertions(+), 4 deletions(-)

diff --git a/src/bin/pg_archivecleanup/pg_archivecleanup.c b/src/bin/pg_archivecleanup/pg_archivecleanup.c
index c25348bcb85..ab686b4748c 100644
--- a/src/bin/pg_archivecleanup/pg_archivecleanup.c
+++ b/src/bin/pg_archivecleanup/pg_archivecleanup.c
@@ -375,6 +375,10 @@ main(int argc, char **argv)
 		exit(2);
 	}
 
+	if (dryrun)
+		pg_log_info("Executing in dry-run mode.\n"
+					"No files will be removed.");
+
 	/*
 	 * Check archive exists and other initialization if required.
 	 */
diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c
index df41836e70f..cc4be5d6ef4 100644
--- a/src/bin/pg_basebackup/pg_createsubscriber.c
+++ b/src/bin/pg_basebackup/pg_createsubscriber.c
@@ -2305,6 +2305,11 @@ main(int argc, char **argv)
 		pg_log_error_hint("Try \"%s --help\" for more information.", progname);
 		exit(1);
 	}
+
+	if (dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
 	pg_log_info("validating publisher connection string");
 	pub_base_conninfo = get_base_conninfo(opt.pub_conninfo_str,
 										  &dbname_conninfo);
diff --git a/src/bin/pg_combinebackup/pg_combinebackup.c b/src/bin/pg_combinebackup/pg_combinebackup.c
index 3a325127209..c9bf0a9e105 100644
--- a/src/bin/pg_combinebackup/pg_combinebackup.c
+++ b/src/bin/pg_combinebackup/pg_combinebackup.c
@@ -242,6 +242,10 @@ main(int argc, char *argv[])
 	if (opt.no_manifest)
 		opt.manifest_checksums = CHECKSUM_TYPE_NONE;
 
+	if (opt.dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
 	/* Check that the platform supports the requested copy method. */
 	if (opt.copy_method == COPY_METHOD_CLONE)
 	{
diff --git a/src/bin/pg_resetwal/pg_resetwal.c b/src/bin/pg_resetwal/pg_resetwal.c
index a89d72fc5cf..dd5d279521e 100644
--- a/src/bin/pg_resetwal/pg_resetwal.c
+++ b/src/bin/pg_resetwal/pg_resetwal.c
@@ -397,6 +397,10 @@ main(int argc, char *argv[])
 		exit(1);
 	}
 
+	if (noupdate)
+		pg_log_info("Executing in dry-run mode.\n"
+					"Nothing will be modified.");
+
 	/*
 	 * Attempt to read the existing pg_control file
 	 */
diff --git a/src/bin/pg_rewind/pg_rewind.c b/src/bin/pg_rewind/pg_rewind.c
index 27c514f934a..e9364d04f76 100644
--- a/src/bin/pg_rewind/pg_rewind.c
+++ b/src/bin/pg_rewind/pg_rewind.c
@@ -300,10 +300,12 @@ main(int argc, char **argv)
 
 	atexit(disconnect_atexit);
 
-	/*
-	 * Ok, we have all the options and we're ready to start. First, connect to
-	 * remote server.
-	 */
+	/* Ok, we have all the options and we're ready to start. */
+	if (dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
+	/* First, connect to remote server. */
 	if (connstr_source)
 	{
 		conn = PQconnectdb(connstr_source);
-- 
2.47.3


--ibfr3ah5qy6tcbhw--





^ permalink  raw  reply  [nested|flat] 126+ messages in thread

* [PATCH v5] Log a note at program start when running in dry-run mode
@ 2025-11-11 08:54 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 126+ messages in thread

From: Álvaro Herrera @ 2025-11-11 08:54 UTC (permalink / raw)

Users might get some peace of mind knowing their data is not being
destroyed or whatever.

Author: Peter Smith <[email protected]>
Reviewed-by: Álvaro Herrera <[email protected]>
Discussion: https://postgr.es/m/CAHut+PsvQJQnQO0KT0S2oegenkvJ8FUuY-QS5syyqmT24R2xFQ@mail.gmail.com
---
 src/bin/pg_archivecleanup/pg_archivecleanup.c |  4 ++++
 src/bin/pg_basebackup/pg_createsubscriber.c   |  5 +++++
 src/bin/pg_combinebackup/pg_combinebackup.c   |  4 ++++
 src/bin/pg_resetwal/pg_resetwal.c             |  4 ++++
 src/bin/pg_rewind/pg_rewind.c                 | 10 ++++++----
 5 files changed, 23 insertions(+), 4 deletions(-)

diff --git a/src/bin/pg_archivecleanup/pg_archivecleanup.c b/src/bin/pg_archivecleanup/pg_archivecleanup.c
index c25348bcb85..ab686b4748c 100644
--- a/src/bin/pg_archivecleanup/pg_archivecleanup.c
+++ b/src/bin/pg_archivecleanup/pg_archivecleanup.c
@@ -375,6 +375,10 @@ main(int argc, char **argv)
 		exit(2);
 	}
 
+	if (dryrun)
+		pg_log_info("Executing in dry-run mode.\n"
+					"No files will be removed.");
+
 	/*
 	 * Check archive exists and other initialization if required.
 	 */
diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c
index df41836e70f..cc4be5d6ef4 100644
--- a/src/bin/pg_basebackup/pg_createsubscriber.c
+++ b/src/bin/pg_basebackup/pg_createsubscriber.c
@@ -2305,6 +2305,11 @@ main(int argc, char **argv)
 		pg_log_error_hint("Try \"%s --help\" for more information.", progname);
 		exit(1);
 	}
+
+	if (dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
 	pg_log_info("validating publisher connection string");
 	pub_base_conninfo = get_base_conninfo(opt.pub_conninfo_str,
 										  &dbname_conninfo);
diff --git a/src/bin/pg_combinebackup/pg_combinebackup.c b/src/bin/pg_combinebackup/pg_combinebackup.c
index 3a325127209..c9bf0a9e105 100644
--- a/src/bin/pg_combinebackup/pg_combinebackup.c
+++ b/src/bin/pg_combinebackup/pg_combinebackup.c
@@ -242,6 +242,10 @@ main(int argc, char *argv[])
 	if (opt.no_manifest)
 		opt.manifest_checksums = CHECKSUM_TYPE_NONE;
 
+	if (opt.dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
 	/* Check that the platform supports the requested copy method. */
 	if (opt.copy_method == COPY_METHOD_CLONE)
 	{
diff --git a/src/bin/pg_resetwal/pg_resetwal.c b/src/bin/pg_resetwal/pg_resetwal.c
index a89d72fc5cf..dd5d279521e 100644
--- a/src/bin/pg_resetwal/pg_resetwal.c
+++ b/src/bin/pg_resetwal/pg_resetwal.c
@@ -397,6 +397,10 @@ main(int argc, char *argv[])
 		exit(1);
 	}
 
+	if (noupdate)
+		pg_log_info("Executing in dry-run mode.\n"
+					"Nothing will be modified.");
+
 	/*
 	 * Attempt to read the existing pg_control file
 	 */
diff --git a/src/bin/pg_rewind/pg_rewind.c b/src/bin/pg_rewind/pg_rewind.c
index 27c514f934a..e9364d04f76 100644
--- a/src/bin/pg_rewind/pg_rewind.c
+++ b/src/bin/pg_rewind/pg_rewind.c
@@ -300,10 +300,12 @@ main(int argc, char **argv)
 
 	atexit(disconnect_atexit);
 
-	/*
-	 * Ok, we have all the options and we're ready to start. First, connect to
-	 * remote server.
-	 */
+	/* Ok, we have all the options and we're ready to start. */
+	if (dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
+	/* First, connect to remote server. */
 	if (connstr_source)
 	{
 		conn = PQconnectdb(connstr_source);
-- 
2.47.3


--ibfr3ah5qy6tcbhw--





^ permalink  raw  reply  [nested|flat] 126+ messages in thread

* [PATCH v5] Log a note at program start when running in dry-run mode
@ 2025-11-11 08:54 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 126+ messages in thread

From: Álvaro Herrera @ 2025-11-11 08:54 UTC (permalink / raw)

Users might get some peace of mind knowing their data is not being
destroyed or whatever.

Author: Peter Smith <[email protected]>
Reviewed-by: Álvaro Herrera <[email protected]>
Discussion: https://postgr.es/m/CAHut+PsvQJQnQO0KT0S2oegenkvJ8FUuY-QS5syyqmT24R2xFQ@mail.gmail.com
---
 src/bin/pg_archivecleanup/pg_archivecleanup.c |  4 ++++
 src/bin/pg_basebackup/pg_createsubscriber.c   |  5 +++++
 src/bin/pg_combinebackup/pg_combinebackup.c   |  4 ++++
 src/bin/pg_resetwal/pg_resetwal.c             |  4 ++++
 src/bin/pg_rewind/pg_rewind.c                 | 10 ++++++----
 5 files changed, 23 insertions(+), 4 deletions(-)

diff --git a/src/bin/pg_archivecleanup/pg_archivecleanup.c b/src/bin/pg_archivecleanup/pg_archivecleanup.c
index c25348bcb85..ab686b4748c 100644
--- a/src/bin/pg_archivecleanup/pg_archivecleanup.c
+++ b/src/bin/pg_archivecleanup/pg_archivecleanup.c
@@ -375,6 +375,10 @@ main(int argc, char **argv)
 		exit(2);
 	}
 
+	if (dryrun)
+		pg_log_info("Executing in dry-run mode.\n"
+					"No files will be removed.");
+
 	/*
 	 * Check archive exists and other initialization if required.
 	 */
diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c
index df41836e70f..cc4be5d6ef4 100644
--- a/src/bin/pg_basebackup/pg_createsubscriber.c
+++ b/src/bin/pg_basebackup/pg_createsubscriber.c
@@ -2305,6 +2305,11 @@ main(int argc, char **argv)
 		pg_log_error_hint("Try \"%s --help\" for more information.", progname);
 		exit(1);
 	}
+
+	if (dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
 	pg_log_info("validating publisher connection string");
 	pub_base_conninfo = get_base_conninfo(opt.pub_conninfo_str,
 										  &dbname_conninfo);
diff --git a/src/bin/pg_combinebackup/pg_combinebackup.c b/src/bin/pg_combinebackup/pg_combinebackup.c
index 3a325127209..c9bf0a9e105 100644
--- a/src/bin/pg_combinebackup/pg_combinebackup.c
+++ b/src/bin/pg_combinebackup/pg_combinebackup.c
@@ -242,6 +242,10 @@ main(int argc, char *argv[])
 	if (opt.no_manifest)
 		opt.manifest_checksums = CHECKSUM_TYPE_NONE;
 
+	if (opt.dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
 	/* Check that the platform supports the requested copy method. */
 	if (opt.copy_method == COPY_METHOD_CLONE)
 	{
diff --git a/src/bin/pg_resetwal/pg_resetwal.c b/src/bin/pg_resetwal/pg_resetwal.c
index a89d72fc5cf..dd5d279521e 100644
--- a/src/bin/pg_resetwal/pg_resetwal.c
+++ b/src/bin/pg_resetwal/pg_resetwal.c
@@ -397,6 +397,10 @@ main(int argc, char *argv[])
 		exit(1);
 	}
 
+	if (noupdate)
+		pg_log_info("Executing in dry-run mode.\n"
+					"Nothing will be modified.");
+
 	/*
 	 * Attempt to read the existing pg_control file
 	 */
diff --git a/src/bin/pg_rewind/pg_rewind.c b/src/bin/pg_rewind/pg_rewind.c
index 27c514f934a..e9364d04f76 100644
--- a/src/bin/pg_rewind/pg_rewind.c
+++ b/src/bin/pg_rewind/pg_rewind.c
@@ -300,10 +300,12 @@ main(int argc, char **argv)
 
 	atexit(disconnect_atexit);
 
-	/*
-	 * Ok, we have all the options and we're ready to start. First, connect to
-	 * remote server.
-	 */
+	/* Ok, we have all the options and we're ready to start. */
+	if (dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
+	/* First, connect to remote server. */
 	if (connstr_source)
 	{
 		conn = PQconnectdb(connstr_source);
-- 
2.47.3


--ibfr3ah5qy6tcbhw--





^ permalink  raw  reply  [nested|flat] 126+ messages in thread

* [PATCH v5] Log a note at program start when running in dry-run mode
@ 2025-11-11 08:54 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 126+ messages in thread

From: Álvaro Herrera @ 2025-11-11 08:54 UTC (permalink / raw)

Users might get some peace of mind knowing their data is not being
destroyed or whatever.

Author: Peter Smith <[email protected]>
Reviewed-by: Álvaro Herrera <[email protected]>
Discussion: https://postgr.es/m/CAHut+PsvQJQnQO0KT0S2oegenkvJ8FUuY-QS5syyqmT24R2xFQ@mail.gmail.com
---
 src/bin/pg_archivecleanup/pg_archivecleanup.c |  4 ++++
 src/bin/pg_basebackup/pg_createsubscriber.c   |  5 +++++
 src/bin/pg_combinebackup/pg_combinebackup.c   |  4 ++++
 src/bin/pg_resetwal/pg_resetwal.c             |  4 ++++
 src/bin/pg_rewind/pg_rewind.c                 | 10 ++++++----
 5 files changed, 23 insertions(+), 4 deletions(-)

diff --git a/src/bin/pg_archivecleanup/pg_archivecleanup.c b/src/bin/pg_archivecleanup/pg_archivecleanup.c
index c25348bcb85..ab686b4748c 100644
--- a/src/bin/pg_archivecleanup/pg_archivecleanup.c
+++ b/src/bin/pg_archivecleanup/pg_archivecleanup.c
@@ -375,6 +375,10 @@ main(int argc, char **argv)
 		exit(2);
 	}
 
+	if (dryrun)
+		pg_log_info("Executing in dry-run mode.\n"
+					"No files will be removed.");
+
 	/*
 	 * Check archive exists and other initialization if required.
 	 */
diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c
index df41836e70f..cc4be5d6ef4 100644
--- a/src/bin/pg_basebackup/pg_createsubscriber.c
+++ b/src/bin/pg_basebackup/pg_createsubscriber.c
@@ -2305,6 +2305,11 @@ main(int argc, char **argv)
 		pg_log_error_hint("Try \"%s --help\" for more information.", progname);
 		exit(1);
 	}
+
+	if (dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
 	pg_log_info("validating publisher connection string");
 	pub_base_conninfo = get_base_conninfo(opt.pub_conninfo_str,
 										  &dbname_conninfo);
diff --git a/src/bin/pg_combinebackup/pg_combinebackup.c b/src/bin/pg_combinebackup/pg_combinebackup.c
index 3a325127209..c9bf0a9e105 100644
--- a/src/bin/pg_combinebackup/pg_combinebackup.c
+++ b/src/bin/pg_combinebackup/pg_combinebackup.c
@@ -242,6 +242,10 @@ main(int argc, char *argv[])
 	if (opt.no_manifest)
 		opt.manifest_checksums = CHECKSUM_TYPE_NONE;
 
+	if (opt.dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
 	/* Check that the platform supports the requested copy method. */
 	if (opt.copy_method == COPY_METHOD_CLONE)
 	{
diff --git a/src/bin/pg_resetwal/pg_resetwal.c b/src/bin/pg_resetwal/pg_resetwal.c
index a89d72fc5cf..dd5d279521e 100644
--- a/src/bin/pg_resetwal/pg_resetwal.c
+++ b/src/bin/pg_resetwal/pg_resetwal.c
@@ -397,6 +397,10 @@ main(int argc, char *argv[])
 		exit(1);
 	}
 
+	if (noupdate)
+		pg_log_info("Executing in dry-run mode.\n"
+					"Nothing will be modified.");
+
 	/*
 	 * Attempt to read the existing pg_control file
 	 */
diff --git a/src/bin/pg_rewind/pg_rewind.c b/src/bin/pg_rewind/pg_rewind.c
index 27c514f934a..e9364d04f76 100644
--- a/src/bin/pg_rewind/pg_rewind.c
+++ b/src/bin/pg_rewind/pg_rewind.c
@@ -300,10 +300,12 @@ main(int argc, char **argv)
 
 	atexit(disconnect_atexit);
 
-	/*
-	 * Ok, we have all the options and we're ready to start. First, connect to
-	 * remote server.
-	 */
+	/* Ok, we have all the options and we're ready to start. */
+	if (dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
+	/* First, connect to remote server. */
 	if (connstr_source)
 	{
 		conn = PQconnectdb(connstr_source);
-- 
2.47.3


--ibfr3ah5qy6tcbhw--





^ permalink  raw  reply  [nested|flat] 126+ messages in thread

* [PATCH v5] Log a note at program start when running in dry-run mode
@ 2025-11-11 08:54 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 126+ messages in thread

From: Álvaro Herrera @ 2025-11-11 08:54 UTC (permalink / raw)

Users might get some peace of mind knowing their data is not being
destroyed or whatever.

Author: Peter Smith <[email protected]>
Reviewed-by: Álvaro Herrera <[email protected]>
Discussion: https://postgr.es/m/CAHut+PsvQJQnQO0KT0S2oegenkvJ8FUuY-QS5syyqmT24R2xFQ@mail.gmail.com
---
 src/bin/pg_archivecleanup/pg_archivecleanup.c |  4 ++++
 src/bin/pg_basebackup/pg_createsubscriber.c   |  5 +++++
 src/bin/pg_combinebackup/pg_combinebackup.c   |  4 ++++
 src/bin/pg_resetwal/pg_resetwal.c             |  4 ++++
 src/bin/pg_rewind/pg_rewind.c                 | 10 ++++++----
 5 files changed, 23 insertions(+), 4 deletions(-)

diff --git a/src/bin/pg_archivecleanup/pg_archivecleanup.c b/src/bin/pg_archivecleanup/pg_archivecleanup.c
index c25348bcb85..ab686b4748c 100644
--- a/src/bin/pg_archivecleanup/pg_archivecleanup.c
+++ b/src/bin/pg_archivecleanup/pg_archivecleanup.c
@@ -375,6 +375,10 @@ main(int argc, char **argv)
 		exit(2);
 	}
 
+	if (dryrun)
+		pg_log_info("Executing in dry-run mode.\n"
+					"No files will be removed.");
+
 	/*
 	 * Check archive exists and other initialization if required.
 	 */
diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c
index df41836e70f..cc4be5d6ef4 100644
--- a/src/bin/pg_basebackup/pg_createsubscriber.c
+++ b/src/bin/pg_basebackup/pg_createsubscriber.c
@@ -2305,6 +2305,11 @@ main(int argc, char **argv)
 		pg_log_error_hint("Try \"%s --help\" for more information.", progname);
 		exit(1);
 	}
+
+	if (dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
 	pg_log_info("validating publisher connection string");
 	pub_base_conninfo = get_base_conninfo(opt.pub_conninfo_str,
 										  &dbname_conninfo);
diff --git a/src/bin/pg_combinebackup/pg_combinebackup.c b/src/bin/pg_combinebackup/pg_combinebackup.c
index 3a325127209..c9bf0a9e105 100644
--- a/src/bin/pg_combinebackup/pg_combinebackup.c
+++ b/src/bin/pg_combinebackup/pg_combinebackup.c
@@ -242,6 +242,10 @@ main(int argc, char *argv[])
 	if (opt.no_manifest)
 		opt.manifest_checksums = CHECKSUM_TYPE_NONE;
 
+	if (opt.dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
 	/* Check that the platform supports the requested copy method. */
 	if (opt.copy_method == COPY_METHOD_CLONE)
 	{
diff --git a/src/bin/pg_resetwal/pg_resetwal.c b/src/bin/pg_resetwal/pg_resetwal.c
index a89d72fc5cf..dd5d279521e 100644
--- a/src/bin/pg_resetwal/pg_resetwal.c
+++ b/src/bin/pg_resetwal/pg_resetwal.c
@@ -397,6 +397,10 @@ main(int argc, char *argv[])
 		exit(1);
 	}
 
+	if (noupdate)
+		pg_log_info("Executing in dry-run mode.\n"
+					"Nothing will be modified.");
+
 	/*
 	 * Attempt to read the existing pg_control file
 	 */
diff --git a/src/bin/pg_rewind/pg_rewind.c b/src/bin/pg_rewind/pg_rewind.c
index 27c514f934a..e9364d04f76 100644
--- a/src/bin/pg_rewind/pg_rewind.c
+++ b/src/bin/pg_rewind/pg_rewind.c
@@ -300,10 +300,12 @@ main(int argc, char **argv)
 
 	atexit(disconnect_atexit);
 
-	/*
-	 * Ok, we have all the options and we're ready to start. First, connect to
-	 * remote server.
-	 */
+	/* Ok, we have all the options and we're ready to start. */
+	if (dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
+	/* First, connect to remote server. */
 	if (connstr_source)
 	{
 		conn = PQconnectdb(connstr_source);
-- 
2.47.3


--ibfr3ah5qy6tcbhw--





^ permalink  raw  reply  [nested|flat] 126+ messages in thread

* [PATCH v5] Log a note at program start when running in dry-run mode
@ 2025-11-11 08:54 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 126+ messages in thread

From: Álvaro Herrera @ 2025-11-11 08:54 UTC (permalink / raw)

Users might get some peace of mind knowing their data is not being
destroyed or whatever.

Author: Peter Smith <[email protected]>
Reviewed-by: Álvaro Herrera <[email protected]>
Discussion: https://postgr.es/m/CAHut+PsvQJQnQO0KT0S2oegenkvJ8FUuY-QS5syyqmT24R2xFQ@mail.gmail.com
---
 src/bin/pg_archivecleanup/pg_archivecleanup.c |  4 ++++
 src/bin/pg_basebackup/pg_createsubscriber.c   |  5 +++++
 src/bin/pg_combinebackup/pg_combinebackup.c   |  4 ++++
 src/bin/pg_resetwal/pg_resetwal.c             |  4 ++++
 src/bin/pg_rewind/pg_rewind.c                 | 10 ++++++----
 5 files changed, 23 insertions(+), 4 deletions(-)

diff --git a/src/bin/pg_archivecleanup/pg_archivecleanup.c b/src/bin/pg_archivecleanup/pg_archivecleanup.c
index c25348bcb85..ab686b4748c 100644
--- a/src/bin/pg_archivecleanup/pg_archivecleanup.c
+++ b/src/bin/pg_archivecleanup/pg_archivecleanup.c
@@ -375,6 +375,10 @@ main(int argc, char **argv)
 		exit(2);
 	}
 
+	if (dryrun)
+		pg_log_info("Executing in dry-run mode.\n"
+					"No files will be removed.");
+
 	/*
 	 * Check archive exists and other initialization if required.
 	 */
diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c
index df41836e70f..cc4be5d6ef4 100644
--- a/src/bin/pg_basebackup/pg_createsubscriber.c
+++ b/src/bin/pg_basebackup/pg_createsubscriber.c
@@ -2305,6 +2305,11 @@ main(int argc, char **argv)
 		pg_log_error_hint("Try \"%s --help\" for more information.", progname);
 		exit(1);
 	}
+
+	if (dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
 	pg_log_info("validating publisher connection string");
 	pub_base_conninfo = get_base_conninfo(opt.pub_conninfo_str,
 										  &dbname_conninfo);
diff --git a/src/bin/pg_combinebackup/pg_combinebackup.c b/src/bin/pg_combinebackup/pg_combinebackup.c
index 3a325127209..c9bf0a9e105 100644
--- a/src/bin/pg_combinebackup/pg_combinebackup.c
+++ b/src/bin/pg_combinebackup/pg_combinebackup.c
@@ -242,6 +242,10 @@ main(int argc, char *argv[])
 	if (opt.no_manifest)
 		opt.manifest_checksums = CHECKSUM_TYPE_NONE;
 
+	if (opt.dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
 	/* Check that the platform supports the requested copy method. */
 	if (opt.copy_method == COPY_METHOD_CLONE)
 	{
diff --git a/src/bin/pg_resetwal/pg_resetwal.c b/src/bin/pg_resetwal/pg_resetwal.c
index a89d72fc5cf..dd5d279521e 100644
--- a/src/bin/pg_resetwal/pg_resetwal.c
+++ b/src/bin/pg_resetwal/pg_resetwal.c
@@ -397,6 +397,10 @@ main(int argc, char *argv[])
 		exit(1);
 	}
 
+	if (noupdate)
+		pg_log_info("Executing in dry-run mode.\n"
+					"Nothing will be modified.");
+
 	/*
 	 * Attempt to read the existing pg_control file
 	 */
diff --git a/src/bin/pg_rewind/pg_rewind.c b/src/bin/pg_rewind/pg_rewind.c
index 27c514f934a..e9364d04f76 100644
--- a/src/bin/pg_rewind/pg_rewind.c
+++ b/src/bin/pg_rewind/pg_rewind.c
@@ -300,10 +300,12 @@ main(int argc, char **argv)
 
 	atexit(disconnect_atexit);
 
-	/*
-	 * Ok, we have all the options and we're ready to start. First, connect to
-	 * remote server.
-	 */
+	/* Ok, we have all the options and we're ready to start. */
+	if (dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
+	/* First, connect to remote server. */
 	if (connstr_source)
 	{
 		conn = PQconnectdb(connstr_source);
-- 
2.47.3


--ibfr3ah5qy6tcbhw--





^ permalink  raw  reply  [nested|flat] 126+ messages in thread

* [PATCH v5] Log a note at program start when running in dry-run mode
@ 2025-11-11 08:54 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 126+ messages in thread

From: Álvaro Herrera @ 2025-11-11 08:54 UTC (permalink / raw)

Users might get some peace of mind knowing their data is not being
destroyed or whatever.

Author: Peter Smith <[email protected]>
Reviewed-by: Álvaro Herrera <[email protected]>
Discussion: https://postgr.es/m/CAHut+PsvQJQnQO0KT0S2oegenkvJ8FUuY-QS5syyqmT24R2xFQ@mail.gmail.com
---
 src/bin/pg_archivecleanup/pg_archivecleanup.c |  4 ++++
 src/bin/pg_basebackup/pg_createsubscriber.c   |  5 +++++
 src/bin/pg_combinebackup/pg_combinebackup.c   |  4 ++++
 src/bin/pg_resetwal/pg_resetwal.c             |  4 ++++
 src/bin/pg_rewind/pg_rewind.c                 | 10 ++++++----
 5 files changed, 23 insertions(+), 4 deletions(-)

diff --git a/src/bin/pg_archivecleanup/pg_archivecleanup.c b/src/bin/pg_archivecleanup/pg_archivecleanup.c
index c25348bcb85..ab686b4748c 100644
--- a/src/bin/pg_archivecleanup/pg_archivecleanup.c
+++ b/src/bin/pg_archivecleanup/pg_archivecleanup.c
@@ -375,6 +375,10 @@ main(int argc, char **argv)
 		exit(2);
 	}
 
+	if (dryrun)
+		pg_log_info("Executing in dry-run mode.\n"
+					"No files will be removed.");
+
 	/*
 	 * Check archive exists and other initialization if required.
 	 */
diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c
index df41836e70f..cc4be5d6ef4 100644
--- a/src/bin/pg_basebackup/pg_createsubscriber.c
+++ b/src/bin/pg_basebackup/pg_createsubscriber.c
@@ -2305,6 +2305,11 @@ main(int argc, char **argv)
 		pg_log_error_hint("Try \"%s --help\" for more information.", progname);
 		exit(1);
 	}
+
+	if (dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
 	pg_log_info("validating publisher connection string");
 	pub_base_conninfo = get_base_conninfo(opt.pub_conninfo_str,
 										  &dbname_conninfo);
diff --git a/src/bin/pg_combinebackup/pg_combinebackup.c b/src/bin/pg_combinebackup/pg_combinebackup.c
index 3a325127209..c9bf0a9e105 100644
--- a/src/bin/pg_combinebackup/pg_combinebackup.c
+++ b/src/bin/pg_combinebackup/pg_combinebackup.c
@@ -242,6 +242,10 @@ main(int argc, char *argv[])
 	if (opt.no_manifest)
 		opt.manifest_checksums = CHECKSUM_TYPE_NONE;
 
+	if (opt.dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
 	/* Check that the platform supports the requested copy method. */
 	if (opt.copy_method == COPY_METHOD_CLONE)
 	{
diff --git a/src/bin/pg_resetwal/pg_resetwal.c b/src/bin/pg_resetwal/pg_resetwal.c
index a89d72fc5cf..dd5d279521e 100644
--- a/src/bin/pg_resetwal/pg_resetwal.c
+++ b/src/bin/pg_resetwal/pg_resetwal.c
@@ -397,6 +397,10 @@ main(int argc, char *argv[])
 		exit(1);
 	}
 
+	if (noupdate)
+		pg_log_info("Executing in dry-run mode.\n"
+					"Nothing will be modified.");
+
 	/*
 	 * Attempt to read the existing pg_control file
 	 */
diff --git a/src/bin/pg_rewind/pg_rewind.c b/src/bin/pg_rewind/pg_rewind.c
index 27c514f934a..e9364d04f76 100644
--- a/src/bin/pg_rewind/pg_rewind.c
+++ b/src/bin/pg_rewind/pg_rewind.c
@@ -300,10 +300,12 @@ main(int argc, char **argv)
 
 	atexit(disconnect_atexit);
 
-	/*
-	 * Ok, we have all the options and we're ready to start. First, connect to
-	 * remote server.
-	 */
+	/* Ok, we have all the options and we're ready to start. */
+	if (dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
+	/* First, connect to remote server. */
 	if (connstr_source)
 	{
 		conn = PQconnectdb(connstr_source);
-- 
2.47.3


--ibfr3ah5qy6tcbhw--





^ permalink  raw  reply  [nested|flat] 126+ messages in thread

* [PATCH v5] Log a note at program start when running in dry-run mode
@ 2025-11-11 08:54 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 126+ messages in thread

From: Álvaro Herrera @ 2025-11-11 08:54 UTC (permalink / raw)

Users might get some peace of mind knowing their data is not being
destroyed or whatever.

Author: Peter Smith <[email protected]>
Reviewed-by: Álvaro Herrera <[email protected]>
Discussion: https://postgr.es/m/CAHut+PsvQJQnQO0KT0S2oegenkvJ8FUuY-QS5syyqmT24R2xFQ@mail.gmail.com
---
 src/bin/pg_archivecleanup/pg_archivecleanup.c |  4 ++++
 src/bin/pg_basebackup/pg_createsubscriber.c   |  5 +++++
 src/bin/pg_combinebackup/pg_combinebackup.c   |  4 ++++
 src/bin/pg_resetwal/pg_resetwal.c             |  4 ++++
 src/bin/pg_rewind/pg_rewind.c                 | 10 ++++++----
 5 files changed, 23 insertions(+), 4 deletions(-)

diff --git a/src/bin/pg_archivecleanup/pg_archivecleanup.c b/src/bin/pg_archivecleanup/pg_archivecleanup.c
index c25348bcb85..ab686b4748c 100644
--- a/src/bin/pg_archivecleanup/pg_archivecleanup.c
+++ b/src/bin/pg_archivecleanup/pg_archivecleanup.c
@@ -375,6 +375,10 @@ main(int argc, char **argv)
 		exit(2);
 	}
 
+	if (dryrun)
+		pg_log_info("Executing in dry-run mode.\n"
+					"No files will be removed.");
+
 	/*
 	 * Check archive exists and other initialization if required.
 	 */
diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c
index df41836e70f..cc4be5d6ef4 100644
--- a/src/bin/pg_basebackup/pg_createsubscriber.c
+++ b/src/bin/pg_basebackup/pg_createsubscriber.c
@@ -2305,6 +2305,11 @@ main(int argc, char **argv)
 		pg_log_error_hint("Try \"%s --help\" for more information.", progname);
 		exit(1);
 	}
+
+	if (dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
 	pg_log_info("validating publisher connection string");
 	pub_base_conninfo = get_base_conninfo(opt.pub_conninfo_str,
 										  &dbname_conninfo);
diff --git a/src/bin/pg_combinebackup/pg_combinebackup.c b/src/bin/pg_combinebackup/pg_combinebackup.c
index 3a325127209..c9bf0a9e105 100644
--- a/src/bin/pg_combinebackup/pg_combinebackup.c
+++ b/src/bin/pg_combinebackup/pg_combinebackup.c
@@ -242,6 +242,10 @@ main(int argc, char *argv[])
 	if (opt.no_manifest)
 		opt.manifest_checksums = CHECKSUM_TYPE_NONE;
 
+	if (opt.dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
 	/* Check that the platform supports the requested copy method. */
 	if (opt.copy_method == COPY_METHOD_CLONE)
 	{
diff --git a/src/bin/pg_resetwal/pg_resetwal.c b/src/bin/pg_resetwal/pg_resetwal.c
index a89d72fc5cf..dd5d279521e 100644
--- a/src/bin/pg_resetwal/pg_resetwal.c
+++ b/src/bin/pg_resetwal/pg_resetwal.c
@@ -397,6 +397,10 @@ main(int argc, char *argv[])
 		exit(1);
 	}
 
+	if (noupdate)
+		pg_log_info("Executing in dry-run mode.\n"
+					"Nothing will be modified.");
+
 	/*
 	 * Attempt to read the existing pg_control file
 	 */
diff --git a/src/bin/pg_rewind/pg_rewind.c b/src/bin/pg_rewind/pg_rewind.c
index 27c514f934a..e9364d04f76 100644
--- a/src/bin/pg_rewind/pg_rewind.c
+++ b/src/bin/pg_rewind/pg_rewind.c
@@ -300,10 +300,12 @@ main(int argc, char **argv)
 
 	atexit(disconnect_atexit);
 
-	/*
-	 * Ok, we have all the options and we're ready to start. First, connect to
-	 * remote server.
-	 */
+	/* Ok, we have all the options and we're ready to start. */
+	if (dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
+	/* First, connect to remote server. */
 	if (connstr_source)
 	{
 		conn = PQconnectdb(connstr_source);
-- 
2.47.3


--ibfr3ah5qy6tcbhw--





^ permalink  raw  reply  [nested|flat] 126+ messages in thread

* [PATCH v5] Log a note at program start when running in dry-run mode
@ 2025-11-11 08:54 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 126+ messages in thread

From: Álvaro Herrera @ 2025-11-11 08:54 UTC (permalink / raw)

Users might get some peace of mind knowing their data is not being
destroyed or whatever.

Author: Peter Smith <[email protected]>
Reviewed-by: Álvaro Herrera <[email protected]>
Discussion: https://postgr.es/m/CAHut+PsvQJQnQO0KT0S2oegenkvJ8FUuY-QS5syyqmT24R2xFQ@mail.gmail.com
---
 src/bin/pg_archivecleanup/pg_archivecleanup.c |  4 ++++
 src/bin/pg_basebackup/pg_createsubscriber.c   |  5 +++++
 src/bin/pg_combinebackup/pg_combinebackup.c   |  4 ++++
 src/bin/pg_resetwal/pg_resetwal.c             |  4 ++++
 src/bin/pg_rewind/pg_rewind.c                 | 10 ++++++----
 5 files changed, 23 insertions(+), 4 deletions(-)

diff --git a/src/bin/pg_archivecleanup/pg_archivecleanup.c b/src/bin/pg_archivecleanup/pg_archivecleanup.c
index c25348bcb85..ab686b4748c 100644
--- a/src/bin/pg_archivecleanup/pg_archivecleanup.c
+++ b/src/bin/pg_archivecleanup/pg_archivecleanup.c
@@ -375,6 +375,10 @@ main(int argc, char **argv)
 		exit(2);
 	}
 
+	if (dryrun)
+		pg_log_info("Executing in dry-run mode.\n"
+					"No files will be removed.");
+
 	/*
 	 * Check archive exists and other initialization if required.
 	 */
diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c
index df41836e70f..cc4be5d6ef4 100644
--- a/src/bin/pg_basebackup/pg_createsubscriber.c
+++ b/src/bin/pg_basebackup/pg_createsubscriber.c
@@ -2305,6 +2305,11 @@ main(int argc, char **argv)
 		pg_log_error_hint("Try \"%s --help\" for more information.", progname);
 		exit(1);
 	}
+
+	if (dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
 	pg_log_info("validating publisher connection string");
 	pub_base_conninfo = get_base_conninfo(opt.pub_conninfo_str,
 										  &dbname_conninfo);
diff --git a/src/bin/pg_combinebackup/pg_combinebackup.c b/src/bin/pg_combinebackup/pg_combinebackup.c
index 3a325127209..c9bf0a9e105 100644
--- a/src/bin/pg_combinebackup/pg_combinebackup.c
+++ b/src/bin/pg_combinebackup/pg_combinebackup.c
@@ -242,6 +242,10 @@ main(int argc, char *argv[])
 	if (opt.no_manifest)
 		opt.manifest_checksums = CHECKSUM_TYPE_NONE;
 
+	if (opt.dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
 	/* Check that the platform supports the requested copy method. */
 	if (opt.copy_method == COPY_METHOD_CLONE)
 	{
diff --git a/src/bin/pg_resetwal/pg_resetwal.c b/src/bin/pg_resetwal/pg_resetwal.c
index a89d72fc5cf..dd5d279521e 100644
--- a/src/bin/pg_resetwal/pg_resetwal.c
+++ b/src/bin/pg_resetwal/pg_resetwal.c
@@ -397,6 +397,10 @@ main(int argc, char *argv[])
 		exit(1);
 	}
 
+	if (noupdate)
+		pg_log_info("Executing in dry-run mode.\n"
+					"Nothing will be modified.");
+
 	/*
 	 * Attempt to read the existing pg_control file
 	 */
diff --git a/src/bin/pg_rewind/pg_rewind.c b/src/bin/pg_rewind/pg_rewind.c
index 27c514f934a..e9364d04f76 100644
--- a/src/bin/pg_rewind/pg_rewind.c
+++ b/src/bin/pg_rewind/pg_rewind.c
@@ -300,10 +300,12 @@ main(int argc, char **argv)
 
 	atexit(disconnect_atexit);
 
-	/*
-	 * Ok, we have all the options and we're ready to start. First, connect to
-	 * remote server.
-	 */
+	/* Ok, we have all the options and we're ready to start. */
+	if (dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
+	/* First, connect to remote server. */
 	if (connstr_source)
 	{
 		conn = PQconnectdb(connstr_source);
-- 
2.47.3


--ibfr3ah5qy6tcbhw--





^ permalink  raw  reply  [nested|flat] 126+ messages in thread

* [PATCH v5] Log a note at program start when running in dry-run mode
@ 2025-11-11 08:54 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 126+ messages in thread

From: Álvaro Herrera @ 2025-11-11 08:54 UTC (permalink / raw)

Users might get some peace of mind knowing their data is not being
destroyed or whatever.

Author: Peter Smith <[email protected]>
Reviewed-by: Álvaro Herrera <[email protected]>
Discussion: https://postgr.es/m/CAHut+PsvQJQnQO0KT0S2oegenkvJ8FUuY-QS5syyqmT24R2xFQ@mail.gmail.com
---
 src/bin/pg_archivecleanup/pg_archivecleanup.c |  4 ++++
 src/bin/pg_basebackup/pg_createsubscriber.c   |  5 +++++
 src/bin/pg_combinebackup/pg_combinebackup.c   |  4 ++++
 src/bin/pg_resetwal/pg_resetwal.c             |  4 ++++
 src/bin/pg_rewind/pg_rewind.c                 | 10 ++++++----
 5 files changed, 23 insertions(+), 4 deletions(-)

diff --git a/src/bin/pg_archivecleanup/pg_archivecleanup.c b/src/bin/pg_archivecleanup/pg_archivecleanup.c
index c25348bcb85..ab686b4748c 100644
--- a/src/bin/pg_archivecleanup/pg_archivecleanup.c
+++ b/src/bin/pg_archivecleanup/pg_archivecleanup.c
@@ -375,6 +375,10 @@ main(int argc, char **argv)
 		exit(2);
 	}
 
+	if (dryrun)
+		pg_log_info("Executing in dry-run mode.\n"
+					"No files will be removed.");
+
 	/*
 	 * Check archive exists and other initialization if required.
 	 */
diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c
index df41836e70f..cc4be5d6ef4 100644
--- a/src/bin/pg_basebackup/pg_createsubscriber.c
+++ b/src/bin/pg_basebackup/pg_createsubscriber.c
@@ -2305,6 +2305,11 @@ main(int argc, char **argv)
 		pg_log_error_hint("Try \"%s --help\" for more information.", progname);
 		exit(1);
 	}
+
+	if (dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
 	pg_log_info("validating publisher connection string");
 	pub_base_conninfo = get_base_conninfo(opt.pub_conninfo_str,
 										  &dbname_conninfo);
diff --git a/src/bin/pg_combinebackup/pg_combinebackup.c b/src/bin/pg_combinebackup/pg_combinebackup.c
index 3a325127209..c9bf0a9e105 100644
--- a/src/bin/pg_combinebackup/pg_combinebackup.c
+++ b/src/bin/pg_combinebackup/pg_combinebackup.c
@@ -242,6 +242,10 @@ main(int argc, char *argv[])
 	if (opt.no_manifest)
 		opt.manifest_checksums = CHECKSUM_TYPE_NONE;
 
+	if (opt.dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
 	/* Check that the platform supports the requested copy method. */
 	if (opt.copy_method == COPY_METHOD_CLONE)
 	{
diff --git a/src/bin/pg_resetwal/pg_resetwal.c b/src/bin/pg_resetwal/pg_resetwal.c
index a89d72fc5cf..dd5d279521e 100644
--- a/src/bin/pg_resetwal/pg_resetwal.c
+++ b/src/bin/pg_resetwal/pg_resetwal.c
@@ -397,6 +397,10 @@ main(int argc, char *argv[])
 		exit(1);
 	}
 
+	if (noupdate)
+		pg_log_info("Executing in dry-run mode.\n"
+					"Nothing will be modified.");
+
 	/*
 	 * Attempt to read the existing pg_control file
 	 */
diff --git a/src/bin/pg_rewind/pg_rewind.c b/src/bin/pg_rewind/pg_rewind.c
index 27c514f934a..e9364d04f76 100644
--- a/src/bin/pg_rewind/pg_rewind.c
+++ b/src/bin/pg_rewind/pg_rewind.c
@@ -300,10 +300,12 @@ main(int argc, char **argv)
 
 	atexit(disconnect_atexit);
 
-	/*
-	 * Ok, we have all the options and we're ready to start. First, connect to
-	 * remote server.
-	 */
+	/* Ok, we have all the options and we're ready to start. */
+	if (dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
+	/* First, connect to remote server. */
 	if (connstr_source)
 	{
 		conn = PQconnectdb(connstr_source);
-- 
2.47.3


--ibfr3ah5qy6tcbhw--





^ permalink  raw  reply  [nested|flat] 126+ messages in thread

* [PATCH v5] Log a note at program start when running in dry-run mode
@ 2025-11-11 08:54 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 126+ messages in thread

From: Álvaro Herrera @ 2025-11-11 08:54 UTC (permalink / raw)

Users might get some peace of mind knowing their data is not being
destroyed or whatever.

Author: Peter Smith <[email protected]>
Reviewed-by: Álvaro Herrera <[email protected]>
Discussion: https://postgr.es/m/CAHut+PsvQJQnQO0KT0S2oegenkvJ8FUuY-QS5syyqmT24R2xFQ@mail.gmail.com
---
 src/bin/pg_archivecleanup/pg_archivecleanup.c |  4 ++++
 src/bin/pg_basebackup/pg_createsubscriber.c   |  5 +++++
 src/bin/pg_combinebackup/pg_combinebackup.c   |  4 ++++
 src/bin/pg_resetwal/pg_resetwal.c             |  4 ++++
 src/bin/pg_rewind/pg_rewind.c                 | 10 ++++++----
 5 files changed, 23 insertions(+), 4 deletions(-)

diff --git a/src/bin/pg_archivecleanup/pg_archivecleanup.c b/src/bin/pg_archivecleanup/pg_archivecleanup.c
index c25348bcb85..ab686b4748c 100644
--- a/src/bin/pg_archivecleanup/pg_archivecleanup.c
+++ b/src/bin/pg_archivecleanup/pg_archivecleanup.c
@@ -375,6 +375,10 @@ main(int argc, char **argv)
 		exit(2);
 	}
 
+	if (dryrun)
+		pg_log_info("Executing in dry-run mode.\n"
+					"No files will be removed.");
+
 	/*
 	 * Check archive exists and other initialization if required.
 	 */
diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c
index df41836e70f..cc4be5d6ef4 100644
--- a/src/bin/pg_basebackup/pg_createsubscriber.c
+++ b/src/bin/pg_basebackup/pg_createsubscriber.c
@@ -2305,6 +2305,11 @@ main(int argc, char **argv)
 		pg_log_error_hint("Try \"%s --help\" for more information.", progname);
 		exit(1);
 	}
+
+	if (dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
 	pg_log_info("validating publisher connection string");
 	pub_base_conninfo = get_base_conninfo(opt.pub_conninfo_str,
 										  &dbname_conninfo);
diff --git a/src/bin/pg_combinebackup/pg_combinebackup.c b/src/bin/pg_combinebackup/pg_combinebackup.c
index 3a325127209..c9bf0a9e105 100644
--- a/src/bin/pg_combinebackup/pg_combinebackup.c
+++ b/src/bin/pg_combinebackup/pg_combinebackup.c
@@ -242,6 +242,10 @@ main(int argc, char *argv[])
 	if (opt.no_manifest)
 		opt.manifest_checksums = CHECKSUM_TYPE_NONE;
 
+	if (opt.dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
 	/* Check that the platform supports the requested copy method. */
 	if (opt.copy_method == COPY_METHOD_CLONE)
 	{
diff --git a/src/bin/pg_resetwal/pg_resetwal.c b/src/bin/pg_resetwal/pg_resetwal.c
index a89d72fc5cf..dd5d279521e 100644
--- a/src/bin/pg_resetwal/pg_resetwal.c
+++ b/src/bin/pg_resetwal/pg_resetwal.c
@@ -397,6 +397,10 @@ main(int argc, char *argv[])
 		exit(1);
 	}
 
+	if (noupdate)
+		pg_log_info("Executing in dry-run mode.\n"
+					"Nothing will be modified.");
+
 	/*
 	 * Attempt to read the existing pg_control file
 	 */
diff --git a/src/bin/pg_rewind/pg_rewind.c b/src/bin/pg_rewind/pg_rewind.c
index 27c514f934a..e9364d04f76 100644
--- a/src/bin/pg_rewind/pg_rewind.c
+++ b/src/bin/pg_rewind/pg_rewind.c
@@ -300,10 +300,12 @@ main(int argc, char **argv)
 
 	atexit(disconnect_atexit);
 
-	/*
-	 * Ok, we have all the options and we're ready to start. First, connect to
-	 * remote server.
-	 */
+	/* Ok, we have all the options and we're ready to start. */
+	if (dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
+	/* First, connect to remote server. */
 	if (connstr_source)
 	{
 		conn = PQconnectdb(connstr_source);
-- 
2.47.3


--ibfr3ah5qy6tcbhw--





^ permalink  raw  reply  [nested|flat] 126+ messages in thread

* [PATCH v5] Log a note at program start when running in dry-run mode
@ 2025-11-11 08:54 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 126+ messages in thread

From: Álvaro Herrera @ 2025-11-11 08:54 UTC (permalink / raw)

Users might get some peace of mind knowing their data is not being
destroyed or whatever.

Author: Peter Smith <[email protected]>
Reviewed-by: Álvaro Herrera <[email protected]>
Discussion: https://postgr.es/m/CAHut+PsvQJQnQO0KT0S2oegenkvJ8FUuY-QS5syyqmT24R2xFQ@mail.gmail.com
---
 src/bin/pg_archivecleanup/pg_archivecleanup.c |  4 ++++
 src/bin/pg_basebackup/pg_createsubscriber.c   |  5 +++++
 src/bin/pg_combinebackup/pg_combinebackup.c   |  4 ++++
 src/bin/pg_resetwal/pg_resetwal.c             |  4 ++++
 src/bin/pg_rewind/pg_rewind.c                 | 10 ++++++----
 5 files changed, 23 insertions(+), 4 deletions(-)

diff --git a/src/bin/pg_archivecleanup/pg_archivecleanup.c b/src/bin/pg_archivecleanup/pg_archivecleanup.c
index c25348bcb85..ab686b4748c 100644
--- a/src/bin/pg_archivecleanup/pg_archivecleanup.c
+++ b/src/bin/pg_archivecleanup/pg_archivecleanup.c
@@ -375,6 +375,10 @@ main(int argc, char **argv)
 		exit(2);
 	}
 
+	if (dryrun)
+		pg_log_info("Executing in dry-run mode.\n"
+					"No files will be removed.");
+
 	/*
 	 * Check archive exists and other initialization if required.
 	 */
diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c
index df41836e70f..cc4be5d6ef4 100644
--- a/src/bin/pg_basebackup/pg_createsubscriber.c
+++ b/src/bin/pg_basebackup/pg_createsubscriber.c
@@ -2305,6 +2305,11 @@ main(int argc, char **argv)
 		pg_log_error_hint("Try \"%s --help\" for more information.", progname);
 		exit(1);
 	}
+
+	if (dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
 	pg_log_info("validating publisher connection string");
 	pub_base_conninfo = get_base_conninfo(opt.pub_conninfo_str,
 										  &dbname_conninfo);
diff --git a/src/bin/pg_combinebackup/pg_combinebackup.c b/src/bin/pg_combinebackup/pg_combinebackup.c
index 3a325127209..c9bf0a9e105 100644
--- a/src/bin/pg_combinebackup/pg_combinebackup.c
+++ b/src/bin/pg_combinebackup/pg_combinebackup.c
@@ -242,6 +242,10 @@ main(int argc, char *argv[])
 	if (opt.no_manifest)
 		opt.manifest_checksums = CHECKSUM_TYPE_NONE;
 
+	if (opt.dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
 	/* Check that the platform supports the requested copy method. */
 	if (opt.copy_method == COPY_METHOD_CLONE)
 	{
diff --git a/src/bin/pg_resetwal/pg_resetwal.c b/src/bin/pg_resetwal/pg_resetwal.c
index a89d72fc5cf..dd5d279521e 100644
--- a/src/bin/pg_resetwal/pg_resetwal.c
+++ b/src/bin/pg_resetwal/pg_resetwal.c
@@ -397,6 +397,10 @@ main(int argc, char *argv[])
 		exit(1);
 	}
 
+	if (noupdate)
+		pg_log_info("Executing in dry-run mode.\n"
+					"Nothing will be modified.");
+
 	/*
 	 * Attempt to read the existing pg_control file
 	 */
diff --git a/src/bin/pg_rewind/pg_rewind.c b/src/bin/pg_rewind/pg_rewind.c
index 27c514f934a..e9364d04f76 100644
--- a/src/bin/pg_rewind/pg_rewind.c
+++ b/src/bin/pg_rewind/pg_rewind.c
@@ -300,10 +300,12 @@ main(int argc, char **argv)
 
 	atexit(disconnect_atexit);
 
-	/*
-	 * Ok, we have all the options and we're ready to start. First, connect to
-	 * remote server.
-	 */
+	/* Ok, we have all the options and we're ready to start. */
+	if (dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
+	/* First, connect to remote server. */
 	if (connstr_source)
 	{
 		conn = PQconnectdb(connstr_source);
-- 
2.47.3


--ibfr3ah5qy6tcbhw--





^ permalink  raw  reply  [nested|flat] 126+ messages in thread

* [PATCH v5] Log a note at program start when running in dry-run mode
@ 2025-11-11 08:54 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 126+ messages in thread

From: Álvaro Herrera @ 2025-11-11 08:54 UTC (permalink / raw)

Users might get some peace of mind knowing their data is not being
destroyed or whatever.

Author: Peter Smith <[email protected]>
Reviewed-by: Álvaro Herrera <[email protected]>
Discussion: https://postgr.es/m/CAHut+PsvQJQnQO0KT0S2oegenkvJ8FUuY-QS5syyqmT24R2xFQ@mail.gmail.com
---
 src/bin/pg_archivecleanup/pg_archivecleanup.c |  4 ++++
 src/bin/pg_basebackup/pg_createsubscriber.c   |  5 +++++
 src/bin/pg_combinebackup/pg_combinebackup.c   |  4 ++++
 src/bin/pg_resetwal/pg_resetwal.c             |  4 ++++
 src/bin/pg_rewind/pg_rewind.c                 | 10 ++++++----
 5 files changed, 23 insertions(+), 4 deletions(-)

diff --git a/src/bin/pg_archivecleanup/pg_archivecleanup.c b/src/bin/pg_archivecleanup/pg_archivecleanup.c
index c25348bcb85..ab686b4748c 100644
--- a/src/bin/pg_archivecleanup/pg_archivecleanup.c
+++ b/src/bin/pg_archivecleanup/pg_archivecleanup.c
@@ -375,6 +375,10 @@ main(int argc, char **argv)
 		exit(2);
 	}
 
+	if (dryrun)
+		pg_log_info("Executing in dry-run mode.\n"
+					"No files will be removed.");
+
 	/*
 	 * Check archive exists and other initialization if required.
 	 */
diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c
index df41836e70f..cc4be5d6ef4 100644
--- a/src/bin/pg_basebackup/pg_createsubscriber.c
+++ b/src/bin/pg_basebackup/pg_createsubscriber.c
@@ -2305,6 +2305,11 @@ main(int argc, char **argv)
 		pg_log_error_hint("Try \"%s --help\" for more information.", progname);
 		exit(1);
 	}
+
+	if (dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
 	pg_log_info("validating publisher connection string");
 	pub_base_conninfo = get_base_conninfo(opt.pub_conninfo_str,
 										  &dbname_conninfo);
diff --git a/src/bin/pg_combinebackup/pg_combinebackup.c b/src/bin/pg_combinebackup/pg_combinebackup.c
index 3a325127209..c9bf0a9e105 100644
--- a/src/bin/pg_combinebackup/pg_combinebackup.c
+++ b/src/bin/pg_combinebackup/pg_combinebackup.c
@@ -242,6 +242,10 @@ main(int argc, char *argv[])
 	if (opt.no_manifest)
 		opt.manifest_checksums = CHECKSUM_TYPE_NONE;
 
+	if (opt.dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
 	/* Check that the platform supports the requested copy method. */
 	if (opt.copy_method == COPY_METHOD_CLONE)
 	{
diff --git a/src/bin/pg_resetwal/pg_resetwal.c b/src/bin/pg_resetwal/pg_resetwal.c
index a89d72fc5cf..dd5d279521e 100644
--- a/src/bin/pg_resetwal/pg_resetwal.c
+++ b/src/bin/pg_resetwal/pg_resetwal.c
@@ -397,6 +397,10 @@ main(int argc, char *argv[])
 		exit(1);
 	}
 
+	if (noupdate)
+		pg_log_info("Executing in dry-run mode.\n"
+					"Nothing will be modified.");
+
 	/*
 	 * Attempt to read the existing pg_control file
 	 */
diff --git a/src/bin/pg_rewind/pg_rewind.c b/src/bin/pg_rewind/pg_rewind.c
index 27c514f934a..e9364d04f76 100644
--- a/src/bin/pg_rewind/pg_rewind.c
+++ b/src/bin/pg_rewind/pg_rewind.c
@@ -300,10 +300,12 @@ main(int argc, char **argv)
 
 	atexit(disconnect_atexit);
 
-	/*
-	 * Ok, we have all the options and we're ready to start. First, connect to
-	 * remote server.
-	 */
+	/* Ok, we have all the options and we're ready to start. */
+	if (dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
+	/* First, connect to remote server. */
 	if (connstr_source)
 	{
 		conn = PQconnectdb(connstr_source);
-- 
2.47.3


--ibfr3ah5qy6tcbhw--





^ permalink  raw  reply  [nested|flat] 126+ messages in thread

* [PATCH v5] Log a note at program start when running in dry-run mode
@ 2025-11-11 08:54 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 126+ messages in thread

From: Álvaro Herrera @ 2025-11-11 08:54 UTC (permalink / raw)

Users might get some peace of mind knowing their data is not being
destroyed or whatever.

Author: Peter Smith <[email protected]>
Reviewed-by: Álvaro Herrera <[email protected]>
Discussion: https://postgr.es/m/CAHut+PsvQJQnQO0KT0S2oegenkvJ8FUuY-QS5syyqmT24R2xFQ@mail.gmail.com
---
 src/bin/pg_archivecleanup/pg_archivecleanup.c |  4 ++++
 src/bin/pg_basebackup/pg_createsubscriber.c   |  5 +++++
 src/bin/pg_combinebackup/pg_combinebackup.c   |  4 ++++
 src/bin/pg_resetwal/pg_resetwal.c             |  4 ++++
 src/bin/pg_rewind/pg_rewind.c                 | 10 ++++++----
 5 files changed, 23 insertions(+), 4 deletions(-)

diff --git a/src/bin/pg_archivecleanup/pg_archivecleanup.c b/src/bin/pg_archivecleanup/pg_archivecleanup.c
index c25348bcb85..ab686b4748c 100644
--- a/src/bin/pg_archivecleanup/pg_archivecleanup.c
+++ b/src/bin/pg_archivecleanup/pg_archivecleanup.c
@@ -375,6 +375,10 @@ main(int argc, char **argv)
 		exit(2);
 	}
 
+	if (dryrun)
+		pg_log_info("Executing in dry-run mode.\n"
+					"No files will be removed.");
+
 	/*
 	 * Check archive exists and other initialization if required.
 	 */
diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c
index df41836e70f..cc4be5d6ef4 100644
--- a/src/bin/pg_basebackup/pg_createsubscriber.c
+++ b/src/bin/pg_basebackup/pg_createsubscriber.c
@@ -2305,6 +2305,11 @@ main(int argc, char **argv)
 		pg_log_error_hint("Try \"%s --help\" for more information.", progname);
 		exit(1);
 	}
+
+	if (dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
 	pg_log_info("validating publisher connection string");
 	pub_base_conninfo = get_base_conninfo(opt.pub_conninfo_str,
 										  &dbname_conninfo);
diff --git a/src/bin/pg_combinebackup/pg_combinebackup.c b/src/bin/pg_combinebackup/pg_combinebackup.c
index 3a325127209..c9bf0a9e105 100644
--- a/src/bin/pg_combinebackup/pg_combinebackup.c
+++ b/src/bin/pg_combinebackup/pg_combinebackup.c
@@ -242,6 +242,10 @@ main(int argc, char *argv[])
 	if (opt.no_manifest)
 		opt.manifest_checksums = CHECKSUM_TYPE_NONE;
 
+	if (opt.dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
 	/* Check that the platform supports the requested copy method. */
 	if (opt.copy_method == COPY_METHOD_CLONE)
 	{
diff --git a/src/bin/pg_resetwal/pg_resetwal.c b/src/bin/pg_resetwal/pg_resetwal.c
index a89d72fc5cf..dd5d279521e 100644
--- a/src/bin/pg_resetwal/pg_resetwal.c
+++ b/src/bin/pg_resetwal/pg_resetwal.c
@@ -397,6 +397,10 @@ main(int argc, char *argv[])
 		exit(1);
 	}
 
+	if (noupdate)
+		pg_log_info("Executing in dry-run mode.\n"
+					"Nothing will be modified.");
+
 	/*
 	 * Attempt to read the existing pg_control file
 	 */
diff --git a/src/bin/pg_rewind/pg_rewind.c b/src/bin/pg_rewind/pg_rewind.c
index 27c514f934a..e9364d04f76 100644
--- a/src/bin/pg_rewind/pg_rewind.c
+++ b/src/bin/pg_rewind/pg_rewind.c
@@ -300,10 +300,12 @@ main(int argc, char **argv)
 
 	atexit(disconnect_atexit);
 
-	/*
-	 * Ok, we have all the options and we're ready to start. First, connect to
-	 * remote server.
-	 */
+	/* Ok, we have all the options and we're ready to start. */
+	if (dry_run)
+		pg_log_info("Executing in dry-run mode.\n"
+					"The target directory will not be modified.");
+
+	/* First, connect to remote server. */
 	if (connstr_source)
 	{
 		conn = PQconnectdb(connstr_source);
-- 
2.47.3


--ibfr3ah5qy6tcbhw--





^ permalink  raw  reply  [nested|flat] 126+ messages in thread

* [PATCH 3/6] Move conversion of a "historic" to MVCC snapshot to a separate function.
@ 2026-01-27 10:48 Antonin Houska <[email protected]>
  0 siblings, 0 replies; 126+ messages in thread

From: Antonin Houska @ 2026-01-27 10:48 UTC (permalink / raw)

The conversion is now handled by SnapBuildMVCCFromHistoric(). REPACK
CONCURRENTLY will also need it.
---
 src/backend/replication/logical/snapbuild.c | 59 +++++++++++++++++----
 src/backend/utils/time/snapmgr.c            |  3 +-
 src/include/replication/snapbuild.h         |  1 +
 src/include/utils/snapmgr.h                 |  1 +
 4 files changed, 52 insertions(+), 12 deletions(-)

diff --git a/src/backend/replication/logical/snapbuild.c b/src/backend/replication/logical/snapbuild.c
index 7f79621b57e..a738ad8a864 100644
--- a/src/backend/replication/logical/snapbuild.c
+++ b/src/backend/replication/logical/snapbuild.c
@@ -440,10 +440,7 @@ Snapshot
 SnapBuildInitialSnapshot(SnapBuild *builder)
 {
 	Snapshot	snap;
-	TransactionId xid;
 	TransactionId safeXid;
-	TransactionId *newxip;
-	int			newxcnt = 0;
 
 	Assert(XactIsoLevel == XACT_REPEATABLE_READ);
 	Assert(builder->building_full_snapshot);
@@ -485,7 +482,35 @@ SnapBuildInitialSnapshot(SnapBuild *builder)
 
 	MyProc->xmin = snap->xmin;
 
-	/* allocate in transaction context */
+	/* Convert the historic snapshot to MVCC snapshot. */
+	return SnapBuildMVCCFromHistoric(snap, true);
+}
+
+/*
+ * Turn a historic MVCC snapshot into an ordinary MVCC snapshot.
+ *
+ * Unlike a regular (non-historic) MVCC snapshot, the 'xip' array of this
+ * snapshot contains not only running main transactions, but also their
+ * subtransactions. On the other hand, 'subxip' will usually be empty. This
+ * difference does not affect the result of XidInMVCCSnapshot() because it
+ * searches both in 'xip' and 'subxip'.
+ *
+ * Pass true for 'in_place' if you don't care about modifying the source
+ * snapshot. If you need a new instance, and one that was allocated as a
+ * single chunk of memory, pass false.
+ */
+Snapshot
+SnapBuildMVCCFromHistoric(Snapshot snapshot, bool in_place)
+{
+	TransactionId xid;
+	TransactionId *oldxip = snapshot->xip;
+	uint32		oldxcnt = snapshot->xcnt;
+	TransactionId *newxip;
+	int			newxcnt = 0;
+	Snapshot	result;
+
+	Assert(snapshot->snapshot_type == SNAPSHOT_HISTORIC_MVCC);
+
 	newxip = palloc_array(TransactionId, GetMaxSnapshotXidCount());
 
 	/*
@@ -494,7 +519,7 @@ SnapBuildInitialSnapshot(SnapBuild *builder)
 	 * classical snapshot by marking all non-committed transactions as
 	 * in-progress. This can be expensive.
 	 */
-	for (xid = snap->xmin; NormalTransactionIdPrecedes(xid, snap->xmax);)
+	for (xid = snapshot->xmin; NormalTransactionIdPrecedes(xid, snapshot->xmax);)
 	{
 		void	   *test;
 
@@ -502,7 +527,7 @@ SnapBuildInitialSnapshot(SnapBuild *builder)
 		 * Check whether transaction committed using the decoding snapshot
 		 * meaning of ->xip.
 		 */
-		test = bsearch(&xid, snap->xip, snap->xcnt,
+		test = bsearch(&xid, snapshot->xip, snapshot->xcnt,
 					   sizeof(TransactionId), xidComparator);
 
 		if (test == NULL)
@@ -519,11 +544,25 @@ SnapBuildInitialSnapshot(SnapBuild *builder)
 	}
 
 	/* adjust remaining snapshot fields as needed */
-	snap->snapshot_type = SNAPSHOT_MVCC;
-	snap->xcnt = newxcnt;
-	snap->xip = newxip;
+	snapshot->xcnt = newxcnt;
+	snapshot->xip = newxip;
+
+	if (in_place)
+		result = snapshot;
+	else
+	{
+		result = CopySnapshot(snapshot);
+
+		/* Restore the original values so the source is intact. */
+		snapshot->xip = oldxip;
+		snapshot->xcnt = oldxcnt;
+
+		/* newxip has been copied */
+		pfree(newxip);
+	}
+	result->snapshot_type = SNAPSHOT_MVCC;
 
-	return snap;
+	return result;
 }
 
 /*
diff --git a/src/backend/utils/time/snapmgr.c b/src/backend/utils/time/snapmgr.c
index 2e6197f5f35..3af1b366adf 100644
--- a/src/backend/utils/time/snapmgr.c
+++ b/src/backend/utils/time/snapmgr.c
@@ -213,7 +213,6 @@ typedef struct ExportedSnapshot
 static List *exportedSnapshots = NIL;
 
 /* Prototypes for local functions */
-static Snapshot CopySnapshot(Snapshot snapshot);
 static void UnregisterSnapshotNoOwner(Snapshot snapshot);
 static void FreeSnapshot(Snapshot snapshot);
 static void SnapshotResetXmin(void);
@@ -604,7 +603,7 @@ SetTransactionSnapshot(Snapshot sourcesnap, VirtualTransactionId *sourcevxid,
  * The copy is palloc'd in TopTransactionContext and has initial refcounts set
  * to 0.  The returned snapshot has the copied flag set.
  */
-static Snapshot
+Snapshot
 CopySnapshot(Snapshot snapshot)
 {
 	Snapshot	newsnap;
diff --git a/src/include/replication/snapbuild.h b/src/include/replication/snapbuild.h
index ccded021433..34383dea776 100644
--- a/src/include/replication/snapbuild.h
+++ b/src/include/replication/snapbuild.h
@@ -73,6 +73,7 @@ extern void FreeSnapshotBuilder(SnapBuild *builder);
 extern void SnapBuildSnapDecRefcount(Snapshot snap);
 
 extern Snapshot SnapBuildInitialSnapshot(SnapBuild *builder);
+extern Snapshot SnapBuildMVCCFromHistoric(Snapshot snapshot, bool in_place);
 extern const char *SnapBuildExportSnapshot(SnapBuild *builder);
 extern void SnapBuildClearExportedSnapshot(void);
 extern void SnapBuildResetExportedSnapshotState(void);
diff --git a/src/include/utils/snapmgr.h b/src/include/utils/snapmgr.h
index b8c01a291a1..de824945f0b 100644
--- a/src/include/utils/snapmgr.h
+++ b/src/include/utils/snapmgr.h
@@ -63,6 +63,7 @@ extern Snapshot GetTransactionSnapshot(void);
 extern Snapshot GetLatestSnapshot(void);
 extern void SnapshotSetCommandId(CommandId curcid);
 
+extern Snapshot CopySnapshot(Snapshot snapshot);
 extern Snapshot GetCatalogSnapshot(Oid relid);
 extern Snapshot GetNonHistoricCatalogSnapshot(Oid relid);
 extern void InvalidateCatalogSnapshot(void);
-- 
2.47.3


--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
 filename=v32-0004-Add-CONCURRENTLY-option-to-REPACK-command.patch



^ permalink  raw  reply  [nested|flat] 126+ messages in thread


end of thread, other threads:[~2026-01-27 10:48 UTC | newest]

Thread overview: 126+ 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]>
2026-01-27 10:48 [PATCH 3/6] Move conversion of a "historic" to MVCC snapshot to a separate function. Antonin Houska <[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