跳转到主要内容

PostgreSQL 9.6 → 10 GUC 差异

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

Fact。 实测在档数从 263 变为 272;新增 11、boot 默认值变化 12、移除 2。

新增参数

参数 类型 Context Boot 默认值 分类
allow_in_place_tablespaces bool superuser off Developer Options
enable_gathermerge bool user on Query Tuning / Planner Method Configuration
max_logical_replication_workers integer postmaster 4 Replication / Subscribers
max_parallel_workers integer user 8 Resource Usage / Asynchronous Behavior
max_pred_locks_per_page integer sighup 2 Lock Management
max_pred_locks_per_relation integer sighup -2 Lock Management
max_sync_workers_per_subscription integer sighup 2 Replication / Subscribers
min_parallel_index_scan_size integer user 64 8kB (512 KiB (64 × 8kB)) Query Tuning / Planner Cost Constants
min_parallel_table_scan_size integer user 1024 8kB (8 MiB (1024 × 8kB)) Query Tuning / Planner Cost Constants
ssl_dh_params_file string sighup "" (empty string) Connections and Authentication / Security and Authentication
wal_consistency_checking string superuser "" (empty string) Developer Options

Boot 默认值变化

参数 PG9.6 PG10 分类
hot_standby off on Replication / Standby Servers
log_directory pg_log log Reporting and Logging / Where to Log
log_line_prefix "" (empty string) %m [%p] Reporting and Logging / What to Log
max_parallel_workers_per_gather 0 2 Resource Usage / Asynchronous Behavior
max_replication_slots 0 10 Replication / Sending Servers
max_wal_senders 0 10 Replication / Sending Servers
max_wal_size 64 16MB (1 GiB (64 × 16MB)) 1024 MB (1 GiB) Write-Ahead Log / Checkpoints
min_wal_size 5 16MB (80 MiB (5 × 16MB)) 80 MB (80 MiB) Write-Ahead Log / Checkpoints
password_encryption on md5 Connections and Authentication / Security and Authentication
server_version 9.6.24 10.23 (Debian 10.23-1.pgdg110+1) Preset Options
server_version_num 90624 100023 Preset Options
wal_level minimal replica Write-Ahead Log / Settings

移除参数

参数 最后类型 Context 最后 Boot 默认值 分类
min_parallel_relation_size integer user 1024 8kB (8 MiB (1024 × 8kB)) Query Tuning / Planner Cost Constants
sql_inheritance bool user on Version and Platform Compatibility / Previous PostgreSQL Versions

计算方法

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