跳转到主要内容

PostgreSQL 17 → 18 GUC 差异

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

Fact。 实测在档数从 380 变为 399;新增 21、boot 默认值变化 5、移除 2。

新增参数

参数 类型 Context Boot 默认值 分类
autovacuum_vacuum_max_threshold integer sighup 100000000 Vacuuming / Automatic Vacuuming
autovacuum_worker_slots integer postmaster 16 Vacuuming / Automatic Vacuuming
enable_distinct_reordering bool user on Query Tuning / Planner Method Configuration
enable_self_join_elimination bool user on Query Tuning / Planner Method Configuration
extension_control_path string superuser $system Client Connection Defaults / Other Defaults
file_copy_method enum user copy Resource Usage / Disk
idle_replication_slot_timeout integer sighup 0 s Replication / Sending Servers
io_max_combine_limit integer postmaster 16 8kB (128 KiB (16 × 8kB)) Resource Usage / I/O
io_max_concurrency integer postmaster -1 Resource Usage / I/O
io_method enum postmaster worker Resource Usage / I/O
io_workers integer sighup 3 Resource Usage / I/O
log_lock_failures bool superuser off Reporting and Logging / What to Log
max_active_replication_origins integer postmaster 10 Replication / Subscribers
md5_password_warnings bool user on Connections and Authentication / Authentication
num_os_semaphores integer internal 0 Preset Options
oauth_validator_libraries string sighup "" (empty string) Connections and Authentication / Authentication
ssl_groups string sighup X25519:prime256v1 Connections and Authentication / SSL
ssl_tls13_ciphers string sighup "" (empty string) Connections and Authentication / SSL
track_cost_delay_timing bool superuser off Statistics / Cumulative Query and Index Statistics
vacuum_max_eager_freeze_failure_rate real user 0.03 Vacuuming / Freezing
vacuum_truncate bool user on Vacuuming / Default Behavior

Boot 默认值变化

参数 PG17 PG18 分类
effective_io_concurrency 1 16 Resource Usage / I/O
log_connections off "" (empty string) Reporting and Logging / What to Log
maintenance_io_concurrency 10 16 Resource Usage / I/O
server_version 17.11 (Debian 17.11-1.pgdg13+2) 18.6 (Debian 18.6-1.pgdg13+2) Preset Options
server_version_num 170011 180006 Preset Options

移除参数

参数 最后类型 Context 最后 Boot 默认值 分类
extension_destdir string superuser "" (empty string) File Locations
ssl_ecdh_curve string sighup prime256v1 Connections and Authentication / SSL

计算方法

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