mirror of
https://github.com/postgres/postgres.git
synced 2025-11-01 21:31:19 +03:00
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 supersedesa243569bf6and8d9978a717, 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
This commit is contained in:
@@ -709,7 +709,7 @@ check_temp_buffers(int *newval, void **extra, GucSource source)
|
||||
*/
|
||||
if (source != PGC_S_TEST && NLocBuffer && NLocBuffer != *newval)
|
||||
{
|
||||
GUC_check_errdetail("temp_buffers cannot be changed after any temporary tables have been accessed in the session.");
|
||||
GUC_check_errdetail("\"temp_buffers\" cannot be changed after any temporary tables have been accessed in the session.");
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
|
||||
@@ -3947,7 +3947,7 @@ check_debug_io_direct(char **newval, void **extra, GucSource source)
|
||||
#if PG_O_DIRECT == 0
|
||||
if (strcmp(*newval, "") != 0)
|
||||
{
|
||||
GUC_check_errdetail("debug_io_direct is not supported on this platform.");
|
||||
GUC_check_errdetail("\"debug_io_direct\" is not supported on this platform.");
|
||||
result = false;
|
||||
}
|
||||
flags = 0;
|
||||
@@ -3961,7 +3961,7 @@ check_debug_io_direct(char **newval, void **extra, GucSource source)
|
||||
|
||||
if (!SplitGUCList(rawstring, ',', &elemlist))
|
||||
{
|
||||
GUC_check_errdetail("Invalid list syntax in parameter %s",
|
||||
GUC_check_errdetail("Invalid list syntax in parameter \"%s\"",
|
||||
"debug_io_direct");
|
||||
pfree(rawstring);
|
||||
list_free(elemlist);
|
||||
@@ -3994,14 +3994,14 @@ check_debug_io_direct(char **newval, void **extra, GucSource source)
|
||||
#if XLOG_BLCKSZ < PG_IO_ALIGN_SIZE
|
||||
if (result && (flags & (IO_DIRECT_WAL | IO_DIRECT_WAL_INIT)))
|
||||
{
|
||||
GUC_check_errdetail("debug_io_direct is not supported for WAL because XLOG_BLCKSZ is too small");
|
||||
GUC_check_errdetail("\"debug_io_direct\" is not supported for WAL because XLOG_BLCKSZ is too small");
|
||||
result = false;
|
||||
}
|
||||
#endif
|
||||
#if BLCKSZ < PG_IO_ALIGN_SIZE
|
||||
if (result && (flags & IO_DIRECT_DATA))
|
||||
{
|
||||
GUC_check_errdetail("debug_io_direct is not supported for data because BLCKSZ is too small");
|
||||
GUC_check_errdetail("\"debug_io_direct\" is not supported for data because BLCKSZ is too small");
|
||||
result = false;
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -960,7 +960,7 @@ LockAcquireExtended(const LOCKTAG *locktag,
|
||||
ereport(ERROR,
|
||||
(errcode(ERRCODE_OUT_OF_MEMORY),
|
||||
errmsg("out of shared memory"),
|
||||
errhint("You might need to increase %s.", "max_locks_per_transaction")));
|
||||
errhint("You might need to increase \"%s\".", "max_locks_per_transaction")));
|
||||
else
|
||||
return LOCKACQUIRE_NOT_AVAIL;
|
||||
}
|
||||
@@ -998,7 +998,7 @@ LockAcquireExtended(const LOCKTAG *locktag,
|
||||
ereport(ERROR,
|
||||
(errcode(ERRCODE_OUT_OF_MEMORY),
|
||||
errmsg("out of shared memory"),
|
||||
errhint("You might need to increase %s.", "max_locks_per_transaction")));
|
||||
errhint("You might need to increase \"%s\".", "max_locks_per_transaction")));
|
||||
else
|
||||
return LOCKACQUIRE_NOT_AVAIL;
|
||||
}
|
||||
@@ -2801,7 +2801,7 @@ FastPathGetRelationLockEntry(LOCALLOCK *locallock)
|
||||
ereport(ERROR,
|
||||
(errcode(ERRCODE_OUT_OF_MEMORY),
|
||||
errmsg("out of shared memory"),
|
||||
errhint("You might need to increase %s.", "max_locks_per_transaction")));
|
||||
errhint("You might need to increase \"%s\".", "max_locks_per_transaction")));
|
||||
}
|
||||
GrantLock(proclock->tag.myLock, proclock, lockmode);
|
||||
FAST_PATH_CLEAR_LOCKMODE(MyProc, f, lockmode);
|
||||
@@ -4186,7 +4186,7 @@ lock_twophase_recover(TransactionId xid, uint16 info,
|
||||
ereport(ERROR,
|
||||
(errcode(ERRCODE_OUT_OF_MEMORY),
|
||||
errmsg("out of shared memory"),
|
||||
errhint("You might need to increase %s.", "max_locks_per_transaction")));
|
||||
errhint("You might need to increase \"%s\".", "max_locks_per_transaction")));
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -4251,7 +4251,7 @@ lock_twophase_recover(TransactionId xid, uint16 info,
|
||||
ereport(ERROR,
|
||||
(errcode(ERRCODE_OUT_OF_MEMORY),
|
||||
errmsg("out of shared memory"),
|
||||
errhint("You might need to increase %s.", "max_locks_per_transaction")));
|
||||
errhint("You might need to increase \"%s\".", "max_locks_per_transaction")));
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -4601,7 +4601,7 @@ VirtualXactLock(VirtualTransactionId vxid, bool wait)
|
||||
ereport(ERROR,
|
||||
(errcode(ERRCODE_OUT_OF_MEMORY),
|
||||
errmsg("out of shared memory"),
|
||||
errhint("You might need to increase %s.", "max_locks_per_transaction")));
|
||||
errhint("You might need to increase \"%s\".", "max_locks_per_transaction")));
|
||||
}
|
||||
GrantLock(proclock->tag.myLock, proclock, ExclusiveLock);
|
||||
|
||||
|
||||
@@ -651,7 +651,7 @@ SetRWConflict(SERIALIZABLEXACT *reader, SERIALIZABLEXACT *writer)
|
||||
ereport(ERROR,
|
||||
(errcode(ERRCODE_OUT_OF_MEMORY),
|
||||
errmsg("not enough elements in RWConflictPool to record a read/write conflict"),
|
||||
errhint("You might need to run fewer transactions at a time or increase max_connections.")));
|
||||
errhint("You might need to run fewer transactions at a time or increase \"max_connections\".")));
|
||||
|
||||
conflict = dlist_head_element(RWConflictData, outLink, &RWConflictPool->availableList);
|
||||
dlist_delete(&conflict->outLink);
|
||||
@@ -676,7 +676,7 @@ SetPossibleUnsafeConflict(SERIALIZABLEXACT *roXact,
|
||||
ereport(ERROR,
|
||||
(errcode(ERRCODE_OUT_OF_MEMORY),
|
||||
errmsg("not enough elements in RWConflictPool to record a potential read/write conflict"),
|
||||
errhint("You might need to run fewer transactions at a time or increase max_connections.")));
|
||||
errhint("You might need to run fewer transactions at a time or increase \"max_connections\".")));
|
||||
|
||||
conflict = dlist_head_element(RWConflictData, outLink, &RWConflictPool->availableList);
|
||||
dlist_delete(&conflict->outLink);
|
||||
@@ -1678,7 +1678,7 @@ GetSerializableTransactionSnapshot(Snapshot snapshot)
|
||||
ereport(ERROR,
|
||||
(errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
|
||||
errmsg("cannot use serializable mode in a hot standby"),
|
||||
errdetail("default_transaction_isolation is set to \"serializable\"."),
|
||||
errdetail("\"default_transaction_isolation\" is set to \"serializable\"."),
|
||||
errhint("You can use \"SET default_transaction_isolation = 'repeatable read'\" to change the default.")));
|
||||
|
||||
/*
|
||||
@@ -2461,7 +2461,7 @@ CreatePredicateLock(const PREDICATELOCKTARGETTAG *targettag,
|
||||
ereport(ERROR,
|
||||
(errcode(ERRCODE_OUT_OF_MEMORY),
|
||||
errmsg("out of shared memory"),
|
||||
errhint("You might need to increase %s.", "max_pred_locks_per_transaction")));
|
||||
errhint("You might need to increase \"%s\".", "max_pred_locks_per_transaction")));
|
||||
if (!found)
|
||||
dlist_init(&target->predicateLocks);
|
||||
|
||||
@@ -2476,7 +2476,7 @@ CreatePredicateLock(const PREDICATELOCKTARGETTAG *targettag,
|
||||
ereport(ERROR,
|
||||
(errcode(ERRCODE_OUT_OF_MEMORY),
|
||||
errmsg("out of shared memory"),
|
||||
errhint("You might need to increase %s.", "max_pred_locks_per_transaction")));
|
||||
errhint("You might need to increase \"%s\".", "max_pred_locks_per_transaction")));
|
||||
|
||||
if (!found)
|
||||
{
|
||||
@@ -3873,7 +3873,7 @@ ReleaseOneSerializableXact(SERIALIZABLEXACT *sxact, bool partial,
|
||||
ereport(ERROR,
|
||||
(errcode(ERRCODE_OUT_OF_MEMORY),
|
||||
errmsg("out of shared memory"),
|
||||
errhint("You might need to increase %s.", "max_pred_locks_per_transaction")));
|
||||
errhint("You might need to increase \"%s\".", "max_pred_locks_per_transaction")));
|
||||
if (found)
|
||||
{
|
||||
Assert(predlock->commitSeqNo != 0);
|
||||
|
||||
@@ -345,7 +345,7 @@ InitProcess(void)
|
||||
if (AmWalSenderProcess())
|
||||
ereport(FATAL,
|
||||
(errcode(ERRCODE_TOO_MANY_CONNECTIONS),
|
||||
errmsg("number of requested standby connections exceeds max_wal_senders (currently %d)",
|
||||
errmsg("number of requested standby connections exceeds \"max_wal_senders\" (currently %d)",
|
||||
max_wal_senders)));
|
||||
ereport(FATAL,
|
||||
(errcode(ERRCODE_TOO_MANY_CONNECTIONS),
|
||||
|
||||
Reference in New Issue
Block a user