Minimum WAL retained for standbys (replaces wal_keep_segments).
At a glance
| Property | Value |
|---|---|
| Parameter | wal_keep_size |
| Category | Replication |
| Default | 0 |
| Value type | memory (kB/MB/GB) |
| Change scope | Reload (no restart) |
What it does
Minimum size of past WAL kept in pg_wal for standbys, in case they fall behind. Replaced wal_keep_segments in PG13.
How to apply a change
Takes effect on configuration reload (sighup context). Run SELECT pg_reload_conf(); or send SIGHUP — no restart needed.
Inspect the current value and source with SHOW wal_keep_size; or SELECT name, setting, unit, context, source FROM pg_settings WHERE name = 'wal_keep_size';.
Tuning guidance
Prefer replication slots over a large value here. Use it as a bounded safety margin (e.g. a few GB) so a briefly disconnected standby can catch up without slot-driven unbounded retention.