PostgreSQL Source Code git master
Loading...
Searching...
No Matches
guc_tables.c
Go to the documentation of this file.
1/*--------------------------------------------------------------------
2 *
3 * guc_tables.c
4 *
5 * Static tables for the Grand Unified Configuration scheme.
6 *
7 * Many of these tables are const. However, ConfigureNames[] is not, because
8 * the structs in it are actually the live per-variable state data that guc.c
9 * manipulates. While many of their fields are intended to be constant, some
10 * fields change at runtime.
11 *
12 *
13 * Copyright (c) 2000-2026, PostgreSQL Global Development Group
14 * Written by Peter Eisentraut <peter_e@gmx.net>.
15 *
16 * IDENTIFICATION
17 * src/backend/utils/misc/guc_tables.c
18 *
19 *--------------------------------------------------------------------
20 */
21#include "postgres.h"
22
23#ifdef HAVE_COPYFILE_H
24#include <copyfile.h>
25#endif
26#include <float.h>
27#include <limits.h>
28#ifdef HAVE_SYSLOG
29#include <syslog.h>
30#endif
31
32#include "access/commit_ts.h"
33#include "access/gin.h"
34#include "access/slru.h"
36#include "access/twophase.h"
39#include "access/xlogrecovery.h"
40#include "access/xlogutils.h"
42#include "catalog/namespace.h"
43#include "catalog/storage.h"
44#include "commands/async.h"
45#include "commands/extension.h"
47#include "commands/tablespace.h"
48#include "commands/trigger.h"
49#include "commands/user.h"
50#include "commands/vacuum.h"
51#include "common/file_utils.h"
52#include "common/scram-common.h"
53#include "jit/jit.h"
54#include "libpq/auth.h"
55#include "libpq/libpq.h"
56#include "libpq/oauth.h"
57#include "libpq/scram.h"
58#include "nodes/queryjumble.h"
59#include "optimizer/cost.h"
60#include "optimizer/geqo.h"
61#include "optimizer/optimizer.h"
62#include "optimizer/paths.h"
63#include "optimizer/planmain.h"
64#include "parser/parse_expr.h"
65#include "parser/parser.h"
66#include "pgstat.h"
69#include "postmaster/bgwriter.h"
71#include "postmaster/startup.h"
76#include "replication/slot.h"
78#include "replication/syncrep.h"
79#include "storage/aio.h"
80#include "storage/bufmgr.h"
81#include "storage/bufpage.h"
82#include "storage/copydir.h"
83#include "storage/fd.h"
84#include "storage/io_worker.h"
86#include "storage/pg_shmem.h"
87#include "storage/predicate.h"
88#include "storage/procnumber.h"
89#include "storage/standby.h"
91#include "tcop/tcopprot.h"
92#include "tsearch/ts_cache.h"
93#include "utils/builtins.h"
94#include "utils/bytea.h"
95#include "utils/float.h"
96#include "utils/guc_hooks.h"
97#include "utils/guc_tables.h"
98#include "utils/inval.h"
99#include "utils/memutils.h"
100#include "utils/pg_locale.h"
101#include "utils/plancache.h"
102#include "utils/ps_status.h"
103#include "utils/rls.h"
104#include "utils/xml.h"
105
106#ifdef TRACE_SYNCSCAN
107#include "access/syncscan.h"
108#endif
109
110/* This value is normally passed in from the Makefile */
111#ifndef PG_KRB_SRVTAB
112#define PG_KRB_SRVTAB ""
113#endif
114
115/*
116 * Options for enum values defined in this module.
117 *
118 * NOTE! Option values may not contain double quotes!
119 */
120
122 {"escape", BYTEA_OUTPUT_ESCAPE, false},
123 {"hex", BYTEA_OUTPUT_HEX, false},
124 {NULL, 0, false}
125};
126
128 "array length mismatch");
129
130/*
131 * We have different sets for client and server message level options because
132 * they sort slightly different (see "log" level), and because "fatal"/"panic"
133 * aren't sensible for client_min_messages.
134 */
136 {"debug5", DEBUG5, false},
137 {"debug4", DEBUG4, false},
138 {"debug3", DEBUG3, false},
139 {"debug2", DEBUG2, false},
140 {"debug1", DEBUG1, false},
141 {"debug", DEBUG2, true},
142 {"log", LOG, false},
143 {"info", INFO, true},
144 {"notice", NOTICE, false},
145 {"warning", WARNING, false},
146 {"error", ERROR, false},
147 {NULL, 0, false}
148};
149
151 {"debug5", DEBUG5, false},
152 {"debug4", DEBUG4, false},
153 {"debug3", DEBUG3, false},
154 {"debug2", DEBUG2, false},
155 {"debug1", DEBUG1, false},
156 {"debug", DEBUG2, true},
157 {"info", INFO, false},
158 {"notice", NOTICE, false},
159 {"warning", WARNING, false},
160 {"error", ERROR, false},
161 {"log", LOG, false},
162 {"fatal", FATAL, false},
163 {"panic", PANIC, false},
164 {NULL, 0, false}
165};
166
168 {"postgres", INTSTYLE_POSTGRES, false},
169 {"postgres_verbose", INTSTYLE_POSTGRES_VERBOSE, false},
170 {"sql_standard", INTSTYLE_SQL_STANDARD, false},
171 {"iso_8601", INTSTYLE_ISO_8601, false},
172 {NULL, 0, false}
173};
174
176 {"disabled", -1, false},
177 {"debug5", DEBUG5, false},
178 {"debug4", DEBUG4, false},
179 {"debug3", DEBUG3, false},
180 {"debug2", DEBUG2, false},
181 {"debug1", DEBUG1, false},
182 {"debug", DEBUG2, true},
183 {"log", LOG, false},
184 {"info", INFO, true},
185 {"notice", NOTICE, false},
186 {"warning", WARNING, false},
187 {"error", ERROR, false},
188 {NULL, 0, false}
189};
190
192 "array length mismatch");
193
195 {"terse", PGERROR_TERSE, false},
196 {"default", PGERROR_DEFAULT, false},
197 {"verbose", PGERROR_VERBOSE, false},
198 {NULL, 0, false}
199};
200
202 "array length mismatch");
203
205 {"none", LOGSTMT_NONE, false},
206 {"ddl", LOGSTMT_DDL, false},
207 {"mod", LOGSTMT_MOD, false},
208 {"all", LOGSTMT_ALL, false},
209 {NULL, 0, false}
210};
211
213 "array length mismatch");
214
216 {"serializable", XACT_SERIALIZABLE, false},
217 {"repeatable read", XACT_REPEATABLE_READ, false},
218 {"read committed", XACT_READ_COMMITTED, false},
219 {"read uncommitted", XACT_READ_UNCOMMITTED, false},
220 {NULL, 0}
221};
222
224 {"origin", SESSION_REPLICATION_ROLE_ORIGIN, false},
225 {"replica", SESSION_REPLICATION_ROLE_REPLICA, false},
226 {"local", SESSION_REPLICATION_ROLE_LOCAL, false},
227 {NULL, 0, false}
228};
229
231 "array length mismatch");
232
234#ifdef HAVE_SYSLOG
235 {"local0", LOG_LOCAL0, false},
236 {"local1", LOG_LOCAL1, false},
237 {"local2", LOG_LOCAL2, false},
238 {"local3", LOG_LOCAL3, false},
239 {"local4", LOG_LOCAL4, false},
240 {"local5", LOG_LOCAL5, false},
241 {"local6", LOG_LOCAL6, false},
242 {"local7", LOG_LOCAL7, false},
243#else
244 {"none", 0, false},
245#endif
246 {NULL, 0}
247};
248
250 {"none", TRACK_FUNC_OFF, false},
251 {"pl", TRACK_FUNC_PL, false},
252 {"all", TRACK_FUNC_ALL, false},
253 {NULL, 0, false}
254};
255
257 "array length mismatch");
258
260 {"none", PGSTAT_FETCH_CONSISTENCY_NONE, false},
261 {"cache", PGSTAT_FETCH_CONSISTENCY_CACHE, false},
262 {"snapshot", PGSTAT_FETCH_CONSISTENCY_SNAPSHOT, false},
263 {NULL, 0, false}
264};
265
267 "array length mismatch");
268
269static const struct config_enum_entry xmlbinary_options[] = {
270 {"base64", XMLBINARY_BASE64, false},
271 {"hex", XMLBINARY_HEX, false},
272 {NULL, 0, false}
273};
274
276 "array length mismatch");
277
278static const struct config_enum_entry xmloption_options[] = {
279 {"content", XMLOPTION_CONTENT, false},
280 {"document", XMLOPTION_DOCUMENT, false},
281 {NULL, 0, false}
282};
283
285 "array length mismatch");
286
287/*
288 * Although only "on", "off", and "safe_encoding" are documented, we
289 * accept all the likely variants of "on" and "off".
290 */
292 {"safe_encoding", BACKSLASH_QUOTE_SAFE_ENCODING, false},
293 {"on", BACKSLASH_QUOTE_ON, false},
294 {"off", BACKSLASH_QUOTE_OFF, false},
295 {"true", BACKSLASH_QUOTE_ON, true},
296 {"false", BACKSLASH_QUOTE_OFF, true},
297 {"yes", BACKSLASH_QUOTE_ON, true},
298 {"no", BACKSLASH_QUOTE_OFF, true},
299 {"1", BACKSLASH_QUOTE_ON, true},
300 {"0", BACKSLASH_QUOTE_OFF, true},
301 {NULL, 0, false}
302};
303
304/*
305 * Although only "on", "off", and "auto" are documented, we accept
306 * all the likely variants of "on" and "off".
307 */
309 {"auto", COMPUTE_QUERY_ID_AUTO, false},
310 {"regress", COMPUTE_QUERY_ID_REGRESS, false},
311 {"on", COMPUTE_QUERY_ID_ON, false},
312 {"off", COMPUTE_QUERY_ID_OFF, false},
313 {"true", COMPUTE_QUERY_ID_ON, true},
314 {"false", COMPUTE_QUERY_ID_OFF, true},
315 {"yes", COMPUTE_QUERY_ID_ON, true},
316 {"no", COMPUTE_QUERY_ID_OFF, true},
317 {"1", COMPUTE_QUERY_ID_ON, true},
318 {"0", COMPUTE_QUERY_ID_OFF, true},
319 {NULL, 0, false}
320};
321
322/*
323 * Although only "on", "off", and "partition" are documented, we
324 * accept all the likely variants of "on" and "off".
325 */
327 {"partition", CONSTRAINT_EXCLUSION_PARTITION, false},
328 {"on", CONSTRAINT_EXCLUSION_ON, false},
329 {"off", CONSTRAINT_EXCLUSION_OFF, false},
330 {"true", CONSTRAINT_EXCLUSION_ON, true},
331 {"false", CONSTRAINT_EXCLUSION_OFF, true},
332 {"yes", CONSTRAINT_EXCLUSION_ON, true},
333 {"no", CONSTRAINT_EXCLUSION_OFF, true},
334 {"1", CONSTRAINT_EXCLUSION_ON, true},
335 {"0", CONSTRAINT_EXCLUSION_OFF, true},
336 {NULL, 0, false}
337};
338
339/*
340 * Although only "on", "off", "remote_apply", "remote_write", and "local" are
341 * documented, we accept all the likely variants of "on" and "off".
342 */
344 {"local", SYNCHRONOUS_COMMIT_LOCAL_FLUSH, false},
345 {"remote_write", SYNCHRONOUS_COMMIT_REMOTE_WRITE, false},
346 {"remote_apply", SYNCHRONOUS_COMMIT_REMOTE_APPLY, false},
347 {"on", SYNCHRONOUS_COMMIT_ON, false},
348 {"off", SYNCHRONOUS_COMMIT_OFF, false},
349 {"true", SYNCHRONOUS_COMMIT_ON, true},
350 {"false", SYNCHRONOUS_COMMIT_OFF, true},
351 {"yes", SYNCHRONOUS_COMMIT_ON, true},
352 {"no", SYNCHRONOUS_COMMIT_OFF, true},
353 {"1", SYNCHRONOUS_COMMIT_ON, true},
354 {"0", SYNCHRONOUS_COMMIT_OFF, true},
355 {NULL, 0, false}
356};
357
358/*
359 * Although only "on", "off", "try" are documented, we accept all the likely
360 * variants of "on" and "off".
361 */
362static const struct config_enum_entry huge_pages_options[] = {
363 {"off", HUGE_PAGES_OFF, false},
364 {"on", HUGE_PAGES_ON, false},
365 {"try", HUGE_PAGES_TRY, false},
366 {"true", HUGE_PAGES_ON, true},
367 {"false", HUGE_PAGES_OFF, true},
368 {"yes", HUGE_PAGES_ON, true},
369 {"no", HUGE_PAGES_OFF, true},
370 {"1", HUGE_PAGES_ON, true},
371 {"0", HUGE_PAGES_OFF, true},
372 {NULL, 0, false}
373};
374
376 {"off", HUGE_PAGES_OFF, false},
377 {"on", HUGE_PAGES_ON, false},
378 {"unknown", HUGE_PAGES_UNKNOWN, false},
379 {NULL, 0, false}
380};
381
383 {"off", RECOVERY_PREFETCH_OFF, false},
384 {"on", RECOVERY_PREFETCH_ON, false},
385 {"try", RECOVERY_PREFETCH_TRY, false},
386 {"true", RECOVERY_PREFETCH_ON, true},
387 {"false", RECOVERY_PREFETCH_OFF, true},
388 {"yes", RECOVERY_PREFETCH_ON, true},
389 {"no", RECOVERY_PREFETCH_OFF, true},
390 {"1", RECOVERY_PREFETCH_ON, true},
391 {"0", RECOVERY_PREFETCH_OFF, true},
392 {NULL, 0, false}
393};
394
396 {"off", DEBUG_PARALLEL_OFF, false},
397 {"on", DEBUG_PARALLEL_ON, false},
398 {"regress", DEBUG_PARALLEL_REGRESS, false},
399 {"true", DEBUG_PARALLEL_ON, true},
400 {"false", DEBUG_PARALLEL_OFF, true},
401 {"yes", DEBUG_PARALLEL_ON, true},
402 {"no", DEBUG_PARALLEL_OFF, true},
403 {"1", DEBUG_PARALLEL_ON, true},
404 {"0", DEBUG_PARALLEL_OFF, true},
405 {NULL, 0, false}
406};
407
409 {"auto", PLAN_CACHE_MODE_AUTO, false},
410 {"force_generic_plan", PLAN_CACHE_MODE_FORCE_GENERIC_PLAN, false},
411 {"force_custom_plan", PLAN_CACHE_MODE_FORCE_CUSTOM_PLAN, false},
412 {NULL, 0, false}
413};
414
416 {"md5", PASSWORD_TYPE_MD5, false},
417 {"scram-sha-256", PASSWORD_TYPE_SCRAM_SHA_256, false},
418 {NULL, 0, false}
419};
420
422 {"", PG_TLS_ANY, false},
423 {"TLSv1", PG_TLS1_VERSION, false},
424 {"TLSv1.1", PG_TLS1_1_VERSION, false},
425 {"TLSv1.2", PG_TLS1_2_VERSION, false},
426 {"TLSv1.3", PG_TLS1_3_VERSION, false},
427 {NULL, 0, false}
428};
429
431 {"buffered", DEBUG_LOGICAL_REP_STREAMING_BUFFERED, false},
432 {"immediate", DEBUG_LOGICAL_REP_STREAMING_IMMEDIATE, false},
433 {NULL, 0, false}
434};
435
437 "array length mismatch");
438
440 {"fsync", DATA_DIR_SYNC_METHOD_FSYNC, false},
441#ifdef HAVE_SYNCFS
442 {"syncfs", DATA_DIR_SYNC_METHOD_SYNCFS, false},
443#endif
444 {NULL, 0, false}
445};
446
448#ifndef WIN32
449 {"sysv", SHMEM_TYPE_SYSV, false},
450#endif
451#ifndef EXEC_BACKEND
452 {"mmap", SHMEM_TYPE_MMAP, false},
453#endif
454#ifdef WIN32
455 {"windows", SHMEM_TYPE_WINDOWS, false},
456#endif
457 {NULL, 0, false}
458};
459
461 {"pglz", TOAST_PGLZ_COMPRESSION, false},
462#ifdef USE_LZ4
463 {"lz4", TOAST_LZ4_COMPRESSION, false},
464#endif
465 {NULL, 0, false}
466};
467
469 {"pglz", WAL_COMPRESSION_PGLZ, false},
470#ifdef USE_LZ4
471 {"lz4", WAL_COMPRESSION_LZ4, false},
472#endif
473#ifdef USE_ZSTD
474 {"zstd", WAL_COMPRESSION_ZSTD, false},
475#endif
476 {"on", WAL_COMPRESSION_PGLZ, false},
477 {"off", WAL_COMPRESSION_NONE, false},
478 {"true", WAL_COMPRESSION_PGLZ, true},
479 {"false", WAL_COMPRESSION_NONE, true},
480 {"yes", WAL_COMPRESSION_PGLZ, true},
481 {"no", WAL_COMPRESSION_NONE, true},
482 {"1", WAL_COMPRESSION_PGLZ, true},
483 {"0", WAL_COMPRESSION_NONE, true},
484 {NULL, 0, false}
485};
486
488 {"copy", FILE_COPY_METHOD_COPY, false},
489#if defined(HAVE_COPYFILE) && defined(COPYFILE_CLONE_FORCE) || defined(HAVE_COPY_FILE_RANGE)
490 {"clone", FILE_COPY_METHOD_CLONE, false},
491#endif
492 {NULL, 0, false}
493};
494
496#ifdef HAVE_POSIX_FALLOCATE
497 {"posix_fallocate", FILE_EXTEND_METHOD_POSIX_FALLOCATE, false},
498#endif
499 {"write_zeros", FILE_EXTEND_METHOD_WRITE_ZEROS, false},
500 {NULL, 0, false}
501};
502
503/*
504 * Options for enum values stored in other modules
505 */
506extern const struct config_enum_entry wal_level_options[];
507extern const struct config_enum_entry archive_mode_options[];
509extern const struct config_enum_entry wal_sync_method_options[];
511
512/*
513 * GUC option variables that are exported from this module
514 */
516bool log_duration = false;
517bool Debug_print_plan = false;
518bool Debug_print_parse = false;
522
523#ifdef DEBUG_NODE_TESTS_ENABLED
527#endif
528
529bool log_parser_stats = false;
530bool log_planner_stats = false;
532bool log_statement_stats = false; /* this is sort of all three above
533 * together */
536
539
540/*
541 * These GUCs exist solely for backward compatibility.
542 */
543static bool default_with_oids = false;
545
547
559
561
563
564char *cluster_name = "";
569
571
576
577/*
578 * SSL renegotiation was been removed in PostgreSQL 9.5, but we tolerate it
579 * being set to zero (meaning never renegotiate) for backward compatibility.
580 * This avoids breaking compatibility with clients that have never supported
581 * renegotiation and therefore always try to zero it.
582 */
584
585/*
586 * This really belongs in pg_shmem.c, but is defined here so that it doesn't
587 * need to be duplicated in all the different implementations of pg_shmem.c.
588 */
592
593/*
594 * These variables are all dummies that don't do anything, except in some
595 * cases provide the value for SHOW to display. The real state is elsewhere
596 * and is kept in sync by assign_hooks.
597 */
598static char *syslog_ident_str;
599static double phony_random_seed;
601static char *datestyle_string;
607
608#ifdef HAVE_SYSLOG
609#define DEFAULT_SYSLOG_FACILITY LOG_LOCAL0
610#else
611#define DEFAULT_SYSLOG_FACILITY 0
612#endif
614
615static char *timezone_string;
618static char *data_directory;
621static int max_index_keys;
623static int block_size;
624static int segment_size;
627static int wal_block_size;
630static bool data_checksums;
632
633#ifdef USE_ASSERT_CHECKING
634#define DEFAULT_ASSERT_ENABLED true
635#else
636#define DEFAULT_ASSERT_ENABLED false
637#endif
639
640#ifdef EXEC_BACKEND
641#define EXEC_BACKEND_ENABLED true
642#else
643#define EXEC_BACKEND_ENABLED false
644#endif
646
652
653/* should be static, but commands/variable.c needs to get at this */
655
656/* should be static, but guc.c needs to get at this */
658
659
660/*
661 * Displayable names for context types (enum GucContext)
662 *
663 * Note: these strings are deliberately not localized.
664 */
665const char *const GucContext_Names[] =
666{
667 [PGC_INTERNAL] = "internal",
668 [PGC_POSTMASTER] = "postmaster",
669 [PGC_SIGHUP] = "sighup",
670 [PGC_SU_BACKEND] = "superuser-backend",
671 [PGC_BACKEND] = "backend",
672 [PGC_SUSET] = "superuser",
673 [PGC_USERSET] = "user",
674};
675
677 "array length mismatch");
678
679/*
680 * Displayable names for source types (enum GucSource)
681 *
682 * Note: these strings are deliberately not localized.
683 */
684const char *const GucSource_Names[] =
685{
686 [PGC_S_DEFAULT] = "default",
687 [PGC_S_DYNAMIC_DEFAULT] = "default",
688 [PGC_S_ENV_VAR] = "environment variable",
689 [PGC_S_FILE] = "configuration file",
690 [PGC_S_ARGV] = "command line",
691 [PGC_S_GLOBAL] = "global",
692 [PGC_S_DATABASE] = "database",
693 [PGC_S_USER] = "user",
694 [PGC_S_DATABASE_USER] = "database user",
695 [PGC_S_CLIENT] = "client",
696 [PGC_S_OVERRIDE] = "override",
697 [PGC_S_INTERACTIVE] = "interactive",
698 [PGC_S_TEST] = "test",
699 [PGC_S_SESSION] = "session",
700};
701
703 "array length mismatch");
704
705/*
706 * Displayable names for the groupings defined in enum config_group
707 */
708const char *const config_group_names[] =
709{
710 [UNGROUPED] = gettext_noop("Ungrouped"),
711 [FILE_LOCATIONS] = gettext_noop("File Locations"),
712 [CONN_AUTH_SETTINGS] = gettext_noop("Connections and Authentication / Connection Settings"),
713 [CONN_AUTH_TCP] = gettext_noop("Connections and Authentication / TCP Settings"),
714 [CONN_AUTH_AUTH] = gettext_noop("Connections and Authentication / Authentication"),
715 [CONN_AUTH_SSL] = gettext_noop("Connections and Authentication / SSL"),
716 [RESOURCES_MEM] = gettext_noop("Resource Usage / Memory"),
717 [RESOURCES_DISK] = gettext_noop("Resource Usage / Disk"),
718 [RESOURCES_KERNEL] = gettext_noop("Resource Usage / Kernel Resources"),
719 [RESOURCES_BGWRITER] = gettext_noop("Resource Usage / Background Writer"),
720 [RESOURCES_IO] = gettext_noop("Resource Usage / I/O"),
721 [RESOURCES_WORKER_PROCESSES] = gettext_noop("Resource Usage / Worker Processes"),
722 [WAL_SETTINGS] = gettext_noop("Write-Ahead Log / Settings"),
723 [WAL_CHECKPOINTS] = gettext_noop("Write-Ahead Log / Checkpoints"),
724 [WAL_ARCHIVING] = gettext_noop("Write-Ahead Log / Archiving"),
725 [WAL_RECOVERY] = gettext_noop("Write-Ahead Log / Recovery"),
726 [WAL_ARCHIVE_RECOVERY] = gettext_noop("Write-Ahead Log / Archive Recovery"),
727 [WAL_RECOVERY_TARGET] = gettext_noop("Write-Ahead Log / Recovery Target"),
728 [WAL_SUMMARIZATION] = gettext_noop("Write-Ahead Log / Summarization"),
729 [REPLICATION_SENDING] = gettext_noop("Replication / Sending Servers"),
730 [REPLICATION_PRIMARY] = gettext_noop("Replication / Primary Server"),
731 [REPLICATION_STANDBY] = gettext_noop("Replication / Standby Servers"),
732 [REPLICATION_SUBSCRIBERS] = gettext_noop("Replication / Subscribers"),
733 [QUERY_TUNING_METHOD] = gettext_noop("Query Tuning / Planner Method Configuration"),
734 [QUERY_TUNING_COST] = gettext_noop("Query Tuning / Planner Cost Constants"),
735 [QUERY_TUNING_GEQO] = gettext_noop("Query Tuning / Genetic Query Optimizer"),
736 [QUERY_TUNING_OTHER] = gettext_noop("Query Tuning / Other Planner Options"),
737 [LOGGING_WHERE] = gettext_noop("Reporting and Logging / Where to Log"),
738 [LOGGING_WHEN] = gettext_noop("Reporting and Logging / When to Log"),
739 [LOGGING_WHAT] = gettext_noop("Reporting and Logging / What to Log"),
740 [PROCESS_TITLE] = gettext_noop("Reporting and Logging / Process Title"),
741 [STATS_MONITORING] = gettext_noop("Statistics / Monitoring"),
742 [STATS_CUMULATIVE] = gettext_noop("Statistics / Cumulative Query and Index Statistics"),
743 [VACUUM_AUTOVACUUM] = gettext_noop("Vacuuming / Automatic Vacuuming"),
744 [VACUUM_COST_DELAY] = gettext_noop("Vacuuming / Cost-Based Vacuum Delay"),
745 [VACUUM_DEFAULT] = gettext_noop("Vacuuming / Default Behavior"),
746 [VACUUM_FREEZING] = gettext_noop("Vacuuming / Freezing"),
747 [CLIENT_CONN_STATEMENT] = gettext_noop("Client Connection Defaults / Statement Behavior"),
748 [CLIENT_CONN_LOCALE] = gettext_noop("Client Connection Defaults / Locale and Formatting"),
749 [CLIENT_CONN_PRELOAD] = gettext_noop("Client Connection Defaults / Shared Library Preloading"),
750 [CLIENT_CONN_OTHER] = gettext_noop("Client Connection Defaults / Other Defaults"),
751 [LOCK_MANAGEMENT] = gettext_noop("Lock Management"),
752 [COMPAT_OPTIONS_PREVIOUS] = gettext_noop("Version and Platform Compatibility / Previous PostgreSQL Versions"),
753 [COMPAT_OPTIONS_OTHER] = gettext_noop("Version and Platform Compatibility / Other Platforms and Clients"),
754 [ERROR_HANDLING_OPTIONS] = gettext_noop("Error Handling"),
755 [PRESET_OPTIONS] = gettext_noop("Preset Options"),
756 [CUSTOM_OPTIONS] = gettext_noop("Customized Options"),
757 [DEVELOPER_OPTIONS] = gettext_noop("Developer Options"),
758};
759
761 "array length mismatch");
762
763/*
764 * Displayable names for GUC variable types (enum config_type)
765 *
766 * Note: these strings are deliberately not localized.
767 */
768const char *const config_type_names[] =
769{
770 [PGC_BOOL] = "bool",
771 [PGC_INT] = "integer",
772 [PGC_REAL] = "real",
773 [PGC_STRING] = "string",
774 [PGC_ENUM] = "enum",
775};
776
778 "array length mismatch");
779
780
781#include "utils/guc_tables.inc.c"
@ BYTEA_OUTPUT_HEX
Definition bytea.h:22
@ BYTEA_OUTPUT_ESCAPE
Definition bytea.h:21
#define gettext_noop(x)
Definition c.h:1191
#define lengthof(array)
Definition c.h:803
#define StaticAssertDecl(condition, errmessage)
Definition c.h:942
@ FILE_COPY_METHOD_COPY
Definition copydir.h:18
@ FILE_COPY_METHOD_CLONE
Definition copydir.h:19
@ CONSTRAINT_EXCLUSION_OFF
Definition cost.h:38
@ CONSTRAINT_EXCLUSION_PARTITION
Definition cost.h:40
@ CONSTRAINT_EXCLUSION_ON
Definition cost.h:39
@ PASSWORD_TYPE_SCRAM_SHA_256
Definition crypt.h:44
@ PASSWORD_TYPE_MD5
Definition crypt.h:43
@ PGERROR_VERBOSE
Definition elog.h:474
@ PGERROR_DEFAULT
Definition elog.h:473
@ PGERROR_TERSE
Definition elog.h:472
#define LOG
Definition elog.h:31
#define DEBUG3
Definition elog.h:28
#define FATAL
Definition elog.h:41
#define WARNING
Definition elog.h:36
#define DEBUG2
Definition elog.h:29
#define PANIC
Definition elog.h:42
#define DEBUG1
Definition elog.h:30
#define ERROR
Definition elog.h:39
#define NOTICE
Definition elog.h:35
#define INFO
Definition elog.h:34
#define DEBUG5
Definition elog.h:26
#define DEBUG4
Definition elog.h:27
@ FILE_EXTEND_METHOD_WRITE_ZEROS
Definition fd.h:63
@ DATA_DIR_SYNC_METHOD_SYNCFS
Definition file_utils.h:30
@ DATA_DIR_SYNC_METHOD_FSYNC
Definition file_utils.h:29
@ PGC_S_DEFAULT
Definition guc.h:113
@ PGC_S_DYNAMIC_DEFAULT
Definition guc.h:114
@ PGC_S_FILE
Definition guc.h:116
@ PGC_S_GLOBAL
Definition guc.h:118
@ PGC_S_DATABASE
Definition guc.h:119
@ PGC_S_OVERRIDE
Definition guc.h:123
@ PGC_S_ARGV
Definition guc.h:117
@ PGC_S_SESSION
Definition guc.h:126
@ PGC_S_CLIENT
Definition guc.h:122
@ PGC_S_DATABASE_USER
Definition guc.h:121
@ PGC_S_ENV_VAR
Definition guc.h:115
@ PGC_S_USER
Definition guc.h:120
@ PGC_S_TEST
Definition guc.h:125
@ PGC_S_INTERACTIVE
Definition guc.h:124
@ PGC_SUSET
Definition guc.h:78
@ PGC_INTERNAL
Definition guc.h:73
@ PGC_USERSET
Definition guc.h:79
@ PGC_SU_BACKEND
Definition guc.h:76
@ PGC_POSTMASTER
Definition guc.h:74
@ PGC_SIGHUP
Definition guc.h:75
@ PGC_BACKEND
Definition guc.h:77
static char * recovery_target_lsn_string
Definition guc_tables.c:651
bool log_statement_stats
Definition guc_tables.c:532
static char * client_encoding_string
Definition guc_tables.c:600
static int segment_size
Definition guc_tables.c:624
static char * timezone_abbreviations_string
Definition guc_tables.c:617
static const struct config_enum_entry stats_fetch_consistency[]
Definition guc_tables.c:259
bool Debug_print_plan
Definition guc_tables.c:517
char * event_source
Definition guc_tables.c:535
bool check_function_bodies
Definition guc_tables.c:538
int num_temp_buffers
Definition guc_tables.c:562
int client_min_messages
Definition guc_tables.c:550
static bool exec_backend_enabled
Definition guc_tables.c:645
static int max_identifier_length
Definition guc_tables.c:622
static const struct config_enum_entry password_encryption_options[]
Definition guc_tables.c:415
static const struct config_enum_entry ssl_protocol_versions_info[]
Definition guc_tables.c:421
const struct config_enum_entry recovery_target_action_options[]
static bool default_with_oids
Definition guc_tables.c:543
bool Debug_print_raw_parse
Definition guc_tables.c:519
static char * timezone_string
Definition guc_tables.c:615
static const struct config_enum_entry debug_parallel_query_options[]
Definition guc_tables.c:395
static char * server_version_string
Definition guc_tables.c:603
int log_min_error_statement
Definition guc_tables.c:548
static bool data_checksums
Definition guc_tables.c:630
static const struct config_enum_entry file_copy_method_options[]
Definition guc_tables.c:487
static const struct config_enum_entry syslog_facility_options[]
Definition guc_tables.c:233
static const struct config_enum_entry icu_validation_level_options[]
Definition guc_tables.c:175
static const struct config_enum_entry recovery_prefetch_options[]
Definition guc_tables.c:382
static const struct config_enum_entry recovery_init_sync_method_options[]
Definition guc_tables.c:439
int tcp_keepalives_idle
Definition guc_tables.c:572
char * HbaFileName
Definition guc_tables.c:566
int temp_file_limit
Definition guc_tables.c:560
const char *const GucContext_Names[]
Definition guc_tables.c:665
static int ssl_renegotiation_limit
Definition guc_tables.c:583
static int syslog_facility
Definition guc_tables.c:613
static int max_function_args
Definition guc_tables.c:620
int tcp_keepalives_interval
Definition guc_tables.c:573
#define EXEC_BACKEND_ENABLED
Definition guc_tables.c:643
static int max_index_keys
Definition guc_tables.c:621
static const struct config_enum_entry backslash_quote_options[]
Definition guc_tables.c:291
static char * syslog_ident_str
Definition guc_tables.c:598
#define DEFAULT_SYSLOG_FACILITY
Definition guc_tables.c:611
const char *const GucSource_Names[]
Definition guc_tables.c:684
char * ConfigFileName
Definition guc_tables.c:565
bool log_parser_stats
Definition guc_tables.c:529
static int block_size
Definition guc_tables.c:623
int tcp_keepalives_count
Definition guc_tables.c:574
double log_xact_sample_rate
Definition guc_tables.c:557
#define DEFAULT_ASSERT_ENABLED
Definition guc_tables.c:636
static const struct config_enum_entry shared_memory_options[]
Definition guc_tables.c:447
static const struct config_enum_entry file_extend_method_options[]
Definition guc_tables.c:495
static const struct config_enum_entry huge_pages_status_options[]
Definition guc_tables.c:375
const char *const config_type_names[]
Definition guc_tables.c:768
bool Debug_pretty_print
Definition guc_tables.c:521
char * role_string
Definition guc_tables.c:654
static char * server_encoding_string
Definition guc_tables.c:602
static int wal_block_size
Definition guc_tables.c:627
static const struct config_enum_entry log_statement_options[]
Definition guc_tables.c:204
static const struct config_enum_entry plan_cache_mode_options[]
Definition guc_tables.c:408
int huge_pages
Definition guc_tables.c:589
static const struct config_enum_entry wal_compression_options[]
Definition guc_tables.c:468
static const struct config_enum_entry debug_logical_replication_streaming_options[]
Definition guc_tables.c:430
static int effective_wal_level
Definition guc_tables.c:629
static char * datestyle_string
Definition guc_tables.c:601
static char * recovery_target_timeline_string
Definition guc_tables.c:647
static char * restrict_nonsystem_relation_kind_string
Definition guc_tables.c:606
int log_parameter_max_length_on_error
Definition guc_tables.c:554
const struct config_enum_entry dynamic_shared_memory_options[]
Definition dsm_impl.c:95
static const struct config_enum_entry xmlbinary_options[]
Definition guc_tables.c:269
int log_min_duration_statement
Definition guc_tables.c:552
static char * recovery_target_xid_string
Definition guc_tables.c:649
bool AllowAlterSystem
Definition guc_tables.c:515
int log_min_duration_sample
Definition guc_tables.c:551
bool log_btree_build_stats
Definition guc_tables.c:534
bool log_planner_stats
Definition guc_tables.c:530
static const struct config_enum_entry bytea_output_options[]
Definition guc_tables.c:121
bool row_security
Definition guc_tables.c:537
static bool standard_conforming_strings
Definition guc_tables.c:544
const struct config_enum_entry archive_mode_options[]
Definition xlog.c:194
static const struct config_enum_entry huge_pages_options[]
Definition guc_tables.c:362
static const struct config_enum_entry synchronous_commit_options[]
Definition guc_tables.c:343
static char * recovery_target_string
Definition guc_tables.c:648
char * cluster_name
Definition guc_tables.c:564
static bool assert_enabled
Definition guc_tables.c:638
static const struct config_enum_entry default_toast_compression_options[]
Definition guc_tables.c:460
static char * log_timezone_string
Definition guc_tables.c:616
static char * session_authorization_string
Definition guc_tables.c:619
bool in_hot_standby_guc
Definition guc_tables.c:657
bool Debug_print_rewritten
Definition guc_tables.c:520
static int shared_memory_size_in_huge_pages
Definition guc_tables.c:626
static const struct config_enum_entry isolation_level_options[]
Definition guc_tables.c:215
static const struct config_enum_entry log_error_verbosity_options[]
Definition guc_tables.c:194
const struct config_enum_entry wal_sync_method_options[]
Definition xlog.c:174
static int server_version_num
Definition guc_tables.c:604
bool Debug_print_parse
Definition guc_tables.c:518
char * application_name
Definition guc_tables.c:570
static const struct config_enum_entry intervalstyle_options[]
Definition guc_tables.c:167
int log_parameter_max_length
Definition guc_tables.c:553
char * IdentFileName
Definition guc_tables.c:567
const struct config_enum_entry wal_level_options[]
Definition xlogdesc.c:27
static const struct config_enum_entry client_message_level_options[]
Definition guc_tables.c:135
int tcp_user_timeout
Definition guc_tables.c:575
bool current_role_is_superuser
Definition guc_tables.c:546
static const struct config_enum_entry constraint_exclusion_options[]
Definition guc_tables.c:326
static const struct config_enum_entry server_message_level_options[]
Definition guc_tables.c:150
static const struct config_enum_entry compute_query_id_options[]
Definition guc_tables.c:308
static char * recovery_target_name_string
Definition guc_tables.c:650
int huge_page_size
Definition guc_tables.c:590
static char * data_directory
Definition guc_tables.c:618
double log_statement_sample_rate
Definition guc_tables.c:556
bool log_duration
Definition guc_tables.c:516
const char *const config_group_names[]
Definition guc_tables.c:708
static bool integer_datetimes
Definition guc_tables.c:631
static double phony_random_seed
Definition guc_tables.c:599
char * external_pid_file
Definition guc_tables.c:568
int log_temp_files
Definition guc_tables.c:555
static int num_os_semaphores
Definition guc_tables.c:628
int log_min_messages
Definition guc_tables.c:549
bool log_executor_stats
Definition guc_tables.c:531
char * backtrace_functions
Definition guc_tables.c:558
static int shared_memory_size_mb
Definition guc_tables.c:625
static const struct config_enum_entry session_replication_role_options[]
Definition guc_tables.c:223
static const struct config_enum_entry track_function_options[]
Definition guc_tables.c:249
static const struct config_enum_entry xmloption_options[]
Definition guc_tables.c:278
int huge_pages_status
Definition guc_tables.c:591
static char * debug_io_direct_string
Definition guc_tables.c:605
@ RESOURCES_KERNEL
Definition guc_tables.h:65
@ CLIENT_CONN_LOCALE
Definition guc_tables.h:95
@ WAL_ARCHIVE_RECOVERY
Definition guc_tables.h:73
@ STATS_CUMULATIVE
Definition guc_tables.h:89
@ CLIENT_CONN_PRELOAD
Definition guc_tables.h:96
@ VACUUM_COST_DELAY
Definition guc_tables.h:91
@ QUERY_TUNING_OTHER
Definition guc_tables.h:83
@ LOGGING_WHERE
Definition guc_tables.h:84
@ CONN_AUTH_AUTH
Definition guc_tables.h:61
@ RESOURCES_WORKER_PROCESSES
Definition guc_tables.h:68
@ VACUUM_FREEZING
Definition guc_tables.h:93
@ ERROR_HANDLING_OPTIONS
Definition guc_tables.h:101
@ PROCESS_TITLE
Definition guc_tables.h:87
@ RESOURCES_DISK
Definition guc_tables.h:64
@ REPLICATION_SENDING
Definition guc_tables.h:76
@ RESOURCES_IO
Definition guc_tables.h:67
@ LOCK_MANAGEMENT
Definition guc_tables.h:98
@ CUSTOM_OPTIONS
Definition guc_tables.h:103
@ REPLICATION_PRIMARY
Definition guc_tables.h:77
@ STATS_MONITORING
Definition guc_tables.h:88
@ WAL_RECOVERY_TARGET
Definition guc_tables.h:74
@ WAL_RECOVERY
Definition guc_tables.h:72
@ CONN_AUTH_SSL
Definition guc_tables.h:62
@ RESOURCES_MEM
Definition guc_tables.h:63
@ RESOURCES_BGWRITER
Definition guc_tables.h:66
@ PRESET_OPTIONS
Definition guc_tables.h:102
@ DEVELOPER_OPTIONS
Definition guc_tables.h:104
@ QUERY_TUNING_METHOD
Definition guc_tables.h:80
@ LOGGING_WHAT
Definition guc_tables.h:86
@ VACUUM_DEFAULT
Definition guc_tables.h:92
@ QUERY_TUNING_GEQO
Definition guc_tables.h:82
@ WAL_SETTINGS
Definition guc_tables.h:69
@ COMPAT_OPTIONS_OTHER
Definition guc_tables.h:100
@ CLIENT_CONN_STATEMENT
Definition guc_tables.h:94
@ FILE_LOCATIONS
Definition guc_tables.h:58
@ REPLICATION_STANDBY
Definition guc_tables.h:78
@ QUERY_TUNING_COST
Definition guc_tables.h:81
@ WAL_ARCHIVING
Definition guc_tables.h:71
@ COMPAT_OPTIONS_PREVIOUS
Definition guc_tables.h:99
@ WAL_CHECKPOINTS
Definition guc_tables.h:70
@ CLIENT_CONN_OTHER
Definition guc_tables.h:97
@ LOGGING_WHEN
Definition guc_tables.h:85
@ CONN_AUTH_TCP
Definition guc_tables.h:60
@ REPLICATION_SUBSCRIBERS
Definition guc_tables.h:79
@ WAL_SUMMARIZATION
Definition guc_tables.h:75
@ CONN_AUTH_SETTINGS
Definition guc_tables.h:59
@ UNGROUPED
Definition guc_tables.h:57
@ VACUUM_AUTOVACUUM
Definition guc_tables.h:90
@ PGC_BOOL
Definition guc_tables.h:25
@ PGC_STRING
Definition guc_tables.h:28
@ PGC_ENUM
Definition guc_tables.h:29
@ PGC_REAL
Definition guc_tables.h:27
@ PGC_INT
Definition guc_tables.h:26
@ PG_TLS1_VERSION
Definition libpq.h:149
@ PG_TLS1_3_VERSION
Definition libpq.h:152
@ PG_TLS1_1_VERSION
Definition libpq.h:150
@ PG_TLS1_2_VERSION
Definition libpq.h:151
@ PG_TLS_ANY
Definition libpq.h:148
#define INTSTYLE_SQL_STANDARD
Definition miscadmin.h:259
#define INTSTYLE_POSTGRES_VERBOSE
Definition miscadmin.h:258
#define INTSTYLE_ISO_8601
Definition miscadmin.h:260
#define INTSTYLE_POSTGRES
Definition miscadmin.h:257
@ DEBUG_PARALLEL_REGRESS
Definition optimizer.h:98
@ DEBUG_PARALLEL_ON
Definition optimizer.h:97
@ DEBUG_PARALLEL_OFF
Definition optimizer.h:96
@ BACKSLASH_QUOTE_ON
Definition parser.h:51
@ BACKSLASH_QUOTE_SAFE_ENCODING
Definition parser.h:52
@ BACKSLASH_QUOTE_OFF
Definition parser.h:50
@ HUGE_PAGES_UNKNOWN
Definition pg_shmem.h:56
@ HUGE_PAGES_ON
Definition pg_shmem.h:54
@ HUGE_PAGES_OFF
Definition pg_shmem.h:53
@ HUGE_PAGES_TRY
Definition pg_shmem.h:55
@ SHMEM_TYPE_MMAP
Definition pg_shmem.h:64
@ SHMEM_TYPE_SYSV
Definition pg_shmem.h:63
@ SHMEM_TYPE_WINDOWS
Definition pg_shmem.h:62
@ PGSTAT_FETCH_CONSISTENCY_NONE
Definition pgstat.h:48
@ PGSTAT_FETCH_CONSISTENCY_CACHE
Definition pgstat.h:49
@ PGSTAT_FETCH_CONSISTENCY_SNAPSHOT
Definition pgstat.h:50
@ TRACK_FUNC_PL
Definition pgstat.h:42
@ TRACK_FUNC_ALL
Definition pgstat.h:43
@ TRACK_FUNC_OFF
Definition pgstat.h:41
@ PLAN_CACHE_MODE_FORCE_CUSTOM_PLAN
Definition plancache.h:35
@ PLAN_CACHE_MODE_FORCE_GENERIC_PLAN
Definition plancache.h:34
@ PLAN_CACHE_MODE_AUTO
Definition plancache.h:33
static int fb(int x)
@ XMLOPTION_CONTENT
Definition primnodes.h:1618
@ XMLOPTION_DOCUMENT
Definition primnodes.h:1617
@ COMPUTE_QUERY_ID_AUTO
Definition queryjumble.h:85
@ COMPUTE_QUERY_ID_REGRESS
Definition queryjumble.h:86
@ COMPUTE_QUERY_ID_ON
Definition queryjumble.h:84
@ COMPUTE_QUERY_ID_OFF
Definition queryjumble.h:83
@ DEBUG_LOGICAL_REP_STREAMING_IMMEDIATE
@ DEBUG_LOGICAL_REP_STREAMING_BUFFERED
Definition guc.h:174
@ LOGSTMT_NONE
Definition tcopprot.h:34
@ LOGSTMT_MOD
Definition tcopprot.h:36
@ LOGSTMT_DDL
Definition tcopprot.h:35
@ LOGSTMT_ALL
Definition tcopprot.h:37
#define TOAST_PGLZ_COMPRESSION
#define TOAST_LZ4_COMPRESSION
#define SESSION_REPLICATION_ROLE_REPLICA
Definition trigger.h:143
#define SESSION_REPLICATION_ROLE_LOCAL
Definition trigger.h:144
#define SESSION_REPLICATION_ROLE_ORIGIN
Definition trigger.h:142
#define XACT_SERIALIZABLE
Definition xact.h:39
@ SYNCHRONOUS_COMMIT_LOCAL_FLUSH
Definition xact.h:72
@ SYNCHRONOUS_COMMIT_REMOTE_WRITE
Definition xact.h:73
@ SYNCHRONOUS_COMMIT_REMOTE_APPLY
Definition xact.h:76
@ SYNCHRONOUS_COMMIT_OFF
Definition xact.h:71
#define SYNCHRONOUS_COMMIT_ON
Definition xact.h:81
#define XACT_READ_UNCOMMITTED
Definition xact.h:36
#define XACT_REPEATABLE_READ
Definition xact.h:38
#define XACT_READ_COMMITTED
Definition xact.h:37
@ WAL_COMPRESSION_NONE
Definition xlog.h:83
@ WAL_COMPRESSION_LZ4
Definition xlog.h:85
@ WAL_COMPRESSION_PGLZ
Definition xlog.h:84
@ WAL_COMPRESSION_ZSTD
Definition xlog.h:86
@ WAL_LEVEL_REPLICA
Definition xlog.h:76
@ RECOVERY_PREFETCH_OFF
@ RECOVERY_PREFETCH_ON
@ RECOVERY_PREFETCH_TRY
@ XMLBINARY_BASE64
Definition xml.h:35
@ XMLBINARY_HEX
Definition xml.h:36