wal_keep_size
No restart — takes effect on reloadtuned by pgconfiguratordisk size (MB/GB)
Minimum WAL kept around so lagging standbys can still catch up.
What pgconfigurator would set
32 GB · 8 vCPU · NVMe · OLTP
Computing…
Tune for your exact server → /tunecomputed in your browser · nothing uploaded
What it does
wal_keep_size is how much old WAL the primary retains beyond what it strictly needs, so a streaming standby that falls behind can still fetch the segments it missed instead of needing a full rebuild. (It replaced the old wal_keep_segments in PostgreSQL 13.)
How to tune it
Replication slots are the more robust way to guarantee retention, but they can let WAL grow without bound if a standby disappears. wal_keep_size is a simpler, bounded safety margin — set it to cover your expected replica lag (e.g. a few GB). 0 keeps only the minimum.