8000 Apply quotes more consistently to GUC names in logs · postgrespro/postgres@8d9978a · GitHub
[go: up one dir, main page]

Skip to content

Commit 8d9978a

Browse files
committed
Apply quotes more consistently to GUC names in logs
Quotes are applied to GUCs in a very inconsistent way across the code base, with a mix of double quotes or no quotes used. This commit removes double quotes around all the GUC names that are obviously referred to as parameters with non-English words (use of underscore, mixed case, etc). This is the result of a discussion with Álvaro Herrera, Nathan Bossart, Laurenz Albe, Peter Eisentraut, Tom Lane and Daniel Gustafsson. Author: Peter Smith Discussion: https://postgr.es/m/CAHut+Pv-kSN8SkxSdoHano_wPubqcg5789ejhCDZAcLFceBR-w@mail.gmail.com
1 parent 334f512 commit 8d9978a

File tree

22 files changed

+41
-41
lines changed

22 files changed

+41
-41
lines changed

contrib/pg_prewarm/autoprewarm.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -877,7 +877,7 @@ apw_start_database_worker(void)
877877
ereport(ERROR,
878878
(errcode(ERRCODE_INSUFFICIENT_RESOURCES),
879879
errmsg("registering dynamic bgworker autoprewarm failed"),
880-
errhint("Consider increasing configuration parameter \"max_worker_processes\".")));
880+
errhint("Consider increasing configuration parameter max_worker_processes.")));
881881

882882
/*
883883
* Ignore return value; if it fails, postmaster has died, but we have

src/backend/access/heap/vacuumlazy.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2658,7 +2658,7 @@ lazy_check_wraparound_failsafe(LVRelState *vacrel)
26582658
vacrel->dbname, vacrel->relnamespace, vacrel->relname,
26592659
vacrel->num_index_scans),
26602660
errdetail("The table's relfrozenxid or relminmxid is too far in the past."),
2661-
errhint("Consider increasing configuration parameter \"maintenance_work_mem\" or \"autovacuum_work_mem\".\n"
2661+
errhint("Consider increasing configuration parameter maintenance_work_mem or autovacuum_work_mem.\n"
26622662
"You might also need to consider other ways for VACUUM to keep up with the allocation of transaction IDs.")));
26632663

26642664
/* Stop applying cost limits from this point on */

src/backend/access/transam/commit_ts.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -385,9 +385,9 @@ error_commit_ts_disabled(void)
385385
(errcode(ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE),
386386
errmsg("could not get commit timestamp data"),
387387
RecoveryInProgress() ?
388-
errhint("Make sure the configuration parameter \"%s\" is set on the primary server.",
388+
errhint("Make sure the configuration parameter %s is set on the primary server.",
389389
"track_commit_timestamp") :
390-
errhint("Make sure the configuration parameter \"%s\" is set.",
390+
errhint("Make sure the configuration parameter %s is set.",
391391
"track_commit_timestamp")));
392392
}
393393

src/backend/access/transam/xlog.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4258,11 +4258,11 @@ ReadControlFile(void)
42584258
/* check and update variables dependent on wal_segment_size */
42594259
if (ConvertToXSegs(min_wal_size_mb, wal_segment_size) < 2)
42604260
ereport(ERROR, (errcode(ERRCODE_INVALID_PARAMETER_VALUE),
4261-
errmsg("\"min_wal_size\" must be at least twice \"wal_segment_size\"")));
4261+
errmsg("min_wal_size must be at least twice wal_segment_size")));
42624262

42634263
if (ConvertToXSegs(max_wal_size_mb, wal_segment_size) < 2)
42644264
ereport(ERROR, (errcode(ERRCODE_INVALID_PARAMETER_VALUE),
4265-
errmsg("\"max_wal_size\" must be at least twice \"wal_segment_size\"")));
4265+
errmsg("max_wal_size must be at least twice wal_segment_size")));
42664266

