During a live data migration from a Patroni-managed PostgreSQL cluster to a standalone PostgreSQL instance using logical replication, replication slots silently disappeared after a node restart. Investigation revealed Patroni's built-in cleanup routine drops any replication slots it doesn't recognize as its own — a safeguard against stale slots blocking WAL cleanup. The fix is to use the `ignore_slots` configuration option in Patroni's `config.yml`, which tells Patroni to leave specified slots untouched even if it didn't create them.

3m read timeFrom postgr.es
Post cover image
Table of contents
The SetupSomething Went WrongThe Real Culprit: PatroniThe Fix: ignore_slotsWhat to Take Away From This
490 Impressions