↑↓ 选择↵ 打开⌫ 切换范围完整搜索

PG.CENTER 连接 PostgreSQL 文档、百科与生态知识。由 Pigsty 维护。

Wiki / 配置参数

max_slot_wal_keep_size

英文手册覆盖始于 PostgreSQL 7.4. 来源历史与运行验证各自保留独立版本边界。

当前阅读 PG 18·选择有来源记录的版本

boot val
-1
category
Replication / Sending Servers
context
sighup
documented
true
enumvals
未知
extra desc
Replication slots will be marked as failed, and segments released for deletion or recycling, if this much space is occupied by WAL on disk. -1 means no maximum.
lang
en
max val
2147483647
metadata version
18
min val
-1
name
max_slot_wal_keep_size
short desc
Sets the maximum WAL size that can be reserved by replication slots.
source
pg-settings-source-snapshot
unit
MB
vartype
integer

版本定义 PG 18

指定检查点时复制槽允许在 pg_wal 目录中保留的 WAL 文件最大总量。如果 max_slot_wal_keep_size 为 -1(默认值),复制槽可以保留无限量的 WAL 文件。否则,如果复制槽的 restart_lsn 落后当前 LSN 超过给定大小,使用该槽的备库可能会因为所需 WAL 文件被移除而无法继续复制。可以在 pg_replication_slots 中查看复制槽的 WAL 可用情况。如果指定值时没有单位,则按兆字节计算。此参数只能在 postgresql.conf 文件中或服务器命令行上设置。

比较版本

来源引用

完整定义与证据 JSON

定义来源

center · PostgreSQL 18 · english-manuals:794ce79275b20862eb6fa6f0b27ace2dda59d3e96e964fa66fc6f7636b0a01f7

正文语言: zh-Hans · 2026-09-11@29c86d9