PostgreSQL 11 → 12 GUC 差异
PG11 与 PG12 之间新增、boot 默认值变化和移除的核心配置参数。
说明
Fact。 实测在档数从 292 变为 317;新增 26、boot 默认值变化 6、移除 1。
新增参数
| 参数 | 类型 | Context | Boot 默认值 | 分类 |
|---|---|---|---|---|
archive_cleanup_command |
string |
sighup |
"" (empty string) |
Write-Ahead Log / Archive Recovery |
default_table_access_method |
string |
user |
heap |
Client Connection Defaults / Statement Behavior |
log_transaction_sample_rate |
real |
superuser |
0 |
Reporting and Logging / When to Log |
plan_cache_mode |
enum |
user |
auto |
Query Tuning / Other Planner Options |
primary_conninfo |
string |
postmaster |
"" (empty string) |
Replication / Standby Servers |
primary_slot_name |
string |
postmaster |
"" (empty string) |
Replication / Standby Servers |
promote_trigger_file |
string |
sighup |
"" (empty string) |
Replication / Standby Servers |
recovery_end_command |
string |
sighup |
"" (empty string) |
Write-Ahead Log / Archive Recovery |
recovery_min_apply_delay |
integer |
sighup |
0 ms |
Replication / Standby Servers |
recovery_target |
string |
postmaster |
"" (empty string) |
Write-Ahead Log / Recovery Target |
recovery_target_action |
enum |
postmaster |
pause |
Write-Ahead Log / Recovery Target |
recovery_target_inclusive |
bool |
postmaster |
on |
Write-Ahead Log / Recovery Target |
recovery_target_lsn |
string |
postmaster |
"" (empty string) |
Write-Ahead Log / Recovery Target |
recovery_target_name |
string |
postmaster |
"" (empty string) |
Write-Ahead Log / Recovery Target |
recovery_target_time |
string |
postmaster |
"" (empty string) |
Write-Ahead Log / Recovery Target |
recovery_target_timeline |
string |
postmaster |
latest |
Write-Ahead Log / Recovery Target |
recovery_target_xid |
string |
postmaster |
"" (empty string) |
Write-Ahead Log / Recovery Target |
restore_command |
string |
postmaster |
"" (empty string) |
Write-Ahead Log / Archive Recovery |
restrict_nonsystem_relation_kind |
string |
user |
"" (empty string) |
Client Connection Defaults / Statement Behavior |
shared_memory_type |
enum |
postmaster |
mmap |
Resource Usage / Memory |
ssl_library |
string |
internal |
OpenSSL |
Preset Options |
ssl_max_protocol_version |
enum |
sighup |
"" (empty string) |
Connections and Authentication / SSL |
ssl_min_protocol_version |
enum |
sighup |
TLSv1 |
Connections and Authentication / SSL |
tcp_user_timeout |
integer |
user |
0 ms |
Client Connection Defaults / Other Defaults |
wal_init_zero |
bool |
superuser |
on |
Write-Ahead Log / Settings |
wal_recycle |
bool |
superuser |
on |
Write-Ahead Log / Settings |
Boot 默认值变化
| 参数 | PG11 | PG12 | 分类 |
|---|---|---|---|
autovacuum_vacuum_cost_delay |
20 ms |
2 ms |
Autovacuum |
extra_float_digits |
0 |
1 |
Client Connection Defaults / Locale and Formatting |
jit |
off |
on |
Query Tuning / Other Planner Options |
server_version |
11.22 (Debian 11.22-1.pgdg120+1) |
12.22 (Debian 12.22-1.pgdg120+1) |
Preset Options |
server_version_num |
110022 |
120022 |
Preset Options |
transaction_isolation |
default |
read committed |
Client Connection Defaults / Statement Behavior |
移除参数
| 参数 | 最后类型 | Context | 最后 Boot 默认值 | 分类 |
|---|---|---|---|---|
default_with_oids |
bool |
user |
off |
Version and Platform Compatibility / Previous PostgreSQL Versions |
计算方法
三张清单直接比较固定环境中的 PG11 与 PG12 pg_settings 快照。默认值变化使用 boot_val 与 unit 的组合;setting 不参与判定,以免把 initdb 生成值误当作编译时默认值。