v10-0003-Add-quotes-for-GUCs-string.patch
application/octet-stream
Filename: v10-0003-Add-quotes-for-GUCs-string.patch
Type: application/octet-stream
Part: 2
Message:
Re: GUC names in messages
Patch
Format: format-patch
Series: patch v10-0003
Subject: Add quotes for GUCs - string
| File | + | − |
|---|---|---|
| src/backend/archive/shell_archive.c | 1 | 1 |
| src/backend/replication/logical/slotsync.c | 3 | 3 |
| src/bin/pg_archivecleanup/pg_archivecleanup.c | 1 | 1 |
| src/bin/pg_basebackup/pg_createsubscriber.c | 1 | 1 |
| src/bin/pg_dump/pg_backup_db.c | 1 | 1 |
| src/bin/pg_rewind/pg_rewind.c | 1 | 1 |
From 29f48fba0e27a63a5645c7be2d44db40fd8ab90f Mon Sep 17 00:00:00 2001
From: Peter Smith <peter.b.smith@fujitsu.com>
Date: Tue, 3 Sep 2024 09:46:24 +1000
Subject: [PATCH v10] Add quotes for GUCs - string
---
src/backend/archive/shell_archive.c | 2 +-
src/backend/replication/logical/slotsync.c | 6 +++---
src/bin/pg_archivecleanup/pg_archivecleanup.c | 2 +-
src/bin/pg_basebackup/pg_createsubscriber.c | 2 +-
src/bin/pg_dump/pg_backup_db.c | 2 +-
src/bin/pg_rewind/pg_rewind.c | 2 +-
6 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/src/backend/archive/shell_archive.c b/src/backend/archive/shell_archive.c
index 506c5a3..4de7e66 100644
--- a/src/backend/archive/shell_archive.c
+++ b/src/backend/archive/shell_archive.c
@@ -48,7 +48,7 @@ shell_archive_configured(ArchiveModuleState *state)
if (XLogArchiveCommand[0] != '\0')
return true;
- arch_module_check_errdetail("%s is not set.",
+ arch_module_check_errdetail("\"%s\" is not set.",
"archive_command");
return false;
}
diff --git a/src/backend/replication/logical/slotsync.c b/src/backend/replication/logical/slotsync.c
index 5107229..20d9653 100644
--- a/src/backend/replication/logical/slotsync.c
+++ b/src/backend/replication/logical/slotsync.c
@@ -962,14 +962,14 @@ validate_remote_info(WalReceiverConn *wrconn)
if (res->status != WALRCV_OK_TUPLES)
ereport(ERROR,
- errmsg("could not fetch primary_slot_name \"%s\" info from the primary server: %s",
+ errmsg("could not fetch primary slot name \"%s\" info from the primary server: %s",
PrimarySlotName, res->err),
- errhint("Check if primary_slot_name is configured correctly."));
+ errhint("Check if \"primary_slot_name\" is configured correctly."));
tupslot = MakeSingleTupleTableSlot(res->tupledesc, &TTSOpsMinimalTuple);
if (!tuplestore_gettupleslot(res->tuplestore, true, false, tupslot))
elog(ERROR,
- "failed to fetch tuple for the primary server slot specified by primary_slot_name");
+ "failed to fetch tuple for the primary server slot specified by \"primary_slot_name\"");
remote_in_recovery = DatumGetBool(slot_getattr(tupslot, 1, &isnull));
Assert(!isnull);
diff --git a/src/bin/pg_archivecleanup/pg_archivecleanup.c b/src/bin/pg_archivecleanup/pg_archivecleanup.c
index 5a12438..c25348b 100644
--- a/src/bin/pg_archivecleanup/pg_archivecleanup.c
+++ b/src/bin/pg_archivecleanup/pg_archivecleanup.c
@@ -270,7 +270,7 @@ usage(void)
" clean up\n"));
printf(_(" -?, --help show this help, then exit\n"));
printf(_("\n"
- "For use as archive_cleanup_command in postgresql.conf:\n"
+ "For use as \"archive_cleanup_command\" in postgresql.conf:\n"
" archive_cleanup_command = 'pg_archivecleanup [OPTION]... ARCHIVELOCATION %%r'\n"
"e.g.\n"
" archive_cleanup_command = 'pg_archivecleanup /mnt/server/archiverdir %%r'\n"));
diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c
index 6b79393..764a2d6 100644
--- a/src/bin/pg_basebackup/pg_createsubscriber.c
+++ b/src/bin/pg_basebackup/pg_createsubscriber.c
@@ -523,7 +523,7 @@ connect_database(const char *conninfo, bool exit_on_error)
res = PQexec(conn, ALWAYS_SECURE_SEARCH_PATH_SQL);
if (PQresultStatus(res) != PGRES_TUPLES_OK)
{
- pg_log_error("could not clear search_path: %s",
+ pg_log_error("could not clear \"search_path\": %s",
PQresultErrorMessage(res));
PQclear(res);
PQfinish(conn);
diff --git a/src/bin/pg_dump/pg_backup_db.c b/src/bin/pg_dump/pg_backup_db.c
index a02841c..4d1957a 100644
--- a/src/bin/pg_dump/pg_backup_db.c
+++ b/src/bin/pg_dump/pg_backup_db.c
@@ -39,7 +39,7 @@ _check_database_version(ArchiveHandle *AH)
remoteversion_str = PQparameterStatus(AH->connection, "server_version");
remoteversion = PQserverVersion(AH->connection);
if (remoteversion == 0 || !remoteversion_str)
- pg_fatal("could not get server_version from libpq");
+ pg_fatal("could not get \"server_version\" from libpq");
AH->public.remoteVersionStr = pg_strdup(remoteversion_str);
AH->public.remoteVersion = remoteversion;
diff --git a/src/bin/pg_rewind/pg_rewind.c b/src/bin/pg_rewind/pg_rewind.c
index 1027d23..960916a 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("could not read restore_command from target cluster");
+ pg_fatal("could not read \"restore_command\" from target cluster");
(void) pg_strip_crlf(restore_command);
--
1.8.3.1