v7-0004-Add-quotes-for-GUCs-string.patch
application/octet-stream
Filename: v7-0004-Add-quotes-for-GUCs-string.patch
Type: application/octet-stream
Part: 3
Message:
Re: GUC names in messages
Patch
Format: format-patch
Series: patch v7-0004
Subject: Add quotes for GUCs - string
| File | + | − |
|---|---|---|
| src/backend/archive/shell_archive.c | 1 | 1 |
| src/backend/replication/logical/slotsync.c | 6 | 6 |
| 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 cfb6a909dcfa12a2f3e387dea03cbef2c21d2b8b Mon Sep 17 00:00:00 2001
From: Peter Smith <peter.b.smith@fujitsu.com>
Date: Tue, 28 May 2024 12:30:30 +1000
Subject: [PATCH v7] Add quotes for GUCs - string
---
src/backend/archive/shell_archive.c | 2 +-
src/backend/replication/logical/slotsync.c | 12 ++++++------
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, 11 insertions(+), 11 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 2c60a84..aaacc1d 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);
@@ -992,9 +992,9 @@ validate_remote_info(WalReceiverConn *wrconn)
if (!primary_slot_valid)
ereport(ERROR,
errcode(ERRCODE_INVALID_PARAMETER_VALUE),
- errmsg("slot synchronization requires valid primary_slot_name"),
+ errmsg("slot synchronization requires valid \"primary_slot_name\""),
/* translator: second %s is a GUC variable name */
- errdetail("The replication slot \"%s\" specified by %s does not exist on the primary server.",
+ errdetail("The replication slot \"%s\" specified by \"%s\" does not exist on the primary server.",
PrimarySlotName, "primary_slot_name"));
ExecClearTuple(tupslot);
@@ -1060,7 +1060,7 @@ ValidateSlotSyncParams(int elevel)
ereport(elevel,
/* translator: %s is a GUC variable name */
errcode(ERRCODE_INVALID_PARAMETER_VALUE),
- errmsg("slot synchronization requires %s to be defined", "primary_slot_name"));
+ errmsg("slot synchronization requires \"%s\" to be defined", "primary_slot_name"));
return false;
}
diff --git a/src/bin/pg_archivecleanup/pg_archivecleanup.c b/src/bin/pg_archivecleanup/pg_archivecleanup.c
index 07bf356..3acbe69 100644
--- a/src/bin/pg_archivecleanup/pg_archivecleanup.c
+++ b/src/bin/pg_archivecleanup/pg_archivecleanup.c
@@ -269,7 +269,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 4e2c9ff..acfb419 100644
--- a/src/bin/pg_basebackup/pg_createsubscriber.c
+++ b/src/bin/pg_basebackup/pg_createsubscriber.c
@@ -510,7 +510,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 8dfea05..287245c 100644
--- a/src/bin/pg_rewind/pg_rewind.c
+++ b/src/bin/pg_rewind/pg_rewind.c
@@ -1106,7 +1106,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("unable to read \"restore_command\" from target cluster");
(void) pg_strip_crlf(restore_command);
--
1.8.3.1