Root cause
A lagging or disconnected logical consumer can retain WAL. Growth depends on actual database write volume and slot progress.
How to fix
- Monitor pg_replication_slots, retained WAL bytes, database write rate and free disk.
- Choose max_slot_wal_keep_size for the installed PostgreSQL version and recovery budget. Exceeding the cap can make the slot unusable; it is not a guarantee against disk exhaustion.
- Review heartbeat.interval.ms and heartbeat.action.query with capture/publication filters; a heartbeat alone does not guarantee progress for every database workload.
- Set alerts from remaining disk and expected recovery time, not a universal 1 GiB threshold.
⚠ Bound disk growth and preserve a recovery plan for invalidated slots.
Recovery guidance reviewed 2026-10-27 against v3.7.0.Final.
Official Debezium documentation ↗