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