Split dry-run messages into primary and detail

Fixup for commit c05dee1911.  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
This commit is contained in:
Peter Eisentraut 2026-07-01 10:12:33 +02:00
parent e8f851d617
commit e3b5817c8b
5 changed files with 20 additions and 10 deletions

View 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.

View 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,

View 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)

View 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)

View 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,