]> git.ipfire.org Git - thirdparty/postgresql.git/commitdiff
Split dry-run messages into primary and detail
authorPeter Eisentraut <peter@eisentraut.org>
Wed, 1 Jul 2026 08:12:33 +0000 (10:12 +0200)
committerPeter Eisentraut <peter@eisentraut.org>
Wed, 1 Jul 2026 08:12:33 +0000 (10:12 +0200)
Fixup for commit c05dee19112.  It fits better with the style and APIs
to print separate primary and a detail messages instead of one
multiline message.

Reviewed-by: Euler Taveira <euler@eulerto.com>
Reviewed-by: Peter Smith <smithpb2250@gmail.com>
Reviewed-by: Álvaro Herrera <alvherre@kurilemu.de>
Discussion: https://postgr.es/m/CAHut+PsvQJQnQO0KT0S2oegenkvJ8FUuY-QS5syyqmT24R2xFQ@mail.gmail.com

src/bin/pg_archivecleanup/pg_archivecleanup.c
src/bin/pg_basebackup/pg_createsubscriber.c
src/bin/pg_combinebackup/pg_combinebackup.c
src/bin/pg_rewind/pg_rewind.c
src/bin/scripts/vacuumdb.c

index ab686b4748ca43b976afd58ba8743267010146af..3492dab64d7e558dd1702c4a0d9629ce7159fce7 100644 (file)
@@ -376,8 +376,10 @@ main(int argc, char **argv)
        }
 
        if (dryrun)
-               pg_log_info("Executing in dry-run mode.\n"
-                                       "No files will be removed.");
+       {
+               pg_log_info("executing in dry-run mode");
+               pg_log_info_detail("No files will be removed.");
+       }
 
        /*
         * Check archive exists and other initialization if required.
index 4d705778454bc49ed08fc013749eed7c36e431de..0a9b11184f59563f508551ba9f2e436da856e2c8 100644 (file)
@@ -2514,8 +2514,10 @@ main(int argc, char **argv)
        }
 
        if (dry_run)
-               pg_log_info("Executing in dry-run mode.\n"
-                                       "The target directory will not be modified.");
+       {
+               pg_log_info("executing in dry-run mode");
+               pg_log_info_detail("The target directory will not be modified.");
+       }
 
        pg_log_info("validating publisher connection string");
        pub_base_conninfo = get_base_conninfo(opt.pub_conninfo_str,
index d13bf63eb1e5f2553f905bbbd76c58b3202d8eb4..767b8b9e499fc2e449229365759002b285433ba3 100644 (file)
@@ -243,8 +243,10 @@ main(int argc, char *argv[])
                opt.manifest_checksums = CHECKSUM_TYPE_NONE;
 
        if (opt.dry_run)
-               pg_log_info("Executing in dry-run mode.\n"
-                                       "The target directory will not be modified.");
+       {
+               pg_log_info("executing in dry-run mode");
+               pg_log_info_detail("The target directory will not be modified.");
+       }
 
        /* Check that the platform supports the requested copy method. */
        if (opt.copy_method == COPY_METHOD_CLONE)
index 9d745d4b25b461f44ad302d6e28ad44f43073be9..2e86fd158d01bf2f3b23dd7c3626ecb53afdd59d 100644 (file)
@@ -302,8 +302,10 @@ main(int argc, char **argv)
 
        /* Ok, we have all the options and we're ready to start. */
        if (dry_run)
-               pg_log_info("Executing in dry-run mode.\n"
-                                       "The target directory will not be modified.");
+       {
+               pg_log_info("executing in dry-run mode");
+               pg_log_info_detail("The target directory will not be modified.");
+       }
 
        /* First, connect to remote server. */
        if (connstr_source)
index ccc7f88a2917a13a1c7ab95b00720aa86fd50601..f8158ca6a78fab0adce8b3ddfb11a3da49503182 100644 (file)
@@ -308,8 +308,10 @@ main(int argc, char *argv[])
                                 "missing-stats-only", "analyze-only", "analyze-in-stages");
 
        if (vacopts.dry_run && !vacopts.quiet)
-               pg_log_info("Executing in dry-run mode.\n"
-                                       "No commands will be sent to the server.");
+       {
+               pg_log_info("executing in dry-run mode");
+               pg_log_info_detail("No commands will be sent to the server.");
+       }
 
        ret = vacuuming_main(&cparams, dbname, maintenance_db, &vacopts,
                                                 &objects, tbl_count,