pub(crate) const PG_GUC_CONTEXTS: &[(&str, &str, &str, &str, &str, &str, &str, &str)] = &[
(
"allow_alter_system",
"sighup",
"on",
"bool",
"Version and Platform Compatibility / Other Platforms and Clients",
"",
"on",
"Allows running the ALTER SYSTEM command.",
),
(
"allow_in_place_tablespaces",
"superuser",
"off",
"bool",
"Developer Options",
"",
"off",
"Allows tablespaces directly inside pg_tblspc, for testing.",
),
(
"allow_system_table_mods",
"superuser",
"off",
"bool",
"Developer Options",
"",
"off",
"Allows modifications of the structure of system tables.",
),
(
"application_name",
"user",
"",
"string",
"Reporting and Logging / What to Log",
"",
"",
"Sets the application name to be reported in statistics and logs.",
),
(
"archive_cleanup_command",
"sighup",
"",
"string",
"Write-Ahead Log / Archive Recovery",
"",
"",
"Sets the shell command that will be executed at every restart point.",
),
(
"archive_command",
"sighup",
"",
"string",
"Write-Ahead Log / Archiving",
"",
"",
"Sets the shell command that will be called to archive a WAL file.",
),
(
"archive_library",
"sighup",
"",
"string",
"Write-Ahead Log / Archiving",
"",
"",
"Sets the library that will be called to archive a WAL file.",
),
(
"archive_mode",
"postmaster",
"off",
"enum",
"Write-Ahead Log / Archiving",
"",
"off",
"Allows archiving of WAL files using \"archive_command\".",
),
(
"archive_timeout",
"sighup",
"0",
"integer",
"Write-Ahead Log / Archiving",
"s",
"0",
"Sets the amount of time to wait before forcing a switch to the next WAL file.",
),
(
"array_nulls",
"user",
"on",
"bool",
"Version and Platform Compatibility / Previous PostgreSQL Versions",
"",
"on",
"Enables input of NULL elements in arrays.",
),
(
"authentication_timeout",
"sighup",
"1min",
"integer",
"Connections and Authentication / Authentication",
"s",
"60",
"Sets the maximum allowed time to complete client authentication.",
),
(
"autovacuum",
"sighup",
"on",
"bool",
"Vacuuming / Automatic Vacuuming",
"",
"on",
"Starts the autovacuum subprocess.",
),
(
"autovacuum_analyze_scale_factor",
"sighup",
"0.1",
"real",
"Vacuuming / Automatic Vacuuming",
"",
"0.1",
"Number of tuple inserts, updates, or deletes prior to analyze as a fraction of reltuples.",
),
(
"autovacuum_analyze_threshold",
"sighup",
"50",
"integer",
"Vacuuming / Automatic Vacuuming",
"",
"50",
"Minimum number of tuple inserts, updates, or deletes prior to analyze.",
),
(
"autovacuum_freeze_max_age",
"postmaster",
"200000000",
"integer",
"Vacuuming / Automatic Vacuuming",
"",
"200000000",
"Age at which to autovacuum a table to prevent transaction ID wraparound.",
),
(
"autovacuum_max_workers",
"sighup",
"3",
"integer",
"Vacuuming / Automatic Vacuuming",
"",
"3",
"Sets the maximum number of simultaneously running autovacuum worker processes.",
),
(
"autovacuum_multixact_freeze_max_age",
"postmaster",
"400000000",
"integer",
"Vacuuming / Automatic Vacuuming",
"",
"400000000",
"Multixact age at which to autovacuum a table to prevent multixact wraparound.",
),
(
"autovacuum_naptime",
"sighup",
"1min",
"integer",
"Vacuuming / Automatic Vacuuming",
"s",
"60",
"Time to sleep between autovacuum runs.",
),
(
"autovacuum_vacuum_cost_delay",
"sighup",
"2ms",
"real",
"Vacuuming / Automatic Vacuuming",
"ms",
"2",
"Vacuum cost delay in milliseconds, for autovacuum.",
),
(
"autovacuum_vacuum_cost_limit",
"sighup",
"-1",
"integer",
"Vacuuming / Automatic Vacuuming",
"",
"-1",
"Vacuum cost amount available before napping, for autovacuum.",
),
(
"autovacuum_vacuum_insert_scale_factor",
"sighup",
"0.2",
"real",
"Vacuuming / Automatic Vacuuming",
"",
"0.2",
"Number of tuple inserts prior to vacuum as a fraction of reltuples.",
),
(
"autovacuum_vacuum_insert_threshold",
"sighup",
"1000",
"integer",
"Vacuuming / Automatic Vacuuming",
"",
"1000",
"Minimum number of tuple inserts prior to vacuum.",
),
(
"autovacuum_vacuum_max_threshold",
"sighup",
"100000000",
"integer",
"Vacuuming / Automatic Vacuuming",
"",
"100000000",
"Maximum number of tuple updates or deletes prior to vacuum.",
),
(
"autovacuum_vacuum_scale_factor",
"sighup",
"0.2",
"real",
"Vacuuming / Automatic Vacuuming",
"",
"0.2",
"Number of tuple updates or deletes prior to vacuum as a fraction of reltuples.",
),
(
"autovacuum_vacuum_threshold",
"sighup",
"50",
"integer",
"Vacuuming / Automatic Vacuuming",
"",
"50",
"Minimum number of tuple updates or deletes prior to vacuum.",
),
(
"autovacuum_work_mem",
"sighup",
"-1",
"integer",
"Resource Usage / Memory",
"kB",
"-1",
"Sets the maximum memory to be used by each autovacuum worker process.",
),
(
"autovacuum_worker_slots",
"postmaster",
"16",
"integer",
"Vacuuming / Automatic Vacuuming",
"",
"16",
"Sets the number of backend slots to allocate for autovacuum workers.",
),
(
"backend_flush_after",
"user",
"0",
"integer",
"Resource Usage / I/O",
"8kB",
"0",
"Number of pages after which previously performed writes are flushed to disk.",
),
(
"backslash_quote",
"user",
"safe_encoding",
"enum",
"Version and Platform Compatibility / Previous PostgreSQL Versions",
"",
"safe_encoding",
"Sets whether \"\\'\" is allowed in string literals.",
),
(
"backtrace_functions",
"superuser",
"",
"string",
"Developer Options",
"",
"",
"Log backtrace for errors in these functions.",
),
(
"bgwriter_delay",
"sighup",
"200ms",
"integer",
"Resource Usage / Background Writer",
"ms",
"200",
"Background writer sleep time between rounds.",
),
(
"bgwriter_flush_after",
"sighup",
"512kB",
"integer",
"Resource Usage / Background Writer",
"8kB",
"64",
"Number of pages after which previously performed writes are flushed to disk.",
),
(
"bgwriter_lru_maxpages",
"sighup",
"100",
"integer",
"Resource Usage / Background Writer",
"",
"100",
"Background writer maximum number of LRU pages to flush per round.",
),
(
"bgwriter_lru_multiplier",
"sighup",
"2",
"real",
"Resource Usage / Background Writer",
"",
"2",
"Multiple of the average buffer usage to free per round.",
),
(
"block_size",
"internal",
"8192",
"integer",
"Preset Options",
"",
"8192",
"Shows the size of a disk block.",
),
(
"bonjour",
"postmaster",
"off",
"bool",
"Connections and Authentication / Connection Settings",
"",
"off",
"Enables advertising the server via Bonjour.",
),
(
"bonjour_name",
"postmaster",
"",
"string",
"Connections and Authentication / Connection Settings",
"",
"",
"Sets the Bonjour service name.",
),
(
"bytea_output",
"user",
"hex",
"enum",
"Client Connection Defaults / Statement Behavior",
"",
"hex",
"Sets the output format for bytea.",
),
(
"check_function_bodies",
"user",
"on",
"bool",
"Client Connection Defaults / Statement Behavior",
"",
"on",
"Check routine bodies during CREATE FUNCTION and CREATE PROCEDURE.",
),
(
"checkpoint_completion_target",
"sighup",
"0.9",
"real",
"Write-Ahead Log / Checkpoints",
"",
"0.9",
"Time spent flushing dirty buffers during checkpoint, as fraction of checkpoint interval.",
),
(
"checkpoint_flush_after",
"sighup",
"256kB",
"integer",
"Write-Ahead Log / Checkpoints",
"8kB",
"32",
"Number of pages after which previously performed writes are flushed to disk.",
),
(
"checkpoint_timeout",
"sighup",
"5min",
"integer",
"Write-Ahead Log / Checkpoints",
"s",
"300",
"Sets the maximum time between automatic WAL checkpoints.",
),
(
"checkpoint_warning",
"sighup",
"30s",
"integer",
"Write-Ahead Log / Checkpoints",
"s",
"30",
"Sets the maximum time before warning if checkpoints triggered by WAL volume happen too frequently.",
),
(
"client_connection_check_interval",
"user",
"0",
"integer",
"Connections and Authentication / TCP Settings",
"ms",
"0",
"Sets the time interval between checks for disconnection while running queries.",
),
(
"client_encoding",
"user",
"SQL_ASCII",
"string",
"Client Connection Defaults / Locale and Formatting",
"",
"SQL_ASCII",
"Sets the client's character set encoding.",
),
(
"client_min_messages",
"user",
"notice",
"enum",
"Client Connection Defaults / Statement Behavior",
"",
"notice",
"Sets the message levels that are sent to the client.",
),
(
"cluster_name",
"postmaster",
"",
"string",
"Reporting and Logging / Process Title",
"",
"",
"Sets the name of the cluster, which is included in the process title.",
),
(
"commit_delay",
"superuser",
"0",
"integer",
"Write-Ahead Log / Settings",
"",
"0",
"Sets the delay in microseconds between transaction commit and flushing WAL to disk.",
),
(
"commit_siblings",
"user",
"5",
"integer",
"Write-Ahead Log / Settings",
"",
"5",
"Sets the minimum number of concurrent open transactions required before performing \"commit_delay\".",
),
(
"commit_timestamp_buffers",
"postmaster",
"0",
"integer",
"Resource Usage / Memory",
"8kB",
"0",
"Sets the size of the dedicated buffer pool used for the commit timestamp cache.",
),
(
"compute_query_id",
"superuser",
"auto",
"enum",
"Statistics / Monitoring",
"",
"auto",
"Enables in-core computation of query identifiers.",
),
(
"config_file",
"postmaster",
"",
"string",
"File Locations",
"",
"",
"Sets the server's main configuration file.",
),
(
"constraint_exclusion",
"user",
"partition",
"enum",
"Query Tuning / Other Planner Options",
"",
"partition",
"Enables the planner to use constraints to optimize queries.",
),
(
"cpu_index_tuple_cost",
"user",
"0.005",
"real",
"Query Tuning / Planner Cost Constants",
"",
"0.005",
"Sets the planner's estimate of the cost of processing each index entry during an index scan.",
),
(
"cpu_operator_cost",
"user",
"0.0025",
"real",
"Query Tuning / Planner Cost Constants",
"",
"0.0025",
"Sets the planner's estimate of the cost of processing each operator or function call.",
),
(
"cpu_tuple_cost",
"user",
"0.01",
"real",
"Query Tuning / Planner Cost Constants",
"",
"0.01",
"Sets the planner's estimate of the cost of processing each tuple (row).",
),
(
"createrole_self_grant",
"user",
"",
"string",
"Client Connection Defaults / Statement Behavior",
"",
"",
"Sets whether a CREATEROLE user automatically grants the role to themselves, and with which options.",
),
(
"cursor_tuple_fraction",
"user",
"0.1",
"real",
"Query Tuning / Other Planner Options",
"",
"0.1",
"Sets the planner's estimate of the fraction of a cursor's rows that will be retrieved.",
),
(
"data_checksums",
"internal",
"off",
"bool",
"Preset Options",
"",
"off",
"Shows whether data checksums are turned on for this cluster.",
),
(
"data_directory",
"postmaster",
"",
"string",
"File Locations",
"",
"",
"Sets the server's data directory.",
),
(
"data_directory_mode",
"internal",
"448",
"integer",
"Preset Options",
"",
"448",
"Shows the mode of the data directory.",
),
(
"data_sync_retry",
"postmaster",
"off",
"bool",
"Error Handling",
"",
"off",
"Whether to continue running after a failure to sync data files.",
),
(
"datestyle",
"user",
"ISO, MDY",
"string",
"Client Connection Defaults / Locale and Formatting",
"",
"ISO, MDY",
"Sets the display format for date and time values.",
),
(
"deadlock_timeout",
"superuser",
"1s",
"integer",
"Lock Management",
"ms",
"1000",
"Sets the time to wait on a lock before checking for deadlock.",
),
(
"debug_assertions",
"internal",
"off",
"bool",
"Preset Options",
"",
"off",
"Shows whether the running server has assertion checks enabled.",
),
(
"debug_discard_caches",
"superuser",
"0",
"integer",
"Developer Options",
"",
"0",
"Aggressively flush system caches for debugging purposes.",
),
(
"debug_io_direct",
"postmaster",
"",
"string",
"Developer Options",
"",
"",
"Use direct I/O for file access.",
),
(
"debug_logical_replication_streaming",
"user",
"buffered",
"enum",
"Developer Options",
"",
"buffered",
"Forces immediate streaming or serialization of changes in large transactions.",
),
(
"debug_parallel_query",
"user",
"off",
"enum",
"Developer Options",
"",
"off",
"Forces the planner's use parallel query nodes.",
),
(
"debug_pretty_print",
"user",
"on",
"bool",
"Reporting and Logging / What to Log",
"",
"on",
"Indents parse and plan tree displays.",
),
(
"debug_print_parse",
"user",
"off",
"bool",
"Reporting and Logging / What to Log",
"",
"off",
"Logs each query's parse tree.",
),
(
"debug_print_plan",
"user",
"off",
"bool",
"Reporting and Logging / What to Log",
"",
"off",
"Logs each query's execution plan.",
),
(
"debug_print_rewritten",
"user",
"off",
"bool",
"Reporting and Logging / What to Log",
"",
"off",
"Logs each query's rewritten parse tree.",
),
(
"default_statistics_target",
"user",
"100",
"integer",
"Query Tuning / Other Planner Options",
"",
"100",
"Sets the default statistics target.",
),
(
"default_table_access_method",
"user",
"heap",
"string",
"Client Connection Defaults / Statement Behavior",
"",
"heap",
"Sets the default table access method for new tables.",
),
(
"default_tablespace",
"user",
"",
"string",
"Client Connection Defaults / Statement Behavior",
"",
"",
"Sets the default tablespace to create tables and indexes in.",
),
(
"default_text_search_config",
"user",
"pg_catalog.simple",
"string",
"Client Connection Defaults / Locale and Formatting",
"",
"pg_catalog.simple",
"Sets default text search configuration.",
),
(
"default_toast_compression",
"user",
"pglz",
"enum",
"Client Connection Defaults / Statement Behavior",
"",
"pglz",
"Sets the default compression method for compressible values.",
),
(
"default_transaction_deferrable",
"user",
"off",
"bool",
"Client Connection Defaults / Statement Behavior",
"",
"off",
"Sets the default deferrable status of new transactions.",
),
(
"default_transaction_isolation",
"user",
"read committed",
"enum",
"Client Connection Defaults / Statement Behavior",
"",
"read committed",
"Sets the transaction isolation level of each new transaction.",
),
(
"default_transaction_read_only",
"user",
"off",
"bool",
"Client Connection Defaults / Statement Behavior",
"",
"off",
"Sets the default read-only status of new transactions.",
),
(
"dynamic_library_path",
"superuser",
"$libdir",
"string",
"Client Connection Defaults / Other Defaults",
"",
"$libdir",
"Sets the path for dynamically loadable modules.",
),
(
"dynamic_shared_memory_type",
"postmaster",
"posix",
"enum",
"Resource Usage / Memory",
"",
"posix",
"Selects the dynamic shared memory implementation used.",
),
(
"effective_cache_size",
"user",
"4GB",
"integer",
"Query Tuning / Planner Cost Constants",
"8kB",
"524288",
"Sets the planner's assumption about the total size of the data caches.",
),
(
"effective_io_concurrency",
"user",
"16",
"integer",
"Resource Usage / I/O",
"",
"16",
"Number of simultaneous requests that can be handled efficiently by the disk subsystem.",
),
(
"enable_async_append",
"user",
"on",
"bool",
"Query Tuning / Planner Method Configuration",
"",
"on",
"Enables the planner's use of async append plans.",
),
(
"enable_bitmapscan",
"user",
"on",
"bool",
"Query Tuning / Planner Method Configuration",
"",
"on",
"Enables the planner's use of bitmap-scan plans.",
),
(
"enable_distinct_reordering",
"user",
"on",
"bool",
"Query Tuning / Planner Method Configuration",
"",
"on",
"Enables reordering of DISTINCT keys.",
),
(
"enable_gathermerge",
"user",
"on",
"bool",
"Query Tuning / Planner Method Configuration",
"",
"on",
"Enables the planner's use of gather merge plans.",
),
(
"enable_group_by_reordering",
"user",
"on",
"bool",
"Query Tuning / Planner Method Configuration",
"",
"on",
"Enables reordering of GROUP BY keys.",
),
(
"enable_hashagg",
"user",
"on",
"bool",
"Query Tuning / Planner Method Configuration",
"",
"on",
"Enables the planner's use of hashed aggregation plans.",
),
(
"enable_hashjoin",
"user",
"on",
"bool",
"Query Tuning / Planner Method Configuration",
"",
"on",
"Enables the planner's use of hash join plans.",
),
(
"enable_incremental_sort",
"user",
"on",
"bool",
"Query Tuning / Planner Method Configuration",
"",
"on",
"Enables the planner's use of incremental sort steps.",
),
(
"enable_indexonlyscan",
"user",
"on",
"bool",
"Query Tuning / Planner Method Configuration",
"",
"on",
"Enables the planner's use of index-only-scan plans.",
),
(
"enable_indexscan",
"user",
"on",
"bool",
"Query Tuning / Planner Method Configuration",
"",
"on",
"Enables the planner's use of index-scan plans.",
),
(
"enable_material",
"user",
"on",
"bool",
"Query Tuning / Planner Method Configuration",
"",
"on",
"Enables the planner's use of materialization.",
),
(
"enable_memoize",
"user",
"on",
"bool",
"Query Tuning / Planner Method Configuration",
"",
"on",
"Enables the planner's use of memoization.",
),
(
"enable_mergejoin",
"user",
"on",
"bool",
"Query Tuning / Planner Method Configuration",
"",
"on",
"Enables the planner's use of merge join plans.",
),
(
"enable_nestloop",
"user",
"on",
"bool",
"Query Tuning / Planner Method Configuration",
"",
"on",
"Enables the planner's use of nested-loop join plans.",
),
(
"enable_parallel_append",
"user",
"on",
"bool",
"Query Tuning / Planner Method Configuration",
"",
"on",
"Enables the planner's use of parallel append plans.",
),
(
"enable_parallel_hash",
"user",
"on",
"bool",
"Query Tuning / Planner Method Configuration",
"",
"on",
"Enables the planner's use of parallel hash plans.",
),
(
"enable_partition_pruning",
"user",
"on",
"bool",
"Query Tuning / Planner Method Configuration",
"",
"on",
"Enables plan-time and execution-time partition pruning.",
),
(
"enable_partitionwise_aggregate",
"user",
"off",
"bool",
"Query Tuning / Planner Method Configuration",
"",
"off",
"Enables partitionwise aggregation and grouping.",
),
(
"enable_partitionwise_join",
"user",
"off",
"bool",
"Query Tuning / Planner Method Configuration",
"",
"off",
"Enables partitionwise join.",
),
(
"enable_presorted_aggregate",
"user",
"on",
"bool",
"Query Tuning / Planner Method Configuration",
"",
"on",
"Enables the planner's ability to produce plans that provide presorted input for ORDER BY / DISTINCT aggregate functions.",
),
(
"enable_self_join_elimination",
"user",
"on",
"bool",
"Query Tuning / Planner Method Configuration",
"",
"on",
"Enables removal of unique self-joins.",
),
(
"enable_seqscan",
"user",
"on",
"bool",
"Query Tuning / Planner Method Configuration",
"",
"on",
"Enables the planner's use of sequential-scan plans.",
),
(
"enable_sort",
"user",
"on",
"bool",
"Query Tuning / Planner Method Configuration",
"",
"on",
"Enables the planner's use of explicit sort steps.",
),
(
"enable_tidscan",
"user",
"on",
"bool",
"Query Tuning / Planner Method Configuration",
"",
"on",
"Enables the planner's use of TID scan plans.",
),
(
"escape_string_warning",
"user",
"on",
"bool",
"Version and Platform Compatibility / Previous PostgreSQL Versions",
"",
"on",
"Warn about backslash escapes in ordinary string literals.",
),
(
"event_source",
"postmaster",
"PostgreSQL",
"string",
"Reporting and Logging / Where to Log",
"",
"PostgreSQL",
"Sets the application name used to identify PostgreSQL messages in the event log.",
),
(
"event_triggers",
"superuser",
"on",
"bool",
"Client Connection Defaults / Statement Behavior",
"",
"on",
"Enables event triggers.",
),
(
"exit_on_error",
"user",
"off",
"bool",
"Error Handling",
"",
"off",
"Terminate session on any error.",
),
(
"extension_control_path",
"superuser",
"$system",
"string",
"Client Connection Defaults / Other Defaults",
"",
"$system",
"Sets the path for extension control files.",
),
(
"external_pid_file",
"postmaster",
"",
"string",
"File Locations",
"",
"",
"Writes the postmaster PID to the specified file.",
),
(
"extra_float_digits",
"user",
"1",
"integer",
"Client Connection Defaults / Locale and Formatting",
"",
"1",
"Sets the number of digits displayed for floating-point values.",
),
(
"file_copy_method",
"user",
"copy",
"enum",
"Resource Usage / Disk",
"",
"copy",
"Selects the file copy method.",
),
(
"file_extend_method",
"sighup",
"posix_fallocate",
"enum",
"Resource Usage / Disk",
"",
"posix_fallocate",
"Selects the method used for extending data files.",
),
(
"from_collapse_limit",
"user",
"8",
"integer",
"Query Tuning / Other Planner Options",
"",
"8",
"Sets the FROM-list size beyond which subqueries are not collapsed.",
),
(
"fsync",
"sighup",
"on",
"bool",
"Write-Ahead Log / Settings",
"",
"on",
"Forces synchronization of updates to disk.",
),
(
"full_page_writes",
"sighup",
"on",
"bool",
"Write-Ahead Log / Settings",
"",
"on",
"Writes full pages to WAL when first modified after a checkpoint.",
),
(
"geqo",
"user",
"on",
"bool",
"Query Tuning / Genetic Query Optimizer",
"",
"on",
"Enables genetic query optimization.",
),
(
"geqo_effort",
"user",
"5",
"integer",
"Query Tuning / Genetic Query Optimizer",
"",
"5",
"GEQO: effort is used to set the default for other GEQO parameters.",
),
(
"geqo_generations",
"user",
"0",
"integer",
"Query Tuning / Genetic Query Optimizer",
"",
"0",
"GEQO: number of iterations of the algorithm.",
),
(
"geqo_pool_size",
"user",
"0",
"integer",
"Query Tuning / Genetic Query Optimizer",
"",
"0",
"GEQO: number of individuals in the population.",
),
(
"geqo_seed",
"user",
"0",
"real",
"Query Tuning / Genetic Query Optimizer",
"",
"0",
"GEQO: seed for random path selection.",
),
(
"geqo_selection_bias",
"user",
"2",
"real",
"Query Tuning / Genetic Query Optimizer",
"",
"2",
"GEQO: selective pressure within the population.",
),
(
"geqo_threshold",
"user",
"12",
"integer",
"Query Tuning / Genetic Query Optimizer",
"",
"12",
"Sets the threshold of FROM items beyond which GEQO is used.",
),
(
"gin_fuzzy_search_limit",
"user",
"0",
"integer",
"Client Connection Defaults / Other Defaults",
"",
"0",
"Sets the maximum allowed result for exact search by GIN.",
),
(
"gin_pending_list_limit",
"user",
"4MB",
"integer",
"Client Connection Defaults / Statement Behavior",
"kB",
"4096",
"Sets the maximum size of the pending list for GIN index.",
),
(
"gss_accept_delegation",
"sighup",
"off",
"bool",
"Connections and Authentication / Authentication",
"",
"off",
"Sets whether GSSAPI delegation should be accepted from the client.",
),
(
"hash_mem_multiplier",
"user",
"2",
"real",
"Resource Usage / Memory",
"",
"2",
"Multiple of \"work_mem\" to use for hash tables.",
),
(
"hba_file",
"postmaster",
"",
"string",
"File Locations",
"",
"",
"Sets the server's \"hba\" configuration file.",
),
(
"hot_standby",
"postmaster",
"on",
"bool",
"Replication / Standby Servers",
"",
"on",
"Allows connections and queries during recovery.",
),
(
"hot_standby_feedback",
"sighup",
"off",
"bool",
"Replication / Standby Servers",
"",
"off",
"Allows feedback from a hot standby to the primary that will avoid query conflicts.",
),
(
"huge_page_size",
"postmaster",
"0",
"integer",
"Resource Usage / Memory",
"kB",
"0",
"The size of huge page that should be requested.",
),
(
"huge_pages",
"postmaster",
"try",
"enum",
"Resource Usage / Memory",
"",
"try",
"Use of huge pages on Linux or Windows.",
),
(
"huge_pages_status",
"internal",
"unknown",
"enum",
"Preset Options",
"",
"unknown",
"Indicates the status of huge pages.",
),
(
"icu_validation_level",
"user",
"warning",
"enum",
"Client Connection Defaults / Locale and Formatting",
"",
"warning",
"Log level for reporting invalid ICU locale strings.",
),
(
"ident_file",
"postmaster",
"",
"string",
"File Locations",
"",
"",
"Sets the server's \"ident\" configuration file.",
),
(
"idle_in_transaction_session_timeout",
"user",
"0",
"integer",
"Client Connection Defaults / Statement Behavior",
"ms",
"0",
"Sets the maximum allowed idle time between queries, when in a transaction.",
),
(
"idle_replication_slot_timeout",
"sighup",
"0",
"integer",
"Replication / Sending Servers",
"s",
"0",
"Sets the duration a replication slot can remain idle before it is invalidated.",
),
(
"idle_session_timeout",
"user",
"0",
"integer",
"Client Connection Defaults / Statement Behavior",
"ms",
"0",
"Sets the maximum allowed idle time between queries, when not in a transaction.",
),
(
"ignore_checksum_failure",
"superuser",
"off",
"bool",
"Developer Options",
"",
"off",
"Continues processing after a checksum failure.",
),
(
"ignore_invalid_pages",
"postmaster",
"off",
"bool",
"Developer Options",
"",
"off",
"Continues recovery after an invalid pages failure.",
),
(
"ignore_system_indexes",
"backend",
"off",
"bool",
"Developer Options",
"",
"off",
"Disables reading from system indexes.",
),
(
"in_hot_standby",
"internal",
"off",
"bool",
"Preset Options",
"",
"off",
"Shows whether hot standby is currently active.",
),
(
"integer_datetimes",
"internal",
"on",
"bool",
"Preset Options",
"",
"on",
"Shows whether datetimes are integer based.",
),
(
"intervalstyle",
"user",
"postgres",
"enum",
"Client Connection Defaults / Locale and Formatting",
"",
"postgres",
"Sets the display format for interval values.",
),
(
"io_combine_limit",
"user",
"128kB",
"integer",
"Resource Usage / I/O",
"8kB",
"16",
"Limit on the size of data reads and writes.",
),
(
"io_max_combine_limit",
"postmaster",
"128kB",
"integer",
"Resource Usage / I/O",
"8kB",
"16",
"Server-wide limit that clamps io_combine_limit.",
),
(
"io_max_concurrency",
"postmaster",
"-1",
"integer",
"Resource Usage / I/O",
"",
"-1",
"Max number of IOs that one process can execute simultaneously.",
),
(
"io_method",
"postmaster",
"worker",
"enum",
"Resource Usage / I/O",
"",
"worker",
"Selects the method for executing asynchronous I/O.",
),
(
"io_workers",
"sighup",
"3",
"integer",
"Resource Usage / I/O",
"",
"3",
"Number of IO worker processes, for io_method=worker.",
),
(
"jit",
"user",
"on",
"bool",
"Query Tuning / Other Planner Options",
"",
"on",
"Allow JIT compilation.",
),
(
"jit_above_cost",
"user",
"100000",
"real",
"Query Tuning / Planner Cost Constants",
"",
"100000",
"Perform JIT compilation if query is more expensive.",
),
(
"jit_debugging_support",
"superuser-backend",
"off",
"bool",
"Developer Options",
"",
"off",
"Register JIT-compiled functions with debugger.",
),
(
"jit_dump_bitcode",
"superuser",
"off",
"bool",
"Developer Options",
"",
"off",
"Write out LLVM bitcode to facilitate JIT debugging.",
),
(
"jit_expressions",
"user",
"on",
"bool",
"Developer Options",
"",
"on",
"Allow JIT compilation of expressions.",
),
(
"jit_inline_above_cost",
"user",
"500000",
"real",
"Query Tuning / Planner Cost Constants",
"",
"500000",
"Perform JIT inlining if query is more expensive.",
),
(
"jit_optimize_above_cost",
"user",
"500000",
"real",
"Query Tuning / Planner Cost Constants",
"",
"500000",
"Optimize JIT-compiled functions if query is more expensive.",
),
(
"jit_profiling_support",
"superuser-backend",
"off",
"bool",
"Developer Options",
"",
"off",
"Register JIT-compiled functions with perf profiler.",
),
(
"jit_provider",
"postmaster",
"llvmjit",
"string",
"Client Connection Defaults / Shared Library Preloading",
"",
"llvmjit",
"JIT provider to use.",
),
(
"jit_tuple_deforming",
"user",
"on",
"bool",
"Developer Options",
"",
"on",
"Allow JIT compilation of tuple deforming.",
),
(
"join_collapse_limit",
"user",
"8",
"integer",
"Query Tuning / Other Planner Options",
"",
"8",
"Sets the FROM-list size beyond which JOIN constructs are not flattened.",
),
(
"krb_caseins_users",
"sighup",
"off",
"bool",
"Connections and Authentication / Authentication",
"",
"off",
"Sets whether Kerberos and GSSAPI user names should be treated as case-insensitive.",
),
(
"krb_server_keyfile",
"sighup",
"FILE:/etc/postgresql-common/krb5.keytab",
"string",
"Connections and Authentication / Authentication",
"",
"FILE:/etc/postgresql-common/krb5.keytab",
"Sets the location of the Kerberos server key file.",
),
(
"lc_messages",
"superuser",
"",
"string",
"Client Connection Defaults / Locale and Formatting",
"",
"",
"Sets the language in which messages are displayed.",
),
(
"lc_monetary",
"user",
"C",
"string",
"Client Connection Defaults / Locale and Formatting",
"",
"C",
"Sets the locale for formatting monetary amounts.",
),
(
"lc_numeric",
"user",
"C",
"string",
"Client Connection Defaults / Locale and Formatting",
"",
"C",
"Sets the locale for formatting numbers.",
),
(
"lc_time",
"user",
"C",
"string",
"Client Connection Defaults / Locale and Formatting",
"",
"C",
"Sets the locale for formatting date and time values.",
),
(
"listen_addresses",
"postmaster",
"localhost",
"string",
"Connections and Authentication / Connection Settings",
"",
"localhost",
"Sets the host name or IP address(es) to listen to.",
),
(
"lo_compat_privileges",
"superuser",
"off",
"bool",
"Version and Platform Compatibility / Previous PostgreSQL Versions",
"",
"off",
"Enables backward compatibility mode for privilege checks on large objects.",
),
(
"local_preload_libraries",
"user",
"",
"string",
"Client Connection Defaults / Shared Library Preloading",
"",
"",
"Lists unprivileged shared libraries to preload into each backend.",
),
(
"lock_timeout",
"user",
"0",
"integer",
"Client Connection Defaults / Statement Behavior",
"ms",
"0",
"Sets the maximum allowed duration of any wait for a lock.",
),
(
"log_autovacuum_min_duration",
"sighup",
"10min",
"integer",
"Reporting and Logging / What to Log",
"ms",
"600000",
"Sets the minimum execution time above which autovacuum actions will be logged.",
),
(
"log_checkpoints",
"sighup",
"on",
"bool",
"Reporting and Logging / What to Log",
"",
"on",
"Logs each checkpoint.",
),
(
"log_connections",
"superuser-backend",
"",
"string",
"Reporting and Logging / What to Log",
"",
"",
"Logs specified aspects of connection establishment and setup.",
),
(
"log_destination",
"sighup",
"stderr",
"string",
"Reporting and Logging / Where to Log",
"",
"stderr",
"Sets the destination for server log output.",
),
(
"log_directory",
"sighup",
"log",
"string",
"Reporting and Logging / Where to Log",
"",
"log",
"Sets the destination directory for log files.",
),
(
"log_disconnections",
"superuser-backend",
"off",
"bool",
"Reporting and Logging / What to Log",
"",
"off",
"Logs end of a session, including duration.",
),
(
"log_duration",
"superuser",
"off",
"bool",
"Reporting and Logging / What to Log",
"",
"off",
"Logs the duration of each completed SQL statement.",
),
(
"log_error_verbosity",
"superuser",
"default",
"enum",
"Reporting and Logging / What to Log",
"",
"default",
"Sets the verbosity of logged messages.",
),
(
"log_executor_stats",
"superuser",
"off",
"bool",
"Statistics / Monitoring",
"",
"off",
"Writes executor performance statistics to the server log.",
),
(
"log_file_mode",
"sighup",
"384",
"integer",
"Reporting and Logging / Where to Log",
"",
"384",
"Sets the file permissions for log files.",
),
(
"log_filename",
"sighup",
"postgresql-%Y-%m-%d_%H%M%S.log",
"string",
"Reporting and Logging / Where to Log",
"",
"postgresql-%Y-%m-%d_%H%M%S.log",
"Sets the file name pattern for log files.",
),
(
"log_hostname",
"sighup",
"off",
"bool",
"Reporting and Logging / What to Log",
"",
"off",
"Logs the host name in the connection logs.",
),
(
"log_line_prefix",
"sighup",
"%m [%p] ",
"string",
"Reporting and Logging / What to Log",
"",
"%m [%p] ",
"Controls information prefixed to each log line.",
),
(
"log_lock_failures",
"superuser",
"off",
"bool",
"Reporting and Logging / What to Log",
"",
"off",
"Logs lock failures.",
),
(
"log_lock_waits",
"superuser",
"off",
"bool",
"Reporting and Logging / What to Log",
"",
"off",
"Logs long lock waits.",
),
(
"log_min_duration_sample",
"superuser",
"-1",
"integer",
"Reporting and Logging / When to Log",
"ms",
"-1",
"Sets the minimum execution time above which a sample of statements will be logged. Sampling is determined by \"log_statement_sample_rate\".",
),
(
"log_min_duration_statement",
"superuser",
"-1",
"integer",
"Reporting and Logging / When to Log",
"ms",
"-1",
"Sets the minimum execution time above which all statements will be logged.",
),
(
"log_min_error_statement",
"superuser",
"error",
"enum",
"Reporting and Logging / When to Log",
"",
"error",
"Causes all statements generating error at or above this level to be logged.",
),
(
"log_min_messages",
"superuser",
"warning",
"enum",
"Reporting and Logging / When to Log",
"",
"warning",
"Sets the message levels that are logged.",
),
(
"log_parameter_max_length",
"superuser",
"-1",
"integer",
"Reporting and Logging / What to Log",
"B",
"-1",
"Sets the maximum length in bytes of data logged for bind parameter values when logging statements.",
),
(
"log_parameter_max_length_on_error",
"user",
"0",
"integer",
"Reporting and Logging / What to Log",
"B",
"0",
"Sets the maximum length in bytes of data logged for bind parameter values when logging statements, on error.",
),
(
"log_parser_stats",
"superuser",
"off",
"bool",
"Statistics / Monitoring",
"",
"off",
"Writes parser performance statistics to the server log.",
),
(
"log_planner_stats",
"superuser",
"off",
"bool",
"Statistics / Monitoring",
"",
"off",
"Writes planner performance statistics to the server log.",
),
(
"log_recovery_conflict_waits",
"sighup",
"off",
"bool",
"Reporting and Logging / What to Log",
"",
"off",
"Logs standby recovery conflict waits.",
),
(
"log_replication_commands",
"superuser",
"off",
"bool",
"Reporting and Logging / What to Log",
"",
"off",
"Logs each replication command.",
),
(
"log_rotation_age",
"sighup",
"1d",
"integer",
"Reporting and Logging / Where to Log",
"min",
"1440",
"Sets the amount of time to wait before forcing log file rotation.",
),
(
"log_rotation_size",
"sighup",
"10MB",
"integer",
"Reporting and Logging / Where to Log",
"kB",
"10240",
"Sets the maximum size a log file can reach before being rotated.",
),
(
"log_startup_progress_interval",
"sighup",
"10s",
"integer",
"Reporting and Logging / When to Log",
"ms",
"10000",
"Time between progress updates for long-running startup operations.",
),
(
"log_statement",
"superuser",
"none",
"enum",
"Reporting and Logging / What to Log",
"",
"none",
"Sets the type of statements logged.",
),
(
"log_statement_sample_rate",
"superuser",
"1",
"real",
"Reporting and Logging / When to Log",
"",
"1",
"Fraction of statements exceeding \"log_min_duration_sample\" to be logged.",
),
(
"log_statement_stats",
"superuser",
"off",
"bool",
"Statistics / Monitoring",
"",
"off",
"Writes cumulative performance statistics to the server log.",
),
(
"log_temp_files",
"superuser",
"-1",
"integer",
"Reporting and Logging / What to Log",
"kB",
"-1",
"Log the use of temporary files larger than this number of kilobytes.",
),
(
"log_timezone",
"sighup",
"GMT",
"string",
"Reporting and Logging / What to Log",
"",
"GMT",
"Sets the time zone to use in log messages.",
),
(
"log_transaction_sample_rate",
"superuser",
"0",
"real",
"Reporting and Logging / When to Log",
"",
"0",
"Sets the fraction of transactions from which to log all statements.",
),
(
"log_truncate_on_rotation",
"sighup",
"off",
"bool",
"Reporting and Logging / Where to Log",
"",
"off",
"Truncate existing log files of same name during log rotation.",
),
(
"logging_collector",
"postmaster",
"off",
"bool",
"Reporting and Logging / Where to Log",
"",
"off",
"Start a subprocess to capture stderr, csvlog and/or jsonlog into log files.",
),
(
"logical_decoding_work_mem",
"user",
"64MB",
"integer",
"Resource Usage / Memory",
"kB",
"65536",
"Sets the maximum memory to be used for logical decoding.",
),
(
"maintenance_io_concurrency",
"user",
"16",
"integer",
"Resource Usage / I/O",
"",
"16",
"A variant of \"effective_io_concurrency\" that is used for maintenance work.",
),
(
"maintenance_work_mem",
"user",
"64MB",
"integer",
"Resource Usage / Memory",
"kB",
"65536",
"Sets the maximum memory to be used for maintenance operations.",
),
(
"max_active_replication_origins",
"postmaster",
"10",
"integer",
"Replication / Subscribers",
"",
"10",
"Sets the maximum number of active replication origins.",
),
(
"max_connections",
"postmaster",
"100",
"integer",
"Connections and Authentication / Connection Settings",
"",
"100",
"Sets the maximum number of concurrent connections.",
),
(
"max_files_per_process",
"postmaster",
"1000",
"integer",
"Resource Usage / Kernel Resources",
"",
"1000",
"Sets the maximum number of files each server process is allowed to open simultaneously.",
),
(
"max_function_args",
"internal",
"100",
"integer",
"Preset Options",
"",
"100",
"Shows the maximum number of function arguments.",
),
(
"max_identifier_length",
"internal",
"63",
"integer",
"Preset Options",
"",
"63",
"Shows the maximum identifier length.",
),
(
"max_index_keys",
"internal",
"32",
"integer",
"Preset Options",
"",
"32",
"Shows the maximum number of index keys.",
),
(
"max_locks_per_transaction",
"postmaster",
"64",
"integer",
"Lock Management",
"",
"64",
"Sets the maximum number of locks per transaction.",
),
(
"max_logical_replication_workers",
"postmaster",
"4",
"integer",
"Replication / Subscribers",
"",
"4",
"Maximum number of logical replication worker processes.",
),
(
"max_notify_queue_pages",
"postmaster",
"1048576",
"integer",
"Resource Usage / Disk",
"",
"1048576",
"Sets the maximum number of allocated pages for NOTIFY / LISTEN queue.",
),
(
"max_parallel_apply_workers_per_subscription",
"sighup",
"2",
"integer",
"Replication / Subscribers",
"",
"2",
"Maximum number of parallel apply workers per subscription.",
),
(
"max_parallel_maintenance_workers",
"user",
"2",
"integer",
"Resource Usage / Worker Processes",
"",
"2",
"Sets the maximum number of parallel processes per maintenance operation.",
),
(
"max_parallel_workers",
"user",
"8",
"integer",
"Resource Usage / Worker Processes",
"",
"8",
"Sets the maximum number of parallel workers that can be active at one time.",
),
(
"max_parallel_workers_per_gather",
"user",
"2",
"integer",
"Resource Usage / Worker Processes",
"",
"2",
"Sets the maximum number of parallel processes per executor node.",
),
(
"max_pred_locks_per_page",
"sighup",
"2",
"integer",
"Lock Management",
"",
"2",
"Sets the maximum number of predicate-locked tuples per page.",
),
(
"max_pred_locks_per_relation",
"sighup",
"-2",
"integer",
"Lock Management",
"",
"-2",
"Sets the maximum number of predicate-locked pages and tuples per relation.",
),
(
"max_pred_locks_per_transaction",
"postmaster",
"64",
"integer",
"Lock Management",
"",
"64",
"Sets the maximum number of predicate locks per transaction.",
),
(
"max_prepared_transactions",
"postmaster",
"0",
"integer",
"Resource Usage / Memory",
"",
"0",
"Sets the maximum number of simultaneously prepared transactions.",
),
(
"max_replication_slots",
"postmaster",
"10",
"integer",
"Replication / Sending Servers",
"",
"10",
"Sets the maximum number of simultaneously defined replication slots.",
),
(
"max_slot_wal_keep_size",
"sighup",
"-1",
"integer",
"Replication / Sending Servers",
"MB",
"-1",
"Sets the maximum WAL size that can be reserved by replication slots.",
),
(
"max_stack_depth",
"superuser",
"100kB",
"integer",
"Resource Usage / Memory",
"kB",
"100",
"Sets the maximum stack depth, in kilobytes.",
),
(
"max_standby_archive_delay",
"sighup",
"30s",
"integer",
"Replication / Standby Servers",
"ms",
"30000",
"Sets the maximum delay before canceling queries when a hot standby server is processing archived WAL data.",
),
(
"max_standby_streaming_delay",
"sighup",
"30s",
"integer",
"Replication / Standby Servers",
"ms",
"30000",
"Sets the maximum delay before canceling queries when a hot standby server is processing streamed WAL data.",
),
(
"max_sync_workers_per_subscription",
"sighup",
"2",
"integer",
"Replication / Subscribers",
"",
"2",
"Maximum number of table synchronization workers per subscription.",
),
(
"max_wal_senders",
"postmaster",
"10",
"integer",
"Replication / Sending Servers",
"",
"10",
"Sets the maximum number of simultaneously running WAL sender processes.",
),
(
"max_wal_size",
"sighup",
"1GB",
"integer",
"Write-Ahead Log / Checkpoints",
"MB",
"1024",
"Sets the WAL size that triggers a checkpoint.",
),
(
"max_worker_processes",
"postmaster",
"8",
"integer",
"Resource Usage / Worker Processes",
"",
"8",
"Maximum number of concurrent worker processes.",
),
(
"md5_password_warnings",
"user",
"on",
"bool",
"Connections and Authentication / Authentication",
"",
"on",
"Enables deprecation warnings for MD5 passwords.",
),
(
"min_dynamic_shared_memory",
"postmaster",
"0",
"integer",
"Resource Usage / Memory",
"MB",
"0",
"Amount of dynamic shared memory reserved at startup.",
),
(
"min_parallel_index_scan_size",
"user",
"512kB",
"integer",
"Query Tuning / Planner Cost Constants",
"8kB",
"64",
"Sets the minimum amount of index data for a parallel scan.",
),
(
"min_parallel_table_scan_size",
"user",
"8MB",
"integer",
"Query Tuning / Planner Cost Constants",
"8kB",
"1024",
"Sets the minimum amount of table data for a parallel scan.",
),
(
"min_wal_size",
"sighup",
"80MB",
"integer",
"Write-Ahead Log / Checkpoints",
"MB",
"80",
"Sets the minimum size to shrink the WAL to.",
),
(
"multixact_member_buffers",
"postmaster",
"256kB",
"integer",
"Resource Usage / Memory",
"8kB",
"32",
"Sets the size of the dedicated buffer pool used for the MultiXact member cache.",
),
(
"multixact_offset_buffers",
"postmaster",
"128kB",
"integer",
"Resource Usage / Memory",
"8kB",
"16",
"Sets the size of the dedicated buffer pool used for the MultiXact offset cache.",
),
(
"notify_buffers",
"postmaster",
"128kB",
"integer",
"Resource Usage / Memory",
"8kB",
"16",
"Sets the size of the dedicated buffer pool used for the LISTEN/NOTIFY message cache.",
),
(
"num_os_semaphores",
"internal",
"0",
"integer",
"Preset Options",
"",
"0",
"Shows the number of semaphores required for the server.",
),
(
"oauth_validator_libraries",
"sighup",
"",
"string",
"Connections and Authentication / Authentication",
"",
"",
"Lists libraries that may be called to validate OAuth v2 bearer tokens.",
),
(
"parallel_leader_participation",
"user",
"on",
"bool",
"Resource Usage / Worker Processes",
"",
"on",
"Controls whether Gather and Gather Merge also run subplans.",
),
(
"parallel_setup_cost",
"user",
"1000",
"real",
"Query Tuning / Planner Cost Constants",
"",
"1000",
"Sets the planner's estimate of the cost of starting up worker processes for parallel query.",
),
(
"parallel_tuple_cost",
"user",
"0.1",
"real",
"Query Tuning / Planner Cost Constants",
"",
"0.1",
"Sets the planner's estimate of the cost of passing each tuple (row) from worker to leader backend.",
),
(
"password_encryption",
"user",
"scram-sha-256",
"enum",
"Connections and Authentication / Authentication",
"",
"scram-sha-256",
"Chooses the algorithm for encrypting passwords.",
),
(
"plan_cache_mode",
"user",
"auto",
"enum",
"Query Tuning / Other Planner Options",
"",
"auto",
"Controls the planner's selection of custom or generic plan.",
),
(
"port",
"postmaster",
"5432",
"integer",
"Connections and Authentication / Connection Settings",
"",
"5432",
"Sets the TCP port the server listens on.",
),
(
"post_auth_delay",
"backend",
"0",
"integer",
"Developer Options",
"s",
"0",
"Sets the amount of time to wait after authentication on connection startup.",
),
(
"pre_auth_delay",
"sighup",
"0",
"integer",
"Developer Options",
"s",
"0",
"Sets the amount of time to wait before authentication on connection startup.",
),
(
"primary_conninfo",
"sighup",
"",
"string",
"Replication / Standby Servers",
"",
"",
"Sets the connection string to be used to connect to the sending server.",
),
(
"primary_slot_name",
"sighup",
"",
"string",
"Replication / Standby Servers",
"",
"",
"Sets the name of the replication slot to use on the sending server.",
),
(
"quote_all_identifiers",
"user",
"off",
"bool",
"Version and Platform Compatibility / Previous PostgreSQL Versions",
"",
"off",
"When generating SQL fragments, quote all identifiers.",
),
(
"random_page_cost",
"user",
"4",
"real",
"Query Tuning / Planner Cost Constants",
"",
"4",
"Sets the planner's estimate of the cost of a nonsequentially fetched disk page.",
),
(
"recovery_end_command",
"sighup",
"",
"string",
"Write-Ahead Log / Archive Recovery",
"",
"",
"Sets the shell command that will be executed once at the end of recovery.",
),
(
"recovery_init_sync_method",
"sighup",
"fsync",
"enum",
"Error Handling",
"",
"fsync",
"Sets the method for synchronizing the data directory before crash recovery.",
),
(
"recovery_min_apply_delay",
"sighup",
"0",
"integer",
"Replication / Standby Servers",
"ms",
"0",
"Sets the minimum delay for applying changes during recovery.",
),
(
"recovery_prefetch",
"sighup",
"try",
"enum",
"Write-Ahead Log / Recovery",
"",
"try",
"Prefetch referenced blocks during recovery.",
),
(
"recovery_target",
"postmaster",
"",
"string",
"Write-Ahead Log / Recovery Target",
"",
"",
"Set to \"immediate\" to end recovery as soon as a consistent state is reached.",
),
(
"recovery_target_action",
"postmaster",
"pause",
"enum",
"Write-Ahead Log / Recovery Target",
"",
"pause",
"Sets the action to perform upon reaching the recovery target.",
),
(
"recovery_target_inclusive",
"postmaster",
"on",
"bool",
"Write-Ahead Log / Recovery Target",
"",
"on",
"Sets whether to include or exclude transaction with recovery target.",
),
(
"recovery_target_lsn",
"postmaster",
"",
"string",
"Write-Ahead Log / Recovery Target",
"",
"",
"Sets the LSN of the write-ahead log location up to which recovery will proceed.",
),
(
"recovery_target_name",
"postmaster",
"",
"string",
"Write-Ahead Log / Recovery Target",
"",
"",
"Sets the named restore point up to which recovery will proceed.",
),
(
"recovery_target_time",
"postmaster",
"",
"string",
"Write-Ahead Log / Recovery Target",
"",
"",
"Sets the time stamp up to which recovery will proceed.",
),
(
"recovery_target_timeline",
"postmaster",
"latest",
"string",
"Write-Ahead Log / Recovery Target",
"",
"latest",
"Specifies the timeline to recover into.",
),
(
"recovery_target_xid",
"postmaster",
"",
"string",
"Write-Ahead Log / Recovery Target",
"",
"",
"Sets the transaction ID up to which recovery will proceed.",
),
(
"recursive_worktable_factor",
"user",
"10",
"real",
"Query Tuning / Other Planner Options",
"",
"10",
"Sets the planner's estimate of the average size of a recursive query's working table.",
),
(
"remove_temp_files_after_crash",
"sighup",
"on",
"bool",
"Developer Options",
"",
"on",
"Remove temporary files after backend crash.",
),
(
"reserved_connections",
"postmaster",
"0",
"integer",
"Connections and Authentication / Connection Settings",
"",
"0",
"Sets the number of connection slots reserved for roles with privileges of pg_use_reserved_connections.",
),
(
"restart_after_crash",
"sighup",
"on",
"bool",
"Error Handling",
"",
"on",
"Reinitialize server after backend crash.",
),
(
"restore_command",
"sighup",
"",
"string",
"Write-Ahead Log / Archive Recovery",
"",
"",
"Sets the shell command that will be called to retrieve an archived WAL file.",
),
(
"restrict_nonsystem_relation_kind",
"user",
"",
"string",
"Client Connection Defaults / Statement Behavior",
"",
"",
"Prohibits access to non-system relations of specified kinds.",
),
(
"row_security",
"user",
"on",
"bool",
"Client Connection Defaults / Statement Behavior",
"",
"on",
"Enables row security.",
),
(
"scram_iterations",
"user",
"4096",
"integer",
"Connections and Authentication / Authentication",
"",
"4096",
"Sets the iteration count for SCRAM secret generation.",
),
(
"search_path",
"user",
"\"$user\", public",
"string",
"Client Connection Defaults / Statement Behavior",
"",
"\"$user\", public",
"Sets the schema search order for names that are not schema-qualified.",
),
(
"segment_size",
"internal",
"1GB",
"integer",
"Preset Options",
"8kB",
"131072",
"Shows the number of pages per disk file.",
),
(
"send_abort_for_crash",
"sighup",
"off",
"bool",
"Developer Options",
"",
"off",
"Send SIGABRT not SIGQUIT to child processes after backend crash.",
),
(
"send_abort_for_kill",
"sighup",
"off",
"bool",
"Developer Options",
"",
"off",
"Send SIGABRT not SIGKILL to stuck child processes.",
),
(
"seq_page_cost",
"user",
"1",
"real",
"Query Tuning / Planner Cost Constants",
"",
"1",
"Sets the planner's estimate of the cost of a sequentially fetched disk page.",
),
(
"serializable_buffers",
"postmaster",
"256kB",
"integer",
"Resource Usage / Memory",
"8kB",
"32",
"Sets the size of the dedicated buffer pool used for the serializable transaction cache.",
),
(
"server_encoding",
"internal",
"SQL_ASCII",
"string",
"Preset Options",
"",
"SQL_ASCII",
"Shows the server (database) character set encoding.",
),
(
"server_version",
"internal",
"18.4 (Debian 18.4-1.pgdg13+1)",
"string",
"Preset Options",
"",
"18.4 (Debian 18.4-1.pgdg13+1)",
"Shows the server version.",
),
(
"server_version_num",
"internal",
"180004",
"integer",
"Preset Options",
"",
"180004",
"Shows the server version as an integer.",
),
(
"session_preload_libraries",
"superuser",
"",
"string",
"Client Connection Defaults / Shared Library Preloading",
"",
"",
"Lists shared libraries to preload into each backend.",
),
(
"session_replication_role",
"superuser",
"origin",
"enum",
"Client Connection Defaults / Statement Behavior",
"",
"origin",
"Sets the session's behavior for triggers and rewrite rules.",
),
(
"shared_buffers",
"postmaster",
"128MB",
"integer",
"Resource Usage / Memory",
"8kB",
"16384",
"Sets the number of shared memory buffers used by the server.",
),
(
"shared_memory_size",
"internal",
"0",
"integer",
"Preset Options",
"MB",
"0",
"Shows the size of the server's main shared memory area (rounded up to the nearest MB).",
),
(
"shared_memory_size_in_huge_pages",
"internal",
"-1",
"integer",
"Preset Options",
"",
"-1",
"Shows the number of huge pages needed for the main shared memory area.",
),
(
"shared_memory_type",
"postmaster",
"mmap",
"enum",
"Resource Usage / Memory",
"",
"mmap",
"Selects the shared memory implementation used for the main shared memory region.",
),
(
"shared_preload_libraries",
"postmaster",
"",
"string",
"Client Connection Defaults / Shared Library Preloading",
"",
"",
"Lists shared libraries to preload into server.",
),
(
"ssl",
"sighup",
"off",
"bool",
"Connections and Authentication / SSL",
"",
"off",
"Enables SSL connections.",
),
(
"ssl_ca_file",
"sighup",
"",
"string",
"Connections and Authentication / SSL",
"",
"",
"Location of the SSL certificate authority file.",
),
(
"ssl_cert_file",
"sighup",
"server.crt",
"string",
"Connections and Authentication / SSL",
"",
"server.crt",
"Location of the SSL server certificate file.",
),
(
"ssl_ciphers",
"sighup",
"HIGH:MEDIUM:+3DES:!aNULL",
"string",
"Connections and Authentication / SSL",
"",
"HIGH:MEDIUM:+3DES:!aNULL",
"Sets the list of allowed TLSv1.2 (and lower) ciphers.",
),
(
"ssl_crl_dir",
"sighup",
"",
"string",
"Connections and Authentication / SSL",
"",
"",
"Location of the SSL certificate revocation list directory.",
),
(
"ssl_crl_file",
"sighup",
"",
"string",
"Connections and Authentication / SSL",
"",
"",
"Location of the SSL certificate revocation list file.",
),
(
"ssl_dh_params_file",
"sighup",
"",
"string",
"Connections and Authentication / SSL",
"",
"",
"Location of the SSL DH parameters file.",
),
(
"ssl_groups",
"sighup",
"X25519:prime256v1",
"string",
"Connections and Authentication / SSL",
"",
"X25519:prime256v1",
"Sets the group(s) to use for Diffie-Hellman key exchange.",
),
(
"ssl_key_file",
"sighup",
"server.key",
"string",
"Connections and Authentication / SSL",
"",
"server.key",
"Location of the SSL server private key file.",
),
(
"ssl_library",
"internal",
"OpenSSL",
"string",
"Preset Options",
"",
"OpenSSL",
"Shows the name of the SSL library.",
),
(
"ssl_max_protocol_version",
"sighup",
"",
"enum",
"Connections and Authentication / SSL",
"",
"",
"Sets the maximum SSL/TLS protocol version to use.",
),
(
"ssl_min_protocol_version",
"sighup",
"TLSv1.2",
"enum",
"Connections and Authentication / SSL",
"",
"TLSv1.2",
"Sets the minimum SSL/TLS protocol version to use.",
),
(
"ssl_passphrase_command",
"sighup",
"",
"string",
"Connections and Authentication / SSL",
"",
"",
"Command to obtain passphrases for SSL.",
),
(
"ssl_passphrase_command_supports_reload",
"sighup",
"off",
"bool",
"Connections and Authentication / SSL",
"",
"off",
"Controls whether \"ssl_passphrase_command\" is called during server reload.",
),
(
"ssl_prefer_server_ciphers",
"sighup",
"on",
"bool",
"Connections and Authentication / SSL",
"",
"on",
"Give priority to server ciphersuite order.",
),
(
"ssl_tls13_ciphers",
"sighup",
"",
"string",
"Connections and Authentication / SSL",
"",
"",
"Sets the list of allowed TLSv1.3 cipher suites.",
),
(
"standard_conforming_strings",
"user",
"on",
"bool",
"Version and Platform Compatibility / Previous PostgreSQL Versions",
"",
"on",
"Causes '...' strings to treat backslashes literally.",
),
(
"statement_timeout",
"user",
"0",
"integer",
"Client Connection Defaults / Statement Behavior",
"ms",
"0",
"Sets the maximum allowed duration of any statement.",
),
(
"stats_fetch_consistency",
"user",
"cache",
"enum",
"Statistics / Cumulative Query and Index Statistics",
"",
"cache",
"Sets the consistency of accesses to statistics data.",
),
(
"subtransaction_buffers",
"postmaster",
"0",
"integer",
"Resource Usage / Memory",
"8kB",
"0",
"Sets the size of the dedicated buffer pool used for the subtransaction cache.",
),
(
"summarize_wal",
"sighup",
"off",
"bool",
"Write-Ahead Log / Summarization",
"",
"off",
"Starts the WAL summarizer process to enable incremental backup.",
),
(
"superuser_reserved_connections",
"postmaster",
"3",
"integer",
"Connections and Authentication / Connection Settings",
"",
"3",
"Sets the number of connection slots reserved for superusers.",
),
(
"sync_replication_slots",
"sighup",
"off",
"bool",
"Replication / Standby Servers",
"",
"off",
"Enables a physical standby to synchronize logical failover replication slots from the primary server.",
),
(
"synchronize_seqscans",
"user",
"on",
"bool",
"Version and Platform Compatibility / Previous PostgreSQL Versions",
"",
"on",
"Enables synchronized sequential scans.",
),
(
"synchronized_standby_slots",
"sighup",
"",
"string",
"Replication / Primary Server",
"",
"",
"Lists streaming replication standby server replication slot names that logical WAL sender processes will wait for.",
),
(
"synchronous_commit",
"user",
"on",
"enum",
"Write-Ahead Log / Settings",
"",
"on",
"Sets the current transaction's synchronization level.",
),
(
"synchronous_standby_names",
"sighup",
"",
"string",
"Replication / Primary Server",
"",
"",
"Number of synchronous standbys and list of names of potential synchronous ones.",
),
(
"syslog_facility",
"sighup",
"local0",
"enum",
"Reporting and Logging / Where to Log",
"",
"local0",
"Sets the syslog \"facility\" to be used when syslog enabled.",
),
(
"syslog_ident",
"sighup",
"postgres",
"string",
"Reporting and Logging / Where to Log",
"",
"postgres",
"Sets the program name used to identify PostgreSQL messages in syslog.",
),
(
"syslog_sequence_numbers",
"sighup",
"on",
"bool",
"Reporting and Logging / Where to Log",
"",
"on",
"Add sequence number to syslog messages to avoid duplicate suppression.",
),
(
"syslog_split_messages",
"sighup",
"on",
"bool",
"Reporting and Logging / Where to Log",
"",
"on",
"Split messages sent to syslog by lines and to fit into 1024 bytes.",
),
(
"tcp_keepalives_count",
"user",
"0",
"integer",
"Connections and Authentication / TCP Settings",
"",
"0",
"Maximum number of TCP keepalive retransmits.",
),
(
"tcp_keepalives_idle",
"user",
"0",
"integer",
"Connections and Authentication / TCP Settings",
"s",
"0",
"Time between issuing TCP keepalives.",
),
(
"tcp_keepalives_interval",
"user",
"0",
"integer",
"Connections and Authentication / TCP Settings",
"s",
"0",
"Time between TCP keepalive retransmits.",
),
(
"tcp_user_timeout",
"user",
"0",
"integer",
"Connections and Authentication / TCP Settings",
"ms",
"0",
"TCP user timeout.",
),
(
"temp_buffers",
"user",
"8MB",
"integer",
"Resource Usage / Memory",
"8kB",
"1024",
"Sets the maximum number of temporary buffers used by each session.",
),
(
"temp_file_limit",
"superuser",
"-1",
"integer",
"Resource Usage / Disk",
"kB",
"-1",
"Limits the total size of all temporary files used by each process.",
),
(
"temp_tablespaces",
"user",
"",
"string",
"Client Connection Defaults / Statement Behavior",
"",
"",
"Sets the tablespace(s) to use for temporary tables and sort files.",
),
(
"timezone",
"user",
"GMT",
"string",
"Client Connection Defaults / Locale and Formatting",
"",
"GMT",
"Sets the time zone for displaying and interpreting time stamps.",
),
(
"timezone_abbreviations",
"user",
"",
"string",
"Client Connection Defaults / Locale and Formatting",
"",
"",
"Selects a file of time zone abbreviations.",
),
(
"trace_connection_negotiation",
"postmaster",
"off",
"bool",
"Developer Options",
"",
"off",
"Logs details of pre-authentication connection handshake.",
),
(
"trace_notify",
"user",
"off",
"bool",
"Developer Options",
"",
"off",
"Generates debugging output for LISTEN and NOTIFY.",
),
(
"trace_sort",
"user",
"off",
"bool",
"Developer Options",
"",
"off",
"Emit information about resource usage in sorting.",
),
(
"track_activities",
"superuser",
"on",
"bool",
"Statistics / Cumulative Query and Index Statistics",
"",
"on",
"Collects information about executing commands.",
),
(
"track_activity_query_size",
"postmaster",
"1kB",
"integer",
"Statistics / Cumulative Query and Index Statistics",
"B",
"1024",
"Sets the size reserved for pg_stat_activity.query, in bytes.",
),
(
"track_commit_timestamp",
"postmaster",
"off",
"bool",
"Replication / Sending Servers",
"",
"off",
"Collects transaction commit time.",
),
(
"track_cost_delay_timing",
"superuser",
"off",
"bool",
"Statistics / Cumulative Query and Index Statistics",
"",
"off",
"Collects timing statistics for cost-based vacuum delay.",
),
(
"track_counts",
"superuser",
"on",
"bool",
"Statistics / Cumulative Query and Index Statistics",
"",
"on",
"Collects statistics on database activity.",
),
(
"track_functions",
"superuser",
"none",
"enum",
"Statistics / Cumulative Query and Index Statistics",
"",
"none",
"Collects function-level statistics on database activity.",
),
(
"track_io_timing",
"superuser",
"off",
"bool",
"Statistics / Cumulative Query and Index Statistics",
"",
"off",
"Collects timing statistics for database I/O activity.",
),
(
"track_wal_io_timing",
"superuser",
"off",
"bool",
"Statistics / Cumulative Query and Index Statistics",
"",
"off",
"Collects timing statistics for WAL I/O activity.",
),
(
"transaction_buffers",
"postmaster",
"0",
"integer",
"Resource Usage / Memory",
"8kB",
"0",
"Sets the size of the dedicated buffer pool used for the transaction status cache.",
),
(
"transaction_deferrable",
"user",
"off",
"bool",
"Client Connection Defaults / Statement Behavior",
"",
"off",
"Whether to defer a read-only serializable transaction until it can be executed with no possible serialization failures.",
),
(
"transaction_isolation",
"user",
"read committed",
"enum",
"Client Connection Defaults / Statement Behavior",
"",
"read committed",
"Sets the current transaction's isolation level.",
),
(
"transaction_read_only",
"user",
"off",
"bool",
"Client Connection Defaults / Statement Behavior",
"",
"off",
"Sets the current transaction's read-only status.",
),
(
"transaction_timeout",
"user",
"0",
"integer",
"Client Connection Defaults / Statement Behavior",
"ms",
"0",
"Sets the maximum allowed duration of any transaction within a session (not a prepared transaction).",
),
(
"transform_null_equals",
"user",
"off",
"bool",
"Version and Platform Compatibility / Other Platforms and Clients",
"",
"off",
"Treats \"expr=NULL\" as \"expr IS NULL\".",
),
(
"unix_socket_directories",
"postmaster",
"/var/run/postgresql",
"string",
"Connections and Authentication / Connection Settings",
"",
"/var/run/postgresql",
"Sets the directories where Unix-domain sockets will be created.",
),
(
"unix_socket_group",
"postmaster",
"",
"string",
"Connections and Authentication / Connection Settings",
"",
"",
"Sets the owning group of the Unix-domain socket.",
),
(
"unix_socket_permissions",
"postmaster",
"511",
"integer",
"Connections and Authentication / Connection Settings",
"",
"511",
"Sets the access permissions of the Unix-domain socket.",
),
(
"update_process_title",
"superuser",
"on",
"bool",
"Reporting and Logging / Process Title",
"",
"on",
"Updates the process title to show the active SQL command.",
),
(
"vacuum_buffer_usage_limit",
"user",
"2MB",
"integer",
"Resource Usage / Memory",
"kB",
"2048",
"Sets the buffer pool size for VACUUM, ANALYZE, and autovacuum.",
),
(
"vacuum_cost_delay",
"user",
"0",
"real",
"Vacuuming / Cost-Based Vacuum Delay",
"ms",
"0",
"Vacuum cost delay in milliseconds.",
),
(
"vacuum_cost_limit",
"user",
"200",
"integer",
"Vacuuming / Cost-Based Vacuum Delay",
"",
"200",
"Vacuum cost amount available before napping.",
),
(
"vacuum_cost_page_dirty",
"user",
"20",
"integer",
"Vacuuming / Cost-Based Vacuum Delay",
"",
"20",
"Vacuum cost for a page dirtied by vacuum.",
),
(
"vacuum_cost_page_hit",
"user",
"1",
"integer",
"Vacuuming / Cost-Based Vacuum Delay",
"",
"1",
"Vacuum cost for a page found in the buffer cache.",
),
(
"vacuum_cost_page_miss",
"user",
"2",
"integer",
"Vacuuming / Cost-Based Vacuum Delay",
"",
"2",
"Vacuum cost for a page not found in the buffer cache.",
),
(
"vacuum_failsafe_age",
"user",
"1600000000",
"integer",
"Vacuuming / Freezing",
"",
"1600000000",
"Age at which VACUUM should trigger failsafe to avoid a wraparound outage.",
),
(
"vacuum_freeze_min_age",
"user",
"50000000",
"integer",
"Vacuuming / Freezing",
"",
"50000000",
"Minimum age at which VACUUM should freeze a table row.",
),
(
"vacuum_freeze_table_age",
"user",
"150000000",
"integer",
"Vacuuming / Freezing",
"",
"150000000",
"Age at which VACUUM should scan whole table to freeze tuples.",
),
(
"vacuum_max_eager_freeze_failure_rate",
"user",
"0.03",
"real",
"Vacuuming / Freezing",
"",
"0.03",
"Fraction of pages in a relation vacuum can scan and fail to freeze before disabling eager scanning.",
),
(
"vacuum_multixact_failsafe_age",
"user",
"1600000000",
"integer",
"Vacuuming / Freezing",
"",
"1600000000",
"Multixact age at which VACUUM should trigger failsafe to avoid a wraparound outage.",
),
(
"vacuum_multixact_freeze_min_age",
"user",
"5000000",
"integer",
"Vacuuming / Freezing",
"",
"5000000",
"Minimum age at which VACUUM should freeze a MultiXactId in a table row.",
),
(
"vacuum_multixact_freeze_table_age",
"user",
"150000000",
"integer",
"Vacuuming / Freezing",
"",
"150000000",
"Multixact age at which VACUUM should scan whole table to freeze tuples.",
),
(
"vacuum_truncate",
"user",
"on",
"bool",
"Vacuuming / Default Behavior",
"",
"on",
"Enables vacuum to truncate empty pages at the end of the table.",
),
(
"wal_block_size",
"internal",
"8192",
"integer",
"Preset Options",
"",
"8192",
"Shows the block size in the write ahead log.",
),
(
"wal_buffers",
"postmaster",
"-1",
"integer",
"Write-Ahead Log / Settings",
"8kB",
"-1",
"Sets the number of disk-page buffers in shared memory for WAL.",
),
(
"wal_compression",
"superuser",
"off",
"enum",
"Write-Ahead Log / Settings",
"",
"off",
"Compresses full-page writes written in WAL file with specified method.",
),
(
"wal_consistency_checking",
"superuser",
"",
"string",
"Developer Options",
"",
"",
"Sets the WAL resource managers for which WAL consistency checks are done.",
),
(
"wal_decode_buffer_size",
"postmaster",
"512kB",
"integer",
"Write-Ahead Log / Recovery",
"B",
"524288",
"Buffer size for reading ahead in the WAL during recovery.",
),
(
"wal_init_zero",
"superuser",
"on",
"bool",
"Write-Ahead Log / Settings",
"",
"on",
"Writes zeroes to new WAL files before first use.",
),
(
"wal_keep_size",
"sighup",
"0",
"integer",
"Replication / Sending Servers",
"MB",
"0",
"Sets the size of WAL files held for standby servers.",
),
(
"wal_level",
"postmaster",
"replica",
"enum",
"Write-Ahead Log / Settings",
"",
"replica",
"Sets the level of information written to the WAL.",
),
(
"wal_log_hints",
"postmaster",
"off",
"bool",
"Write-Ahead Log / Settings",
"",
"off",
"Writes full pages to WAL when first modified after a checkpoint, even for a non-critical modification.",
),
(
"wal_receiver_create_temp_slot",
"sighup",
"off",
"bool",
"Replication / Standby Servers",
"",
"off",
"Sets whether a WAL receiver should create a temporary replication slot if no permanent slot is configured.",
),
(
"wal_receiver_status_interval",
"sighup",
"10s",
"integer",
"Replication / Standby Servers",
"s",
"10",
"Sets the maximum interval between WAL receiver status reports to the sending server.",
),
(
"wal_receiver_timeout",
"sighup",
"1min",
"integer",
"Replication / Standby Servers",
"ms",
"60000",
"Sets the maximum wait time to receive data from the sending server.",
),
(
"wal_recycle",
"superuser",
"on",
"bool",
"Write-Ahead Log / Settings",
"",
"on",
"Recycles WAL files by renaming them.",
),
(
"wal_retrieve_retry_interval",
"sighup",
"5s",
"integer",
"Replication / Standby Servers",
"ms",
"5000",
"Sets the time to wait before retrying to retrieve WAL after a failed attempt.",
),
(
"wal_segment_size",
"internal",
"16MB",
"integer",
"Preset Options",
"B",
"16777216",
"Shows the size of write ahead log segments.",
),
(
"wal_sender_timeout",
"user",
"1min",
"integer",
"Replication / Sending Servers",
"ms",
"60000",
"Sets the maximum time to wait for WAL replication.",
),
(
"wal_skip_threshold",
"user",
"2MB",
"integer",
"Write-Ahead Log / Settings",
"kB",
"2048",
"Minimum size of new file to fsync instead of writing WAL.",
),
(
"wal_summary_keep_time",
"sighup",
"10d",
"integer",
"Write-Ahead Log / Summarization",
"min",
"14400",
"Time for which WAL summary files should be kept.",
),
(
"wal_sync_method",
"sighup",
"fdatasync",
"enum",
"Write-Ahead Log / Settings",
"",
"fdatasync",
"Selects the method used for forcing WAL updates to disk.",
),
(
"wal_writer_delay",
"sighup",
"200ms",
"integer",
"Write-Ahead Log / Settings",
"ms",
"200",
"Time between WAL flushes performed in the WAL writer.",
),
(
"wal_writer_flush_after",
"sighup",
"1MB",
"integer",
"Write-Ahead Log / Settings",
"8kB",
"128",
"Amount of WAL written out by WAL writer that triggers a flush.",
),
(
"work_mem",
"user",
"4MB",
"integer",
"Resource Usage / Memory",
"kB",
"4096",
"Sets the maximum memory to be used for query workspaces.",
),
(
"xmlbinary",
"user",
"base64",
"enum",
"Client Connection Defaults / Statement Behavior",
"",
"base64",
"Sets how binary values are to be encoded in XML.",
),
(
"xmloption",
"user",
"content",
"enum",
"Client Connection Defaults / Statement Behavior",
"",
"content",
"Sets whether XML data in implicit parsing and serialization operations is to be considered as documents or content fragments.",
),
(
"zero_damaged_pages",
"superuser",
"off",
"bool",
"Developer Options",
"",
"off",
"Continues processing past damaged page headers.",
),
];
pub(crate) fn guc_context(name: &str) -> Option<&'static str> {
guc_entry(name).map(|e| e.1)
}
pub(crate) fn guc_boot_value(name: &str) -> Option<&'static str> {
guc_entry(name).map(|e| e.2)
}
type GucRow = (
&'static str,
&'static str,
&'static str,
&'static str,
&'static str,
&'static str,
&'static str,
&'static str,
);
pub(crate) fn guc_short_desc(name: &str) -> Option<&'static str> {
guc_entry(name).map(|e| e.7)
}
fn guc_entry(name: &str) -> Option<&'static GucRow> {
let lower = name.to_ascii_lowercase();
PG_GUC_CONTEXTS
.binary_search_by(|(n, ..)| (*n).cmp(lower.as_str()))
.ok()
.map(|i| &PG_GUC_CONTEXTS[i])
}
#[cfg(test)]
mod tests {
use super::{PG_GUC_CONTEXTS, guc_boot_value, guc_context};
#[test]
fn table_is_strictly_sorted_by_name() {
for w in PG_GUC_CONTEXTS.windows(2) {
assert!(
w[0].0 < w[1].0,
"out of order: {:?} then {:?}",
w[0].0,
w[1].0
);
}
}
#[test]
fn every_name_is_lowercase() {
for (n, ..) in PG_GUC_CONTEXTS {
assert_eq!(*n, n.to_ascii_lowercase(), "{n} is not lowercased");
}
}
#[test]
fn lookups_agree_and_fold_case() {
assert_eq!(guc_context("TimeZone"), Some("user"));
assert_eq!(guc_boot_value("block_size"), Some("8192"));
assert_eq!(guc_boot_value("BLOCK_SIZE"), Some("8192"));
assert_eq!(guc_context("nosuchknob"), None);
assert_eq!(guc_boot_value("nosuchknob"), None);
}
}