Debian Codegraph @

src/backend/utils/misc/guc_tables.c

raw
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, ConfigureNamesBool[]
8 * and so on are not, because the structs in those arrays are actually
9 * the live per-variable state data that guc.c manipulates. While many of
10 * their fields are intended to be constant, some fields change at runtime.
11 *
12 *
13 * Copyright (c) 2000-2025, PostgreSQL Global Development Group
14 * Written by Peter Eisentraut <[email protected]>.
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"
35 #include "access/toast_compression.h"
36 #include "access/twophase.h"
37 #include "access/xlog_internal.h"
38 #include "access/xlogprefetcher.h"
39 #include "access/xlogrecovery.h"
40 #include "access/xlogutils.h"
41 #include "archive/archive_module.h"
42 #include "catalog/namespace.h"
43 #include "catalog/storage.h"
44 #include "commands/async.h"
45 #include "commands/extension.h"
46 #include "commands/event_trigger.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"
67 #include "postmaster/autovacuum.h"
68 #include "postmaster/bgworker_internals.h"
69 #include "postmaster/bgwriter.h"
70 #include "postmaster/postmaster.h"
71 #include "postmaster/startup.h"
72 #include "postmaster/syslogger.h"
73 #include "postmaster/walsummarizer.h"
74 #include "postmaster/walwriter.h"
75 #include "replication/logical.h"
76 #include "replication/logicallauncher.h"
77 #include "replication/slot.h"
78 #include "replication/slotsync.h"
79 #include "replication/syncrep.h"
80 #include "storage/aio.h"
81 #include "storage/bufmgr.h"
82 #include "storage/bufpage.h"
83 #include "storage/copydir.h"
84 #include "storage/fd.h"
85 #include "storage/io_worker.h"
86 #include "storage/large_object.h"
87 #include "storage/pg_shmem.h"
88 #include "storage/predicate.h"
89 #include "storage/procnumber.h"
90 #include "storage/standby.h"
91 #include "tcop/backend_startup.h"
92 #include "tcop/tcopprot.h"
93 #include "tsearch/ts_cache.h"
94 #include "utils/builtins.h"
95 #include "utils/bytea.h"
96 #include "utils/float.h"
97 #include "utils/guc_hooks.h"
98 #include "utils/guc_tables.h"
99 #include "utils/inval.h"
100 #include "utils/memutils.h"
101 #include "utils/pg_locale.h"
102 #include "utils/plancache.h"
103 #include "utils/ps_status.h"
104 #include "utils/rls.h"
105 #include "utils/xml.h"
106
107 #ifdef TRACE_SYNCSCAN
108 #include "access/syncscan.h"
109 #endif
110
111 /* This value is normally passed in from the Makefile */
112 #ifndef PG_KRB_SRVTAB
113 #define PG_KRB_SRVTAB ""
114 #endif
115
116 /*
117 * Options for enum values defined in this module.
118 *
119 * NOTE! Option values may not contain double quotes!
120 */
121
122 static const struct config_enum_entry bytea_output_options[] = {
123 {"escape", BYTEA_OUTPUT_ESCAPE, false},
124 {"hex", BYTEA_OUTPUT_HEX, false},
125 {NULL, 0, false}
126 };
127
128 StaticAssertDecl(lengthof(bytea_output_options) == (BYTEA_OUTPUT_HEX + 2),
129 "array length mismatch");
130
131 /*
132 * We have different sets for client and server message level options because
133 * they sort slightly different (see "log" level), and because "fatal"/"panic"
134 * aren't sensible for client_min_messages.
135 */
136 static const struct config_enum_entry client_message_level_options[] = {
137 {"debug5", DEBUG5, false},
138 {"debug4", DEBUG4, false},
139 {"debug3", DEBUG3, false},
140 {"debug2", DEBUG2, false},
141 {"debug1", DEBUG1, false},
142 {"debug", DEBUG2, true},
143 {"log", LOG, false},
144 {"info", INFO, true},
145 {"notice", NOTICE, false},
146 {"warning", WARNING, false},
147 {"error", ERROR, false},
148 {NULL, 0, false}
149 };
150
151 static const struct config_enum_entry server_message_level_options[] = {
152 {"debug5", DEBUG5, false},
153 {"debug4", DEBUG4, false},
154 {"debug3", DEBUG3, false},
155 {"debug2", DEBUG2, false},
156 {"debug1", DEBUG1, false},
157 {"debug", DEBUG2, true},
158 {"info", INFO, false},
159 {"notice", NOTICE, false},
160 {"warning", WARNING, false},
161 {"error", ERROR, false},
162 {"log", LOG, false},
163 {"fatal", FATAL, false},
164 {"panic", PANIC, false},
165 {NULL, 0, false}
166 };
167
168 static const struct config_enum_entry intervalstyle_options[] = {
169 {"postgres", INTSTYLE_POSTGRES, false},
170 {"postgres_verbose", INTSTYLE_POSTGRES_VERBOSE, false},
171 {"sql_standard", INTSTYLE_SQL_STANDARD, false},
172 {"iso_8601", INTSTYLE_ISO_8601, false},
173 {NULL, 0, false}
174 };
175
176 static const struct config_enum_entry icu_validation_level_options[] = {
177 {"disabled", -1, false},
178 {"debug5", DEBUG5, false},
179 {"debug4", DEBUG4, false},
180 {"debug3", DEBUG3, false},
181 {"debug2", DEBUG2, false},
182 {"debug1", DEBUG1, false},
183 {"debug", DEBUG2, true},
184 {"log", LOG, false},
185 {"info", INFO, true},
186 {"notice", NOTICE, false},
187 {"warning", WARNING, false},
188 {"error", ERROR, false},
189 {NULL, 0, false}
190 };
191
192 StaticAssertDecl(lengthof(intervalstyle_options) == (INTSTYLE_ISO_8601 + 2),
193 "array length mismatch");
194
195 static const struct config_enum_entry log_error_verbosity_options[] = {
196 {"terse", PGERROR_TERSE, false},
197 {"default", PGERROR_DEFAULT, false},
198 {"verbose", PGERROR_VERBOSE, false},
199 {NULL, 0, false}
200 };
201
202 StaticAssertDecl(lengthof(log_error_verbosity_options) == (PGERROR_VERBOSE + 2),
203 "array length mismatch");
204
205 static const struct config_enum_entry log_statement_options[] = {
206 {"none", LOGSTMT_NONE, false},
207 {"ddl", LOGSTMT_DDL, false},
208 {"mod", LOGSTMT_MOD, false},
209 {"all", LOGSTMT_ALL, false},
210 {NULL, 0, false}
211 };
212
213 StaticAssertDecl(lengthof(log_statement_options) == (LOGSTMT_ALL + 2),
214 "array length mismatch");
215
216 static const struct config_enum_entry isolation_level_options[] = {
217 {"serializable", XACT_SERIALIZABLE, false},
218 {"repeatable read", XACT_REPEATABLE_READ, false},
219 {"read committed", XACT_READ_COMMITTED, false},
220 {"read uncommitted", XACT_READ_UNCOMMITTED, false},
221 {NULL, 0}
222 };
223
224 static const struct config_enum_entry session_replication_role_options[] = {
225 {"origin", SESSION_REPLICATION_ROLE_ORIGIN, false},
226 {"replica", SESSION_REPLICATION_ROLE_REPLICA, false},
227 {"local", SESSION_REPLICATION_ROLE_LOCAL, false},
228 {NULL, 0, false}
229 };
230
231 StaticAssertDecl(lengthof(session_replication_role_options) == (SESSION_REPLICATION_ROLE_LOCAL + 2),
232 "array length mismatch");
233
234 static const struct config_enum_entry syslog_facility_options[] = {
235 #ifdef HAVE_SYSLOG
236 {"local0", LOG_LOCAL0, false},
237 {"local1", LOG_LOCAL1, false},
238 {"local2", LOG_LOCAL2, false},
239 {"local3", LOG_LOCAL3, false},
240 {"local4", LOG_LOCAL4, false},
241 {"local5", LOG_LOCAL5, false},
242 {"local6", LOG_LOCAL6, false},
243 {"local7", LOG_LOCAL7, false},
244 #else
245 {"none", 0, false},
246 #endif
247 {NULL, 0}
248 };
249
250 static const struct config_enum_entry track_function_options[] = {
251 {"none", TRACK_FUNC_OFF, false},
252 {"pl", TRACK_FUNC_PL, false},
253 {"all", TRACK_FUNC_ALL, false},
254 {NULL, 0, false}
255 };
256
257 StaticAssertDecl(lengthof(track_function_options) == (TRACK_FUNC_ALL + 2),
258 "array length mismatch");
259
260 static const struct config_enum_entry stats_fetch_consistency[] = {
261 {"none", PGSTAT_FETCH_CONSISTENCY_NONE, false},
262 {"cache", PGSTAT_FETCH_CONSISTENCY_CACHE, false},
263 {"snapshot", PGSTAT_FETCH_CONSISTENCY_SNAPSHOT, false},
264 {NULL, 0, false}
265 };
266
267 StaticAssertDecl(lengthof(stats_fetch_consistency) == (PGSTAT_FETCH_CONSISTENCY_SNAPSHOT + 2),
268 "array length mismatch");
269
270 static const struct config_enum_entry xmlbinary_options[] = {
271 {"base64", XMLBINARY_BASE64, false},
272 {"hex", XMLBINARY_HEX, false},
273 {NULL, 0, false}
274 };
275
276 StaticAssertDecl(lengthof(xmlbinary_options) == (XMLBINARY_HEX + 2),
277 "array length mismatch");
278
279 static const struct config_enum_entry xmloption_options[] = {
280 {"content", XMLOPTION_CONTENT, false},
281 {"document", XMLOPTION_DOCUMENT, false},
282 {NULL, 0, false}
283 };
284
285 StaticAssertDecl(lengthof(xmloption_options) == (XMLOPTION_CONTENT + 2),
286 "array length mismatch");
287
288 /*
289 * Although only "on", "off", and "safe_encoding" are documented, we
290 * accept all the likely variants of "on" and "off".
291 */
292 static const struct config_enum_entry backslash_quote_options[] = {
293 {"safe_encoding", BACKSLASH_QUOTE_SAFE_ENCODING, false},
294 {"on", BACKSLASH_QUOTE_ON, false},
295 {"off", BACKSLASH_QUOTE_OFF, false},
296 {"true", BACKSLASH_QUOTE_ON, true},
297 {"false", BACKSLASH_QUOTE_OFF, true},
298 {"yes", BACKSLASH_QUOTE_ON, true},
299 {"no", BACKSLASH_QUOTE_OFF, true},
300 {"1", BACKSLASH_QUOTE_ON, true},
301 {"0", BACKSLASH_QUOTE_OFF, true},
302 {NULL, 0, false}
303 };
304
305 /*
306 * Although only "on", "off", and "auto" are documented, we accept
307 * all the likely variants of "on" and "off".
308 */
309 static const struct config_enum_entry compute_query_id_options[] = {
310 {"auto", COMPUTE_QUERY_ID_AUTO, false},
311 {"regress", COMPUTE_QUERY_ID_REGRESS, false},
312 {"on", COMPUTE_QUERY_ID_ON, false},
313 {"off", COMPUTE_QUERY_ID_OFF, false},
314 {"true", COMPUTE_QUERY_ID_ON, true},
315 {"false", COMPUTE_QUERY_ID_OFF, true},
316 {"yes", COMPUTE_QUERY_ID_ON, true},
317 {"no", COMPUTE_QUERY_ID_OFF, true},
318 {"1", COMPUTE_QUERY_ID_ON, true},
319 {"0", COMPUTE_QUERY_ID_OFF, true},
320 {NULL, 0, false}
321 };
322
323 /*
324 * Although only "on", "off", and "partition" are documented, we
325 * accept all the likely variants of "on" and "off".
326 */
327 static const struct config_enum_entry constraint_exclusion_options[] = {
328 {"partition", CONSTRAINT_EXCLUSION_PARTITION, false},
329 {"on", CONSTRAINT_EXCLUSION_ON, false},
330 {"off", CONSTRAINT_EXCLUSION_OFF, false},
331 {"true", CONSTRAINT_EXCLUSION_ON, true},
332 {"false", CONSTRAINT_EXCLUSION_OFF, true},
333 {"yes", CONSTRAINT_EXCLUSION_ON, true},
334 {"no", CONSTRAINT_EXCLUSION_OFF, true},
335 {"1", CONSTRAINT_EXCLUSION_ON, true},
336 {"0", CONSTRAINT_EXCLUSION_OFF, true},
337 {NULL, 0, false}
338 };
339
340 /*
341 * Although only "on", "off", "remote_apply", "remote_write", and "local" are
342 * documented, we accept all the likely variants of "on" and "off".
343 */
344 static const struct config_enum_entry synchronous_commit_options[] = {
345 {"local", SYNCHRONOUS_COMMIT_LOCAL_FLUSH, false},
346 {"remote_write", SYNCHRONOUS_COMMIT_REMOTE_WRITE, false},
347 {"remote_apply", SYNCHRONOUS_COMMIT_REMOTE_APPLY, false},
348 {"on", SYNCHRONOUS_COMMIT_ON, false},
349 {"off", SYNCHRONOUS_COMMIT_OFF, false},
350 {"true", SYNCHRONOUS_COMMIT_ON, true},
351 {"false", SYNCHRONOUS_COMMIT_OFF, true},
352 {"yes", SYNCHRONOUS_COMMIT_ON, true},
353 {"no", SYNCHRONOUS_COMMIT_OFF, true},
354 {"1", SYNCHRONOUS_COMMIT_ON, true},
355 {"0", SYNCHRONOUS_COMMIT_OFF, true},
356 {NULL, 0, false}
357 };
358
359 /*
360 * Although only "on", "off", "try" are documented, we accept all the likely
361 * variants of "on" and "off".
362 */
363 static const struct config_enum_entry huge_pages_options[] = {
364 {"off", HUGE_PAGES_OFF, false},
365 {"on", HUGE_PAGES_ON, false},
366 {"try", HUGE_PAGES_TRY, false},
367 {"true", HUGE_PAGES_ON, true},
368 {"false", HUGE_PAGES_OFF, true},
369 {"yes", HUGE_PAGES_ON, true},
370 {"no", HUGE_PAGES_OFF, true},
371 {"1", HUGE_PAGES_ON, true},
372 {"0", HUGE_PAGES_OFF, true},
373 {NULL, 0, false}
374 };
375
376 static const struct config_enum_entry huge_pages_status_options[] = {
377 {"off", HUGE_PAGES_OFF, false},
378 {"on", HUGE_PAGES_ON, false},
379 {"unknown", HUGE_PAGES_UNKNOWN, false},
380 {NULL, 0, false}
381 };
382
383 static const struct config_enum_entry recovery_prefetch_options[] = {
384 {"off", RECOVERY_PREFETCH_OFF, false},
385 {"on", RECOVERY_PREFETCH_ON, false},
386 {"try", RECOVERY_PREFETCH_TRY, false},
387 {"true", RECOVERY_PREFETCH_ON, true},
388 {"false", RECOVERY_PREFETCH_OFF, true},
389 {"yes", RECOVERY_PREFETCH_ON, true},
390 {"no", RECOVERY_PREFETCH_OFF, true},
391 {"1", RECOVERY_PREFETCH_ON, true},
392 {"0", RECOVERY_PREFETCH_OFF, true},
393 {NULL, 0, false}
394 };
395
396 static const struct config_enum_entry debug_parallel_query_options[] = {
397 {"off", DEBUG_PARALLEL_OFF, false},
398 {"on", DEBUG_PARALLEL_ON, false},
399 {"regress", DEBUG_PARALLEL_REGRESS, false},
400 {"true", DEBUG_PARALLEL_ON, true},
401 {"false", DEBUG_PARALLEL_OFF, true},
402 {"yes", DEBUG_PARALLEL_ON, true},
403 {"no", DEBUG_PARALLEL_OFF, true},
404 {"1", DEBUG_PARALLEL_ON, true},
405 {"0", DEBUG_PARALLEL_OFF, true},
406 {NULL, 0, false}
407 };
408
409 static const struct config_enum_entry plan_cache_mode_options[] = {
410 {"auto", PLAN_CACHE_MODE_AUTO, false},
411 {"force_generic_plan", PLAN_CACHE_MODE_FORCE_GENERIC_PLAN, false},
412 {"force_custom_plan", PLAN_CACHE_MODE_FORCE_CUSTOM_PLAN, false},
413 {NULL, 0, false}
414 };
415
416 static const struct config_enum_entry password_encryption_options[] = {
417 {"md5", PASSWORD_TYPE_MD5, false},
418 {"scram-sha-256", PASSWORD_TYPE_SCRAM_SHA_256, false},
419 {NULL, 0, false}
420 };
421
422 static const struct config_enum_entry ssl_protocol_versions_info[] = {
423 {"", PG_TLS_ANY, false},
424 {"TLSv1", PG_TLS1_VERSION, false},
425 {"TLSv1.1", PG_TLS1_1_VERSION, false},
426 {"TLSv1.2", PG_TLS1_2_VERSION, false},
427 {"TLSv1.3", PG_TLS1_3_VERSION, false},
428 {NULL, 0, false}
429 };
430
431 static const struct config_enum_entry debug_logical_replication_streaming_options[] = {
432 {"buffered", DEBUG_LOGICAL_REP_STREAMING_BUFFERED, false},
433 {"immediate", DEBUG_LOGICAL_REP_STREAMING_IMMEDIATE, false},
434 {NULL, 0, false}
435 };
436
437 StaticAssertDecl(lengthof(ssl_protocol_versions_info) == (PG_TLS1_3_VERSION + 2),
438 "array length mismatch");
439
440 static const struct config_enum_entry recovery_init_sync_method_options[] = {
441 {"fsync", DATA_DIR_SYNC_METHOD_FSYNC, false},
442 #ifdef HAVE_SYNCFS
443 {"syncfs", DATA_DIR_SYNC_METHOD_SYNCFS, false},
444 #endif
445 {NULL, 0, false}
446 };
447
448 static const struct config_enum_entry shared_memory_options[] = {
449 #ifndef WIN32
450 {"sysv", SHMEM_TYPE_SYSV, false},
451 #endif
452 #ifndef EXEC_BACKEND
453 {"mmap", SHMEM_TYPE_MMAP, false},
454 #endif
455 #ifdef WIN32
456 {"windows", SHMEM_TYPE_WINDOWS, false},
457 #endif
458 {NULL, 0, false}
459 };
460
461 static const struct config_enum_entry default_toast_compression_options[] = {
462 {"pglz", TOAST_PGLZ_COMPRESSION, false},
463 #ifdef USE_LZ4
464 {"lz4", TOAST_LZ4_COMPRESSION, false},
465 #endif
466 {NULL, 0, false}
467 };
468
469 static const struct config_enum_entry wal_compression_options[] = {
470 {"pglz", WAL_COMPRESSION_PGLZ, false},
471 #ifdef USE_LZ4
472 {"lz4", WAL_COMPRESSION_LZ4, false},
473 #endif
474 #ifdef USE_ZSTD
475 {"zstd", WAL_COMPRESSION_ZSTD, false},
476 #endif
477 {"on", WAL_COMPRESSION_PGLZ, false},
478 {"off", WAL_COMPRESSION_NONE, false},
479 {"true", WAL_COMPRESSION_PGLZ, true},
480 {"false", WAL_COMPRESSION_NONE, true},
481 {"yes", WAL_COMPRESSION_PGLZ, true},
482 {"no", WAL_COMPRESSION_NONE, true},
483 {"1", WAL_COMPRESSION_PGLZ, true},
484 {"0", WAL_COMPRESSION_NONE, true},
485 {NULL, 0, false}
486 };
487
488 static const struct config_enum_entry file_copy_method_options[] = {
489 {"copy", FILE_COPY_METHOD_COPY, false},
490 #if defined(HAVE_COPYFILE) && defined(COPYFILE_CLONE_FORCE) || defined(HAVE_COPY_FILE_RANGE)
491 {"clone", FILE_COPY_METHOD_CLONE, false},
492 #endif
493 {NULL, 0, false}
494 };
495
496 static const struct config_enum_entry file_extend_method_options[] = {
497 #ifdef HAVE_POSIX_FALLOCATE
498 {"posix_fallocate", FILE_EXTEND_METHOD_POSIX_FALLOCATE, false},
499 #endif
500 {"write_zeros", FILE_EXTEND_METHOD_WRITE_ZEROS, false},
501 {NULL, 0, false}
502 };
503
504 /*
505 * Options for enum values stored in other modules
506 */
507 extern const struct config_enum_entry wal_level_options[];
508 extern const struct config_enum_entry archive_mode_options[];
509 extern const struct config_enum_entry recovery_target_action_options[];
510 extern const struct config_enum_entry wal_sync_method_options[];
511 extern const struct config_enum_entry dynamic_shared_memory_options[];
512
513 /*
514 * GUC option variables that are exported from this module
515 */
516 bool AllowAlterSystem = true;
517 bool log_duration = false;
518 bool Debug_print_plan = false;
519 bool Debug_print_parse = false;
520 bool Debug_print_rewritten = false;
521 bool Debug_pretty_print = true;
522
523 #ifdef DEBUG_NODE_TESTS_ENABLED
524 bool Debug_copy_parse_plan_trees;
525 bool Debug_write_read_parse_plan_trees;
526 bool Debug_raw_expression_coverage_test;
527 #endif
528
529 bool log_parser_stats = false;
530 bool log_planner_stats = false;
531 bool log_executor_stats = false;
532 bool log_statement_stats = false; /* this is sort of all three above
533 * together */
534 bool log_btree_build_stats = false;
535 char *event_source;
536
537 bool row_security;
538 bool check_function_bodies = true;
539
540 /*
541 * This GUC exists solely for backward compatibility, check its definition for
542 * details.
543 */
544 static bool default_with_oids = false;
545
546 bool current_role_is_superuser;
547
548 int log_min_error_statement = ERROR;
549 int log_min_messages = WARNING;
550 int client_min_messages = NOTICE;
551 int log_min_duration_sample = -1;
552 int log_min_duration_statement = -1;
553 int log_parameter_max_length = -1;
554 int log_parameter_max_length_on_error = 0;
555 int log_temp_files = -1;
556 double log_statement_sample_rate = 1.0;
557 double log_xact_sample_rate = 0;
558 char *backtrace_functions;
559
560 int temp_file_limit = -1;
561
562 int num_temp_buffers = 1024;
563
564 char *cluster_name = "";
565 char *ConfigFileName;
566 char *HbaFileName;
567 char *IdentFileName;
568 char *external_pid_file;
569
570 char *application_name;
571
572 int tcp_keepalives_idle;
573 int tcp_keepalives_interval;
574 int tcp_keepalives_count;
575 int tcp_user_timeout;
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 */
583 static int ssl_renegotiation_limit;
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 */
589 int huge_pages = HUGE_PAGES_TRY;
590 int huge_page_size;
591 int huge_pages_status = HUGE_PAGES_UNKNOWN;
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 */
598 static char *syslog_ident_str;
599 static double phony_random_seed;
600 static char *client_encoding_string;
601 static char *datestyle_string;
602 static char *server_encoding_string;
603 static char *server_version_string;
604 static int server_version_num;
605 static char *debug_io_direct_string;
606 static char *restrict_nonsystem_relation_kind_string;
607
608 #ifdef HAVE_SYSLOG
609 #define DEFAULT_SYSLOG_FACILITY LOG_LOCAL0
610 #else
611 #define DEFAULT_SYSLOG_FACILITY 0
612 #endif
613 static int syslog_facility = DEFAULT_SYSLOG_FACILITY;
614
615 static char *timezone_string;
616 static char *log_timezone_string;
617 static char *timezone_abbreviations_string;
618 static char *data_directory;
619 static char *session_authorization_string;
620 static int max_function_args;
621 static int max_index_keys;
622 static int max_identifier_length;
623 static int block_size;
624 static int segment_size;
625 static int shared_memory_size_mb;
626 static int shared_memory_size_in_huge_pages;
627 static int wal_block_size;
628 static int num_os_semaphores;
629 static bool data_checksums;
630 static bool integer_datetimes;
631
632 #ifdef USE_ASSERT_CHECKING
633 #define DEFAULT_ASSERT_ENABLED true
634 #else
635 #define DEFAULT_ASSERT_ENABLED false
636 #endif
637 static bool assert_enabled = DEFAULT_ASSERT_ENABLED;
638
639 static char *recovery_target_timeline_string;
640 static char *recovery_target_string;
641 static char *recovery_target_xid_string;
642 static char *recovery_target_name_string;
643 static char *recovery_target_lsn_string;
644
645 /* should be static, but commands/variable.c needs to get at this */
646 char *role_string;
647
648 /* should be static, but guc.c needs to get at this */
649 bool in_hot_standby_guc;
650
651
652 /*
653 * Displayable names for context types (enum GucContext)
654 *
655 * Note: these strings are deliberately not localized.
656 */
657 const char *const GucContext_Names[] =
658 {
659 [PGC_INTERNAL] = "internal",
660 [PGC_POSTMASTER] = "postmaster",
661 [PGC_SIGHUP] = "sighup",
662 [PGC_SU_BACKEND] = "superuser-backend",
663 [PGC_BACKEND] = "backend",
664 [PGC_SUSET] = "superuser",
665 [PGC_USERSET] = "user",
666 };
667
668 StaticAssertDecl(lengthof(GucContext_Names) == (PGC_USERSET + 1),
669 "array length mismatch");
670
671 /*
672 * Displayable names for source types (enum GucSource)
673 *
674 * Note: these strings are deliberately not localized.
675 */
676 const char *const GucSource_Names[] =
677 {
678 [PGC_S_DEFAULT] = "default",
679 [PGC_S_DYNAMIC_DEFAULT] = "default",
680 [PGC_S_ENV_VAR] = "environment variable",
681 [PGC_S_FILE] = "configuration file",
682 [PGC_S_ARGV] = "command line",
683 [PGC_S_GLOBAL] = "global",
684 [PGC_S_DATABASE] = "database",
685 [PGC_S_USER] = "user",
686 [PGC_S_DATABASE_USER] = "database user",
687 [PGC_S_CLIENT] = "client",
688 [PGC_S_OVERRIDE] = "override",
689 [PGC_S_INTERACTIVE] = "interactive",
690 [PGC_S_TEST] = "test",
691 [PGC_S_SESSION] = "session",
692 };
693
694 StaticAssertDecl(lengthof(GucSource_Names) == (PGC_S_SESSION + 1),
695 "array length mismatch");
696
697 /*
698 * Displayable names for the groupings defined in enum config_group
699 */
700 const char *const config_group_names[] =
701 {
702 [UNGROUPED] = gettext_noop("Ungrouped"),
703 [FILE_LOCATIONS] = gettext_noop("File Locations"),
704 [CONN_AUTH_SETTINGS] = gettext_noop("Connections and Authentication / Connection Settings"),
705 [CONN_AUTH_TCP] = gettext_noop("Connections and Authentication / TCP Settings"),
706 [CONN_AUTH_AUTH] = gettext_noop("Connections and Authentication / Authentication"),
707 [CONN_AUTH_SSL] = gettext_noop("Connections and Authentication / SSL"),
708 [RESOURCES_MEM] = gettext_noop("Resource Usage / Memory"),
709 [RESOURCES_DISK] = gettext_noop("Resource Usage / Disk"),
710 [RESOURCES_KERNEL] = gettext_noop("Resource Usage / Kernel Resources"),
711 [RESOURCES_BGWRITER] = gettext_noop("Resource Usage / Background Writer"),
712 [RESOURCES_IO] = gettext_noop("Resource Usage / I/O"),
713 [RESOURCES_WORKER_PROCESSES] = gettext_noop("Resource Usage / Worker Processes"),
714 [WAL_SETTINGS] = gettext_noop("Write-Ahead Log / Settings"),
715 [WAL_CHECKPOINTS] = gettext_noop("Write-Ahead Log / Checkpoints"),
716 [WAL_ARCHIVING] = gettext_noop("Write-Ahead Log / Archiving"),
717 [WAL_RECOVERY] = gettext_noop("Write-Ahead Log / Recovery"),
718 [WAL_ARCHIVE_RECOVERY] = gettext_noop("Write-Ahead Log / Archive Recovery"),
719 [WAL_RECOVERY_TARGET] = gettext_noop("Write-Ahead Log / Recovery Target"),
720 [WAL_SUMMARIZATION] = gettext_noop("Write-Ahead Log / Summarization"),
721 [REPLICATION_SENDING] = gettext_noop("Replication / Sending Servers"),
722 [REPLICATION_PRIMARY] = gettext_noop("Replication / Primary Server"),
723 [REPLICATION_STANDBY] = gettext_noop("Replication / Standby Servers"),
724 [REPLICATION_SUBSCRIBERS] = gettext_noop("Replication / Subscribers"),
725 [QUERY_TUNING_METHOD] = gettext_noop("Query Tuning / Planner Method Configuration"),
726 [QUERY_TUNING_COST] = gettext_noop("Query Tuning / Planner Cost Constants"),
727 [QUERY_TUNING_GEQO] = gettext_noop("Query Tuning / Genetic Query Optimizer"),
728 [QUERY_TUNING_OTHER] = gettext_noop("Query Tuning / Other Planner Options"),
729 [LOGGING_WHERE] = gettext_noop("Reporting and Logging / Where to Log"),
730 [LOGGING_WHEN] = gettext_noop("Reporting and Logging / When to Log"),
731 [LOGGING_WHAT] = gettext_noop("Reporting and Logging / What to Log"),
732 [PROCESS_TITLE] = gettext_noop("Reporting and Logging / Process Title"),
733 [STATS_MONITORING] = gettext_noop("Statistics / Monitoring"),
734 [STATS_CUMULATIVE] = gettext_noop("Statistics / Cumulative Query and Index Statistics"),
735 [VACUUM_AUTOVACUUM] = gettext_noop("Vacuuming / Automatic Vacuuming"),
736 [VACUUM_COST_DELAY] = gettext_noop("Vacuuming / Cost-Based Vacuum Delay"),
737 [VACUUM_DEFAULT] = gettext_noop("Vacuuming / Default Behavior"),
738 [VACUUM_FREEZING] = gettext_noop("Vacuuming / Freezing"),
739 [CLIENT_CONN_STATEMENT] = gettext_noop("Client Connection Defaults / Statement Behavior"),
740 [CLIENT_CONN_LOCALE] = gettext_noop("Client Connection Defaults / Locale and Formatting"),
741 [CLIENT_CONN_PRELOAD] = gettext_noop("Client Connection Defaults / Shared Library Preloading"),
742 [CLIENT_CONN_OTHER] = gettext_noop("Client Connection Defaults / Other Defaults"),
743 [LOCK_MANAGEMENT] = gettext_noop("Lock Management"),
744 [COMPAT_OPTIONS_PREVIOUS] = gettext_noop("Version and Platform Compatibility / Previous PostgreSQL Versions"),
745 [COMPAT_OPTIONS_OTHER] = gettext_noop("Version and Platform Compatibility / Other Platforms and Clients"),
746 [ERROR_HANDLING_OPTIONS] = gettext_noop("Error Handling"),
747 [PRESET_OPTIONS] = gettext_noop("Preset Options"),
748 [CUSTOM_OPTIONS] = gettext_noop("Customized Options"),
749 [DEVELOPER_OPTIONS] = gettext_noop("Developer Options"),
750 };
751
752 StaticAssertDecl(lengthof(config_group_names) == (DEVELOPER_OPTIONS + 1),
753 "array length mismatch");
754
755 /*
756 * Displayable names for GUC variable types (enum config_type)
757 *
758 * Note: these strings are deliberately not localized.
759 */
760 const char *const config_type_names[] =
761 {
762 [PGC_BOOL] = "bool",
763 [PGC_INT] = "integer",
764 [PGC_REAL] = "real",
765 [PGC_STRING] = "string",
766 [PGC_ENUM] = "enum",
767 };
768
769 StaticAssertDecl(lengthof(config_type_names) == (PGC_ENUM + 1),
770 "array length mismatch");
771
772
773 /*
774 * Contents of GUC tables
775 *
776 * See src/backend/utils/misc/README for design notes.
777 *
778 * TO ADD AN OPTION:
779 *
780 * 1. Declare a global variable of type bool, int, double, or char*
781 * and make use of it.
782 *
783 * 2. Decide at what times it's safe to set the option. See guc.h for
784 * details.
785 *
786 * 3. Decide on a name, a default value, upper and lower bounds (if
787 * applicable), etc.
788 *
789 * 4. Add a record below.
790 *
791 * 5. Add it to src/backend/utils/misc/postgresql.conf.sample, if
792 * appropriate.
793 *
794 * 6. Don't forget to document the option (at least in config.sgml).
795 *
796 * 7. If it's a new GUC_LIST_QUOTE option, you must add it to
797 * variable_is_guc_list_quote() in src/bin/pg_dump/dumputils.c.
798 */
799
800 struct config_bool ConfigureNamesBool[] =
801 {
802 {
803 {"enable_seqscan", PGC_USERSET, QUERY_TUNING_METHOD,
804 gettext_noop("Enables the planner's use of sequential-scan plans."),
805 NULL,
806 GUC_EXPLAIN
807 },
808 &enable_seqscan,
809 true,
810 NULL, NULL, NULL
811 },
812 {
813 {"enable_indexscan", PGC_USERSET, QUERY_TUNING_METHOD,
814 gettext_noop("Enables the planner's use of index-scan plans."),
815 NULL,
816 GUC_EXPLAIN
817 },
818 &enable_indexscan,
819 true,
820 NULL, NULL, NULL
821 },
822 {
823 {"enable_indexonlyscan", PGC_USERSET, QUERY_TUNING_METHOD,
824 gettext_noop("Enables the planner's use of index-only-scan plans."),
825 NULL,
826 GUC_EXPLAIN
827 },
828 &enable_indexonlyscan,
829 true,
830 NULL, NULL, NULL
831 },
832 {
833 {"enable_bitmapscan", PGC_USERSET, QUERY_TUNING_METHOD,
834 gettext_noop("Enables the planner's use of bitmap-scan plans."),
835 NULL,
836 GUC_EXPLAIN
837 },
838 &enable_bitmapscan,
839 true,
840 NULL, NULL, NULL
841 },
842 {
843 {"enable_tidscan", PGC_USERSET, QUERY_TUNING_METHOD,
844 gettext_noop("Enables the planner's use of TID scan plans."),
845 NULL,
846 GUC_EXPLAIN
847 },
848 &enable_tidscan,
849 true,
850 NULL, NULL, NULL
851 },
852 {
853 {"enable_sort", PGC_USERSET, QUERY_TUNING_METHOD,
854 gettext_noop("Enables the planner's use of explicit sort steps."),
855 NULL,
856 GUC_EXPLAIN
857 },
858 &enable_sort,
859 true,
860 NULL, NULL, NULL
861 },
862 {
863 {"enable_incremental_sort", PGC_USERSET, QUERY_TUNING_METHOD,
864 gettext_noop("Enables the planner's use of incremental sort steps."),
865 NULL,
866 GUC_EXPLAIN
867 },
868 &enable_incremental_sort,
869 true,
870 NULL, NULL, NULL
871 },
872 {
873 {"enable_hashagg", PGC_USERSET, QUERY_TUNING_METHOD,
874 gettext_noop("Enables the planner's use of hashed aggregation plans."),
875 NULL,
876 GUC_EXPLAIN
877 },
878 &enable_hashagg,
879 true,
880 NULL, NULL, NULL
881 },
882 {
883 {"enable_material", PGC_USERSET, QUERY_TUNING_METHOD,
884 gettext_noop("Enables the planner's use of materialization."),
885 NULL,
886 GUC_EXPLAIN
887 },
888 &enable_material,
889 true,
890 NULL, NULL, NULL
891 },
892 {
893 {"enable_memoize", PGC_USERSET, QUERY_TUNING_METHOD,
894 gettext_noop("Enables the planner's use of memoization."),
895 NULL,
896 GUC_EXPLAIN
897 },
898 &enable_memoize,
899 true,
900 NULL, NULL, NULL
901 },
902 {
903 {"enable_nestloop", PGC_USERSET, QUERY_TUNING_METHOD,
904 gettext_noop("Enables the planner's use of nested-loop join plans."),
905 NULL,
906 GUC_EXPLAIN
907 },
908 &enable_nestloop,
909 true,
910 NULL, NULL, NULL
911 },
912 {
913 {"enable_mergejoin", PGC_USERSET, QUERY_TUNING_METHOD,
914 gettext_noop("Enables the planner's use of merge join plans."),
915 NULL,
916 GUC_EXPLAIN
917 },
918 &enable_mergejoin,
919 true,
920 NULL, NULL, NULL
921 },
922 {
923 {"enable_hashjoin", PGC_USERSET, QUERY_TUNING_METHOD,
924 gettext_noop("Enables the planner's use of hash join plans."),
925 NULL,
926 GUC_EXPLAIN
927 },
928 &enable_hashjoin,
929 true,
930 NULL, NULL, NULL
931 },
932 {
933 {"enable_gathermerge", PGC_USERSET, QUERY_TUNING_METHOD,
934 gettext_noop("Enables the planner's use of gather merge plans."),
935 NULL,
936 GUC_EXPLAIN
937 },
938 &enable_gathermerge,
939 true,
940 NULL, NULL, NULL
941 },
942 {
943 {"enable_partitionwise_join", PGC_USERSET, QUERY_TUNING_METHOD,
944 gettext_noop("Enables partitionwise join."),
945 NULL,
946 GUC_EXPLAIN
947 },
948 &enable_partitionwise_join,
949 false,
950 NULL, NULL, NULL
951 },
952 {
953 {"enable_partitionwise_aggregate", PGC_USERSET, QUERY_TUNING_METHOD,
954 gettext_noop("Enables partitionwise aggregation and grouping."),
955 NULL,
956 GUC_EXPLAIN
957 },
958 &enable_partitionwise_aggregate,
959 false,
960 NULL, NULL, NULL
961 },
962 {
963 {"enable_parallel_append", PGC_USERSET, QUERY_TUNING_METHOD,
964 gettext_noop("Enables the planner's use of parallel append plans."),
965 NULL,
966 GUC_EXPLAIN
967 },
968 &enable_parallel_append,
969 true,
970 NULL, NULL, NULL
971 },
972 {
973 {"enable_parallel_hash", PGC_USERSET, QUERY_TUNING_METHOD,
974 gettext_noop("Enables the planner's use of parallel hash plans."),
975 NULL,
976 GUC_EXPLAIN
977 },
978 &enable_parallel_hash,
979 true,
980 NULL, NULL, NULL
981 },
982 {
983 {"enable_partition_pruning", PGC_USERSET, QUERY_TUNING_METHOD,
984 gettext_noop("Enables plan-time and execution-time partition pruning."),
985 gettext_noop("Allows the query planner and executor to compare partition "
986 "bounds to conditions in the query to determine which "
987 "partitions must be scanned."),
988 GUC_EXPLAIN
989 },
990 &enable_partition_pruning,
991 true,
992 NULL, NULL, NULL
993 },
994 {
995 {"enable_presorted_aggregate", PGC_USERSET, QUERY_TUNING_METHOD,
996 gettext_noop("Enables the planner's ability to produce plans that "
997 "provide presorted input for ORDER BY / DISTINCT aggregate "
998 "functions."),
999 gettext_noop("Allows the query planner to build plans that provide "
1000 "presorted input for aggregate functions with an ORDER BY / "
1001 "DISTINCT clause. When disabled, implicit sorts are always "
1002 "performed during execution."),
1003 GUC_EXPLAIN
1004 },
1005 &enable_presorted_aggregate,
1006 true,
1007 NULL, NULL, NULL
1008 },
1009 {
1010 {"enable_async_append", PGC_USERSET, QUERY_TUNING_METHOD,
1011 gettext_noop("Enables the planner's use of async append plans."),
1012 NULL,
1013 GUC_EXPLAIN
1014 },
1015 &enable_async_append,
1016 true,
1017 NULL, NULL, NULL
1018 },
1019 {
1020 {"enable_self_join_elimination", PGC_USERSET, QUERY_TUNING_METHOD,
1021 gettext_noop("Enables removal of unique self-joins."),
1022 NULL,
1023 GUC_EXPLAIN
1024 },
1025 &enable_self_join_elimination,
1026 true,
1027 NULL, NULL, NULL
1028 },
1029 {
1030 {"enable_group_by_reordering", PGC_USERSET, QUERY_TUNING_METHOD,
1031 gettext_noop("Enables reordering of GROUP BY keys."),
1032 NULL,
1033 GUC_EXPLAIN
1034 },
1035 &enable_group_by_reordering,
1036 true,
1037 NULL, NULL, NULL
1038 },
1039 {
1040 {"enable_distinct_reordering", PGC_USERSET, QUERY_TUNING_METHOD,
1041 gettext_noop("Enables reordering of DISTINCT keys."),
1042 NULL,
1043 GUC_EXPLAIN
1044 },
1045 &enable_distinct_reordering,
1046 true,
1047 NULL, NULL, NULL
1048 },
1049 {
1050 {"geqo", PGC_USERSET, QUERY_TUNING_GEQO,
1051 gettext_noop("Enables genetic query optimization."),
1052 gettext_noop("This algorithm attempts to do planning without "
1053 "exhaustive searching."),
1054 GUC_EXPLAIN
1055 },
1056 &enable_geqo,
1057 true,
1058 NULL, NULL, NULL
1059 },
1060 {
1061 /*
1062 * Not for general use --- used by SET SESSION AUTHORIZATION and SET
1063 * ROLE
1064 */
1065 {"is_superuser", PGC_INTERNAL, UNGROUPED,
1066 gettext_noop("Shows whether the current user is a superuser."),
1067 NULL,
1068 GUC_REPORT | GUC_NO_SHOW_ALL | GUC_NO_RESET_ALL | GUC_NOT_IN_SAMPLE | GUC_DISALLOW_IN_FILE | GUC_ALLOW_IN_PARALLEL
1069 },
1070 &current_role_is_superuser,
1071 false,
1072 NULL, NULL, NULL
1073 },
1074 {
1075 /*
1076 * This setting itself cannot be set by ALTER SYSTEM to avoid an
1077 * operator turning this setting off by using ALTER SYSTEM, without a
1078 * way to turn it back on.
1079 */
1080 {"allow_alter_system", PGC_SIGHUP, COMPAT_OPTIONS_OTHER,
1081 gettext_noop("Allows running the ALTER SYSTEM command."),
1082 gettext_noop("Can be set to off for environments where global configuration "
1083 "changes should be made using a different method."),
1084 GUC_DISALLOW_IN_AUTO_FILE
1085 },
1086 &AllowAlterSystem,
1087 true,
1088 NULL, NULL, NULL
1089 },
1090 {
1091 {"bonjour", PGC_POSTMASTER, CONN_AUTH_SETTINGS,
1092 gettext_noop("Enables advertising the server via Bonjour."),
1093 NULL
1094 },
1095 &enable_bonjour,
1096 false,
1097 check_bonjour, NULL, NULL
1098 },
1099 {
1100 {"track_commit_timestamp", PGC_POSTMASTER, REPLICATION_SENDING,
1101 gettext_noop("Collects transaction commit time."),
1102 NULL
1103 },
1104 &track_commit_timestamp,
1105 false,
1106 NULL, NULL, NULL
1107 },
1108 {
1109 {"ssl", PGC_SIGHUP, CONN_AUTH_SSL,
1110 gettext_noop("Enables SSL connections."),
1111 NULL
1112 },
1113 &EnableSSL,
1114 false,
1115 check_ssl, NULL, NULL
1116 },
1117 {
1118 {"ssl_passphrase_command_supports_reload", PGC_SIGHUP, CONN_AUTH_SSL,
1119 gettext_noop("Controls whether \"ssl_passphrase_command\" is called during server reload."),
1120 NULL
1121 },
1122 &ssl_passphrase_command_supports_reload,
1123 false,
1124 NULL, NULL, NULL
1125 },
1126 {
1127 {"ssl_prefer_server_ciphers", PGC_SIGHUP, CONN_AUTH_SSL,
1128 gettext_noop("Give priority to server ciphersuite order."),
1129 NULL
1130 },
1131 &SSLPreferServerCiphers,
1132 true,
1133 NULL, NULL, NULL
1134 },
1135 {
1136 {"fsync", PGC_SIGHUP, WAL_SETTINGS,
1137 gettext_noop("Forces synchronization of updates to disk."),
1138 gettext_noop("The server will use the fsync() system call in several places to make "
1139 "sure that updates are physically written to disk. This ensures "
1140 "that a database cluster will recover to a consistent state after "
1141 "an operating system or hardware crash.")
1142 },
1143 &enableFsync,
1144 true,
1145 NULL, NULL, NULL
1146 },
1147 {
1148 {"ignore_checksum_failure", PGC_SUSET, DEVELOPER_OPTIONS,
1149 gettext_noop("Continues processing after a checksum failure."),
1150 gettext_noop("Detection of a checksum failure normally causes PostgreSQL to "
1151 "report an error, aborting the current transaction. Setting "
1152 "ignore_checksum_failure to true causes the system to ignore the failure "
1153 "(but still report a warning), and continue processing. This "
1154 "behavior could cause crashes or other serious problems. Only "
1155 "has an effect if checksums are enabled."),
1156 GUC_NOT_IN_SAMPLE
1157 },
1158 &ignore_checksum_failure,
1159 false,
1160 NULL, NULL, NULL
1161 },
1162 {
1163 {"zero_damaged_pages", PGC_SUSET, DEVELOPER_OPTIONS,
1164 gettext_noop("Continues processing past damaged page headers."),
1165 gettext_noop("Detection of a damaged page header normally causes PostgreSQL to "
1166 "report an error, aborting the current transaction. Setting "
1167 "\"zero_damaged_pages\" to true causes the system to instead report a "
1168 "warning, zero out the damaged page, and continue processing. This "
1169 "behavior will destroy data, namely all the rows on the damaged page."),
1170 GUC_NOT_IN_SAMPLE
1171 },
1172 &zero_damaged_pages,
1173 false,
1174 NULL, NULL, NULL
1175 },
1176 {
1177 {"ignore_invalid_pages", PGC_POSTMASTER, DEVELOPER_OPTIONS,
1178 gettext_noop("Continues recovery after an invalid pages failure."),
1179 gettext_noop("Detection of WAL records having references to "
1180 "invalid pages during recovery causes PostgreSQL to "
1181 "raise a PANIC-level error, aborting the recovery. "
1182 "Setting \"ignore_invalid_pages\" to true causes "
1183 "the system to ignore invalid page references "
1184 "in WAL records (but still report a warning), "
1185 "and continue recovery. This behavior may cause "
1186 "crashes, data loss, propagate or hide corruption, "
1187 "or other serious problems. Only has an effect "
1188 "during recovery or in standby mode."),
1189 GUC_NOT_IN_SAMPLE
1190 },
1191 &ignore_invalid_pages,
1192 false,
1193 NULL, NULL, NULL
1194 },
1195 {
1196 {"full_page_writes", PGC_SIGHUP, WAL_SETTINGS,
1197 gettext_noop("Writes full pages to WAL when first modified after a checkpoint."),
1198 gettext_noop("A page write in process during an operating system crash might be "
1199 "only partially written to disk. During recovery, the row changes "
1200 "stored in WAL are not enough to recover. This option writes "
1201 "pages when first modified after a checkpoint to WAL so full recovery "
1202 "is possible.")
1203 },
1204 &fullPageWrites,
1205 true,
1206 NULL, NULL, NULL
1207 },
1208
1209 {
1210 {"wal_log_hints", PGC_POSTMASTER, WAL_SETTINGS,
1211 gettext_noop("Writes full pages to WAL when first modified after a checkpoint, even for a non-critical modification."),
1212 NULL
1213 },
1214 &wal_log_hints,
1215 false,
1216 NULL, NULL, NULL
1217 },
1218
1219 {
1220 {"wal_init_zero", PGC_SUSET, WAL_SETTINGS,
1221 gettext_noop("Writes zeroes to new WAL files before first use."),
1222 NULL
1223 },
1224 &wal_init_zero,
1225 true,
1226 NULL, NULL, NULL
1227 },
1228
1229 {
1230 {"wal_recycle", PGC_SUSET, WAL_SETTINGS,
1231 gettext_noop("Recycles WAL files by renaming them."),
1232 NULL
1233 },
1234 &wal_recycle,
1235 true,
1236 NULL, NULL, NULL
1237 },
1238
1239 {
1240 {"log_checkpoints", PGC_SIGHUP, LOGGING_WHAT,
1241 gettext_noop("Logs each checkpoint."),
1242 NULL
1243 },
1244 &log_checkpoints,
1245 true,
1246 NULL, NULL, NULL
1247 },
1248 {
1249 {"trace_connection_negotiation", PGC_POSTMASTER, DEVELOPER_OPTIONS,
1250 gettext_noop("Logs details of pre-authentication connection handshake."),
1251 NULL,
1252 GUC_NOT_IN_SAMPLE
1253 },
1254 &Trace_connection_negotiation,
1255 false,
1256 NULL, NULL, NULL
1257 },
1258 {
1259 {"log_disconnections", PGC_SU_BACKEND, LOGGING_WHAT,
1260 gettext_noop("Logs end of a session, including duration."),
1261 NULL
1262 },
1263 &Log_disconnections,
1264 false,
1265 NULL, NULL, NULL
1266 },
1267 {
1268 {"log_replication_commands", PGC_SUSET, LOGGING_WHAT,
1269 gettext_noop("Logs each replication command."),
1270 NULL
1271 },
1272 &log_replication_commands,
1273 false,
1274 NULL, NULL, NULL
1275 },
1276 {
1277 {"debug_assertions", PGC_INTERNAL, PRESET_OPTIONS,
1278 gettext_noop("Shows whether the running server has assertion checks enabled."),
1279 NULL,
1280 GUC_NOT_IN_SAMPLE | GUC_DISALLOW_IN_FILE
1281 },
1282 &assert_enabled,
1283 DEFAULT_ASSERT_ENABLED,
1284 NULL, NULL, NULL
1285 },
1286
1287 {
1288 {"exit_on_error", PGC_USERSET, ERROR_HANDLING_OPTIONS,
1289 gettext_noop("Terminate session on any error."),
1290 NULL
1291 },
1292 &ExitOnAnyError,
1293 false,
1294 NULL, NULL, NULL
1295 },
1296 {
1297 {"restart_after_crash", PGC_SIGHUP, ERROR_HANDLING_OPTIONS,
1298 gettext_noop("Reinitialize server after backend crash."),
1299 NULL
1300 },
1301 &restart_after_crash,
1302 true,
1303 NULL, NULL, NULL
1304 },
1305 {
1306 {"remove_temp_files_after_crash", PGC_SIGHUP, DEVELOPER_OPTIONS,
1307 gettext_noop("Remove temporary files after backend crash."),
1308 NULL,
1309 GUC_NOT_IN_SAMPLE
1310 },
1311 &remove_temp_files_after_crash,
1312 true,
1313 NULL, NULL, NULL
1314 },
1315 {
1316 {"send_abort_for_crash", PGC_SIGHUP, DEVELOPER_OPTIONS,
1317 gettext_noop("Send SIGABRT not SIGQUIT to child processes after backend crash."),
1318 NULL,
1319 GUC_NOT_IN_SAMPLE
1320 },
1321 &send_abort_for_crash,
1322 false,
1323 NULL, NULL, NULL
1324 },
1325 {
1326 {"send_abort_for_kill", PGC_SIGHUP, DEVELOPER_OPTIONS,
1327 gettext_noop("Send SIGABRT not SIGKILL to stuck child processes."),
1328 NULL,
1329 GUC_NOT_IN_SAMPLE
1330 },
1331 &send_abort_for_kill,
1332 false,
1333 NULL, NULL, NULL
1334 },
1335
1336 {
1337 {"log_duration", PGC_SUSET, LOGGING_WHAT,
1338 gettext_noop("Logs the duration of each completed SQL statement."),
1339 NULL
1340 },
1341 &log_duration,
1342 false,
1343 NULL, NULL, NULL
1344 },
1345 #ifdef DEBUG_NODE_TESTS_ENABLED
1346 {
1347 {"debug_copy_parse_plan_trees", PGC_SUSET, DEVELOPER_OPTIONS,
1348 gettext_noop("Set this to force all parse and plan trees to be passed through "
1349 "copyObject(), to facilitate catching errors and omissions in "
1350 "copyObject()."),
1351 NULL,
1352 GUC_NOT_IN_SAMPLE
1353 },
1354 &Debug_copy_parse_plan_trees,
1355 /* support for legacy compile-time setting */
1356 #ifdef COPY_PARSE_PLAN_TREES
1357 true,
1358 #else
1359 false,
1360 #endif
1361 NULL, NULL, NULL
1362 },
1363 {
1364 {"debug_write_read_parse_plan_trees", PGC_SUSET, DEVELOPER_OPTIONS,
1365 gettext_noop("Set this to force all parse and plan trees to be passed through "
1366 "outfuncs.c/readfuncs.c, to facilitate catching errors and omissions in "
1367 "those modules."),
1368 NULL,
1369 GUC_NOT_IN_SAMPLE
1370 },
1371 &Debug_write_read_parse_plan_trees,
1372 /* support for legacy compile-time setting */
1373 #ifdef WRITE_READ_PARSE_PLAN_TREES
1374 true,
1375 #else
1376 false,
1377 #endif
1378 NULL, NULL, NULL
1379 },
1380 {
1381 {"debug_raw_expression_coverage_test", PGC_SUSET, DEVELOPER_OPTIONS,
1382 gettext_noop("Set this to force all raw parse trees for DML statements to be scanned "
1383 "by raw_expression_tree_walker(), to facilitate catching errors and "
1384 "omissions in that function."),
1385 NULL,
1386 GUC_NOT_IN_SAMPLE
1387 },
1388 &Debug_raw_expression_coverage_test,
1389 /* support for legacy compile-time setting */
1390 #ifdef RAW_EXPRESSION_COVERAGE_TEST
1391 true,
1392 #else
1393 false,
1394 #endif
1395 NULL, NULL, NULL
1396 },
1397 #endif /* DEBUG_NODE_TESTS_ENABLED */
1398 {
1399 {"debug_print_parse", PGC_USERSET, LOGGING_WHAT,
1400 gettext_noop("Logs each query's parse tree."),
1401 NULL
1402 },
1403 &Debug_print_parse,
1404 false,
1405 NULL, NULL, NULL
1406 },
1407 {
1408 {"debug_print_rewritten", PGC_USERSET, LOGGING_WHAT,
1409 gettext_noop("Logs each query's rewritten parse tree."),
1410 NULL
1411 },
1412 &Debug_print_rewritten,
1413 false,
1414 NULL, NULL, NULL
1415 },
1416 {
1417 {"debug_print_plan", PGC_USERSET, LOGGING_WHAT,
1418 gettext_noop("Logs each query's execution plan."),
1419 NULL
1420 },
1421 &Debug_print_plan,
1422 false,
1423 NULL, NULL, NULL
1424 },
1425 {
1426 {"debug_pretty_print", PGC_USERSET, LOGGING_WHAT,
1427 gettext_noop("Indents parse and plan tree displays."),
1428 NULL
1429 },
1430 &Debug_pretty_print,
1431 true,
1432 NULL, NULL, NULL
1433 },
1434 {
1435 {"log_parser_stats", PGC_SUSET, STATS_MONITORING,
1436 gettext_noop("Writes parser performance statistics to the server log."),
1437 NULL
1438 },
1439 &log_parser_stats,
1440 false,
1441 check_stage_log_stats, NULL, NULL
1442 },
1443 {
1444 {"log_planner_stats", PGC_SUSET, STATS_MONITORING,
1445 gettext_noop("Writes planner performance statistics to the server log."),
1446 NULL
1447 },
1448 &log_planner_stats,
1449 false,
1450 check_stage_log_stats, NULL, NULL
1451 },
1452 {
1453 {"log_executor_stats", PGC_SUSET, STATS_MONITORING,
1454 gettext_noop("Writes executor performance statistics to the server log."),
1455 NULL
1456 },
1457 &log_executor_stats,
1458 false,
1459 check_stage_log_stats, NULL, NULL
1460 },
1461 {
1462 {"log_statement_stats", PGC_SUSET, STATS_MONITORING,
1463 gettext_noop("Writes cumulative performance statistics to the server log."),
1464 NULL
1465 },
1466 &log_statement_stats,
1467 false,
1468 check_log_stats, NULL, NULL
1469 },
1470 #ifdef BTREE_BUILD_STATS
1471 {
1472 {"log_btree_build_stats", PGC_SUSET, DEVELOPER_OPTIONS,
1473 gettext_noop("Logs system resource usage statistics (memory and CPU) on various B-tree operations."),
1474 NULL,
1475 GUC_NOT_IN_SAMPLE
1476 },
1477 &log_btree_build_stats,
1478 false,
1479 NULL, NULL, NULL
1480 },
1481 #endif
1482
1483 {
1484 {"track_activities", PGC_SUSET, STATS_CUMULATIVE,
1485 gettext_noop("Collects information about executing commands."),
1486 gettext_noop("Enables the collection of information on the currently "
1487 "executing command of each session, along with "
1488 "the time at which that command began execution.")
1489 },
1490 &pgstat_track_activities,
1491 true,
1492 NULL, NULL, NULL
1493 },
1494 {
1495 {"track_counts", PGC_SUSET, STATS_CUMULATIVE,
1496 gettext_noop("Collects statistics on database activity."),
1497 NULL
1498 },
1499 &pgstat_track_counts,
1500 true,
1501 NULL, NULL, NULL
1502 },
1503 {
1504 {"track_cost_delay_timing", PGC_SUSET, STATS_CUMULATIVE,
1505 gettext_noop("Collects timing statistics for cost-based vacuum delay."),
1506 NULL
1507 },
1508 &track_cost_delay_timing,
1509 false,
1510 NULL, NULL, NULL
1511 },
1512 {
1513 {"track_io_timing", PGC_SUSET, STATS_CUMULATIVE,
1514 gettext_noop("Collects timing statistics for database I/O activity."),
1515 NULL
1516 },
1517 &track_io_timing,
1518 false,
1519 NULL, NULL, NULL
1520 },
1521 {
1522 {"track_wal_io_timing", PGC_SUSET, STATS_CUMULATIVE,
1523 gettext_noop("Collects timing statistics for WAL I/O activity."),
1524 NULL
1525 },
1526 &track_wal_io_timing,
1527 false,
1528 NULL, NULL, NULL
1529 },
1530
1531 {
1532 {"update_process_title", PGC_SUSET, PROCESS_TITLE,
1533 gettext_noop("Updates the process title to show the active SQL command."),
1534 gettext_noop("Enables updating of the process title every time a new SQL command is received by the server.")
1535 },
1536 &update_process_title,
1537 DEFAULT_UPDATE_PROCESS_TITLE,
1538 NULL, NULL, NULL
1539 },
1540
1541 {
1542 {"autovacuum", PGC_SIGHUP, VACUUM_AUTOVACUUM,
1543 gettext_noop("Starts the autovacuum subprocess."),
1544 NULL
1545 },
1546 &autovacuum_start_daemon,
1547 true,
1548 NULL, NULL, NULL
1549 },
1550
1551 {
1552 {"trace_notify", PGC_USERSET, DEVELOPER_OPTIONS,
1553 gettext_noop("Generates debugging output for LISTEN and NOTIFY."),
1554 NULL,
1555 GUC_NOT_IN_SAMPLE
1556 },
1557 &Trace_notify,
1558 false,
1559 NULL, NULL, NULL
1560 },
1561
1562 #ifdef LOCK_DEBUG
1563 {
1564 {"trace_locks", PGC_SUSET, DEVELOPER_OPTIONS,
1565 gettext_noop("Emits information about lock usage."),
1566 NULL,
1567 GUC_NOT_IN_SAMPLE
1568 },
1569 &Trace_locks,
1570 false,
1571 NULL, NULL, NULL
1572 },
1573 {
1574 {"trace_userlocks", PGC_SUSET, DEVELOPER_OPTIONS,
1575 gettext_noop("Emits information about user lock usage."),
1576 NULL,
1577 GUC_NOT_IN_SAMPLE
1578 },
1579 &Trace_userlocks,
1580 false,
1581 NULL, NULL, NULL
1582 },
1583 {
1584 {"trace_lwlocks", PGC_SUSET, DEVELOPER_OPTIONS,
1585 gettext_noop("Emits information about lightweight lock usage."),
1586 NULL,
1587 GUC_NOT_IN_SAMPLE
1588 },
1589 &Trace_lwlocks,
1590 false,
1591 NULL, NULL, NULL
1592 },
1593 {
1594 {"debug_deadlocks", PGC_SUSET, DEVELOPER_OPTIONS,
1595 gettext_noop("Dumps information about all current locks when a deadlock timeout occurs."),
1596 NULL,
1597 GUC_NOT_IN_SAMPLE
1598 },
1599 &Debug_deadlocks,
1600 false,
1601 NULL, NULL, NULL
1602 },
1603 #endif
1604
1605 {
1606 {"log_lock_waits", PGC_SUSET, LOGGING_WHAT,
1607 gettext_noop("Logs long lock waits."),
1608 NULL
1609 },
1610 &log_lock_waits,
1611 false,
1612 NULL, NULL, NULL
1613 },
1614 {
1615 {"log_lock_failures", PGC_SUSET, LOGGING_WHAT,
1616 gettext_noop("Logs lock failures."),
1617 NULL
1618 },
1619 &log_lock_failures,
1620 false,
1621 NULL, NULL, NULL
1622 },
1623 {
1624 {"log_recovery_conflict_waits", PGC_SIGHUP, LOGGING_WHAT,
1625 gettext_noop("Logs standby recovery conflict waits."),
1626 NULL
1627 },
1628 &log_recovery_conflict_waits,
1629 false,
1630 NULL, NULL, NULL
1631 },
1632 {
1633 {"log_hostname", PGC_SIGHUP, LOGGING_WHAT,
1634 gettext_noop("Logs the host name in the connection logs."),
1635 gettext_noop("By default, connection logs only show the IP address "
1636 "of the connecting host. If you want them to show the host name you "
1637 "can turn this on, but depending on your host name resolution "
1638 "setup it might impose a non-negligible performance penalty.")
1639 },
1640 &log_hostname,
1641 false,
1642 NULL, NULL, NULL
1643 },
1644 {
1645 {"transform_null_equals", PGC_USERSET, COMPAT_OPTIONS_OTHER,
1646 gettext_noop("Treats \"expr=NULL\" as \"expr IS NULL\"."),
1647 gettext_noop("When turned on, expressions of the form expr = NULL "
1648 "(or NULL = expr) are treated as expr IS NULL, that is, they "
1649 "return true if expr evaluates to the null value, and false "
1650 "otherwise. The correct behavior of expr = NULL is to always "
1651 "return null (unknown).")
1652 },
1653 &Transform_null_equals,
1654 false,
1655 NULL, NULL, NULL
1656 },
1657 {
1658 {"default_transaction_read_only", PGC_USERSET, CLIENT_CONN_STATEMENT,
1659 gettext_noop("Sets the default read-only status of new transactions."),
1660 NULL,
1661 GUC_REPORT
1662 },
1663 &DefaultXactReadOnly,
1664 false,
1665 NULL, NULL, NULL
1666 },
1667 {
1668 {"transaction_read_only", PGC_USERSET, CLIENT_CONN_STATEMENT,
1669 gettext_noop("Sets the current transaction's read-only status."),
1670 NULL,
1671 GUC_NO_RESET | GUC_NO_RESET_ALL | GUC_NOT_IN_SAMPLE | GUC_DISALLOW_IN_FILE
1672 },
1673 &XactReadOnly,
1674 false,
1675 check_transaction_read_only, NULL, NULL
1676 },
1677 {
1678 {"default_transaction_deferrable", PGC_USERSET, CLIENT_CONN_STATEMENT,
1679 gettext_noop("Sets the default deferrable status of new transactions."),
1680 NULL
1681 },
1682 &DefaultXactDeferrable,
1683 false,
1684 NULL, NULL, NULL
1685 },
1686 {
1687 {"transaction_deferrable", PGC_USERSET, CLIENT_CONN_STATEMENT,
1688 gettext_noop("Whether to defer a read-only serializable transaction until it can be executed with no possible serialization failures."),
1689 NULL,
1690 GUC_NO_RESET | GUC_NO_RESET_ALL | GUC_NOT_IN_SAMPLE | GUC_DISALLOW_IN_FILE
1691 },
1692 &XactDeferrable,
1693 false,
1694 check_transaction_deferrable, NULL, NULL
1695 },
1696 {
1697 {"row_security", PGC_USERSET, CLIENT_CONN_STATEMENT,
1698 gettext_noop("Enables row security."),
1699 gettext_noop("When enabled, row security will be applied to all users.")
1700 },
1701 &row_security,
1702 true,
1703 NULL, NULL, NULL
1704 },
1705 {
1706 {"check_function_bodies", PGC_USERSET, CLIENT_CONN_STATEMENT,
1707 gettext_noop("Check routine bodies during CREATE FUNCTION and CREATE PROCEDURE."),
1708 NULL
1709 },
1710 &check_function_bodies,
1711 true,
1712 NULL, NULL, NULL
1713 },
1714 {
1715 {"array_nulls", PGC_USERSET, COMPAT_OPTIONS_PREVIOUS,
1716 gettext_noop("Enables input of NULL elements in arrays."),
1717 gettext_noop("When turned on, unquoted NULL in an array input "
1718 "value means a null value; "
1719 "otherwise it is taken literally.")
1720 },
1721 &Array_nulls,
1722 true,
1723 NULL, NULL, NULL
1724 },
1725
1726 /*
1727 * WITH OIDS support, and consequently default_with_oids, was removed in
1728 * PostgreSQL 12, but we tolerate the parameter being set to false to
1729 * avoid unnecessarily breaking older dump files.
1730 */
1731 {
1732 {"default_with_oids", PGC_USERSET, COMPAT_OPTIONS_PREVIOUS,
1733 gettext_noop("WITH OIDS is no longer supported; this can only be false."),
1734 NULL,
1735 GUC_NO_SHOW_ALL | GUC_NOT_IN_SAMPLE
1736 },
1737 &default_with_oids,
1738 false,
1739 check_default_with_oids, NULL, NULL
1740 },
1741 {
1742 {"logging_collector", PGC_POSTMASTER, LOGGING_WHERE,
1743 gettext_noop("Start a subprocess to capture stderr, csvlog and/or jsonlog into log files."),
1744 NULL
1745 },
1746 &Logging_collector,
1747 false,
1748 NULL, NULL, NULL
1749 },
1750 {
1751 {"log_truncate_on_rotation", PGC_SIGHUP, LOGGING_WHERE,
1752 gettext_noop("Truncate existing log files of same name during log rotation."),
1753 NULL
1754 },
1755 &Log_truncate_on_rotation,
1756 false,
1757 NULL, NULL, NULL
1758 },
1759
1760 {
1761 {"trace_sort", PGC_USERSET, DEVELOPER_OPTIONS,
1762 gettext_noop("Emit information about resource usage in sorting."),
1763 NULL,
1764 GUC_NOT_IN_SAMPLE
1765 },
1766 &trace_sort,
1767 false,
1768 NULL, NULL, NULL
1769 },
1770
1771 #ifdef TRACE_SYNCSCAN
1772 /* this is undocumented because not exposed in a standard build */
1773 {
1774 {"trace_syncscan", PGC_USERSET, DEVELOPER_OPTIONS,
1775 gettext_noop("Generate debugging output for synchronized scanning."),
1776 NULL,
1777 GUC_NOT_IN_SAMPLE
1778 },
1779 &trace_syncscan,
1780 false,
1781 NULL, NULL, NULL
1782 },
1783 #endif
1784
1785 #ifdef DEBUG_BOUNDED_SORT
1786 /* this is undocumented because not exposed in a standard build */
1787 {
1788 {
1789 "optimize_bounded_sort", PGC_USERSET, QUERY_TUNING_METHOD,
1790 gettext_noop("Enables bounded sorting using heap sort."),
1791 NULL,
1792 GUC_NOT_IN_SAMPLE | GUC_EXPLAIN
1793 },
1794 &optimize_bounded_sort,
1795 true,
1796 NULL, NULL, NULL
1797 },
1798 #endif
1799
1800 #ifdef WAL_DEBUG
1801 {
1802 {"wal_debug", PGC_SUSET, DEVELOPER_OPTIONS,
1803 gettext_noop("Emit WAL-related debugging output."),
1804 NULL,
1805 GUC_NOT_IN_SAMPLE
1806 },
1807 &XLOG_DEBUG,
1808 false,
1809 NULL, NULL, NULL
1810 },
1811 #endif
1812
1813 {
1814 {"integer_datetimes", PGC_INTERNAL, PRESET_OPTIONS,
1815 gettext_noop("Shows whether datetimes are integer based."),
1816 NULL,
1817 GUC_REPORT | GUC_NOT_IN_SAMPLE | GUC_DISALLOW_IN_FILE
1818 },
1819 &integer_datetimes,
1820 true,
1821 NULL, NULL, NULL
1822 },
1823
1824 {
1825 {"krb_caseins_users", PGC_SIGHUP, CONN_AUTH_AUTH,
1826 gettext_noop("Sets whether Kerberos and GSSAPI user names should be treated as case-insensitive."),
1827 NULL
1828 },
1829 &pg_krb_caseins_users,
1830 false,
1831 NULL, NULL, NULL
1832 },
1833
1834 {
1835 {"gss_accept_delegation", PGC_SIGHUP, CONN_AUTH_AUTH,
1836 gettext_noop("Sets whether GSSAPI delegation should be accepted from the client."),
1837 NULL
1838 },
1839 &pg_gss_accept_delegation,
1840 false,
1841 NULL, NULL, NULL
1842 },
1843
1844 {
1845 {"escape_string_warning", PGC_USERSET, COMPAT_OPTIONS_PREVIOUS,
1846 gettext_noop("Warn about backslash escapes in ordinary string literals."),
1847 NULL
1848 },
1849 &escape_string_warning,
1850 true,
1851 NULL, NULL, NULL
1852 },
1853
1854 {
1855 {"standard_conforming_strings", PGC_USERSET, COMPAT_OPTIONS_PREVIOUS,
1856 gettext_noop("Causes '...' strings to treat backslashes literally."),
1857 NULL,
1858 GUC_REPORT
1859 },
1860 &standard_conforming_strings,
1861 true,
1862 NULL, NULL, NULL
1863 },
1864
1865 {
1866 {"synchronize_seqscans", PGC_USERSET, COMPAT_OPTIONS_PREVIOUS,
1867 gettext_noop("Enables synchronized sequential scans."),
1868 NULL
1869 },
1870 &synchronize_seqscans,
1871 true,
1872 NULL, NULL, NULL
1873 },
1874
1875 {
1876 {"recovery_target_inclusive", PGC_POSTMASTER, WAL_RECOVERY_TARGET,
1877 gettext_noop("Sets whether to include or exclude transaction with recovery target."),
1878 NULL
1879 },
1880 &recoveryTargetInclusive,
1881 true,
1882 NULL, NULL, NULL
1883 },
1884
1885 {
1886 {"summarize_wal", PGC_SIGHUP, WAL_SUMMARIZATION,
1887 gettext_noop("Starts the WAL summarizer process to enable incremental backup."),
1888 NULL
1889 },
1890 &summarize_wal,
1891 false,
1892 NULL, NULL, NULL
1893 },
1894
1895 {
1896 {"hot_standby", PGC_POSTMASTER, REPLICATION_STANDBY,
1897 gettext_noop("Allows connections and queries during recovery."),
1898 NULL
1899 },
1900 &EnableHotStandby,
1901 true,
1902 NULL, NULL, NULL
1903 },
1904
1905 {
1906 {"hot_standby_feedback", PGC_SIGHUP, REPLICATION_STANDBY,
1907 gettext_noop("Allows feedback from a hot standby to the primary that will avoid query conflicts."),
1908 NULL
1909 },
1910 &hot_standby_feedback,
1911 false,
1912 NULL, NULL, NULL
1913 },
1914
1915 {
1916 {"in_hot_standby", PGC_INTERNAL, PRESET_OPTIONS,
1917 gettext_noop("Shows whether hot standby is currently active."),
1918 NULL,
1919 GUC_REPORT | GUC_NOT_IN_SAMPLE | GUC_DISALLOW_IN_FILE
1920 },
1921 &in_hot_standby_guc,
1922 false,
1923 NULL, NULL, show_in_hot_standby
1924 },
1925
1926 {
1927 {"allow_system_table_mods", PGC_SUSET, DEVELOPER_OPTIONS,
1928 gettext_noop("Allows modifications of the structure of system tables."),
1929 NULL,
1930 GUC_NOT_IN_SAMPLE
1931 },
1932 &allowSystemTableMods,
1933 false,
1934 NULL, NULL, NULL
1935 },
1936
1937 {
1938 {"ignore_system_indexes", PGC_BACKEND, DEVELOPER_OPTIONS,
1939 gettext_noop("Disables reading from system indexes."),
1940 gettext_noop("It does not prevent updating the indexes, so it is safe "
1941 "to use. The worst consequence is slowness."),
1942 GUC_NOT_IN_SAMPLE
1943 },
1944 &IgnoreSystemIndexes,
1945 false,
1946 NULL, NULL, NULL
1947 },
1948
1949 {
1950 {"allow_in_place_tablespaces", PGC_SUSET, DEVELOPER_OPTIONS,
1951 gettext_noop("Allows tablespaces directly inside pg_tblspc, for testing."),
1952 NULL,
1953 GUC_NOT_IN_SAMPLE
1954 },
1955 &allow_in_place_tablespaces,
1956 false,
1957 NULL, NULL, NULL
1958 },
1959
1960 {
1961 {"lo_compat_privileges", PGC_SUSET, COMPAT_OPTIONS_PREVIOUS,
1962 gettext_noop("Enables backward compatibility mode for privilege checks on large objects."),
1963 gettext_noop("Skips privilege checks when reading or modifying large objects, "
1964 "for compatibility with PostgreSQL releases prior to 9.0.")
1965 },
1966 &lo_compat_privileges,
1967 false,
1968 NULL, NULL, NULL
1969 },
1970
1971 {
1972 {"quote_all_identifiers", PGC_USERSET, COMPAT_OPTIONS_PREVIOUS,
1973 gettext_noop("When generating SQL fragments, quote all identifiers."),
1974 NULL,
1975 },
1976 &quote_all_identifiers,
1977 false,
1978 NULL, NULL, NULL
1979 },
1980
1981 {
1982 {"data_checksums", PGC_INTERNAL, PRESET_OPTIONS,
1983 gettext_noop("Shows whether data checksums are turned on for this cluster."),
1984 NULL,
1985 GUC_NOT_IN_SAMPLE | GUC_DISALLOW_IN_FILE | GUC_RUNTIME_COMPUTED
1986 },
1987 &data_checksums,
1988 false,
1989 NULL, NULL, NULL
1990 },
1991
1992 {
1993 {"syslog_sequence_numbers", PGC_SIGHUP, LOGGING_WHERE,
1994 gettext_noop("Add sequence number to syslog messages to avoid duplicate suppression."),
1995 NULL
1996 },
1997 &syslog_sequence_numbers,
1998 true,
1999 NULL, NULL, NULL
2000 },
2001
2002 {
2003 {"syslog_split_messages", PGC_SIGHUP, LOGGING_WHERE,
2004 gettext_noop("Split messages sent to syslog by lines and to fit into 1024 bytes."),
2005 NULL
2006 },
2007 &syslog_split_messages,
2008 true,
2009 NULL, NULL, NULL
2010 },
2011
2012 {
2013 {"parallel_leader_participation", PGC_USERSET, RESOURCES_WORKER_PROCESSES,
2014 gettext_noop("Controls whether Gather and Gather Merge also run subplans."),
2015 gettext_noop("Should gather nodes also run subplans or just gather tuples?"),
2016 GUC_EXPLAIN
2017 },
2018 &parallel_leader_participation,
2019 true,
2020 NULL, NULL, NULL
2021 },
2022
2023 {
2024 {"jit", PGC_USERSET, QUERY_TUNING_OTHER,
2025 gettext_noop("Allow JIT compilation."),
2026 NULL,
2027 GUC_EXPLAIN
2028 },
2029 &jit_enabled,
2030 true,
2031 NULL, NULL, NULL
2032 },
2033
2034 {
2035 {"jit_debugging_support", PGC_SU_BACKEND, DEVELOPER_OPTIONS,
2036 gettext_noop("Register JIT-compiled functions with debugger."),
2037 NULL,
2038 GUC_NOT_IN_SAMPLE
2039 },
2040 &jit_debugging_support,
2041 false,
2042
2043 /*
2044 * This is not guaranteed to be available, but given it's a developer
2045 * oriented option, it doesn't seem worth adding code checking
2046 * availability.
2047 */
2048 NULL, NULL, NULL
2049 },
2050
2051 {
2052 {"jit_dump_bitcode", PGC_SUSET, DEVELOPER_OPTIONS,
2053 gettext_noop("Write out LLVM bitcode to facilitate JIT debugging."),
2054 NULL,
2055 GUC_NOT_IN_SAMPLE
2056 },
2057 &jit_dump_bitcode,
2058 false,
2059 NULL, NULL, NULL
2060 },
2061
2062 {
2063 {"jit_expressions", PGC_USERSET, DEVELOPER_OPTIONS,
2064 gettext_noop("Allow JIT compilation of expressions."),
2065 NULL,
2066 GUC_NOT_IN_SAMPLE
2067 },
2068 &jit_expressions,
2069 true,
2070 NULL, NULL, NULL
2071 },
2072
2073 {
2074 {"jit_profiling_support", PGC_SU_BACKEND, DEVELOPER_OPTIONS,
2075 gettext_noop("Register JIT-compiled functions with perf profiler."),
2076 NULL,
2077 GUC_NOT_IN_SAMPLE
2078 },
2079 &jit_profiling_support,
2080 false,
2081
2082 /*
2083 * This is not guaranteed to be available, but given it's a developer
2084 * oriented option, it doesn't seem worth adding code checking
2085 * availability.
2086 */
2087 NULL, NULL, NULL
2088 },
2089
2090 {
2091 {"jit_tuple_deforming", PGC_USERSET, DEVELOPER_OPTIONS,
2092 gettext_noop("Allow JIT compilation of tuple deforming."),
2093 NULL,
2094 GUC_NOT_IN_SAMPLE
2095 },
2096 &jit_tuple_deforming,
2097 true,
2098 NULL, NULL, NULL
2099 },
2100
2101 {
2102 {"data_sync_retry", PGC_POSTMASTER, ERROR_HANDLING_OPTIONS,
2103 gettext_noop("Whether to continue running after a failure to sync data files."),
2104 },
2105 &data_sync_retry,
2106 false,
2107 NULL, NULL, NULL
2108 },
2109
2110 {
2111 {"wal_receiver_create_temp_slot", PGC_SIGHUP, REPLICATION_STANDBY,
2112 gettext_noop("Sets whether a WAL receiver should create a temporary replication slot if no permanent slot is configured."),
2113 },
2114 &wal_receiver_create_temp_slot,
2115 false,
2116 NULL, NULL, NULL
2117 },
2118
2119 {
2120 {"event_triggers", PGC_SUSET, CLIENT_CONN_STATEMENT,
2121 gettext_noop("Enables event triggers."),
2122 gettext_noop("When enabled, event triggers will fire for all applicable statements."),
2123 },
2124 &event_triggers,
2125 true,
2126 NULL, NULL, NULL
2127 },
2128
2129 {
2130 {"sync_replication_slots", PGC_SIGHUP, REPLICATION_STANDBY,
2131 gettext_noop("Enables a physical standby to synchronize logical failover replication slots from the primary server."),
2132 },
2133 &sync_replication_slots,
2134 false,
2135 NULL, NULL, NULL
2136 },
2137
2138 {
2139 {"md5_password_warnings", PGC_USERSET, CONN_AUTH_AUTH,
2140 gettext_noop("Enables deprecation warnings for MD5 passwords."),
2141 },
2142 &md5_password_warnings,
2143 true,
2144 NULL, NULL, NULL
2145 },
2146
2147 {
2148 {"vacuum_truncate", PGC_USERSET, VACUUM_DEFAULT,
2149 gettext_noop("Enables vacuum to truncate empty pages at the end of the table."),
2150 },
2151 &vacuum_truncate,
2152 true,
2153 NULL, NULL, NULL
2154 },
2155
2156 /* End-of-list marker */
2157 {
2158 {NULL, 0, 0, NULL, NULL}, NULL, false, NULL, NULL, NULL
2159 }
2160 };
2161
2162
2163 struct config_int ConfigureNamesInt[] =
2164 {
2165 {
2166 {"archive_timeout", PGC_SIGHUP, WAL_ARCHIVING,
2167 gettext_noop("Sets the amount of time to wait before forcing a "
2168 "switch to the next WAL file."),
2169 gettext_noop("0 disables the timeout."),
2170 GUC_UNIT_S
2171 },
2172 &XLogArchiveTimeout,
2173 0, 0, INT_MAX / 2,
2174 NULL, NULL, NULL
2175 },
2176 {
2177 {"post_auth_delay", PGC_BACKEND, DEVELOPER_OPTIONS,
2178 gettext_noop("Sets the amount of time to wait after "
2179 "authentication on connection startup."),
2180 gettext_noop("This allows attaching a debugger to the process."),
2181 GUC_NOT_IN_SAMPLE | GUC_UNIT_S
2182 },
2183 &PostAuthDelay,
2184 0, 0, INT_MAX / 1000000,
2185 NULL, NULL, NULL
2186 },
2187 {
2188 {"default_statistics_target", PGC_USERSET, QUERY_TUNING_OTHER,
2189 gettext_noop("Sets the default statistics target."),
2190 gettext_noop("This applies to table columns that have not had a "
2191 "column-specific target set via ALTER TABLE SET STATISTICS.")
2192 },
2193 &default_statistics_target,
2194 100, 1, MAX_STATISTICS_TARGET,
2195 NULL, NULL, NULL
2196 },
2197 {
2198 {"from_collapse_limit", PGC_USERSET, QUERY_TUNING_OTHER,
2199 gettext_noop("Sets the FROM-list size beyond which subqueries "
2200 "are not collapsed."),
2201 gettext_noop("The planner will merge subqueries into upper "
2202 "queries if the resulting FROM list would have no more than "
2203 "this many items."),
2204 GUC_EXPLAIN
2205 },
2206 &from_collapse_limit,
2207 8, 1, INT_MAX,
2208 NULL, NULL, NULL
2209 },
2210 {
2211 {"join_collapse_limit", PGC_USERSET, QUERY_TUNING_OTHER,
2212 gettext_noop("Sets the FROM-list size beyond which JOIN "
2213 "constructs are not flattened."),
2214 gettext_noop("The planner will flatten explicit JOIN "
2215 "constructs into lists of FROM items whenever a "
2216 "list of no more than this many items would result."),
2217 GUC_EXPLAIN
2218 },
2219 &join_collapse_limit,
2220 8, 1, INT_MAX,
2221 NULL, NULL, NULL
2222 },
2223 {
2224 {"geqo_threshold", PGC_USERSET, QUERY_TUNING_GEQO,
2225 gettext_noop("Sets the threshold of FROM items beyond which GEQO is used."),
2226 NULL,
2227 GUC_EXPLAIN
2228 },
2229 &geqo_threshold,
2230 12, 2, INT_MAX,
2231 NULL, NULL, NULL
2232 },
2233 {
2234 {"geqo_effort", PGC_USERSET, QUERY_TUNING_GEQO,
2235 gettext_noop("GEQO: effort is used to set the default for other GEQO parameters."),
2236 NULL,
2237 GUC_EXPLAIN
2238 },
2239 &Geqo_effort,
2240 DEFAULT_GEQO_EFFORT, MIN_GEQO_EFFORT, MAX_GEQO_EFFORT,
2241 NULL, NULL, NULL
2242 },
2243 {
2244 {"geqo_pool_size", PGC_USERSET, QUERY_TUNING_GEQO,
2245 gettext_noop("GEQO: number of individuals in the population."),
2246 gettext_noop("0 means use a suitable default value."),
2247 GUC_EXPLAIN
2248 },
2249 &Geqo_pool_size,
2250 0, 0, INT_MAX,
2251 NULL, NULL, NULL
2252 },
2253 {
2254 {"geqo_generations", PGC_USERSET, QUERY_TUNING_GEQO,
2255 gettext_noop("GEQO: number of iterations of the algorithm."),
2256 gettext_noop("0 means use a suitable default value."),
2257 GUC_EXPLAIN
2258 },
2259 &Geqo_generations,
2260 0, 0, INT_MAX,
2261 NULL, NULL, NULL
2262 },
2263
2264 {
2265 /* This is PGC_SUSET to prevent hiding from log_lock_waits. */
2266 {"deadlock_timeout", PGC_SUSET, LOCK_MANAGEMENT,
2267 gettext_noop("Sets the time to wait on a lock before checking for deadlock."),
2268 NULL,
2269 GUC_UNIT_MS
2270 },
2271 &DeadlockTimeout,
2272 1000, 1, INT_MAX,
2273 NULL, NULL, NULL
2274 },
2275
2276 {
2277 {"max_standby_archive_delay", PGC_SIGHUP, REPLICATION_STANDBY,
2278 gettext_noop("Sets the maximum delay before canceling queries when a hot standby server is processing archived WAL data."),
2279 gettext_noop("-1 means wait forever."),
2280 GUC_UNIT_MS
2281 },
2282 &max_standby_archive_delay,
2283 30 * 1000, -1, INT_MAX,
2284 NULL, NULL, NULL
2285 },
2286
2287 {
2288 {"max_standby_streaming_delay", PGC_SIGHUP, REPLICATION_STANDBY,
2289 gettext_noop("Sets the maximum delay before canceling queries when a hot standby server is processing streamed WAL data."),
2290 gettext_noop("-1 means wait forever."),
2291 GUC_UNIT_MS
2292 },
2293 &max_standby_streaming_delay,
2294 30 * 1000, -1, INT_MAX,
2295 NULL, NULL, NULL
2296 },
2297
2298 {
2299 {"recovery_min_apply_delay", PGC_SIGHUP, REPLICATION_STANDBY,
2300 gettext_noop("Sets the minimum delay for applying changes during recovery."),
2301 NULL,
2302 GUC_UNIT_MS
2303 },
2304 &recovery_min_apply_delay,
2305 0, 0, INT_MAX,
2306 NULL, NULL, NULL
2307 },
2308
2309 {
2310 {"wal_receiver_status_interval", PGC_SIGHUP, REPLICATION_STANDBY,
2311 gettext_noop("Sets the maximum interval between WAL receiver status reports to the sending server."),
2312 NULL,
2313 GUC_UNIT_S
2314 },
2315 &wal_receiver_status_interval,
2316 10, 0, INT_MAX / 1000,
2317 NULL, NULL, NULL
2318 },
2319
2320 {
2321 {"wal_receiver_timeout", PGC_SIGHUP, REPLICATION_STANDBY,
2322 gettext_noop("Sets the maximum wait time to receive data from the sending server."),
2323 gettext_noop("0 disables the timeout."),
2324 GUC_UNIT_MS
2325 },
2326 &wal_receiver_timeout,
2327 60 * 1000, 0, INT_MAX,
2328 NULL, NULL, NULL
2329 },
2330
2331 {
2332 {"max_connections", PGC_POSTMASTER, CONN_AUTH_SETTINGS,
2333 gettext_noop("Sets the maximum number of concurrent connections."),
2334 NULL
2335 },
2336 &MaxConnections,
2337 100, 1, MAX_BACKENDS,
2338 NULL, NULL, NULL
2339 },
2340
2341 {
2342 /* see max_connections */
2343 {"superuser_reserved_connections", PGC_POSTMASTER, CONN_AUTH_SETTINGS,
2344 gettext_noop("Sets the number of connection slots reserved for superusers."),
2345 NULL
2346 },
2347 &SuperuserReservedConnections,
2348 3, 0, MAX_BACKENDS,
2349 NULL, NULL, NULL
2350 },
2351
2352 {
2353 {"reserved_connections", PGC_POSTMASTER, CONN_AUTH_SETTINGS,
2354 gettext_noop("Sets the number of connection slots reserved for roles "
2355 "with privileges of pg_use_reserved_connections."),
2356 NULL
2357 },
2358 &ReservedConnections,
2359 0, 0, MAX_BACKENDS,
2360 NULL, NULL, NULL
2361 },
2362
2363 {
2364 {"min_dynamic_shared_memory", PGC_POSTMASTER, RESOURCES_MEM,
2365 gettext_noop("Amount of dynamic shared memory reserved at startup."),
2366 NULL,
2367 GUC_UNIT_MB
2368 },
2369 &min_dynamic_shared_memory,
2370 0, 0, (int) Min((size_t) INT_MAX, SIZE_MAX / (1024 * 1024)),
2371 NULL, NULL, NULL
2372 },
2373
2374 /*
2375 * We sometimes multiply the number of shared buffers by two without
2376 * checking for overflow, so we mustn't allow more than INT_MAX / 2.
2377 */
2378 {
2379 {"shared_buffers", PGC_POSTMASTER, RESOURCES_MEM,
2380 gettext_noop("Sets the number of shared memory buffers used by the server."),
2381 NULL,
2382 GUC_UNIT_BLOCKS
2383 },
2384 &NBuffers,
2385 16384, 16, INT_MAX / 2,
2386 NULL, NULL, NULL
2387 },
2388
2389 {
2390 {"vacuum_buffer_usage_limit", PGC_USERSET, RESOURCES_MEM,
2391 gettext_noop("Sets the buffer pool size for VACUUM, ANALYZE, and autovacuum."),
2392 NULL,
2393 GUC_UNIT_KB
2394 },
2395 &VacuumBufferUsageLimit,
2396 2048, 0, MAX_BAS_VAC_RING_SIZE_KB,
2397 check_vacuum_buffer_usage_limit, NULL, NULL
2398 },
2399
2400 {
2401 {"shared_memory_size", PGC_INTERNAL, PRESET_OPTIONS,
2402 gettext_noop("Shows the size of the server's main shared memory area (rounded up to the nearest MB)."),
2403 NULL,
2404 GUC_NOT_IN_SAMPLE | GUC_DISALLOW_IN_FILE | GUC_UNIT_MB | GUC_RUNTIME_COMPUTED
2405 },
2406 &shared_memory_size_mb,
2407 0, 0, INT_MAX,
2408 NULL, NULL, NULL
2409 },
2410
2411 {
2412 {"shared_memory_size_in_huge_pages", PGC_INTERNAL, PRESET_OPTIONS,
2413 gettext_noop("Shows the number of huge pages needed for the main shared memory area."),
2414 gettext_noop("-1 means huge pages are not supported."),
2415 GUC_NOT_IN_SAMPLE | GUC_DISALLOW_IN_FILE | GUC_RUNTIME_COMPUTED
2416 },
2417 &shared_memory_size_in_huge_pages,
2418 -1, -1, INT_MAX,
2419 NULL, NULL, NULL
2420 },
2421
2422 {
2423 {"num_os_semaphores", PGC_INTERNAL, PRESET_OPTIONS,
2424 gettext_noop("Shows the number of semaphores required for the server."),
2425 NULL,
2426 GUC_NOT_IN_SAMPLE | GUC_DISALLOW_IN_FILE | GUC_RUNTIME_COMPUTED
2427 },
2428 &num_os_semaphores,
2429 0, 0, INT_MAX,
2430 NULL, NULL, NULL
2431 },
2432
2433 {
2434 {"commit_timestamp_buffers", PGC_POSTMASTER, RESOURCES_MEM,
2435 gettext_noop("Sets the size of the dedicated buffer pool used for the commit timestamp cache."),
2436 gettext_noop("0 means use a fraction of \"shared_buffers\"."),
2437 GUC_UNIT_BLOCKS
2438 },
2439 &commit_timestamp_buffers,
2440 0, 0, SLRU_MAX_ALLOWED_BUFFERS,
2441 check_commit_ts_buffers, NULL, NULL
2442 },
2443
2444 {
2445 {"multixact_member_buffers", PGC_POSTMASTER, RESOURCES_MEM,
2446 gettext_noop("Sets the size of the dedicated buffer pool used for the MultiXact member cache."),
2447 NULL,
2448 GUC_UNIT_BLOCKS
2449 },
2450 &multixact_member_buffers,
2451 32, 16, SLRU_MAX_ALLOWED_BUFFERS,
2452 check_multixact_member_buffers, NULL, NULL
2453 },
2454
2455 {
2456 {"multixact_offset_buffers", PGC_POSTMASTER, RESOURCES_MEM,
2457 gettext_noop("Sets the size of the dedicated buffer pool used for the MultiXact offset cache."),
2458 NULL,
2459 GUC_UNIT_BLOCKS
2460 },
2461 &multixact_offset_buffers,
2462 16, 16, SLRU_MAX_ALLOWED_BUFFERS,
2463 check_multixact_offset_buffers, NULL, NULL
2464 },
2465
2466 {
2467 {"notify_buffers", PGC_POSTMASTER, RESOURCES_MEM,
2468 gettext_noop("Sets the size of the dedicated buffer pool used for the LISTEN/NOTIFY message cache."),
2469 NULL,
2470 GUC_UNIT_BLOCKS
2471 },
2472 &notify_buffers,
2473 16, 16, SLRU_MAX_ALLOWED_BUFFERS,
2474 check_notify_buffers, NULL, NULL
2475 },
2476
2477 {
2478 {"serializable_buffers", PGC_POSTMASTER, RESOURCES_MEM,
2479 gettext_noop("Sets the size of the dedicated buffer pool used for the serializable transaction cache."),
2480 NULL,
2481 GUC_UNIT_BLOCKS
2482 },
2483 &serializable_buffers,
2484 32, 16, SLRU_MAX_ALLOWED_BUFFERS,
2485 check_serial_buffers, NULL, NULL
2486 },
2487
2488 {
2489 {"subtransaction_buffers", PGC_POSTMASTER, RESOURCES_MEM,
2490 gettext_noop("Sets the size of the dedicated buffer pool used for the subtransaction cache."),
2491 gettext_noop("0 means use a fraction of \"shared_buffers\"."),
2492 GUC_UNIT_BLOCKS
2493 },
2494 &subtransaction_buffers,
2495 0, 0, SLRU_MAX_ALLOWED_BUFFERS,
2496 check_subtrans_buffers, NULL, NULL
2497 },
2498
2499 {
2500 {"transaction_buffers", PGC_POSTMASTER, RESOURCES_MEM,
2501 gettext_noop("Sets the size of the dedicated buffer pool used for the transaction status cache."),
2502 gettext_noop("0 means use a fraction of \"shared_buffers\"."),
2503 GUC_UNIT_BLOCKS
2504 },
2505 &transaction_buffers,
2506 0, 0, SLRU_MAX_ALLOWED_BUFFERS,
2507 check_transaction_buffers, NULL, NULL
2508 },
2509
2510 {
2511 {"temp_buffers", PGC_USERSET, RESOURCES_MEM,
2512 gettext_noop("Sets the maximum number of temporary buffers used by each session."),
2513 NULL,
2514 GUC_UNIT_BLOCKS | GUC_EXPLAIN
2515 },
2516 &num_temp_buffers,
2517 1024, 100, INT_MAX / 2,
2518 check_temp_buffers, NULL, NULL
2519 },
2520
2521 {
2522 {"port", PGC_POSTMASTER, CONN_AUTH_SETTINGS,
2523 gettext_noop("Sets the TCP port the server listens on."),
2524 NULL
2525 },
2526 &PostPortNumber,
2527 DEF_PGPORT, 1, 65535,
2528 NULL, NULL, NULL
2529 },
2530
2531 {
2532 {"unix_socket_permissions", PGC_POSTMASTER, CONN_AUTH_SETTINGS,
2533 gettext_noop("Sets the access permissions of the Unix-domain socket."),
2534 gettext_noop("Unix-domain sockets use the usual Unix file system "
2535 "permission set. The parameter value is expected "
2536 "to be a numeric mode specification in the form "
2537 "accepted by the chmod and umask system calls. "
2538 "(To use the customary octal format the number must "
2539 "start with a 0 (zero).)")
2540 },
2541 &Unix_socket_permissions,
2542 0777, 0000, 0777,
2543 NULL, NULL, show_unix_socket_permissions
2544 },
2545
2546 {
2547 {"log_file_mode", PGC_SIGHUP, LOGGING_WHERE,
2548 gettext_noop("Sets the file permissions for log files."),
2549 gettext_noop("The parameter value is expected "
2550 "to be a numeric mode specification in the form "
2551 "accepted by the chmod and umask system calls. "
2552 "(To use the customary octal format the number must "
2553 "start with a 0 (zero).)")
2554 },
2555 &Log_file_mode,
2556 0600, 0000, 0777,
2557 NULL, NULL, show_log_file_mode
2558 },
2559
2560
2561 {
2562 {"data_directory_mode", PGC_INTERNAL, PRESET_OPTIONS,
2563 gettext_noop("Shows the mode of the data directory."),
2564 gettext_noop("The parameter value is a numeric mode specification "
2565 "in the form accepted by the chmod and umask system "
2566 "calls. (To use the customary octal format the number "
2567 "must start with a 0 (zero).)"),
2568 GUC_NOT_IN_SAMPLE | GUC_DISALLOW_IN_FILE | GUC_RUNTIME_COMPUTED
2569 },
2570 &data_directory_mode,
2571 0700, 0000, 0777,
2572 NULL, NULL, show_data_directory_mode
2573 },
2574
2575 {
2576 {"work_mem", PGC_USERSET, RESOURCES_MEM,
2577 gettext_noop("Sets the maximum memory to be used for query workspaces."),
2578 gettext_noop("This much memory can be used by each internal "
2579 "sort operation and hash table before switching to "
2580 "temporary disk files."),
2581 GUC_UNIT_KB | GUC_EXPLAIN
2582 },
2583 &work_mem,
2584 4096, 64, MAX_KILOBYTES,
2585 NULL, NULL, NULL
2586 },
2587
2588 /*
2589 * Dynamic shared memory has a higher overhead than local memory contexts,
2590 * so when testing low-memory scenarios that could use shared memory, the
2591 * recommended minimum is 1MB.
2592 */
2593 {
2594 {"maintenance_work_mem", PGC_USERSET, RESOURCES_MEM,
2595 gettext_noop("Sets the maximum memory to be used for maintenance operations."),
2596 gettext_noop("This includes operations such as VACUUM and CREATE INDEX."),
2597 GUC_UNIT_KB
2598 },
2599 &maintenance_work_mem,
2600 65536, 64, MAX_KILOBYTES,
2601 NULL, NULL, NULL
2602 },
2603
2604 {
2605 {"logical_decoding_work_mem", PGC_USERSET, RESOURCES_MEM,
2606 gettext_noop("Sets the maximum memory to be used for logical decoding."),
2607 gettext_noop("This much memory can be used by each internal "
2608 "reorder buffer before spilling to disk."),
2609 GUC_UNIT_KB
2610 },
2611 &logical_decoding_work_mem,
2612 65536, 64, MAX_KILOBYTES,
2613 NULL, NULL, NULL
2614 },
2615
2616 /*
2617 * We use the hopefully-safely-small value of 100kB as the compiled-in
2618 * default for max_stack_depth. InitializeGUCOptions will increase it if
2619 * possible, depending on the actual platform-specific stack limit.
2620 */
2621 {
2622 {"max_stack_depth", PGC_SUSET, RESOURCES_MEM,
2623 gettext_noop("Sets the maximum stack depth, in kilobytes."),
2624 NULL,
2625 GUC_UNIT_KB
2626 },
2627 &max_stack_depth,
2628 100, 100, MAX_KILOBYTES,
2629 check_max_stack_depth, assign_max_stack_depth, NULL
2630 },
2631
2632 {
2633 {"temp_file_limit", PGC_SUSET, RESOURCES_DISK,
2634 gettext_noop("Limits the total size of all temporary files used by each process."),
2635 gettext_noop("-1 means no limit."),
2636 GUC_UNIT_KB
2637 },
2638 &temp_file_limit,
2639 -1, -1, INT_MAX,
2640 NULL, NULL, NULL
2641 },
2642
2643 {
2644 {"vacuum_cost_page_hit", PGC_USERSET, VACUUM_COST_DELAY,
2645 gettext_noop("Vacuum cost for a page found in the buffer cache."),
2646 NULL
2647 },
2648 &VacuumCostPageHit,
2649 1, 0, 10000,
2650 NULL, NULL, NULL
2651 },
2652
2653 {
2654 {"vacuum_cost_page_miss", PGC_USERSET, VACUUM_COST_DELAY,
2655 gettext_noop("Vacuum cost for a page not found in the buffer cache."),
2656 NULL
2657 },
2658 &VacuumCostPageMiss,
2659 2, 0, 10000,
2660 NULL, NULL, NULL
2661 },
2662
2663 {
2664 {"vacuum_cost_page_dirty", PGC_USERSET, VACUUM_COST_DELAY,
2665 gettext_noop("Vacuum cost for a page dirtied by vacuum."),
2666 NULL
2667 },
2668 &VacuumCostPageDirty,
2669 20, 0, 10000,
2670 NULL, NULL, NULL
2671 },
2672
2673 {
2674 {"vacuum_cost_limit", PGC_USERSET, VACUUM_COST_DELAY,
2675 gettext_noop("Vacuum cost amount available before napping."),
2676 NULL
2677 },
2678 &VacuumCostLimit,
2679 200, 1, 10000,
2680 NULL, NULL, NULL
2681 },
2682
2683 {
2684 {"autovacuum_vacuum_cost_limit", PGC_SIGHUP, VACUUM_AUTOVACUUM,
2685 gettext_noop("Vacuum cost amount available before napping, for autovacuum."),
2686 gettext_noop("-1 means use \"vacuum_cost_limit\".")
2687 },
2688 &autovacuum_vac_cost_limit,
2689 -1, -1, 10000,
2690 NULL, NULL, NULL
2691 },
2692
2693 {
2694 {"max_files_per_process", PGC_POSTMASTER, RESOURCES_KERNEL,
2695 gettext_noop("Sets the maximum number of files each server process is allowed to open simultaneously."),
2696 NULL
2697 },
2698 &max_files_per_process,
2699 1000, 64, INT_MAX,
2700 NULL, NULL, NULL
2701 },
2702
2703 /*
2704 * See also CheckRequiredParameterValues() if this parameter changes
2705 */
2706 {
2707 {"max_prepared_transactions", PGC_POSTMASTER, RESOURCES_MEM,
2708 gettext_noop("Sets the maximum number of simultaneously prepared transactions."),
2709 NULL
2710 },
2711 &max_prepared_xacts,
2712 0, 0, MAX_BACKENDS,
2713 NULL, NULL, NULL
2714 },
2715
2716 #ifdef LOCK_DEBUG
2717 {
2718 {"trace_lock_oidmin", PGC_SUSET, DEVELOPER_OPTIONS,
2719 gettext_noop("Sets the minimum OID of tables for tracking locks."),
2720 gettext_noop("Is used to avoid output on system tables."),
2721 GUC_NOT_IN_SAMPLE
2722 },
2723 &Trace_lock_oidmin,
2724 FirstNormalObjectId, 0, INT_MAX,
2725 NULL, NULL, NULL
2726 },
2727 {
2728 {"trace_lock_table", PGC_SUSET, DEVELOPER_OPTIONS,
2729 gettext_noop("Sets the OID of the table with unconditionally lock tracing."),
2730 NULL,
2731 GUC_NOT_IN_SAMPLE
2732 },
2733 &Trace_lock_table,
2734 0, 0, INT_MAX,
2735 NULL, NULL, NULL
2736 },
2737 #endif
2738
2739 {
2740 {"statement_timeout", PGC_USERSET, CLIENT_CONN_STATEMENT,
2741 gettext_noop("Sets the maximum allowed duration of any statement."),
2742 gettext_noop("0 disables the timeout."),
2743 GUC_UNIT_MS
2744 },
2745 &StatementTimeout,
2746 0, 0, INT_MAX,
2747 NULL, NULL, NULL
2748 },
2749
2750 {
2751 {"lock_timeout", PGC_USERSET, CLIENT_CONN_STATEMENT,
2752 gettext_noop("Sets the maximum allowed duration of any wait for a lock."),
2753 gettext_noop("0 disables the timeout."),
2754 GUC_UNIT_MS
2755 },
2756 &LockTimeout,
2757 0, 0, INT_MAX,
2758 NULL, NULL, NULL
2759 },
2760
2761 {
2762 {"idle_in_transaction_session_timeout", PGC_USERSET, CLIENT_CONN_STATEMENT,
2763 gettext_noop("Sets the maximum allowed idle time between queries, when in a transaction."),
2764 gettext_noop("0 disables the timeout."),
2765 GUC_UNIT_MS
2766 },
2767 &IdleInTransactionSessionTimeout,
2768 0, 0, INT_MAX,
2769 NULL, NULL, NULL
2770 },
2771
2772 {
2773 {"transaction_timeout", PGC_USERSET, CLIENT_CONN_STATEMENT,
2774 gettext_noop("Sets the maximum allowed duration of any transaction within a session (not a prepared transaction)."),
2775 gettext_noop("0 disables the timeout."),
2776 GUC_UNIT_MS
2777 },
2778 &TransactionTimeout,
2779 0, 0, INT_MAX,
2780 NULL, assign_transaction_timeout, NULL
2781 },
2782
2783 {
2784 {"idle_session_timeout", PGC_USERSET, CLIENT_CONN_STATEMENT,
2785 gettext_noop("Sets the maximum allowed idle time between queries, when not in a transaction."),
2786 gettext_noop("0 disables the timeout."),
2787 GUC_UNIT_MS
2788 },
2789 &IdleSessionTimeout,
2790 0, 0, INT_MAX,
2791 NULL, NULL, NULL
2792 },
2793
2794 {
2795 {"vacuum_freeze_min_age", PGC_USERSET, VACUUM_FREEZING,
2796 gettext_noop("Minimum age at which VACUUM should freeze a table row."),
2797 NULL
2798 },
2799 &vacuum_freeze_min_age,
2800 50000000, 0, 1000000000,
2801 NULL, NULL, NULL
2802 },
2803
2804 {
2805 {"vacuum_freeze_table_age", PGC_USERSET, VACUUM_FREEZING,
2806 gettext_noop("Age at which VACUUM should scan whole table to freeze tuples."),
2807 NULL
2808 },
2809 &vacuum_freeze_table_age,
2810 150000000, 0, 2000000000,
2811 NULL, NULL, NULL
2812 },
2813
2814 {
2815 {"vacuum_multixact_freeze_min_age", PGC_USERSET, VACUUM_FREEZING,
2816 gettext_noop("Minimum age at which VACUUM should freeze a MultiXactId in a table row."),
2817 NULL
2818 },
2819 &vacuum_multixact_freeze_min_age,
2820 5000000, 0, 1000000000,
2821 NULL, NULL, NULL
2822 },
2823
2824 {
2825 {"vacuum_multixact_freeze_table_age", PGC_USERSET, VACUUM_FREEZING,
2826 gettext_noop("Multixact age at which VACUUM should scan whole table to freeze tuples."),
2827 NULL
2828 },
2829 &vacuum_multixact_freeze_table_age,
2830 150000000, 0, 2000000000,
2831 NULL, NULL, NULL
2832 },
2833
2834 {
2835 {"vacuum_failsafe_age", PGC_USERSET, VACUUM_FREEZING,
2836 gettext_noop("Age at which VACUUM should trigger failsafe to avoid a wraparound outage."),
2837 NULL
2838 },
2839 &vacuum_failsafe_age,
2840 1600000000, 0, 2100000000,
2841 NULL, NULL, NULL
2842 },
2843 {
2844 {"vacuum_multixact_failsafe_age", PGC_USERSET, VACUUM_FREEZING,
2845 gettext_noop("Multixact age at which VACUUM should trigger failsafe to avoid a wraparound outage."),
2846 NULL
2847 },
2848 &vacuum_multixact_failsafe_age,
2849 1600000000, 0, 2100000000,
2850 NULL, NULL, NULL
2851 },
2852
2853 /*
2854 * See also CheckRequiredParameterValues() if this parameter changes
2855 */
2856 {
2857 {"max_locks_per_transaction", PGC_POSTMASTER, LOCK_MANAGEMENT,
2858 gettext_noop("Sets the maximum number of locks per transaction."),
2859 gettext_noop("The shared lock table is sized on the assumption that at most "
2860 "\"max_locks_per_transaction\" objects per server process or prepared "
2861 "transaction will need to be locked at any one time.")
2862 },
2863 &max_locks_per_xact,
2864 64, 10, INT_MAX,
2865 NULL, NULL, NULL
2866 },
2867
2868 {
2869 {"max_pred_locks_per_transaction", PGC_POSTMASTER, LOCK_MANAGEMENT,
2870 gettext_noop("Sets the maximum number of predicate locks per transaction."),
2871 gettext_noop("The shared predicate lock table is sized on the assumption that "
2872 "at most \"max_pred_locks_per_transaction\" objects per server process "
2873 "or prepared transaction will need to be locked at any one time.")
2874 },
2875 &max_predicate_locks_per_xact,
2876 64, 10, INT_MAX,
2877 NULL, NULL, NULL
2878 },
2879
2880 {
2881 {"max_pred_locks_per_relation", PGC_SIGHUP, LOCK_MANAGEMENT,
2882 gettext_noop("Sets the maximum number of predicate-locked pages and tuples per relation."),
2883 gettext_noop("If more than this total of pages and tuples in the same relation are locked "
2884 "by a connection, those locks are replaced by a relation-level lock.")
2885 },
2886 &max_predicate_locks_per_relation,
2887 -2, INT_MIN, INT_MAX,
2888 NULL, NULL, NULL
2889 },
2890
2891 {
2892 {"max_pred_locks_per_page", PGC_SIGHUP, LOCK_MANAGEMENT,
2893 gettext_noop("Sets the maximum number of predicate-locked tuples per page."),
2894 gettext_noop("If more than this number of tuples on the same page are locked "
2895 "by a connection, those locks are replaced by a page-level lock.")
2896 },
2897 &max_predicate_locks_per_page,
2898 2, 0, INT_MAX,
2899 NULL, NULL, NULL
2900 },
2901
2902 {
2903 {"authentication_timeout", PGC_SIGHUP, CONN_AUTH_AUTH,
2904 gettext_noop("Sets the maximum allowed time to complete client authentication."),
2905 NULL,
2906 GUC_UNIT_S
2907 },
2908 &AuthenticationTimeout,
2909 60, 1, 600,
2910 NULL, NULL, NULL
2911 },
2912
2913 {
2914 /* Not for general use */
2915 {"pre_auth_delay", PGC_SIGHUP, DEVELOPER_OPTIONS,
2916 gettext_noop("Sets the amount of time to wait before "
2917 "authentication on connection startup."),
2918 gettext_noop("This allows attaching a debugger to the process."),
2919 GUC_NOT_IN_SAMPLE | GUC_UNIT_S
2920 },
2921 &PreAuthDelay,
2922 0, 0, 60,
2923 NULL, NULL, NULL
2924 },
2925
2926 {
2927 {"max_notify_queue_pages", PGC_POSTMASTER, RESOURCES_DISK,
2928 gettext_noop("Sets the maximum number of allocated pages for NOTIFY / LISTEN queue."),
2929 NULL,
2930 },
2931 &max_notify_queue_pages,
2932 1048576, 64, INT_MAX,
2933 NULL, NULL, NULL
2934 },
2935
2936 {
2937 {"wal_decode_buffer_size", PGC_POSTMASTER, WAL_RECOVERY,
2938 gettext_noop("Buffer size for reading ahead in the WAL during recovery."),
2939 gettext_noop("Maximum distance to read ahead in the WAL to prefetch referenced data blocks."),
2940 GUC_UNIT_BYTE
2941 },
2942 &wal_decode_buffer_size,
2943 512 * 1024, 64 * 1024, MaxAllocSize,
2944 NULL, NULL, NULL
2945 },
2946
2947 {
2948 {"wal_keep_size", PGC_SIGHUP, REPLICATION_SENDING,
2949 gettext_noop("Sets the size of WAL files held for standby servers."),
2950 NULL,
2951 GUC_UNIT_MB
2952 },
2953 &wal_keep_size_mb,
2954 0, 0, MAX_KILOBYTES,
2955 NULL, NULL, NULL
2956 },
2957
2958 {
2959 {"min_wal_size", PGC_SIGHUP, WAL_CHECKPOINTS,
2960 gettext_noop("Sets the minimum size to shrink the WAL to."),
2961 NULL,
2962 GUC_UNIT_MB
2963 },
2964 &min_wal_size_mb,
2965 DEFAULT_MIN_WAL_SEGS * (DEFAULT_XLOG_SEG_SIZE / (1024 * 1024)),
2966 2, MAX_KILOBYTES,
2967 NULL, NULL, NULL
2968 },
2969
2970 {
2971 {"max_wal_size", PGC_SIGHUP, WAL_CHECKPOINTS,
2972 gettext_noop("Sets the WAL size that triggers a checkpoint."),
2973 NULL,
2974 GUC_UNIT_MB
2975 },
2976 &max_wal_size_mb,
2977 DEFAULT_MAX_WAL_SEGS * (DEFAULT_XLOG_SEG_SIZE / (1024 * 1024)),
2978 2, MAX_KILOBYTES,
2979 NULL, assign_max_wal_size, NULL
2980 },
2981
2982 {
2983 {"checkpoint_timeout", PGC_SIGHUP, WAL_CHECKPOINTS,
2984 gettext_noop("Sets the maximum time between automatic WAL checkpoints."),
2985 NULL,
2986 GUC_UNIT_S
2987 },
2988 &CheckPointTimeout,
2989 300, 30, 86400,
2990 NULL, NULL, NULL
2991 },
2992
2993 {
2994 {"checkpoint_warning", PGC_SIGHUP, WAL_CHECKPOINTS,
2995 gettext_noop("Sets the maximum time before warning if checkpoints "
2996 "triggered by WAL volume happen too frequently."),
2997 gettext_noop("Write a message to the server log if checkpoints "
2998 "caused by the filling of WAL segment files happen more "
2999 "frequently than this amount of time. "
3000 "0 disables the warning."),
3001 GUC_UNIT_S
3002 },
3003 &CheckPointWarning,
3004 30, 0, INT_MAX,
3005 NULL, NULL, NULL
3006 },
3007
3008 {
3009 {"checkpoint_flush_after", PGC_SIGHUP, WAL_CHECKPOINTS,
3010 gettext_noop("Number of pages after which previously performed writes are flushed to disk."),
3011 gettext_noop("0 disables forced writeback."),
3012 GUC_UNIT_BLOCKS
3013 },
3014 &checkpoint_flush_after,
3015 DEFAULT_CHECKPOINT_FLUSH_AFTER, 0, WRITEBACK_MAX_PENDING_FLUSHES,
3016 NULL, NULL, NULL
3017 },
3018
3019 {
3020 {"wal_buffers", PGC_POSTMASTER, WAL_SETTINGS,
3021 gettext_noop("Sets the number of disk-page buffers in shared memory for WAL."),
3022 gettext_noop("-1 means use a fraction of \"shared_buffers\"."),
3023 GUC_UNIT_XBLOCKS
3024 },
3025 &XLOGbuffers,
3026 -1, -1, (INT_MAX / XLOG_BLCKSZ),
3027 check_wal_buffers, NULL, NULL
3028 },
3029
3030 {
3031 {"wal_writer_delay", PGC_SIGHUP, WAL_SETTINGS,
3032 gettext_noop("Time between WAL flushes performed in the WAL writer."),
3033 NULL,
3034 GUC_UNIT_MS
3035 },
3036 &WalWriterDelay,
3037 200, 1, 10000,
3038 NULL, NULL, NULL
3039 },
3040
3041 {
3042 {"wal_writer_flush_after", PGC_SIGHUP, WAL_SETTINGS,
3043 gettext_noop("Amount of WAL written out by WAL writer that triggers a flush."),
3044 NULL,
3045 GUC_UNIT_XBLOCKS
3046 },
3047 &WalWriterFlushAfter,
3048 DEFAULT_WAL_WRITER_FLUSH_AFTER, 0, INT_MAX,
3049 NULL, NULL, NULL
3050 },
3051
3052 {
3053 {"wal_skip_threshold", PGC_USERSET, WAL_SETTINGS,
3054 gettext_noop("Minimum size of new file to fsync instead of writing WAL."),
3055 NULL,
3056 GUC_UNIT_KB
3057 },
3058 &wal_skip_threshold,
3059 2048, 0, MAX_KILOBYTES,
3060 NULL, NULL, NULL
3061 },
3062
3063 {
3064 {"max_wal_senders", PGC_POSTMASTER, REPLICATION_SENDING,
3065 gettext_noop("Sets the maximum number of simultaneously running WAL sender processes."),
3066 NULL
3067 },
3068 &max_wal_senders,
3069 10, 0, MAX_BACKENDS,
3070 NULL, NULL, NULL
3071 },
3072
3073 {
3074 /* see max_wal_senders */
3075 {"max_replication_slots", PGC_POSTMASTER, REPLICATION_SENDING,
3076 gettext_noop("Sets the maximum number of simultaneously defined replication slots."),
3077 NULL
3078 },
3079 &max_replication_slots,
3080 10, 0, MAX_BACKENDS /* XXX? */ ,
3081 NULL, NULL, NULL
3082 },
3083
3084 {
3085 {"max_slot_wal_keep_size", PGC_SIGHUP, REPLICATION_SENDING,
3086 gettext_noop("Sets the maximum WAL size that can be reserved by replication slots."),
3087 gettext_noop("Replication slots will be marked as failed, and segments released "
3088 "for deletion or recycling, if this much space is occupied by WAL on disk. "
3089 "-1 means no maximum."),
3090 GUC_UNIT_MB
3091 },
3092 &max_slot_wal_keep_size_mb,
3093 -1, -1, MAX_KILOBYTES,
3094 NULL, NULL, NULL
3095 },
3096
3097 {
3098 {"wal_sender_timeout", PGC_USERSET, REPLICATION_SENDING,
3099 gettext_noop("Sets the maximum time to wait for WAL replication."),
3100 NULL,
3101 GUC_UNIT_MS
3102 },
3103 &wal_sender_timeout,
3104 60 * 1000, 0, INT_MAX,
3105 NULL, NULL, NULL
3106 },
3107
3108 {
3109 {"idle_replication_slot_timeout", PGC_SIGHUP, REPLICATION_SENDING,
3110 gettext_noop("Sets the duration a replication slot can remain idle before "
3111 "it is invalidated."),
3112 NULL,
3113 GUC_UNIT_S
3114 },
3115 &idle_replication_slot_timeout_secs,
3116 0, 0, INT_MAX,
3117 NULL, NULL, NULL
3118 },
3119
3120 {
3121 {"commit_delay", PGC_SUSET, WAL_SETTINGS,
3122 gettext_noop("Sets the delay in microseconds between transaction commit and "
3123 "flushing WAL to disk."),
3124 NULL
3125 /* we have no microseconds designation, so can't supply units here */
3126 },
3127 &CommitDelay,
3128 0, 0, 100000,
3129 NULL, NULL, NULL
3130 },
3131
3132 {
3133 {"commit_siblings", PGC_USERSET, WAL_SETTINGS,
3134 gettext_noop("Sets the minimum number of concurrent open transactions "
3135 "required before performing \"commit_delay\"."),
3136 NULL
3137 },
3138 &CommitSiblings,
3139 5, 0, 1000,
3140 NULL, NULL, NULL
3141 },
3142
3143 {
3144 {"extra_float_digits", PGC_USERSET, CLIENT_CONN_LOCALE,
3145 gettext_noop("Sets the number of digits displayed for floating-point values."),
3146 gettext_noop("This affects real, double precision, and geometric data types. "
3147 "A zero or negative parameter value is added to the standard "
3148 "number of digits (FLT_DIG or DBL_DIG as appropriate). "
3149 "Any value greater than zero selects precise output mode.")
3150 },
3151 &extra_float_digits,
3152 1, -15, 3,
3153 NULL, NULL, NULL
3154 },
3155
3156 {
3157 {"log_min_duration_sample", PGC_SUSET, LOGGING_WHEN,
3158 gettext_noop("Sets the minimum execution time above which "
3159 "a sample of statements will be logged."
3160 " Sampling is determined by \"log_statement_sample_rate\"."),
3161 gettext_noop("-1 disables sampling. 0 means sample all statements."),
3162 GUC_UNIT_MS
3163 },
3164 &log_min_duration_sample,
3165 -1, -1, INT_MAX,
3166 NULL, NULL, NULL
3167 },
3168
3169 {
3170 {"log_min_duration_statement", PGC_SUSET, LOGGING_WHEN,
3171 gettext_noop("Sets the minimum execution time above which "
3172 "all statements will be logged."),
3173 gettext_noop("-1 disables logging statement durations. 0 means log all statement durations."),
3174 GUC_UNIT_MS
3175 },
3176 &log_min_duration_statement,
3177 -1, -1, INT_MAX,
3178 NULL, NULL, NULL
3179 },
3180
3181 {
3182 {"log_autovacuum_min_duration", PGC_SIGHUP, LOGGING_WHAT,
3183 gettext_noop("Sets the minimum execution time above which "
3184 "autovacuum actions will be logged."),
3185 gettext_noop("-1 disables logging autovacuum actions. 0 means log all autovacuum actions."),
3186 GUC_UNIT_MS
3187 },
3188 &Log_autovacuum_min_duration,
3189 600000, -1, INT_MAX,
3190 NULL, NULL, NULL
3191 },
3192
3193 {
3194 {"log_parameter_max_length", PGC_SUSET, LOGGING_WHAT,
3195 gettext_noop("Sets the maximum length in bytes of data logged for bind "
3196 "parameter values when logging statements."),
3197 gettext_noop("-1 means log values in full."),
3198 GUC_UNIT_BYTE
3199 },
3200 &log_parameter_max_length,
3201 -1, -1, INT_MAX / 2,
3202 NULL, NULL, NULL
3203 },
3204
3205 {
3206 {"log_parameter_max_length_on_error", PGC_USERSET, LOGGING_WHAT,
3207 gettext_noop("Sets the maximum length in bytes of data logged for bind "
3208 "parameter values when logging statements, on error."),
3209 gettext_noop("-1 means log values in full."),
3210 GUC_UNIT_BYTE
3211 },
3212 &log_parameter_max_length_on_error,
3213 0, -1, INT_MAX / 2,
3214 NULL, NULL, NULL
3215 },
3216
3217 {
3218 {"bgwriter_delay", PGC_SIGHUP, RESOURCES_BGWRITER,
3219 gettext_noop("Background writer sleep time between rounds."),
3220 NULL,
3221 GUC_UNIT_MS
3222 },
3223 &BgWriterDelay,
3224 200, 10, 10000,
3225 NULL, NULL, NULL
3226 },
3227
3228 {
3229 {"bgwriter_lru_maxpages", PGC_SIGHUP, RESOURCES_BGWRITER,
3230 gettext_noop("Background writer maximum number of LRU pages to flush per round."),
3231 gettext_noop("0 disables background writing.")
3232 },
3233 &bgwriter_lru_maxpages,
3234 100, 0, INT_MAX / 2, /* Same upper limit as shared_buffers */
3235 NULL, NULL, NULL
3236 },
3237
3238 {
3239 {"bgwriter_flush_after", PGC_SIGHUP, RESOURCES_BGWRITER,
3240 gettext_noop("Number of pages after which previously performed writes are flushed to disk."),
3241 gettext_noop("0 disables forced writeback."),
3242 GUC_UNIT_BLOCKS
3243 },
3244 &bgwriter_flush_after,
3245 DEFAULT_BGWRITER_FLUSH_AFTER, 0, WRITEBACK_MAX_PENDING_FLUSHES,
3246 NULL, NULL, NULL
3247 },
3248
3249 {
3250 {"effective_io_concurrency",
3251 PGC_USERSET,
3252 RESOURCES_IO,
3253 gettext_noop("Number of simultaneous requests that can be handled efficiently by the disk subsystem."),
3254 gettext_noop("0 disables simultaneous requests."),
3255 GUC_EXPLAIN
3256 },
3257 &effective_io_concurrency,
3258 DEFAULT_EFFECTIVE_IO_CONCURRENCY,
3259 0, MAX_IO_CONCURRENCY,
3260 NULL, NULL, NULL
3261 },
3262
3263 {
3264 {"maintenance_io_concurrency",
3265 PGC_USERSET,
3266 RESOURCES_IO,
3267 gettext_noop("A variant of \"effective_io_concurrency\" that is used for maintenance work."),
3268 gettext_noop("0 disables simultaneous requests."),
3269 GUC_EXPLAIN
3270 },
3271 &maintenance_io_concurrency,
3272 DEFAULT_MAINTENANCE_IO_CONCURRENCY,
3273 0, MAX_IO_CONCURRENCY,
3274 NULL, assign_maintenance_io_concurrency,
3275 NULL
3276 },
3277
3278 {
3279 {"io_max_combine_limit",
3280 PGC_POSTMASTER,
3281 RESOURCES_IO,
3282 gettext_noop("Server-wide limit that clamps io_combine_limit."),
3283 NULL,
3284 GUC_UNIT_BLOCKS
3285 },
3286 &io_max_combine_limit,
3287 DEFAULT_IO_COMBINE_LIMIT,
3288 1, MAX_IO_COMBINE_LIMIT,
3289 NULL, assign_io_max_combine_limit, NULL
3290 },
3291
3292 {
3293 {"io_combine_limit",
3294 PGC_USERSET,
3295 RESOURCES_IO,
3296 gettext_noop("Limit on the size of data reads and writes."),
3297 NULL,
3298 GUC_UNIT_BLOCKS
3299 },
3300 &io_combine_limit_guc,
3301 DEFAULT_IO_COMBINE_LIMIT,
3302 1, MAX_IO_COMBINE_LIMIT,
3303 NULL, assign_io_combine_limit, NULL
3304 },
3305
3306 {
3307 {"io_max_concurrency",
3308 PGC_POSTMASTER,
3309 RESOURCES_IO,
3310 gettext_noop("Max number of IOs that one process can execute simultaneously."),
3311 NULL,
3312 },
3313 &io_max_concurrency,
3314 -1, -1, 1024,
3315 check_io_max_concurrency, NULL, NULL
3316 },
3317
3318 {
3319 {"io_workers",
3320 PGC_SIGHUP,
3321 RESOURCES_IO,
3322 gettext_noop("Number of IO worker processes, for io_method=worker."),
3323 NULL,
3324 },
3325 &io_workers,
3326 3, 1, MAX_IO_WORKERS,
3327 NULL, NULL, NULL
3328 },
3329
3330 {
3331 {"backend_flush_after", PGC_USERSET, RESOURCES_IO,
3332 gettext_noop("Number of pages after which previously performed writes are flushed to disk."),
3333 gettext_noop("0 disables forced writeback."),
3334 GUC_UNIT_BLOCKS
3335 },
3336 &backend_flush_after,
3337 DEFAULT_BACKEND_FLUSH_AFTER, 0, WRITEBACK_MAX_PENDING_FLUSHES,
3338 NULL, NULL, NULL
3339 },
3340
3341 {
3342 {"max_worker_processes",
3343 PGC_POSTMASTER,
3344 RESOURCES_WORKER_PROCESSES,
3345 gettext_noop("Maximum number of concurrent worker processes."),
3346 NULL,
3347 },
3348 &max_worker_processes,
3349 8, 0, MAX_BACKENDS,
3350 NULL, NULL, NULL
3351 },
3352
3353 {
3354 {"max_logical_replication_workers",
3355 PGC_POSTMASTER,
3356 REPLICATION_SUBSCRIBERS,
3357 gettext_noop("Maximum number of logical replication worker processes."),
3358 NULL,
3359 },
3360 &max_logical_replication_workers,
3361 4, 0, MAX_BACKENDS,
3362 NULL, NULL, NULL
3363 },
3364
3365 {
3366 {"max_sync_workers_per_subscription",
3367 PGC_SIGHUP,
3368 REPLICATION_SUBSCRIBERS,
3369 gettext_noop("Maximum number of table synchronization workers per subscription."),
3370 NULL,
3371 },
3372 &max_sync_workers_per_subscription,
3373 2, 0, MAX_BACKENDS,
3374 NULL, NULL, NULL
3375 },
3376
3377 {
3378 {"max_parallel_apply_workers_per_subscription",
3379 PGC_SIGHUP,
3380 REPLICATION_SUBSCRIBERS,
3381 gettext_noop("Maximum number of parallel apply workers per subscription."),
3382 NULL,
3383 },
3384 &max_parallel_apply_workers_per_subscription,
3385 2, 0, MAX_PARALLEL_WORKER_LIMIT,
3386 NULL, NULL, NULL
3387 },
3388
3389 {
3390 {"max_active_replication_origins",
3391 PGC_POSTMASTER,
3392 REPLICATION_SUBSCRIBERS,
3393 gettext_noop("Sets the maximum number of active replication origins."),
3394 NULL
3395 },
3396 &max_active_replication_origins,
3397 10, 0, MAX_BACKENDS,
3398 NULL, NULL, NULL
3399 },
3400
3401 {
3402 {"log_rotation_age", PGC_SIGHUP, LOGGING_WHERE,
3403 gettext_noop("Sets the amount of time to wait before forcing "
3404 "log file rotation."),
3405 gettext_noop("0 disables time-based creation of new log files."),
3406 GUC_UNIT_MIN
3407 },
3408 &Log_RotationAge,
3409 HOURS_PER_DAY * MINS_PER_HOUR, 0, INT_MAX / SECS_PER_MINUTE,
3410 NULL, NULL, NULL
3411 },
3412
3413 {
3414 {"log_rotation_size", PGC_SIGHUP, LOGGING_WHERE,
3415 gettext_noop("Sets the maximum size a log file can reach before "
3416 "being rotated."),
3417 gettext_noop("0 disables size-based creation of new log files."),
3418 GUC_UNIT_KB
3419 },
3420 &Log_RotationSize,
3421 10 * 1024, 0, INT_MAX,
3422 NULL, NULL, NULL
3423 },
3424
3425 {
3426 {"max_function_args", PGC_INTERNAL, PRESET_OPTIONS,
3427 gettext_noop("Shows the maximum number of function arguments."),
3428 NULL,
3429 GUC_NOT_IN_SAMPLE | GUC_DISALLOW_IN_FILE
3430 },
3431 &max_function_args,
3432 FUNC_MAX_ARGS, FUNC_MAX_ARGS, FUNC_MAX_ARGS,
3433 NULL, NULL, NULL
3434 },
3435
3436 {
3437 {"max_index_keys", PGC_INTERNAL, PRESET_OPTIONS,
3438 gettext_noop("Shows the maximum number of index keys."),
3439 NULL,
3440 GUC_NOT_IN_SAMPLE | GUC_DISALLOW_IN_FILE
3441 },
3442 &max_index_keys,
3443 INDEX_MAX_KEYS, INDEX_MAX_KEYS, INDEX_MAX_KEYS,
3444 NULL, NULL, NULL
3445 },
3446
3447 {
3448 {"max_identifier_length", PGC_INTERNAL, PRESET_OPTIONS,
3449 gettext_noop("Shows the maximum identifier length."),
3450 NULL,
3451 GUC_NOT_IN_SAMPLE | GUC_DISALLOW_IN_FILE
3452 },
3453 &max_identifier_length,
3454 NAMEDATALEN - 1, NAMEDATALEN - 1, NAMEDATALEN - 1,
3455 NULL, NULL, NULL
3456 },
3457
3458 {
3459 {"block_size", PGC_INTERNAL, PRESET_OPTIONS,
3460 gettext_noop("Shows the size of a disk block."),
3461 NULL,
3462 GUC_NOT_IN_SAMPLE | GUC_DISALLOW_IN_FILE
3463 },
3464 &block_size,
3465 BLCKSZ, BLCKSZ, BLCKSZ,
3466 NULL, NULL, NULL
3467 },
3468
3469 {
3470 {"segment_size", PGC_INTERNAL, PRESET_OPTIONS,
3471 gettext_noop("Shows the number of pages per disk file."),
3472 NULL,
3473 GUC_UNIT_BLOCKS | GUC_NOT_IN_SAMPLE | GUC_DISALLOW_IN_FILE
3474 },
3475 &segment_size,
3476 RELSEG_SIZE, RELSEG_SIZE, RELSEG_SIZE,
3477 NULL, NULL, NULL
3478 },
3479
3480 {
3481 {"wal_block_size", PGC_INTERNAL, PRESET_OPTIONS,
3482 gettext_noop("Shows the block size in the write ahead log."),
3483 NULL,
3484 GUC_NOT_IN_SAMPLE | GUC_DISALLOW_IN_FILE
3485 },
3486 &wal_block_size,
3487 XLOG_BLCKSZ, XLOG_BLCKSZ, XLOG_BLCKSZ,
3488 NULL, NULL, NULL
3489 },
3490
3491 {
3492 {"wal_retrieve_retry_interval", PGC_SIGHUP, REPLICATION_STANDBY,
3493 gettext_noop("Sets the time to wait before retrying to retrieve WAL "
3494 "after a failed attempt."),
3495 NULL,
3496 GUC_UNIT_MS
3497 },
3498 &wal_retrieve_retry_interval,
3499 5000, 1, INT_MAX,
3500 NULL, NULL, NULL
3501 },
3502
3503 {
3504 {"wal_segment_size", PGC_INTERNAL, PRESET_OPTIONS,
3505 gettext_noop("Shows the size of write ahead log segments."),
3506 NULL,
3507 GUC_UNIT_BYTE | GUC_NOT_IN_SAMPLE | GUC_DISALLOW_IN_FILE | GUC_RUNTIME_COMPUTED
3508 },
3509 &wal_segment_size,
3510 DEFAULT_XLOG_SEG_SIZE,
3511 WalSegMinSize,
3512 WalSegMaxSize,
3513 check_wal_segment_size, NULL, NULL
3514 },
3515
3516 {
3517 {"wal_summary_keep_time", PGC_SIGHUP, WAL_SUMMARIZATION,
3518 gettext_noop("Time for which WAL summary files should be kept."),
3519 gettext_noop("0 disables automatic summary file deletion."),
3520 GUC_UNIT_MIN,
3521 },
3522 &wal_summary_keep_time,
3523 10 * HOURS_PER_DAY * MINS_PER_HOUR, /* 10 days */
3524 0,
3525 INT_MAX / SECS_PER_MINUTE,
3526 NULL, NULL, NULL
3527 },
3528
3529 {
3530 {"autovacuum_naptime", PGC_SIGHUP, VACUUM_AUTOVACUUM,
3531 gettext_noop("Time to sleep between autovacuum runs."),
3532 NULL,
3533 GUC_UNIT_S
3534 },
3535 &autovacuum_naptime,
3536 60, 1, INT_MAX / 1000,
3537 NULL, NULL, NULL
3538 },
3539 {
3540 {"autovacuum_vacuum_threshold", PGC_SIGHUP, VACUUM_AUTOVACUUM,
3541 gettext_noop("Minimum number of tuple updates or deletes prior to vacuum."),
3542 NULL
3543 },
3544 &autovacuum_vac_thresh,
3545 50, 0, INT_MAX,
3546 NULL, NULL, NULL
3547 },
3548 {
3549 {"autovacuum_vacuum_max_threshold", PGC_SIGHUP, VACUUM_AUTOVACUUM,
3550 gettext_noop("Maximum number of tuple updates or deletes prior to vacuum."),
3551 gettext_noop("-1 disables the maximum threshold.")
3552 },
3553 &autovacuum_vac_max_thresh,
3554 100000000, -1, INT_MAX,
3555 NULL, NULL, NULL
3556 },
3557 {
3558 {"autovacuum_vacuum_insert_threshold", PGC_SIGHUP, VACUUM_AUTOVACUUM,
3559 gettext_noop("Minimum number of tuple inserts prior to vacuum."),
3560 gettext_noop("-1 disables insert vacuums.")
3561 },
3562 &autovacuum_vac_ins_thresh,
3563 1000, -1, INT_MAX,
3564 NULL, NULL, NULL
3565 },
3566 {
3567 {"autovacuum_analyze_threshold", PGC_SIGHUP, VACUUM_AUTOVACUUM,
3568 gettext_noop("Minimum number of tuple inserts, updates, or deletes prior to analyze."),
3569 NULL
3570 },
3571 &autovacuum_anl_thresh,
3572 50, 0, INT_MAX,
3573 NULL, NULL, NULL
3574 },
3575 {
3576 /* see varsup.c for why this is PGC_POSTMASTER not PGC_SIGHUP */
3577 {"autovacuum_freeze_max_age", PGC_POSTMASTER, VACUUM_AUTOVACUUM,
3578 gettext_noop("Age at which to autovacuum a table to prevent transaction ID wraparound."),
3579 NULL
3580 },
3581 &autovacuum_freeze_max_age,
3582
3583 /* see vacuum_failsafe_age if you change the upper-limit value. */
3584 200000000, 100000, 2000000000,
3585 NULL, NULL, NULL
3586 },
3587 {
3588 /* see multixact.c for why this is PGC_POSTMASTER not PGC_SIGHUP */
3589 {"autovacuum_multixact_freeze_max_age", PGC_POSTMASTER, VACUUM_AUTOVACUUM,
3590 gettext_noop("Multixact age at which to autovacuum a table to prevent multixact wraparound."),
3591 NULL
3592 },
3593 &autovacuum_multixact_freeze_max_age,
3594 400000000, 10000, 2000000000,
3595 NULL, NULL, NULL
3596 },
3597 {
3598 /* see max_connections */
3599 {"autovacuum_worker_slots", PGC_POSTMASTER, VACUUM_AUTOVACUUM,
3600 gettext_noop("Sets the number of backend slots to allocate for autovacuum workers."),
3601 NULL
3602 },
3603 &autovacuum_worker_slots,
3604 16, 1, MAX_BACKENDS,
3605 NULL, NULL, NULL
3606 },
3607 {
3608 {"autovacuum_max_workers", PGC_SIGHUP, VACUUM_AUTOVACUUM,
3609 gettext_noop("Sets the maximum number of simultaneously running autovacuum worker processes."),
3610 NULL
3611 },
3612 &autovacuum_max_workers,
3613 3, 1, MAX_BACKENDS,
3614 NULL, NULL, NULL
3615 },
3616
3617 {
3618 {"max_parallel_maintenance_workers", PGC_USERSET, RESOURCES_WORKER_PROCESSES,
3619 gettext_noop("Sets the maximum number of parallel processes per maintenance operation."),
3620 NULL
3621 },
3622 &max_parallel_maintenance_workers,
3623 2, 0, MAX_PARALLEL_WORKER_LIMIT,
3624 NULL, NULL, NULL
3625 },
3626
3627 {
3628 {"max_parallel_workers_per_gather", PGC_USERSET, RESOURCES_WORKER_PROCESSES,
3629 gettext_noop("Sets the maximum number of parallel processes per executor node."),
3630 NULL,
3631 GUC_EXPLAIN
3632 },
3633 &max_parallel_workers_per_gather,
3634 2, 0, MAX_PARALLEL_WORKER_LIMIT,
3635 NULL, NULL, NULL
3636 },
3637
3638 {
3639 {"max_parallel_workers", PGC_USERSET, RESOURCES_WORKER_PROCESSES,
3640 gettext_noop("Sets the maximum number of parallel workers that can be active at one time."),
3641 NULL,
3642 GUC_EXPLAIN
3643 },
3644 &max_parallel_workers,
3645 8, 0, MAX_PARALLEL_WORKER_LIMIT,
3646 NULL, NULL, NULL
3647 },
3648
3649 {
3650 {"autovacuum_work_mem", PGC_SIGHUP, RESOURCES_MEM,
3651 gettext_noop("Sets the maximum memory to be used by each autovacuum worker process."),
3652 gettext_noop("-1 means use \"maintenance_work_mem\"."),
3653 GUC_UNIT_KB
3654 },
3655 &autovacuum_work_mem,
3656 -1, -1, MAX_KILOBYTES,
3657 check_autovacuum_work_mem, NULL, NULL
3658 },
3659
3660 {
3661 {"tcp_keepalives_idle", PGC_USERSET, CONN_AUTH_TCP,
3662 gettext_noop("Time between issuing TCP keepalives."),
3663 gettext_noop("0 means use the system default."),
3664 GUC_UNIT_S
3665 },
3666 &tcp_keepalives_idle,
3667 0, 0, INT_MAX,
3668 NULL, assign_tcp_keepalives_idle, show_tcp_keepalives_idle
3669 },
3670
3671 {
3672 {"tcp_keepalives_interval", PGC_USERSET, CONN_AUTH_TCP,
3673 gettext_noop("Time between TCP keepalive retransmits."),
3674 gettext_noop("0 means use the system default."),
3675 GUC_UNIT_S
3676 },
3677 &tcp_keepalives_interval,
3678 0, 0, INT_MAX,
3679 NULL, assign_tcp_keepalives_interval, show_tcp_keepalives_interval
3680 },
3681
3682 {
3683 {"ssl_renegotiation_limit", PGC_USERSET, COMPAT_OPTIONS_PREVIOUS,
3684 gettext_noop("SSL renegotiation is no longer supported; this can only be 0."),
3685 NULL,
3686 GUC_NO_SHOW_ALL | GUC_NOT_IN_SAMPLE | GUC_DISALLOW_IN_FILE,
3687 },
3688 &ssl_renegotiation_limit,
3689 0, 0, 0,
3690 NULL, NULL, NULL
3691 },
3692
3693 {
3694 {"tcp_keepalives_count", PGC_USERSET, CONN_AUTH_TCP,
3695 gettext_noop("Maximum number of TCP keepalive retransmits."),
3696 gettext_noop("Number of consecutive keepalive retransmits that can be "
3697 "lost before a connection is considered dead. "
3698 "0 means use the system default."),
3699 },
3700 &tcp_keepalives_count,
3701 0, 0, INT_MAX,
3702 NULL, assign_tcp_keepalives_count, show_tcp_keepalives_count
3703 },
3704
3705 {
3706 {"gin_fuzzy_search_limit", PGC_USERSET, CLIENT_CONN_OTHER,
3707 gettext_noop("Sets the maximum allowed result for exact search by GIN."),
3708 gettext_noop("0 means no limit."),
3709 },
3710 &GinFuzzySearchLimit,
3711 0, 0, INT_MAX,
3712 NULL, NULL, NULL
3713 },
3714
3715 {
3716 {"effective_cache_size", PGC_USERSET, QUERY_TUNING_COST,
3717 gettext_noop("Sets the planner's assumption about the total size of the data caches."),
3718 gettext_noop("That is, the total size of the caches (kernel cache and shared buffers) used for PostgreSQL data files. "
3719 "This is measured in disk pages, which are normally 8 kB each."),
3720 GUC_UNIT_BLOCKS | GUC_EXPLAIN,
3721 },
3722 &effective_cache_size,
3723 DEFAULT_EFFECTIVE_CACHE_SIZE, 1, INT_MAX,
3724 NULL, NULL, NULL
3725 },
3726
3727 {
3728 {"min_parallel_table_scan_size", PGC_USERSET, QUERY_TUNING_COST,
3729 gettext_noop("Sets the minimum amount of table data for a parallel scan."),
3730 gettext_noop("If the planner estimates that it will read a number of table pages too small to reach this limit, a parallel scan will not be considered."),
3731 GUC_UNIT_BLOCKS | GUC_EXPLAIN,
3732 },
3733 &min_parallel_table_scan_size,
3734 (8 * 1024 * 1024) / BLCKSZ, 0, INT_MAX / 3,
3735 NULL, NULL, NULL
3736 },
3737
3738 {
3739 {"min_parallel_index_scan_size", PGC_USERSET, QUERY_TUNING_COST,
3740 gettext_noop("Sets the minimum amount of index data for a parallel scan."),
3741 gettext_noop("If the planner estimates that it will read a number of index pages too small to reach this limit, a parallel scan will not be considered."),
3742 GUC_UNIT_BLOCKS | GUC_EXPLAIN,
3743 },
3744 &min_parallel_index_scan_size,
3745 (512 * 1024) / BLCKSZ, 0, INT_MAX / 3,
3746 NULL, NULL, NULL
3747 },
3748
3749 {
3750 /* Can't be set in postgresql.conf */
3751 {"server_version_num", PGC_INTERNAL, PRESET_OPTIONS,
3752 gettext_noop("Shows the server version as an integer."),
3753 NULL,
3754 GUC_NOT_IN_SAMPLE | GUC_DISALLOW_IN_FILE
3755 },
3756 &server_version_num,
3757 PG_VERSION_NUM, PG_VERSION_NUM, PG_VERSION_NUM,
3758 NULL, NULL, NULL
3759 },
3760
3761 {
3762 {"log_temp_files", PGC_SUSET, LOGGING_WHAT,
3763 gettext_noop("Log the use of temporary files larger than this number of kilobytes."),
3764 gettext_noop("-1 disables logging temporary files. 0 means log all temporary files."),
3765 GUC_UNIT_KB
3766 },
3767 &log_temp_files,
3768 -1, -1, INT_MAX,
3769 NULL, NULL, NULL
3770 },
3771
3772 {
3773 {"track_activity_query_size", PGC_POSTMASTER, STATS_CUMULATIVE,
3774 gettext_noop("Sets the size reserved for pg_stat_activity.query, in bytes."),
3775 NULL,
3776 GUC_UNIT_BYTE
3777 },
3778 &pgstat_track_activity_query_size,
3779 1024, 100, 1048576,
3780 NULL, NULL, NULL
3781 },
3782
3783 {
3784 {"gin_pending_list_limit", PGC_USERSET, CLIENT_CONN_STATEMENT,
3785 gettext_noop("Sets the maximum size of the pending list for GIN index."),
3786 NULL,
3787 GUC_UNIT_KB
3788 },
3789 &gin_pending_list_limit,
3790 4096, 64, MAX_KILOBYTES,
3791 NULL, NULL, NULL
3792 },
3793
3794 {
3795 {"tcp_user_timeout", PGC_USERSET, CONN_AUTH_TCP,
3796 gettext_noop("TCP user timeout."),
3797 gettext_noop("0 means use the system default."),
3798 GUC_UNIT_MS
3799 },
3800 &tcp_user_timeout,
3801 0, 0, INT_MAX,
3802 NULL, assign_tcp_user_timeout, show_tcp_user_timeout
3803 },
3804
3805 {
3806 {"huge_page_size", PGC_POSTMASTER, RESOURCES_MEM,
3807 gettext_noop("The size of huge page that should be requested."),
3808 gettext_noop("0 means use the system default."),
3809 GUC_UNIT_KB
3810 },
3811 &huge_page_size,
3812 0, 0, INT_MAX,
3813 check_huge_page_size, NULL, NULL
3814 },
3815
3816 {
3817 {"debug_discard_caches", PGC_SUSET, DEVELOPER_OPTIONS,
3818 gettext_noop("Aggressively flush system caches for debugging purposes."),
3819 gettext_noop("0 means use normal caching behavior."),
3820 GUC_NOT_IN_SAMPLE
3821 },
3822 &debug_discard_caches,
3823 #ifdef DISCARD_CACHES_ENABLED
3824 /* Set default based on older compile-time-only cache clobber macros */
3825 #if defined(CLOBBER_CACHE_RECURSIVELY)
3826 3,
3827 #elif defined(CLOBBER_CACHE_ALWAYS)
3828 1,
3829 #else
3830 0,
3831 #endif
3832 0, 5,
3833 #else /* not DISCARD_CACHES_ENABLED */
3834 0, 0, 0,
3835 #endif /* not DISCARD_CACHES_ENABLED */
3836 NULL, NULL, NULL
3837 },
3838
3839 {
3840 {"client_connection_check_interval", PGC_USERSET, CONN_AUTH_TCP,
3841 gettext_noop("Sets the time interval between checks for disconnection while running queries."),
3842 gettext_noop("0 disables connection checks."),
3843 GUC_UNIT_MS
3844 },
3845 &client_connection_check_interval,
3846 0, 0, INT_MAX,
3847 check_client_connection_check_interval, NULL, NULL
3848 },
3849
3850 {
3851 {"log_startup_progress_interval", PGC_SIGHUP, LOGGING_WHEN,
3852 gettext_noop("Time between progress updates for "
3853 "long-running startup operations."),
3854 gettext_noop("0 disables progress updates."),
3855 GUC_UNIT_MS,
3856 },
3857 &log_startup_progress_interval,
3858 10000, 0, INT_MAX,
3859 NULL, NULL, NULL
3860 },
3861
3862 {
3863 {"scram_iterations", PGC_USERSET, CONN_AUTH_AUTH,
3864 gettext_noop("Sets the iteration count for SCRAM secret generation."),
3865 NULL,
3866 GUC_REPORT
3867 },
3868 &scram_sha_256_iterations,
3869 SCRAM_SHA_256_DEFAULT_ITERATIONS, 1, INT_MAX,
3870 NULL, NULL, NULL
3871 },
3872
3873 /* End-of-list marker */
3874 {
3875 {NULL, 0, 0, NULL, NULL}, NULL, 0, 0, 0, NULL, NULL, NULL
3876 }
3877 };
3878
3879
3880 struct config_real ConfigureNamesReal[] =
3881 {
3882 {
3883 {"seq_page_cost", PGC_USERSET, QUERY_TUNING_COST,
3884 gettext_noop("Sets the planner's estimate of the cost of a "
3885 "sequentially fetched disk page."),
3886 NULL,
3887 GUC_EXPLAIN
3888 },
3889 &seq_page_cost,
3890 DEFAULT_SEQ_PAGE_COST, 0, DBL_MAX,
3891 NULL, NULL, NULL
3892 },
3893 {
3894 {"random_page_cost", PGC_USERSET, QUERY_TUNING_COST,
3895 gettext_noop("Sets the planner's estimate of the cost of a "
3896 "nonsequentially fetched disk page."),
3897 NULL,
3898 GUC_EXPLAIN
3899 },
3900 &random_page_cost,
3901 DEFAULT_RANDOM_PAGE_COST, 0, DBL_MAX,
3902 NULL, NULL, NULL
3903 },
3904 {
3905 {"cpu_tuple_cost", PGC_USERSET, QUERY_TUNING_COST,
3906 gettext_noop("Sets the planner's estimate of the cost of "
3907 "processing each tuple (row)."),
3908 NULL,
3909 GUC_EXPLAIN
3910 },
3911 &cpu_tuple_cost,
3912 DEFAULT_CPU_TUPLE_COST, 0, DBL_MAX,
3913 NULL, NULL, NULL
3914 },
3915 {
3916 {"cpu_index_tuple_cost", PGC_USERSET, QUERY_TUNING_COST,
3917 gettext_noop("Sets the planner's estimate of the cost of "
3918 "processing each index entry during an index scan."),
3919 NULL,
3920 GUC_EXPLAIN
3921 },
3922 &cpu_index_tuple_cost,
3923 DEFAULT_CPU_INDEX_TUPLE_COST, 0, DBL_MAX,
3924 NULL, NULL, NULL
3925 },
3926 {
3927 {"cpu_operator_cost", PGC_USERSET, QUERY_TUNING_COST,
3928 gettext_noop("Sets the planner's estimate of the cost of "
3929 "processing each operator or function call."),
3930 NULL,
3931 GUC_EXPLAIN
3932 },
3933 &cpu_operator_cost,
3934 DEFAULT_CPU_OPERATOR_COST, 0, DBL_MAX,
3935 NULL, NULL, NULL
3936 },
3937 {
3938 {"parallel_tuple_cost", PGC_USERSET, QUERY_TUNING_COST,
3939 gettext_noop("Sets the planner's estimate of the cost of "
3940 "passing each tuple (row) from worker to leader backend."),
3941 NULL,
3942 GUC_EXPLAIN
3943 },
3944 &parallel_tuple_cost,
3945 DEFAULT_PARALLEL_TUPLE_COST, 0, DBL_MAX,
3946 NULL, NULL, NULL
3947 },
3948 {
3949 {"parallel_setup_cost", PGC_USERSET, QUERY_TUNING_COST,
3950 gettext_noop("Sets the planner's estimate of the cost of "
3951 "starting up worker processes for parallel query."),
3952 NULL,
3953 GUC_EXPLAIN
3954 },
3955 &parallel_setup_cost,
3956 DEFAULT_PARALLEL_SETUP_COST, 0, DBL_MAX,
3957 NULL, NULL, NULL
3958 },
3959
3960 {
3961 {"jit_above_cost", PGC_USERSET, QUERY_TUNING_COST,
3962 gettext_noop("Perform JIT compilation if query is more expensive."),
3963 gettext_noop("-1 disables JIT compilation."),
3964 GUC_EXPLAIN
3965 },
3966 &jit_above_cost,
3967 100000, -1, DBL_MAX,
3968 NULL, NULL, NULL
3969 },
3970
3971 {
3972 {"jit_optimize_above_cost", PGC_USERSET, QUERY_TUNING_COST,
3973 gettext_noop("Optimize JIT-compiled functions if query is more expensive."),
3974 gettext_noop("-1 disables optimization."),
3975 GUC_EXPLAIN
3976 },
3977 &jit_optimize_above_cost,
3978 500000, -1, DBL_MAX,
3979 NULL, NULL, NULL
3980 },
3981
3982 {
3983 {"jit_inline_above_cost", PGC_USERSET, QUERY_TUNING_COST,
3984 gettext_noop("Perform JIT inlining if query is more expensive."),
3985 gettext_noop("-1 disables inlining."),
3986 GUC_EXPLAIN
3987 },
3988 &jit_inline_above_cost,
3989 500000, -1, DBL_MAX,
3990 NULL, NULL, NULL
3991 },
3992
3993 {
3994 {"cursor_tuple_fraction", PGC_USERSET, QUERY_TUNING_OTHER,
3995 gettext_noop("Sets the planner's estimate of the fraction of "
3996 "a cursor's rows that will be retrieved."),
3997 NULL,
3998 GUC_EXPLAIN
3999 },
4000 &cursor_tuple_fraction,
4001 DEFAULT_CURSOR_TUPLE_FRACTION, 0.0, 1.0,
4002 NULL, NULL, NULL
4003 },
4004
4005 {
4006 {"recursive_worktable_factor", PGC_USERSET, QUERY_TUNING_OTHER,
4007 gettext_noop("Sets the planner's estimate of the average size "
4008 "of a recursive query's working table."),
4009 NULL,
4010 GUC_EXPLAIN
4011 },
4012 &recursive_worktable_factor,
4013 DEFAULT_RECURSIVE_WORKTABLE_FACTOR, 0.001, 1000000.0,
4014 NULL, NULL, NULL
4015 },
4016
4017 {
4018 {"geqo_selection_bias", PGC_USERSET, QUERY_TUNING_GEQO,
4019 gettext_noop("GEQO: selective pressure within the population."),
4020 NULL,
4021 GUC_EXPLAIN
4022 },
4023 &Geqo_selection_bias,
4024 DEFAULT_GEQO_SELECTION_BIAS,
4025 MIN_GEQO_SELECTION_BIAS, MAX_GEQO_SELECTION_BIAS,
4026 NULL, NULL, NULL
4027 },
4028 {
4029 {"geqo_seed", PGC_USERSET, QUERY_TUNING_GEQO,
4030 gettext_noop("GEQO: seed for random path selection."),
4031 NULL,
4032 GUC_EXPLAIN
4033 },
4034 &Geqo_seed,
4035 0.0, 0.0, 1.0,
4036 NULL, NULL, NULL
4037 },
4038
4039 {
4040 {"hash_mem_multiplier", PGC_USERSET, RESOURCES_MEM,
4041 gettext_noop("Multiple of \"work_mem\" to use for hash tables."),
4042 NULL,
4043 GUC_EXPLAIN
4044 },
4045 &hash_mem_multiplier,
4046 2.0, 1.0, 1000.0,
4047 NULL, NULL, NULL
4048 },
4049
4050 {
4051 {"bgwriter_lru_multiplier", PGC_SIGHUP, RESOURCES_BGWRITER,
4052 gettext_noop("Multiple of the average buffer usage to free per round."),
4053 NULL
4054 },
4055 &bgwriter_lru_multiplier,
4056 2.0, 0.0, 10.0,
4057 NULL, NULL, NULL
4058 },
4059
4060 {
4061 {"seed", PGC_USERSET, UNGROUPED,
4062 gettext_noop("Sets the seed for random-number generation."),
4063 NULL,
4064 GUC_NO_SHOW_ALL | GUC_NO_RESET | GUC_NO_RESET_ALL | GUC_NOT_IN_SAMPLE | GUC_DISALLOW_IN_FILE
4065 },
4066 &phony_random_seed,
4067 0.0, -1.0, 1.0,
4068 check_random_seed, assign_random_seed, show_random_seed
4069 },
4070
4071 {
4072 {"vacuum_cost_delay", PGC_USERSET, VACUUM_COST_DELAY,
4073 gettext_noop("Vacuum cost delay in milliseconds."),
4074 NULL,
4075 GUC_UNIT_MS
4076 },
4077 &VacuumCostDelay,
4078 0, 0, 100,
4079 NULL, NULL, NULL
4080 },
4081
4082 {
4083 {"autovacuum_vacuum_cost_delay", PGC_SIGHUP, VACUUM_AUTOVACUUM,
4084 gettext_noop("Vacuum cost delay in milliseconds, for autovacuum."),
4085 gettext_noop("-1 means use \"vacuum_cost_delay\"."),
4086 GUC_UNIT_MS
4087 },
4088 &autovacuum_vac_cost_delay,
4089 2, -1, 100,
4090 NULL, NULL, NULL
4091 },
4092
4093 {
4094 {"autovacuum_vacuum_scale_factor", PGC_SIGHUP, VACUUM_AUTOVACUUM,
4095 gettext_noop("Number of tuple updates or deletes prior to vacuum as a fraction of reltuples."),
4096 NULL
4097 },
4098 &autovacuum_vac_scale,
4099 0.2, 0.0, 100.0,
4100 NULL, NULL, NULL
4101 },
4102
4103 {
4104 {"autovacuum_vacuum_insert_scale_factor", PGC_SIGHUP, VACUUM_AUTOVACUUM,
4105 gettext_noop("Number of tuple inserts prior to vacuum as a fraction of reltuples."),
4106 NULL
4107 },
4108 &autovacuum_vac_ins_scale,
4109 0.2, 0.0, 100.0,
4110 NULL, NULL, NULL
4111 },
4112
4113 {
4114 {"autovacuum_analyze_scale_factor", PGC_SIGHUP, VACUUM_AUTOVACUUM,
4115 gettext_noop("Number of tuple inserts, updates, or deletes prior to analyze as a fraction of reltuples."),
4116 NULL
4117 },
4118 &autovacuum_anl_scale,
4119 0.1, 0.0, 100.0,
4120 NULL, NULL, NULL
4121 },
4122
4123 {
4124 {"checkpoint_completion_target", PGC_SIGHUP, WAL_CHECKPOINTS,
4125 gettext_noop("Time spent flushing dirty buffers during checkpoint, as fraction of checkpoint interval."),
4126 NULL
4127 },
4128 &CheckPointCompletionTarget,
4129 0.9, 0.0, 1.0,
4130 NULL, assign_checkpoint_completion_target, NULL
4131 },
4132
4133 {
4134 {"log_statement_sample_rate", PGC_SUSET, LOGGING_WHEN,
4135 gettext_noop("Fraction of statements exceeding \"log_min_duration_sample\" to be logged."),
4136 gettext_noop("Use a value between 0.0 (never log) and 1.0 (always log).")
4137 },
4138 &log_statement_sample_rate,
4139 1.0, 0.0, 1.0,
4140 NULL, NULL, NULL
4141 },
4142
4143 {
4144 {"log_transaction_sample_rate", PGC_SUSET, LOGGING_WHEN,
4145 gettext_noop("Sets the fraction of transactions from which to log all statements."),
4146 gettext_noop("Use a value between 0.0 (never log) and 1.0 (log all "
4147 "statements for all transactions).")
4148 },
4149 &log_xact_sample_rate,
4150 0.0, 0.0, 1.0,
4151 NULL, NULL, NULL
4152 },
4153
4154 {
4155 {"vacuum_max_eager_freeze_failure_rate", PGC_USERSET, VACUUM_FREEZING,
4156 gettext_noop("Fraction of pages in a relation vacuum can scan and fail to freeze before disabling eager scanning."),
4157 gettext_noop("A value of 0.0 disables eager scanning and a value of 1.0 will eagerly scan up to 100 percent of the all-visible pages in the relation. If vacuum successfully freezes these pages, the cap is lower than 100 percent, because the goal is to amortize page freezing across multiple vacuums.")
4158 },
4159 &vacuum_max_eager_freeze_failure_rate,
4160 0.03, 0.0, 1.0,
4161 NULL, NULL, NULL
4162 },
4163
4164 /* End-of-list marker */
4165 {
4166 {NULL, 0, 0, NULL, NULL}, NULL, 0.0, 0.0, 0.0, NULL, NULL, NULL
4167 }
4168 };
4169
4170
4171 struct config_string ConfigureNamesString[] =
4172 {
4173 {
4174 {"archive_command", PGC_SIGHUP, WAL_ARCHIVING,
4175 gettext_noop("Sets the shell command that will be called to archive a WAL file."),
4176 gettext_noop("An empty string means use \"archive_library\".")
4177 },
4178 &XLogArchiveCommand,
4179 "",
4180 NULL, NULL, show_archive_command
4181 },
4182
4183 {
4184 {"archive_library", PGC_SIGHUP, WAL_ARCHIVING,
4185 gettext_noop("Sets the library that will be called to archive a WAL file."),
4186 gettext_noop("An empty string means use \"archive_command\".")
4187 },
4188 &XLogArchiveLibrary,
4189 "",
4190 NULL, NULL, NULL
4191 },
4192
4193 {
4194 {"restore_command", PGC_SIGHUP, WAL_ARCHIVE_RECOVERY,
4195 gettext_noop("Sets the shell command that will be called to retrieve an archived WAL file."),
4196 NULL
4197 },
4198 &recoveryRestoreCommand,
4199 "",
4200 NULL, NULL, NULL
4201 },
4202
4203 {
4204 {"archive_cleanup_command", PGC_SIGHUP, WAL_ARCHIVE_RECOVERY,
4205 gettext_noop("Sets the shell command that will be executed at every restart point."),
4206 NULL
4207 },
4208 &archiveCleanupCommand,
4209 "",
4210 NULL, NULL, NULL
4211 },
4212
4213 {
4214 {"recovery_end_command", PGC_SIGHUP, WAL_ARCHIVE_RECOVERY,
4215 gettext_noop("Sets the shell command that will be executed once at the end of recovery."),
4216 NULL
4217 },
4218 &recoveryEndCommand,
4219 "",
4220 NULL, NULL, NULL
4221 },
4222
4223 {
4224 {"recovery_target_timeline", PGC_POSTMASTER, WAL_RECOVERY_TARGET,
4225 gettext_noop("Specifies the timeline to recover into."),
4226 NULL
4227 },
4228 &recovery_target_timeline_string,
4229 "latest",
4230 check_recovery_target_timeline, assign_recovery_target_timeline, NULL
4231 },
4232
4233 {
4234 {"recovery_target", PGC_POSTMASTER, WAL_RECOVERY_TARGET,
4235 gettext_noop("Set to \"immediate\" to end recovery as soon as a consistent state is reached."),
4236 NULL
4237 },
4238 &recovery_target_string,
4239 "",
4240 check_recovery_target, assign_recovery_target, NULL
4241 },
4242 {
4243 {"recovery_target_xid", PGC_POSTMASTER, WAL_RECOVERY_TARGET,
4244 gettext_noop("Sets the transaction ID up to which recovery will proceed."),
4245 NULL
4246 },
4247 &recovery_target_xid_string,
4248 "",
4249 check_recovery_target_xid, assign_recovery_target_xid, NULL
4250 },
4251 {
4252 {"recovery_target_time", PGC_POSTMASTER, WAL_RECOVERY_TARGET,
4253 gettext_noop("Sets the time stamp up to which recovery will proceed."),
4254 NULL
4255 },
4256 &recovery_target_time_string,
4257 "",
4258 check_recovery_target_time, assign_recovery_target_time, NULL
4259 },
4260 {
4261 {"recovery_target_name", PGC_POSTMASTER, WAL_RECOVERY_TARGET,
4262 gettext_noop("Sets the named restore point up to which recovery will proceed."),
4263 NULL
4264 },
4265 &recovery_target_name_string,
4266 "",
4267 check_recovery_target_name, assign_recovery_target_name, NULL
4268 },
4269 {
4270 {"recovery_target_lsn", PGC_POSTMASTER, WAL_RECOVERY_TARGET,
4271 gettext_noop("Sets the LSN of the write-ahead log location up to which recovery will proceed."),
4272 NULL
4273 },
4274 &recovery_target_lsn_string,
4275 "",
4276 check_recovery_target_lsn, assign_recovery_target_lsn, NULL
4277 },
4278
4279 {
4280 {"primary_conninfo", PGC_SIGHUP, REPLICATION_STANDBY,
4281 gettext_noop("Sets the connection string to be used to connect to the sending server."),
4282 NULL,
4283 GUC_SUPERUSER_ONLY
4284 },
4285 &PrimaryConnInfo,
4286 "",
4287 NULL, NULL, NULL
4288 },
4289
4290 {
4291 {"primary_slot_name", PGC_SIGHUP, REPLICATION_STANDBY,
4292 gettext_noop("Sets the name of the replication slot to use on the sending server."),
4293 NULL
4294 },
4295 &PrimarySlotName,
4296 "",
4297 check_primary_slot_name, NULL, NULL
4298 },
4299
4300 {
4301 {"client_encoding", PGC_USERSET, CLIENT_CONN_LOCALE,
4302 gettext_noop("Sets the client's character set encoding."),
4303 NULL,
4304 GUC_IS_NAME | GUC_REPORT
4305 },
4306 &client_encoding_string,
4307 "SQL_ASCII",
4308 check_client_encoding, assign_client_encoding, NULL
4309 },
4310
4311 {
4312 {"log_line_prefix", PGC_SIGHUP, LOGGING_WHAT,
4313 gettext_noop("Controls information prefixed to each log line."),
4314 gettext_noop("An empty string means no prefix.")
4315 },
4316 &Log_line_prefix,
4317 "%m [%p] ",
4318 NULL, NULL, NULL
4319 },
4320
4321 {
4322 {"log_timezone", PGC_SIGHUP, LOGGING_WHAT,
4323 gettext_noop("Sets the time zone to use in log messages."),
4324 NULL
4325 },
4326 &log_timezone_string,
4327 "GMT",
4328 check_log_timezone, assign_log_timezone, show_log_timezone
4329 },
4330
4331 {
4332 {"DateStyle", PGC_USERSET, CLIENT_CONN_LOCALE,
4333 gettext_noop("Sets the display format for date and time values."),
4334 gettext_noop("Also controls interpretation of ambiguous "
4335 "date inputs."),
4336 GUC_LIST_INPUT | GUC_REPORT
4337 },
4338 &datestyle_string,
4339 "ISO, MDY",
4340 check_datestyle, assign_datestyle, NULL
4341 },
4342
4343 {
4344 {"default_table_access_method", PGC_USERSET, CLIENT_CONN_STATEMENT,
4345 gettext_noop("Sets the default table access method for new tables."),
4346 NULL,
4347 GUC_IS_NAME
4348 },
4349 &default_table_access_method,
4350 DEFAULT_TABLE_ACCESS_METHOD,
4351 check_default_table_access_method, NULL, NULL
4352 },
4353
4354 {
4355 {"default_tablespace", PGC_USERSET, CLIENT_CONN_STATEMENT,
4356 gettext_noop("Sets the default tablespace to create tables and indexes in."),
4357 gettext_noop("An empty string means use the database's default tablespace."),
4358 GUC_IS_NAME
4359 },
4360 &default_tablespace,
4361 "",
4362 check_default_tablespace, NULL, NULL
4363 },
4364
4365 {
4366 {"temp_tablespaces", PGC_USERSET, CLIENT_CONN_STATEMENT,
4367 gettext_noop("Sets the tablespace(s) to use for temporary tables and sort files."),
4368 gettext_noop("An empty string means use the database's default tablespace."),
4369 GUC_LIST_INPUT | GUC_LIST_QUOTE
4370 },
4371 &temp_tablespaces,
4372 "",
4373 check_temp_tablespaces, assign_temp_tablespaces, NULL
4374 },
4375
4376 {
4377 {"createrole_self_grant", PGC_USERSET, CLIENT_CONN_STATEMENT,
4378 gettext_noop("Sets whether a CREATEROLE user automatically grants "
4379 "the role to themselves, and with which options."),
4380 gettext_noop("An empty string disables automatic self grants."),
4381 GUC_LIST_INPUT
4382 },
4383 &createrole_self_grant,
4384 "",
4385 check_createrole_self_grant, assign_createrole_self_grant, NULL
4386 },
4387
4388 {
4389 {"dynamic_library_path", PGC_SUSET, CLIENT_CONN_OTHER,
4390 gettext_noop("Sets the path for dynamically loadable modules."),
4391 gettext_noop("If a dynamically loadable module needs to be opened and "
4392 "the specified name does not have a directory component (i.e., the "
4393 "name does not contain a slash), the system will search this path for "
4394 "the specified file."),
4395 GUC_SUPERUSER_ONLY
4396 },
4397 &Dynamic_library_path,
4398 "$libdir",
4399 NULL, NULL, NULL
4400 },
4401
4402 {
4403 {"extension_control_path", PGC_SUSET, CLIENT_CONN_OTHER,
4404 gettext_noop("Sets the path for extension control files."),
4405 gettext_noop("The remaining extension script and secondary control files are then loaded "
4406 "from the same directory where the primary control file was found."),
4407 GUC_SUPERUSER_ONLY
4408 },
4409 &Extension_control_path,
4410 "$system",
4411 NULL, NULL, NULL
4412 },
4413
4414 {
4415 {"krb_server_keyfile", PGC_SIGHUP, CONN_AUTH_AUTH,
4416 gettext_noop("Sets the location of the Kerberos server key file."),
4417 NULL,
4418 GUC_SUPERUSER_ONLY
4419 },
4420 &pg_krb_server_keyfile,
4421 PG_KRB_SRVTAB,
4422 NULL, NULL, NULL
4423 },
4424
4425 {
4426 {"bonjour_name", PGC_POSTMASTER, CONN_AUTH_SETTINGS,
4427 gettext_noop("Sets the Bonjour service name."),
4428 gettext_noop("An empty string means use the computer name.")
4429 },
4430 &bonjour_name,
4431 "",
4432 NULL, NULL, NULL
4433 },
4434
4435 {
4436 {"lc_messages", PGC_SUSET, CLIENT_CONN_LOCALE,
4437 gettext_noop("Sets the language in which messages are displayed."),
4438 gettext_noop("An empty string means use the operating system setting.")
4439 },
4440 &locale_messages,
4441 "",
4442 check_locale_messages, assign_locale_messages, NULL
4443 },
4444
4445 {
4446 {"lc_monetary", PGC_USERSET, CLIENT_CONN_LOCALE,
4447 gettext_noop("Sets the locale for formatting monetary amounts."),
4448 gettext_noop("An empty string means use the operating system setting.")
4449 },
4450 &locale_monetary,
4451 "C",
4452 check_locale_monetary, assign_locale_monetary, NULL
4453 },
4454
4455 {
4456 {"lc_numeric", PGC_USERSET, CLIENT_CONN_LOCALE,
4457 gettext_noop("Sets the locale for formatting numbers."),
4458 gettext_noop("An empty string means use the operating system setting.")
4459 },
4460 &locale_numeric,
4461 "C",
4462 check_locale_numeric, assign_locale_numeric, NULL
4463 },
4464
4465 {
4466 {"lc_time", PGC_USERSET, CLIENT_CONN_LOCALE,
4467 gettext_noop("Sets the locale for formatting date and time values."),
4468 gettext_noop("An empty string means use the operating system setting.")
4469 },
4470 &locale_time,
4471 "C",
4472 check_locale_time, assign_locale_time, NULL
4473 },
4474
4475 {
4476 {"session_preload_libraries", PGC_SUSET, CLIENT_CONN_PRELOAD,
4477 gettext_noop("Lists shared libraries to preload into each backend."),
4478 NULL,
4479 GUC_LIST_INPUT | GUC_LIST_QUOTE | GUC_SUPERUSER_ONLY
4480 },
4481 &session_preload_libraries_string,
4482 "",
4483 NULL, NULL, NULL
4484 },
4485
4486 {
4487 {"shared_preload_libraries", PGC_POSTMASTER, CLIENT_CONN_PRELOAD,
4488 gettext_noop("Lists shared libraries to preload into server."),
4489 NULL,
4490 GUC_LIST_INPUT | GUC_LIST_QUOTE | GUC_SUPERUSER_ONLY
4491 },
4492 &shared_preload_libraries_string,
4493 "",
4494 NULL, NULL, NULL
4495 },
4496
4497 {
4498 {"local_preload_libraries", PGC_USERSET, CLIENT_CONN_PRELOAD,
4499 gettext_noop("Lists unprivileged shared libraries to preload into each backend."),
4500 NULL,
4501 GUC_LIST_INPUT | GUC_LIST_QUOTE
4502 },
4503 &local_preload_libraries_string,
4504 "",
4505 NULL, NULL, NULL
4506 },
4507
4508 {
4509 {"search_path", PGC_USERSET, CLIENT_CONN_STATEMENT,
4510 gettext_noop("Sets the schema search order for names that are not schema-qualified."),
4511 NULL,
4512 GUC_LIST_INPUT | GUC_LIST_QUOTE | GUC_EXPLAIN | GUC_REPORT
4513 },
4514 &namespace_search_path,
4515 "\"$user\", public",
4516 check_search_path, assign_search_path, NULL
4517 },
4518
4519 {
4520 /* Can't be set in postgresql.conf */
4521 {"server_encoding", PGC_INTERNAL, PRESET_OPTIONS,
4522 gettext_noop("Shows the server (database) character set encoding."),
4523 NULL,
4524 GUC_IS_NAME | GUC_REPORT | GUC_NOT_IN_SAMPLE | GUC_DISALLOW_IN_FILE
4525 },
4526 &server_encoding_string,
4527 "SQL_ASCII",
4528 NULL, NULL, NULL
4529 },
4530
4531 {
4532 /* Can't be set in postgresql.conf */
4533 {"server_version", PGC_INTERNAL, PRESET_OPTIONS,
4534 gettext_noop("Shows the server version."),
4535 NULL,
4536 GUC_REPORT | GUC_NOT_IN_SAMPLE | GUC_DISALLOW_IN_FILE
4537 },
4538 &server_version_string,
4539 PG_VERSION,
4540 NULL, NULL, NULL
4541 },
4542
4543 {
4544 /* Not for general use --- used by SET ROLE */
4545 {"role", PGC_USERSET, UNGROUPED,
4546 gettext_noop("Sets the current role."),
4547 NULL,
4548 GUC_IS_NAME | GUC_NO_SHOW_ALL | GUC_NO_RESET_ALL | GUC_NOT_IN_SAMPLE | GUC_DISALLOW_IN_FILE | GUC_NOT_WHILE_SEC_REST
4549 },
4550 &role_string,
4551 "none",
4552 check_role, assign_role, show_role
4553 },
4554
4555 {
4556 /* Not for general use --- used by SET SESSION AUTHORIZATION */
4557 {"session_authorization", PGC_USERSET, UNGROUPED,
4558 gettext_noop("Sets the session user name."),
4559 NULL,
4560 GUC_IS_NAME | GUC_REPORT | GUC_NO_SHOW_ALL | GUC_NO_RESET_ALL | GUC_NOT_IN_SAMPLE | GUC_DISALLOW_IN_FILE | GUC_NOT_WHILE_SEC_REST
4561 },
4562 &session_authorization_string,
4563 NULL,
4564 check_session_authorization, assign_session_authorization, NULL
4565 },
4566
4567 {
4568 {"log_destination", PGC_SIGHUP, LOGGING_WHERE,
4569 gettext_noop("Sets the destination for server log output."),
4570 gettext_noop("Valid values are combinations of \"stderr\", "
4571 "\"syslog\", \"csvlog\", \"jsonlog\", and \"eventlog\", "
4572 "depending on the platform."),
4573 GUC_LIST_INPUT
4574 },
4575 &Log_destination_string,
4576 "stderr",
4577 check_log_destination, assign_log_destination, NULL
4578 },
4579 {
4580 {"log_directory", PGC_SIGHUP, LOGGING_WHERE,
4581 gettext_noop("Sets the destination directory for log files."),
4582 gettext_noop("Can be specified as relative to the data directory "
4583 "or as absolute path."),
4584 GUC_SUPERUSER_ONLY
4585 },
4586 &Log_directory,
4587 "log",
4588 check_canonical_path, NULL, NULL
4589 },
4590 {
4591 {"log_filename", PGC_SIGHUP, LOGGING_WHERE,
4592 gettext_noop("Sets the file name pattern for log files."),
4593 NULL,
4594 GUC_SUPERUSER_ONLY
4595 },
4596 &Log_filename,
4597 "postgresql-%Y-%m-%d_%H%M%S.log",
4598 NULL, NULL, NULL
4599 },
4600
4601 {
4602 {"syslog_ident", PGC_SIGHUP, LOGGING_WHERE,
4603 gettext_noop("Sets the program name used to identify PostgreSQL "
4604 "messages in syslog."),
4605 NULL
4606 },
4607 &syslog_ident_str,
4608 "postgres",
4609 NULL, assign_syslog_ident, NULL
4610 },
4611
4612 {
4613 {"event_source", PGC_POSTMASTER, LOGGING_WHERE,
4614 gettext_noop("Sets the application name used to identify "
4615 "PostgreSQL messages in the event log."),
4616 NULL
4617 },
4618 &event_source,
4619 DEFAULT_EVENT_SOURCE,
4620 NULL, NULL, NULL
4621 },
4622
4623 {
4624 {"TimeZone", PGC_USERSET, CLIENT_CONN_LOCALE,
4625 gettext_noop("Sets the time zone for displaying and interpreting time stamps."),
4626 NULL,
4627 GUC_REPORT
4628 },
4629 &timezone_string,
4630 "GMT",
4631 check_timezone, assign_timezone, show_timezone
4632 },
4633 {
4634 {"timezone_abbreviations", PGC_USERSET, CLIENT_CONN_LOCALE,
4635 gettext_noop("Selects a file of time zone abbreviations."),
4636 NULL
4637 },
4638 &timezone_abbreviations_string,
4639 NULL,
4640 check_timezone_abbreviations, assign_timezone_abbreviations, NULL
4641 },
4642
4643 {
4644 {"unix_socket_group", PGC_POSTMASTER, CONN_AUTH_SETTINGS,
4645 gettext_noop("Sets the owning group of the Unix-domain socket."),
4646 gettext_noop("The owning user of the socket is always the user that starts the server. "
4647 "An empty string means use the user's default group.")
4648 },
4649 &Unix_socket_group,
4650 "",
4651 NULL, NULL, NULL
4652 },
4653
4654 {
4655 {"unix_socket_directories", PGC_POSTMASTER, CONN_AUTH_SETTINGS,
4656 gettext_noop("Sets the directories where Unix-domain sockets will be created."),
4657 NULL,
4658 GUC_LIST_INPUT | GUC_LIST_QUOTE | GUC_SUPERUSER_ONLY
4659 },
4660 &Unix_socket_directories,
4661 DEFAULT_PGSOCKET_DIR,
4662 NULL, NULL, NULL
4663 },
4664
4665 {
4666 {"listen_addresses", PGC_POSTMASTER, CONN_AUTH_SETTINGS,
4667 gettext_noop("Sets the host name or IP address(es) to listen to."),
4668 NULL,
4669 GUC_LIST_INPUT
4670 },
4671 &ListenAddresses,
4672 "localhost",
4673 NULL, NULL, NULL
4674 },
4675
4676 {
4677 /*
4678 * Can't be set by ALTER SYSTEM as it can lead to recursive definition
4679 * of data_directory.
4680 */
4681 {"data_directory", PGC_POSTMASTER, FILE_LOCATIONS,
4682 gettext_noop("Sets the server's data directory."),
4683 NULL,
4684 GUC_SUPERUSER_ONLY | GUC_DISALLOW_IN_AUTO_FILE
4685 },
4686 &data_directory,
4687 NULL,
4688 NULL, NULL, NULL
4689 },
4690
4691 {
4692 {"config_file", PGC_POSTMASTER, FILE_LOCATIONS,
4693 gettext_noop("Sets the server's main configuration file."),
4694 NULL,
4695 GUC_DISALLOW_IN_FILE | GUC_SUPERUSER_ONLY
4696 },
4697 &ConfigFileName,
4698 NULL,
4699 NULL, NULL, NULL
4700 },
4701
4702 {
4703 {"hba_file", PGC_POSTMASTER, FILE_LOCATIONS,
4704 gettext_noop("Sets the server's \"hba\" configuration file."),
4705 NULL,
4706 GUC_SUPERUSER_ONLY
4707 },
4708 &HbaFileName,
4709 NULL,
4710 NULL, NULL, NULL
4711 },
4712
4713 {
4714 {"ident_file", PGC_POSTMASTER, FILE_LOCATIONS,
4715 gettext_noop("Sets the server's \"ident\" configuration file."),
4716 NULL,
4717 GUC_SUPERUSER_ONLY
4718 },
4719 &IdentFileName,
4720 NULL,
4721 NULL, NULL, NULL
4722 },
4723
4724 {
4725 {"external_pid_file", PGC_POSTMASTER, FILE_LOCATIONS,
4726 gettext_noop("Writes the postmaster PID to the specified file."),
4727 NULL,
4728 GUC_SUPERUSER_ONLY
4729 },
4730 &external_pid_file,
4731 NULL,
4732 check_canonical_path, NULL, NULL
4733 },
4734
4735 {
4736 {"ssl_library", PGC_INTERNAL, PRESET_OPTIONS,
4737 gettext_noop("Shows the name of the SSL library."),
4738 NULL,
4739 GUC_NOT_IN_SAMPLE | GUC_DISALLOW_IN_FILE
4740 },
4741 &ssl_library,
4742 #ifdef USE_SSL
4743 "OpenSSL",
4744 #else
4745 "",
4746 #endif
4747 NULL, NULL, NULL
4748 },
4749
4750 {
4751 {"ssl_cert_file", PGC_SIGHUP, CONN_AUTH_SSL,
4752 gettext_noop("Location of the SSL server certificate file."),
4753 NULL
4754 },
4755 &ssl_cert_file,
4756 "server.crt",
4757 NULL, NULL, NULL
4758 },
4759
4760 {
4761 {"ssl_key_file", PGC_SIGHUP, CONN_AUTH_SSL,
4762 gettext_noop("Location of the SSL server private key file."),
4763 NULL
4764 },
4765 &ssl_key_file,
4766 "server.key",
4767 NULL, NULL, NULL
4768 },
4769
4770 {
4771 {"ssl_ca_file", PGC_SIGHUP, CONN_AUTH_SSL,
4772 gettext_noop("Location of the SSL certificate authority file."),
4773 NULL
4774 },
4775 &ssl_ca_file,
4776 "",
4777 NULL, NULL, NULL
4778 },
4779
4780 {
4781 {"ssl_crl_file", PGC_SIGHUP, CONN_AUTH_SSL,
4782 gettext_noop("Location of the SSL certificate revocation list file."),
4783 NULL
4784 },
4785 &ssl_crl_file,
4786 "",
4787 NULL, NULL, NULL
4788 },
4789
4790 {
4791 {"ssl_crl_dir", PGC_SIGHUP, CONN_AUTH_SSL,
4792 gettext_noop("Location of the SSL certificate revocation list directory."),
4793 NULL
4794 },
4795 &ssl_crl_dir,
4796 "",
4797 NULL, NULL, NULL
4798 },
4799
4800 {
4801 {"synchronous_standby_names", PGC_SIGHUP, REPLICATION_PRIMARY,
4802 gettext_noop("Number of synchronous standbys and list of names of potential synchronous ones."),
4803 NULL,
4804 GUC_LIST_INPUT
4805 },
4806 &SyncRepStandbyNames,
4807 "",
4808 check_synchronous_standby_names, assign_synchronous_standby_names, NULL
4809 },
4810
4811 {
4812 {"default_text_search_config", PGC_USERSET, CLIENT_CONN_LOCALE,
4813 gettext_noop("Sets default text search configuration."),
4814 NULL
4815 },
4816 &TSCurrentConfig,
4817 "pg_catalog.simple",
4818 check_default_text_search_config, assign_default_text_search_config, NULL
4819 },
4820
4821 {
4822 {"ssl_tls13_ciphers", PGC_SIGHUP, CONN_AUTH_SSL,
4823 gettext_noop("Sets the list of allowed TLSv1.3 cipher suites."),
4824 gettext_noop("An empty string means use the default cipher suites."),
4825 GUC_SUPERUSER_ONLY
4826 },
4827 &SSLCipherSuites,
4828 "",
4829 NULL, NULL, NULL
4830 },
4831
4832 {
4833 {"ssl_ciphers", PGC_SIGHUP, CONN_AUTH_SSL,
4834 gettext_noop("Sets the list of allowed TLSv1.2 (and lower) ciphers."),
4835 NULL,
4836 GUC_SUPERUSER_ONLY
4837 },
4838 &SSLCipherList,
4839 #ifdef USE_OPENSSL
4840 "HIGH:MEDIUM:+3DES:!aNULL",
4841 #else
4842 "none",
4843 #endif
4844 NULL, NULL, NULL
4845 },
4846
4847 {
4848 {"ssl_groups", PGC_SIGHUP, CONN_AUTH_SSL,
4849 gettext_noop("Sets the group(s) to use for Diffie-Hellman key exchange."),
4850 gettext_noop("Multiple groups can be specified using a colon-separated list."),
4851 GUC_SUPERUSER_ONLY
4852 },
4853 &SSLECDHCurve,
4854 #ifdef USE_SSL
4855 "X25519:prime256v1",
4856 #else
4857 "none",
4858 #endif
4859 NULL, NULL, NULL
4860 },
4861
4862 {
4863 {"ssl_dh_params_file", PGC_SIGHUP, CONN_AUTH_SSL,
4864 gettext_noop("Location of the SSL DH parameters file."),
4865 gettext_noop("An empty string means use compiled-in default parameters."),
4866 GUC_SUPERUSER_ONLY
4867 },
4868 &ssl_dh_params_file,
4869 "",
4870 NULL, NULL, NULL
4871 },
4872
4873 {
4874 {"ssl_passphrase_command", PGC_SIGHUP, CONN_AUTH_SSL,
4875 gettext_noop("Command to obtain passphrases for SSL."),
4876 gettext_noop("An empty string means use the built-in prompting mechanism."),
4877 GUC_SUPERUSER_ONLY
4878 },
4879 &ssl_passphrase_command,
4880 "",
4881 NULL, NULL, NULL
4882 },
4883
4884 {
4885 {"application_name", PGC_USERSET, LOGGING_WHAT,
4886 gettext_noop("Sets the application name to be reported in statistics and logs."),
4887 NULL,
4888 GUC_IS_NAME | GUC_REPORT | GUC_NOT_IN_SAMPLE
4889 },
4890 &application_name,
4891 "",
4892 check_application_name, assign_application_name, NULL
4893 },
4894
4895 {
4896 {"cluster_name", PGC_POSTMASTER, PROCESS_TITLE,
4897 gettext_noop("Sets the name of the cluster, which is included in the process title."),
4898 NULL,
4899 GUC_IS_NAME
4900 },
4901 &cluster_name,
4902 "",
4903 check_cluster_name, NULL, NULL
4904 },
4905
4906 {
4907 {"wal_consistency_checking", PGC_SUSET, DEVELOPER_OPTIONS,
4908 gettext_noop("Sets the WAL resource managers for which WAL consistency checks are done."),
4909 gettext_noop("Full-page images will be logged for all data blocks and cross-checked against the results of WAL replay."),
4910 GUC_LIST_INPUT | GUC_NOT_IN_SAMPLE
4911 },
4912 &wal_consistency_checking_string,
4913 "",
4914 check_wal_consistency_checking, assign_wal_consistency_checking, NULL
4915 },
4916
4917 {
4918 {"jit_provider", PGC_POSTMASTER, CLIENT_CONN_PRELOAD,
4919 gettext_noop("JIT provider to use."),
4920 NULL,
4921 GUC_SUPERUSER_ONLY
4922 },
4923 &jit_provider,
4924 "llvmjit",
4925 NULL, NULL, NULL
4926 },
4927
4928 {
4929 {"backtrace_functions", PGC_SUSET, DEVELOPER_OPTIONS,
4930 gettext_noop("Log backtrace for errors in these functions."),
4931 NULL,
4932 GUC_NOT_IN_SAMPLE
4933 },
4934 &backtrace_functions,
4935 "",
4936 check_backtrace_functions, assign_backtrace_functions, NULL
4937 },
4938
4939 {
4940 {"debug_io_direct", PGC_POSTMASTER, DEVELOPER_OPTIONS,
4941 gettext_noop("Use direct I/O for file access."),
4942 gettext_noop("An empty string disables direct I/O."),
4943 GUC_LIST_INPUT | GUC_NOT_IN_SAMPLE
4944 },
4945 &debug_io_direct_string,
4946 "",
4947 check_debug_io_direct, assign_debug_io_direct, NULL
4948 },
4949
4950 {
4951 {"synchronized_standby_slots", PGC_SIGHUP, REPLICATION_PRIMARY,
4952 gettext_noop("Lists streaming replication standby server replication slot "
4953 "names that logical WAL sender processes will wait for."),
4954 gettext_noop("Logical WAL sender processes will send decoded "
4955 "changes to output plugins only after the specified "
4956 "replication slots have confirmed receiving WAL."),
4957 GUC_LIST_INPUT
4958 },
4959 &synchronized_standby_slots,
4960 "",
4961 check_synchronized_standby_slots, assign_synchronized_standby_slots, NULL
4962 },
4963
4964 {
4965 {"restrict_nonsystem_relation_kind", PGC_USERSET, CLIENT_CONN_STATEMENT,
4966 gettext_noop("Prohibits access to non-system relations of specified kinds."),
4967 NULL,
4968 GUC_LIST_INPUT | GUC_NOT_IN_SAMPLE
4969 },
4970 &restrict_nonsystem_relation_kind_string,
4971 "",
4972 check_restrict_nonsystem_relation_kind, assign_restrict_nonsystem_relation_kind, NULL
4973 },
4974
4975 {
4976 {"oauth_validator_libraries", PGC_SIGHUP, CONN_AUTH_AUTH,
4977 gettext_noop("Lists libraries that may be called to validate OAuth v2 bearer tokens."),
4978 NULL,
4979 GUC_LIST_INPUT | GUC_LIST_QUOTE | GUC_SUPERUSER_ONLY
4980 },
4981 &oauth_validator_libraries_string,
4982 "",
4983 NULL, NULL, NULL
4984 },
4985
4986 {
4987 {"output_plugin_libraries", PGC_SUSET, REPLICATION_SENDING,
4988 gettext_noop("Lists libraries that may be named as logical decoding output plugins."),
4989 gettext_noop("Users with REPLICATION privileges may only use plugins in this list when creating logical replication slots."),
4990 /* note: src/bin/pg_upgrade/check.c assumes GUC_LIST_QUOTE here */
4991 GUC_LIST_INPUT | GUC_LIST_QUOTE | GUC_SUPERUSER_ONLY
4992 },
4993 &output_plugin_libraries_string,
4994 "pgoutput, test_decoding",
4995 NULL, NULL, NULL
4996 },
4997
4998 {
4999 {"log_connections", PGC_SU_BACKEND, LOGGING_WHAT,
5000 gettext_noop("Logs specified aspects of connection establishment and setup."),
5001 NULL,
5002 GUC_LIST_INPUT
5003 },
5004 &log_connections_string,
5005 "",
5006 check_log_connections, assign_log_connections, NULL
5007 },
5008
5009
5010 /* End-of-list marker */
5011 {
5012 {NULL, 0, 0, NULL, NULL}, NULL, NULL, NULL, NULL, NULL
5013 }
5014 };
5015
5016
5017 struct config_enum ConfigureNamesEnum[] =
5018 {
5019 {
5020 {"backslash_quote", PGC_USERSET, COMPAT_OPTIONS_PREVIOUS,
5021 gettext_noop("Sets whether \"\\'\" is allowed in string literals."),
5022 NULL
5023 },
5024 &backslash_quote,
5025 BACKSLASH_QUOTE_SAFE_ENCODING, backslash_quote_options,
5026 NULL, NULL, NULL
5027 },
5028
5029 {
5030 {"bytea_output", PGC_USERSET, CLIENT_CONN_STATEMENT,
5031 gettext_noop("Sets the output format for bytea."),
5032 NULL
5033 },
5034 &bytea_output,
5035 BYTEA_OUTPUT_HEX, bytea_output_options,
5036 NULL, NULL, NULL
5037 },
5038
5039 {
5040 {"client_min_messages", PGC_USERSET, CLIENT_CONN_STATEMENT,
5041 gettext_noop("Sets the message levels that are sent to the client."),
5042 gettext_noop("Each level includes all the levels that follow it. The later"
5043 " the level, the fewer messages are sent.")
5044 },
5045 &client_min_messages,
5046 NOTICE, client_message_level_options,
5047 NULL, NULL, NULL
5048 },
5049
5050 {
5051 {"compute_query_id", PGC_SUSET, STATS_MONITORING,
5052 gettext_noop("Enables in-core computation of query identifiers."),
5053 NULL
5054 },
5055 &compute_query_id,
5056 COMPUTE_QUERY_ID_AUTO, compute_query_id_options,
5057 NULL, NULL, NULL
5058 },
5059
5060 {
5061 {"constraint_exclusion", PGC_USERSET, QUERY_TUNING_OTHER,
5062 gettext_noop("Enables the planner to use constraints to optimize queries."),
5063 gettext_noop("Table scans will be skipped if their constraints"
5064 " guarantee that no rows match the query."),
5065 GUC_EXPLAIN
5066 },
5067 &constraint_exclusion,
5068 CONSTRAINT_EXCLUSION_PARTITION, constraint_exclusion_options,
5069 NULL, NULL, NULL
5070 },
5071
5072 {
5073 {"default_toast_compression", PGC_USERSET, CLIENT_CONN_STATEMENT,
5074 gettext_noop("Sets the default compression method for compressible values."),
5075 NULL
5076 },
5077 &default_toast_compression,
5078 TOAST_PGLZ_COMPRESSION,
5079 default_toast_compression_options,
5080 NULL, NULL, NULL
5081 },
5082
5083 {
5084 {"default_transaction_isolation", PGC_USERSET, CLIENT_CONN_STATEMENT,
5085 gettext_noop("Sets the transaction isolation level of each new transaction."),
5086 NULL
5087 },
5088 &DefaultXactIsoLevel,
5089 XACT_READ_COMMITTED, isolation_level_options,
5090 NULL, NULL, NULL
5091 },
5092
5093 {
5094 {"transaction_isolation", PGC_USERSET, CLIENT_CONN_STATEMENT,
5095 gettext_noop("Sets the current transaction's isolation level."),
5096 NULL,
5097 GUC_NO_RESET | GUC_NO_RESET_ALL | GUC_NOT_IN_SAMPLE | GUC_DISALLOW_IN_FILE
5098 },
5099 &XactIsoLevel,
5100 XACT_READ_COMMITTED, isolation_level_options,
5101 check_transaction_isolation, NULL, NULL
5102 },
5103
5104 {
5105 {"IntervalStyle", PGC_USERSET, CLIENT_CONN_LOCALE,
5106 gettext_noop("Sets the display format for interval values."),
5107 NULL,
5108 GUC_REPORT
5109 },
5110 &IntervalStyle,
5111 INTSTYLE_POSTGRES, intervalstyle_options,
5112 NULL, NULL, NULL
5113 },
5114
5115 {
5116 {"icu_validation_level", PGC_USERSET, CLIENT_CONN_LOCALE,
5117 gettext_noop("Log level for reporting invalid ICU locale strings."),
5118 NULL
5119 },
5120 &icu_validation_level,
5121 WARNING, icu_validation_level_options,
5122 NULL, NULL, NULL
5123 },
5124
5125 {
5126 {"log_error_verbosity", PGC_SUSET, LOGGING_WHAT,
5127 gettext_noop("Sets the verbosity of logged messages."),
5128 NULL
5129 },
5130 &Log_error_verbosity,
5131 PGERROR_DEFAULT, log_error_verbosity_options,
5132 NULL, NULL, NULL
5133 },
5134
5135 {
5136 {"log_min_messages", PGC_SUSET, LOGGING_WHEN,
5137 gettext_noop("Sets the message levels that are logged."),
5138 gettext_noop("Each level includes all the levels that follow it. The later"
5139 " the level, the fewer messages are sent.")
5140 },
5141 &log_min_messages,
5142 WARNING, server_message_level_options,
5143 NULL, NULL, NULL
5144 },
5145
5146 {
5147 {"log_min_error_statement", PGC_SUSET, LOGGING_WHEN,
5148 gettext_noop("Causes all statements generating error at or above this level to be logged."),
5149 gettext_noop("Each level includes all the levels that follow it. The later"
5150 " the level, the fewer messages are sent.")
5151 },
5152 &log_min_error_statement,
5153 ERROR, server_message_level_options,
5154 NULL, NULL, NULL
5155 },
5156
5157 {
5158 {"log_statement", PGC_SUSET, LOGGING_WHAT,
5159 gettext_noop("Sets the type of statements logged."),
5160 NULL
5161 },
5162 &log_statement,
5163 LOGSTMT_NONE, log_statement_options,
5164 NULL, NULL, NULL
5165 },
5166
5167 {
5168 {"syslog_facility", PGC_SIGHUP, LOGGING_WHERE,
5169 gettext_noop("Sets the syslog \"facility\" to be used when syslog enabled."),
5170 NULL
5171 },
5172 &syslog_facility,
5173 DEFAULT_SYSLOG_FACILITY,
5174 syslog_facility_options,
5175 NULL, assign_syslog_facility, NULL
5176 },
5177
5178 {
5179 {"session_replication_role", PGC_SUSET, CLIENT_CONN_STATEMENT,
5180 gettext_noop("Sets the session's behavior for triggers and rewrite rules."),
5181 NULL
5182 },
5183 &SessionReplicationRole,
5184 SESSION_REPLICATION_ROLE_ORIGIN, session_replication_role_options,
5185 NULL, assign_session_replication_role, NULL
5186 },
5187
5188 {
5189 {"synchronous_commit", PGC_USERSET, WAL_SETTINGS,
5190 gettext_noop("Sets the current transaction's synchronization level."),
5191 NULL
5192 },
5193 &synchronous_commit,
5194 SYNCHRONOUS_COMMIT_ON, synchronous_commit_options,
5195 NULL, assign_synchronous_commit, NULL
5196 },
5197
5198 {
5199 {"archive_mode", PGC_POSTMASTER, WAL_ARCHIVING,
5200 gettext_noop("Allows archiving of WAL files using \"archive_command\"."),
5201 NULL
5202 },
5203 &XLogArchiveMode,
5204 ARCHIVE_MODE_OFF, archive_mode_options,
5205 NULL, NULL, NULL
5206 },
5207
5208 {
5209 {"recovery_target_action", PGC_POSTMASTER, WAL_RECOVERY_TARGET,
5210 gettext_noop("Sets the action to perform upon reaching the recovery target."),
5211 NULL
5212 },
5213 &recoveryTargetAction,
5214 RECOVERY_TARGET_ACTION_PAUSE, recovery_target_action_options,
5215 NULL, NULL, NULL
5216 },
5217
5218 {
5219 {"track_functions", PGC_SUSET, STATS_CUMULATIVE,
5220 gettext_noop("Collects function-level statistics on database activity."),
5221 NULL
5222 },
5223 &pgstat_track_functions,
5224 TRACK_FUNC_OFF, track_function_options,
5225 NULL, NULL, NULL
5226 },
5227
5228
5229 {
5230 {"stats_fetch_consistency", PGC_USERSET, STATS_CUMULATIVE,
5231 gettext_noop("Sets the consistency of accesses to statistics data."),
5232 NULL
5233 },
5234 &pgstat_fetch_consistency,
5235 PGSTAT_FETCH_CONSISTENCY_CACHE, stats_fetch_consistency,
5236 NULL, assign_stats_fetch_consistency, NULL
5237 },
5238
5239 {
5240 {"wal_compression", PGC_SUSET, WAL_SETTINGS,
5241 gettext_noop("Compresses full-page writes written in WAL file with specified method."),
5242 NULL
5243 },
5244 &wal_compression,
5245 WAL_COMPRESSION_NONE, wal_compression_options,
5246 NULL, NULL, NULL
5247 },
5248
5249 {
5250 {"wal_level", PGC_POSTMASTER, WAL_SETTINGS,
5251 gettext_noop("Sets the level of information written to the WAL."),
5252 NULL
5253 },
5254 &wal_level,
5255 WAL_LEVEL_REPLICA, wal_level_options,
5256 NULL, NULL, NULL
5257 },
5258
5259 {
5260 {"dynamic_shared_memory_type", PGC_POSTMASTER, RESOURCES_MEM,
5261 gettext_noop("Selects the dynamic shared memory implementation used."),
5262 NULL
5263 },
5264 &dynamic_shared_memory_type,
5265 DEFAULT_DYNAMIC_SHARED_MEMORY_TYPE, dynamic_shared_memory_options,
5266 NULL, NULL, NULL
5267 },
5268
5269 {
5270 {"shared_memory_type", PGC_POSTMASTER, RESOURCES_MEM,
5271 gettext_noop("Selects the shared memory implementation used for the main shared memory region."),
5272 NULL
5273 },
5274 &shared_memory_type,
5275 DEFAULT_SHARED_MEMORY_TYPE, shared_memory_options,
5276 NULL, NULL, NULL
5277 },
5278
5279 {
5280 {"file_copy_method", PGC_USERSET, RESOURCES_DISK,
5281 gettext_noop("Selects the file copy method."),
5282 NULL
5283 },
5284 &file_copy_method,
5285 FILE_COPY_METHOD_COPY, file_copy_method_options,
5286 NULL, NULL, NULL
5287 },
5288
5289 {
5290 {"file_extend_method", PGC_SIGHUP, RESOURCES_DISK,
5291 gettext_noop("Selects the method used for extending data files."),
5292 NULL
5293 },
5294 &file_extend_method,
5295 DEFAULT_FILE_EXTEND_METHOD, file_extend_method_options,
5296 NULL, NULL, NULL
5297 },
5298
5299 {
5300 {"wal_sync_method", PGC_SIGHUP, WAL_SETTINGS,
5301 gettext_noop("Selects the method used for forcing WAL updates to disk."),
5302 NULL
5303 },
5304 &wal_sync_method,
5305 DEFAULT_WAL_SYNC_METHOD, wal_sync_method_options,
5306 NULL, assign_wal_sync_method, NULL
5307 },
5308
5309 {
5310 {"xmlbinary", PGC_USERSET, CLIENT_CONN_STATEMENT,
5311 gettext_noop("Sets how binary values are to be encoded in XML."),
5312 NULL
5313 },
5314 &xmlbinary,
5315 XMLBINARY_BASE64, xmlbinary_options,
5316 NULL, NULL, NULL
5317 },
5318
5319 {
5320 {"xmloption", PGC_USERSET, CLIENT_CONN_STATEMENT,
5321 gettext_noop("Sets whether XML data in implicit parsing and serialization "
5322 "operations is to be considered as documents or content fragments."),
5323 NULL
5324 },
5325 &xmloption,
5326 XMLOPTION_CONTENT, xmloption_options,
5327 NULL, NULL, NULL
5328 },
5329
5330 {
5331 {"huge_pages", PGC_POSTMASTER, RESOURCES_MEM,
5332 gettext_noop("Use of huge pages on Linux or Windows."),
5333 NULL
5334 },
5335 &huge_pages,
5336 HUGE_PAGES_TRY, huge_pages_options,
5337 NULL, NULL, NULL
5338 },
5339
5340 {
5341 {"huge_pages_status", PGC_INTERNAL, PRESET_OPTIONS,
5342 gettext_noop("Indicates the status of huge pages."),
5343 NULL,
5344 GUC_NOT_IN_SAMPLE | GUC_DISALLOW_IN_FILE
5345 },
5346 &huge_pages_status,
5347 HUGE_PAGES_UNKNOWN, huge_pages_status_options,
5348 NULL, NULL, NULL
5349 },
5350
5351 {
5352 {"recovery_prefetch", PGC_SIGHUP, WAL_RECOVERY,
5353 gettext_noop("Prefetch referenced blocks during recovery."),
5354 gettext_noop("Look ahead in the WAL to find references to uncached data.")
5355 },
5356 &recovery_prefetch,
5357 RECOVERY_PREFETCH_TRY, recovery_prefetch_options,
5358 check_recovery_prefetch, assign_recovery_prefetch, NULL
5359 },
5360
5361 {
5362 {"debug_parallel_query", PGC_USERSET, DEVELOPER_OPTIONS,
5363 gettext_noop("Forces the planner's use parallel query nodes."),
5364 gettext_noop("This can be useful for testing the parallel query infrastructure "
5365 "by forcing the planner to generate plans that contain nodes "
5366 "that perform tuple communication between workers and the main process."),
5367 GUC_NOT_IN_SAMPLE | GUC_EXPLAIN
5368 },
5369 &debug_parallel_query,
5370 DEBUG_PARALLEL_OFF, debug_parallel_query_options,
5371 NULL, NULL, NULL
5372 },
5373
5374 {
5375 {"password_encryption", PGC_USERSET, CONN_AUTH_AUTH,
5376 gettext_noop("Chooses the algorithm for encrypting passwords."),
5377 NULL
5378 },
5379 &Password_encryption,
5380 PASSWORD_TYPE_SCRAM_SHA_256, password_encryption_options,
5381 NULL, NULL, NULL
5382 },
5383
5384 {
5385 {"plan_cache_mode", PGC_USERSET, QUERY_TUNING_OTHER,
5386 gettext_noop("Controls the planner's selection of custom or generic plan."),
5387 gettext_noop("Prepared statements can have custom and generic plans, and the planner "
5388 "will attempt to choose which is better. This can be set to override "
5389 "the default behavior."),
5390 GUC_EXPLAIN
5391 },
5392 &plan_cache_mode,
5393 PLAN_CACHE_MODE_AUTO, plan_cache_mode_options,
5394 NULL, NULL, NULL
5395 },
5396
5397 {
5398 {"ssl_min_protocol_version", PGC_SIGHUP, CONN_AUTH_SSL,
5399 gettext_noop("Sets the minimum SSL/TLS protocol version to use."),
5400 NULL,
5401 GUC_SUPERUSER_ONLY
5402 },
5403 &ssl_min_protocol_version,
5404 PG_TLS1_2_VERSION,
5405 ssl_protocol_versions_info + 1, /* don't allow PG_TLS_ANY */
5406 NULL, NULL, NULL
5407 },
5408
5409 {
5410 {"ssl_max_protocol_version", PGC_SIGHUP, CONN_AUTH_SSL,
5411 gettext_noop("Sets the maximum SSL/TLS protocol version to use."),
5412 NULL,
5413 GUC_SUPERUSER_ONLY
5414 },
5415 &ssl_max_protocol_version,
5416 PG_TLS_ANY,
5417 ssl_protocol_versions_info,
5418 NULL, NULL, NULL
5419 },
5420
5421 {
5422 {"recovery_init_sync_method", PGC_SIGHUP, ERROR_HANDLING_OPTIONS,
5423 gettext_noop("Sets the method for synchronizing the data directory before crash recovery."),
5424 },
5425 &recovery_init_sync_method,
5426 DATA_DIR_SYNC_METHOD_FSYNC, recovery_init_sync_method_options,
5427 NULL, NULL, NULL
5428 },
5429
5430 {
5431 {"debug_logical_replication_streaming", PGC_USERSET, DEVELOPER_OPTIONS,
5432 gettext_noop("Forces immediate streaming or serialization of changes in large transactions."),
5433 gettext_noop("On the publisher, it allows streaming or serializing each change in logical decoding. "
5434 "On the subscriber, it allows serialization of all changes to files and notifies the "
5435 "parallel apply workers to read and apply them at the end of the transaction."),
5436 GUC_NOT_IN_SAMPLE
5437 },
5438 &debug_logical_replication_streaming,
5439 DEBUG_LOGICAL_REP_STREAMING_BUFFERED, debug_logical_replication_streaming_options,
5440 NULL, NULL, NULL
5441 },
5442
5443 {
5444 {"io_method", PGC_POSTMASTER, RESOURCES_IO,
5445 gettext_noop("Selects the method for executing asynchronous I/O."),
5446 NULL
5447 },
5448 &io_method,
5449 DEFAULT_IO_METHOD, io_method_options,
5450 NULL, assign_io_method, NULL
5451 },
5452
5453 /* End-of-list marker */
5454 {
5455 {NULL, 0, 0, NULL, NULL}, NULL, 0, NULL, NULL, NULL, NULL
5456 }
5457 };