42674267
UsableBytesInSegment =
42684268
(wal_segment_size / XLOG_BLCKSZ * UsableBytesInPage) -

src/backend/commands/vacuum.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ check_vacuum_buffer_usage_limit(int *newval, void **extra,
134134
return true;
135135

136136
/* Value does not fall within any allowable range */
137-
GUC_check_errdetail("\"vacuum_buffer_usage_limit\" must be 0 or between %d kB and %d kB",
137+
GUC_check_errdetail("vacuum_buffer_usage_limit must be 0 or between %d kB and %d kB",
138138
MIN_BAS_VAC_RING_SIZE_KB, MAX_BAS_VAC_RING_SIZE_KB);
139139

140140
return false;

src/backend/commands/variable.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -717,7 +717,7 @@ check_client_encoding(char **newval, void **extra, GucSource source)
717717
else
718718
{
719719
/* Provide a useful complaint */
720-
GUC_check_errdetail("Cannot change \"client_encoding\" now.");
720+
GUC_check_errdetail("Cannot change client_encoding now.");
721721
}
722722
return false;
723723
}

src/backend/libpq/be-secure-openssl.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ be_tls_init(bool isServerStart)
195195
{
196196
ereport(isServerStart ? FATAL : LOG,
197197
/*- translator: first %s is a GUC option name, second %s is its value */
198-
(errmsg("\"%s\" setting \"%s\" not supported by this build",
198+
(errmsg("%s setting \"%s\" not supported by this build",
199199
"ssl_min_protocol_version",
200200
GetConfigOption("ssl_min_protocol_version",
201201
false, false))));
@@ -218,7 +218,7 @@ be_tls_init(bool isServerStart)
218218
{
219219
ereport(isServerStart ? FATAL : LOG,
220220
/*- translator: first %s is a GUC option name, second %s is its value */
221-
(errmsg("\"%s\" setting \"%s\" not supported by this build",
221+
(errmsg("%s setting \"%s\" not supported by this build",
222222
"ssl_max_protocol_version",
223223
GetConfigOption("ssl_max_protocol_version",
224224
false, false))));
@@ -245,7 +245,7 @@ be_tls_init(bool isServerStart)
245245
{
246246
ereport(isServerStart ? FATAL : LOG,
247247
(errmsg("could not set SSL protocol version range"),
248-
errdetail("\"%s\" cannot be higher than \"%s\"",
248+
errdetail("%s cannot be higher than %s",
249249
"ssl_min_protocol_version",
250250
"ssl_max_protocol_version")));
251251
goto error;

src/backend/postmaster/bgworker.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -944,7 +944,7 @@ RegisterBackgroundWorker(BackgroundWorker *worker)
944944
"Up to %d background workers can be registered with the current settings.",
945945
max_worker_processes,
946946
max_worker_processes),
947-
errhint("Consider increasing the configuration parameter \"max_worker_processes\".")));
947+
errhint("Consider increasing the configuration parameter max_worker_processes.")));
948948
return;
949949
}
950950

src/backend/postmaster/checkpointer.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -423,7 +423,7 @@ CheckpointerMain(void)
423423
"checkpoints are occurring too frequently (%d seconds apart)",
424424
elapsed_secs,
425425
elapsed_secs),
426-
errhint("Consider increasing the configuration parameter \"max_wal_size\".")));
426+
errhint("Consider increasing the configuration parameter max_wal_size.")));
427427

428428
/*
429429
* Initialize checkpointer-private variables used during

src/backend/postmaster/pgarch.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -807,7 +807,7 @@ HandlePgArchInterrupts(void)
807807
*/
808808
ereport(LOG,
809809
(errmsg("restarting archiver process because value of "
810-
"\"archive_library\" was changed")));
810+
"archive_library was changed")));
811811

812812
proc_exit(0);
813813
}

0 commit comments

Comments
 (0)
0