跳转到主要内容

PostgreSQL 13 → 14 GUC 差异

PG13 与 PG14 之间新增、boot 默认值变化和移除的核心配置参数。
说明

Fact。 实测在档数从 332 变为 348;新增 18、boot 默认值变化 5、移除 2。

新增参数

参数 类型 Context Boot 默认值 分类
client_connection_check_interval integer user 0 ms Connections and Authentication / Connection Settings
compute_query_id enum superuser auto Statistics / Monitoring
debug_discard_caches integer superuser 0 Developer Options
default_toast_compression enum user pglz Client Connection Defaults / Statement Behavior
enable_async_append bool user on Query Tuning / Planner Method Configuration
enable_memoize bool user on Query Tuning / Planner Method Configuration
huge_page_size integer postmaster 0 kB (0 B) Resource Usage / Memory
idle_session_timeout integer user 0 ms Client Connection Defaults / Statement Behavior
in_hot_standby bool internal off Preset Options
log_recovery_conflict_waits bool sighup off Reporting and Logging / What to Log
min_dynamic_shared_memory integer postmaster 0 MB (0 B) Resource Usage / Memory
output_plugin_libraries string superuser pgoutput, test_decoding Replication / Sending Servers
recovery_init_sync_method enum sighup fsync Error Handling
remove_temp_files_after_crash bool sighup on Developer Options
ssl_crl_dir string sighup "" (empty string) Connections and Authentication / SSL
track_wal_io_timing bool superuser off Statistics / Query and Index Statistics Collector
vacuum_failsafe_age integer user 1600000000 Client Connection Defaults / Statement Behavior
vacuum_multixact_failsafe_age integer user 1600000000 Client Connection Defaults / Statement Behavior

Boot 默认值变化

参数 PG13 PG14 分类
checkpoint_completion_target 0.5 0.9 Write-Ahead Log / Checkpoints
password_encryption md5 scram-sha-256 Connections and Authentication / Authentication
server_version 13.23 (Debian 13.23-1.pgdg13+1) 14.24 (Debian 14.24-1.pgdg13+2) Preset Options
server_version_num 130023 140024 Preset Options
vacuum_cost_page_miss 10 2 Resource Usage / Cost-Based Vacuum Delay

移除参数

参数 最后类型 Context 最后 Boot 默认值 分类
operator_precedence_warning bool user off Version and Platform Compatibility / Previous PostgreSQL Versions
vacuum_cleanup_index_scale_factor real user 0.1 Client Connection Defaults / Statement Behavior

计算方法

三张清单直接比较固定环境中的 PG13 与 PG14 pg_settings 快照。默认值变化使用 boot_valunit 的组合;setting 不参与判定,以免把 initdb 生成值误当作编译时默认值。