Diagnostic step 1
Check pg_replication_slots and pg_stat_replication to confirm slot state and last_confirmed_flush_lsn.
Generated Oct 24, 2026, 9:21:01 AM
Check pg_replication_slots and pg_stat_replication to confirm slot state and last_confirmed_flush_lsn.
If you can recover the decoder/consumer, start it and point it at the existing slot to stream and advance the slot; monitor WAL purge after consumer advances.
If consumer cannot be recovered and disk space is urgent, ensure you have a recent base backup; then drop the slot with SELECT pg_drop_replication_slot('slotname') to free WAL (note: downstream data for that slot will be lost).
Add monitoring/alerts for slot lag (e.g., compare current WAL location to slot's confirmed LSN) and supervise the decoder with systemd/pm2 to auto-restart and resume.
Consider changing architecture: stream logical changes into a durable queue or WAL shipping consumer that persists state, and review plugin for upgrades/bug fixes.