max_slot_wal_keep_size

max_slot_wal_keep_size: PostgreSQL 13: Don't let slots kill your primary. PostgreSQL: Documentation: 17: 19.6. Replication. Documentation: 17: 26.2. Log-Shipping Standby Servers. UGREEN NVMe Adapter, M.2 SSD M and M+B Key to NVMe PCIe 4.0 X4 ... .
ĐĂNG NHẬP
ĐĂNG KÝ
max_slot_wal_keep_size

2026-03-27


If max_slot_wal_keep_size is zero, which is the default value, then there’s no limit. I don’t recommend this, because it leads to failures when slots fill the disk.
postgres-config update --config max_slot_wal_keep_size=2GB.
Rename configuration parameter wal_keep_segments to wal_keep_size (Fujii Masao) ... Allow WAL storage for replication slots to be limited by max_slot_wal_keep_size (Kyotaro Horiguchi).
If the database parameter max_slot_wal_keep_size is set to a non default value, and the restart_lsn of a replication slot falls behind the current LSN by more than this size, the DMS task fails due to removal of required WAL files.