From 2e6a8047f0c94b4ac1c3e80faecd628ae552a6c3 Mon Sep 17 00:00:00 2001 From: Peter Eisentraut Date: Tue, 27 Aug 2024 16:54:10 +0200 Subject: [PATCH] Message style improvements --- src/bin/pg_amcheck/pg_amcheck.c | 4 ++-- src/bin/pg_amcheck/t/003_check.pl | 2 +- src/bin/pg_combinebackup/pg_combinebackup.c | 10 +++++----- src/bin/pg_combinebackup/reconstruct.c | 2 +- src/bin/pg_dump/pg_dumpall.c | 2 +- src/bin/pg_rewind/pg_rewind.c | 2 +- 6 files changed, 11 insertions(+), 11 deletions(-) diff --git a/src/bin/pg_amcheck/pg_amcheck.c b/src/bin/pg_amcheck/pg_amcheck.c index a1ad41e766..0c05cf58bc 100644 --- a/src/bin/pg_amcheck/pg_amcheck.c +++ b/src/bin/pg_amcheck/pg_amcheck.c @@ -621,8 +621,8 @@ main(int argc, char *argv[]) */ if ((vmaj == 1 && vmin < 4) || vmaj == 0) { - pg_log_warning("--checkunique option is not supported by amcheck " - "version \"%s\"", amcheck_version); + pg_log_warning("option %s is not supported by amcheck version %s", + "--checkunique", amcheck_version); dat->is_checkunique = false; } else diff --git a/src/bin/pg_amcheck/t/003_check.pl b/src/bin/pg_amcheck/t/003_check.pl index 4b16bda6a4..d99b094dba 100644 --- a/src/bin/pg_amcheck/t/003_check.pl +++ b/src/bin/pg_amcheck/t/003_check.pl @@ -564,7 +564,7 @@ $node->command_checks_all( 0, [$no_output_re], [ - qr/pg_amcheck: warning: --checkunique option is not supported by amcheck version "1.3"/ + qr/pg_amcheck: warning: option --checkunique is not supported by amcheck version 1.3/ ], 'pg_amcheck smoke test --checkunique'); done_testing(); diff --git a/src/bin/pg_combinebackup/pg_combinebackup.c b/src/bin/pg_combinebackup/pg_combinebackup.c index 9ded5a2140..5e2f4f4b3d 100644 --- a/src/bin/pg_combinebackup/pg_combinebackup.c +++ b/src/bin/pg_combinebackup/pg_combinebackup.c @@ -337,7 +337,7 @@ main(int argc, char *argv[]) * won't have the WAL ranges for the resulting manifest. */ if (manifests[n_prior_backups] == NULL) - pg_fatal("can't generate a manifest because no manifest is available for the final input backup"); + pg_fatal("cannot generate a manifest because no manifest is available for the final input backup"); } else mwriter = NULL; @@ -655,7 +655,7 @@ check_control_files(int n_backups, char **backup_dirs) if (data_checksum_mismatch) { pg_log_warning("only some backups have checksums enabled"); - pg_log_warning_hint("disable, and optionally reenable, checksums on the output directory to avoid failures"); + pg_log_warning_hint("Disable, and optionally reenable, checksums on the output directory to avoid failures."); } return system_identifier; @@ -766,9 +766,9 @@ help(const char *progname) printf(_(" -o, --output=DIRECTORY output directory\n")); printf(_(" -T, --tablespace-mapping=OLDDIR=NEWDIR\n" " relocate tablespace in OLDDIR to NEWDIR\n")); - printf(_(" --clone clone (reflink) instead of copying files\n")); + printf(_(" --clone clone (reflink) files instead of copying\n")); printf(_(" --copy copy files (default)\n")); - printf(_(" --copy-file-range copy using copy_file_range() syscall\n")); + printf(_(" --copy-file-range copy using copy_file_range() system call\n")); printf(_(" --manifest-checksums=SHA{224,256,384,512}|CRC32C|NONE\n" " use algorithm for manifest checksums\n")); printf(_(" --no-manifest suppress generation of backup manifest\n")); @@ -1070,7 +1070,7 @@ process_directory_recursively(Oid tsoid, */ bmpath = psprintf("%s/%s", input_directory, "backup_manifest"); - pg_log_warning("\"%s\" contains no entry for \"%s\"", + pg_log_warning("manifest file \"%s\" contains no entry for file \"%s\"", bmpath, manifest_path); pfree(bmpath); } diff --git a/src/bin/pg_combinebackup/reconstruct.c b/src/bin/pg_combinebackup/reconstruct.c index a08ca22145..db3f968d27 100644 --- a/src/bin/pg_combinebackup/reconstruct.c +++ b/src/bin/pg_combinebackup/reconstruct.c @@ -449,7 +449,7 @@ make_incremental_rfile(char *filename) /* Read and validate magic number. */ read_bytes(rf, &magic, sizeof(magic)); if (magic != INCREMENTAL_MAGIC) - pg_fatal("file \"%s\" has bad incremental magic number (0x%x not 0x%x)", + pg_fatal("file \"%s\" has bad incremental magic number (0x%x, expected 0x%x)", filename, magic, INCREMENTAL_MAGIC); /* Read block count. */ diff --git a/src/bin/pg_dump/pg_dumpall.c b/src/bin/pg_dump/pg_dumpall.c index 882dbf8e86..e3ad8fb295 100644 --- a/src/bin/pg_dump/pg_dumpall.c +++ b/src/bin/pg_dump/pg_dumpall.c @@ -658,7 +658,7 @@ help(void) printf(_(" --disable-triggers disable triggers during data-only restore\n")); printf(_(" --exclude-database=PATTERN exclude databases whose name matches PATTERN\n")); printf(_(" --extra-float-digits=NUM override default setting for extra_float_digits\n")); - printf(_(" --filter=FILENAME exclude databases specified in FILENAME\n")); + printf(_(" --filter=FILENAME exclude databases based on expressions in FILENAME\n")); printf(_(" --if-exists use IF EXISTS when dropping objects\n")); printf(_(" --inserts dump data as INSERT commands, rather than COPY\n")); printf(_(" --load-via-partition-root load partitions via the root table\n")); diff --git a/src/bin/pg_rewind/pg_rewind.c b/src/bin/pg_rewind/pg_rewind.c index 323c35646c..1027d235dc 100644 --- a/src/bin/pg_rewind/pg_rewind.c +++ b/src/bin/pg_rewind/pg_rewind.c @@ -1104,7 +1104,7 @@ getRestoreCommand(const char *argv0) restore_command = pipe_read_line(postgres_cmd->data); if (restore_command == NULL) - pg_fatal("unable to read restore_command from target cluster"); + pg_fatal("could not read restore_command from target cluster"); (void) pg_strip_crlf(restore_command);