PlanetScaleSimeon Griggs5 min readintermediate
Blocking cutovers to save replication slots
Summary
PlanetScale’s Postgres operator blocks cutovers that would leave logical replication slots out‑of‑sync. By requiring `failover=true` on slots and turning on `hot_standby_feedback` and `sync_replication_slots`, the operator ensures slots survive a primary promotion, preventing downstream CDC consumers from losing data.
- Logical replication slots must be configured with `failover = true` to be copied to standbys.
- Enable `hot_standby_feedback` and `sync_replication_slots` on the cluster so slot state is kept valid on replicas.
- PlanetScale’s Kubernetes operator watches `pg_replication_slots` and blocks planned cutovers (resize, config change) until all named slots report ready.
- Operators must list the names of required slots in the dashboard (Clusters → Parameters → Logical slot name) so the system knows what to protect.
Promoting a replica that lacks up‑to‑date logical slots silently breaks CDC pipelines, causing data loss or stalls for downstream services. Automating the safety check removes a class of human error during failover or maintenance.
6/10



