diff options
author | Peter Eisentraut | 2024-05-17 09:23:08 +0000 |
---|---|---|
committer | Peter Eisentraut | 2024-05-17 09:44:26 +0000 |
commit | 17974ec259463869bb6bb4885d46847422fbc9ec (patch) | |
tree | 11cd393058415b42093277f2e15de7bf1e186579 /src/backend/replication | |
parent | be5942aee7a012ce7f30bc7a6617903127f29e89 (diff) |
Revise GUC names quoting in messages again
After further review, we want to move in the direction of always
quoting GUC names in error messages, rather than the previous (PG16)
wildly mixed practice or the intermittent (mid-PG17) idea of doing
this depending on how possibly confusing the GUC name is.
This commit applies appropriate quotes to (almost?) all mentions of
GUC names in error messages. It partially supersedes a243569bf65 and
8d9978a7176, which had moved things a bit in the opposite direction
but which then were abandoned in a partial state.
Author: Peter Smith <smithpb2250@gmail.com>
Discussion: https://www.postgresql.org/message-id/flat/CAHut%2BPv-kSN8SkxSdoHano_wPubqcg5789ejhCDZAcLFceBR-w%40mail.gmail.com
Diffstat (limited to 'src/backend/replication')
-rw-r--r-- | src/backend/replication/logical/decode.c | 2 | ||||
-rw-r--r-- | src/backend/replication/logical/launcher.c | 4 | ||||
-rw-r--r-- | src/backend/replication/logical/logical.c | 4 | ||||
-rw-r--r-- | src/backend/replication/logical/origin.c | 8 | ||||
-rw-r--r-- | src/backend/replication/slot.c | 20 | ||||
-rw-r--r-- | src/backend/replication/syncrep.c | 2 |
6 files changed, 20 insertions, 20 deletions
diff --git a/src/backend/replication/logical/decode.c b/src/backend/replication/logical/decode.c index 7a86f8481db..8ec5adfd909 100644 --- a/src/backend/replication/logical/decode.c +++ b/src/backend/replication/logical/decode.c @@ -174,7 +174,7 @@ xlog_decode(LogicalDecodingContext *ctx, XLogRecordBuffer *buf) Assert(RecoveryInProgress()); ereport(ERROR, (errcode(ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE), - errmsg("logical decoding on standby requires wal_level >= logical on the primary"))); + errmsg("logical decoding on standby requires \"wal_level\" >= \"logical\" on the primary"))); } break; } diff --git a/src/backend/replication/logical/launcher.c b/src/backend/replication/logical/launcher.c index 66070e9131c..27c3a91fb75 100644 --- a/src/backend/replication/logical/launcher.c +++ b/src/backend/replication/logical/launcher.c @@ -425,7 +425,7 @@ retry: ereport(WARNING, (errcode(ERRCODE_CONFIGURATION_LIMIT_EXCEEDED), errmsg("out of logical replication worker slots"), - errhint("You might need to increase %s.", "max_logical_replication_workers"))); + errhint("You might need to increase \"%s\".", "max_logical_replication_workers"))); return false; } @@ -511,7 +511,7 @@ retry: ereport(WARNING, (errcode(ERRCODE_CONFIGURATION_LIMIT_EXCEEDED), errmsg("out of background worker slots"), - errhint("You might need to increase %s.", "max_worker_processes"))); + errhint("You might need to increase \"%s\".", "max_worker_processes"))); return false; } diff --git a/src/backend/replication/logical/logical.c b/src/backend/replication/logical/logical.c index 97a4d99c4e7..99f31849bb1 100644 --- a/src/backend/replication/logical/logical.c +++ b/src/backend/replication/logical/logical.c @@ -118,7 +118,7 @@ CheckLogicalDecodingRequirements(void) if (wal_level < WAL_LEVEL_LOGICAL) ereport(ERROR, (errcode(ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE), - errmsg("logical decoding requires wal_level >= logical"))); + errmsg("logical decoding requires \"wal_level\" >= \"logical\""))); if (MyDatabaseId == InvalidOid) ereport(ERROR, @@ -138,7 +138,7 @@ CheckLogicalDecodingRequirements(void) if (GetActiveWalLevelOnStandby() < WAL_LEVEL_LOGICAL) ereport(ERROR, (errcode(ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE), - errmsg("logical decoding on standby requires wal_level >= logical on the primary"))); + errmsg("logical decoding on standby requires \"wal_level\" >= \"logical\" on the primary"))); } } diff --git a/src/backend/replication/logical/origin.c b/src/backend/replication/logical/origin.c index a529da983ae..419e4814f05 100644 --- a/src/backend/replication/logical/origin.c +++ b/src/backend/replication/logical/origin.c @@ -187,7 +187,7 @@ replorigin_check_prerequisites(bool check_slots, bool recoveryOK) if (check_slots && max_replication_slots == 0) ereport(ERROR, (errcode(ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE), - errmsg("cannot query or manipulate replication origin when max_replication_slots = 0"))); + errmsg("cannot query or manipulate replication origin when \"max_replication_slots\" is 0"))); if (!recoveryOK && RecoveryInProgress()) ereport(ERROR, @@ -795,7 +795,7 @@ StartupReplicationOrigin(void) if (last_state == max_replication_slots) ereport(PANIC, (errcode(ERRCODE_CONFIGURATION_LIMIT_EXCEEDED), - errmsg("could not find free replication state, increase max_replication_slots"))); + errmsg("could not find free replication state, increase \"max_replication_slots\""))); /* copy data to shared memory */ replication_states[last_state].roident = disk_state.roident; @@ -954,7 +954,7 @@ replorigin_advance(RepOriginId node, (errcode(ERRCODE_CONFIGURATION_LIMIT_EXCEEDED), errmsg("could not find free replication state slot for replication origin with ID %d", node), - errhint("Increase max_replication_slots and try again."))); + errhint("Increase \"max_replication_slots\" and try again."))); if (replication_state == NULL) { @@ -1155,7 +1155,7 @@ replorigin_session_setup(RepOriginId node, int acquired_by) (errcode(ERRCODE_CONFIGURATION_LIMIT_EXCEEDED), errmsg("could not find free replication state slot for replication origin with ID %d", node), - errhint("Increase max_replication_slots and try again."))); + errhint("Increase \"max_replication_slots\" and try again."))); else if (session_replication_state == NULL) { /* initialize new slot */ diff --git a/src/backend/replication/slot.c b/src/backend/replication/slot.c index aa4ea387da0..0e54ea5bb9a 100644 --- a/src/backend/replication/slot.c +++ b/src/backend/replication/slot.c @@ -378,7 +378,7 @@ ReplicationSlotCreate(const char *name, bool db_specific, ereport(ERROR, (errcode(ERRCODE_CONFIGURATION_LIMIT_EXCEEDED), errmsg("all replication slots are in use"), - errhint("Free one or increase max_replication_slots."))); + errhint("Free one or increase \"max_replication_slots\"."))); /* * Since this slot is not in use, nobody should be looking at any part of @@ -1369,12 +1369,12 @@ CheckSlotRequirements(void) if (max_replication_slots == 0) ereport(ERROR, (errcode(ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE), - errmsg("replication slots can only be used if max_replication_slots > 0"))); + errmsg("replication slots can only be used if \"max_replication_slots\" > 0"))); if (wal_level < WAL_LEVEL_REPLICA) ereport(ERROR, (errcode(ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE), - errmsg("replication slots can only be used if wal_level >= replica"))); + errmsg("replication slots can only be used if \"wal_level\" >= \"replica\""))); } /* @@ -1508,7 +1508,7 @@ ReportSlotInvalidation(ReplicationSlotInvalidationCause cause, break; case RS_INVAL_WAL_LEVEL: - appendStringInfoString(&err_detail, _("Logical decoding on standby requires wal_level >= logical on the primary server.")); + appendStringInfoString(&err_detail, _("Logical decoding on standby requires \"wal_level\" >= \"logical\" on the primary server.")); break; case RS_INVAL_NONE: pg_unreachable(); @@ -1521,7 +1521,7 @@ ReportSlotInvalidation(ReplicationSlotInvalidationCause cause, errmsg("invalidating obsolete replication slot \"%s\"", NameStr(slotname)), errdetail_internal("%s", err_detail.data), - hint ? errhint("You might need to increase %s.", "max_slot_wal_keep_size") : 0); + hint ? errhint("You might need to increase \"%s\".", "max_slot_wal_keep_size") : 0); pfree(err_detail.data); } @@ -2332,15 +2332,15 @@ RestoreSlotFromDisk(const char *name) if (cp.slotdata.database != InvalidOid && wal_level < WAL_LEVEL_LOGICAL) ereport(FATAL, (errcode(ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE), - errmsg("logical replication slot \"%s\" exists, but wal_level < logical", + errmsg("logical replication slot \"%s\" exists, but \"wal_level\" < \"logical\"", NameStr(cp.slotdata.name)), - errhint("Change wal_level to be logical or higher."))); + errhint("Change \"wal_level\" to be \"logical\" or higher."))); else if (wal_level < WAL_LEVEL_REPLICA) ereport(FATAL, (errcode(ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE), - errmsg("physical replication slot \"%s\" exists, but wal_level < replica", + errmsg("physical replication slot \"%s\" exists, but \"wal_level\" < \"replica\"", NameStr(cp.slotdata.name)), - errhint("Change wal_level to be replica or higher."))); + errhint("Change \"wal_level\" to be \"replica\" or higher."))); /* nothing can be active yet, don't lock anything */ for (i = 0; i < max_replication_slots; i++) @@ -2383,7 +2383,7 @@ RestoreSlotFromDisk(const char *name) if (!restored) ereport(FATAL, (errmsg("too many replication slots active before shutdown"), - errhint("Increase max_replication_slots and try again."))); + errhint("Increase \"max_replication_slots\" and try again."))); } /* diff --git a/src/backend/replication/syncrep.c b/src/backend/replication/syncrep.c index 77917b848a4..fa5988c824e 100644 --- a/src/backend/replication/syncrep.c +++ b/src/backend/replication/syncrep.c @@ -1010,7 +1010,7 @@ check_synchronous_standby_names(char **newval, void **extra, GucSource source) if (syncrep_parse_error_msg) GUC_check_errdetail("%s", syncrep_parse_error_msg); else - GUC_check_errdetail("synchronous_standby_names parser failed"); + GUC_check_errdetail("\"synchronous_standby_names\" parser failed"); return false; } |