PostgreSQL 18 introduces a new GUC, idle_replication_slot_timeout, to automatically drop replication slots that have been idle for a specified duration. This prevents WAL accumulation from orphaned slots from filling up disk space indefinitely. The feature provides a safety net for environments where slots are not actively managed or monitored.
- New GUC idle_replication_slot_timeout replaces infinite WAL retention for abandoned slots.
- Prevents disk exhaustion caused by forgotten or disconnected replication connections.
- Requires PostgreSQL 18 to utilize this automatic cleanup mechanism.
- DBAs should set an appropriate timeout value to balance safety and operational needs.