---
title: "Blocking cutovers to save replication slots"
description: "PlanetScale Postgres blocks planned cutovers (resizes, parameter changes, maintenance) when logical replication slots aren't synchronized to the replica being promoted, because vanilla Postgres will promote a replica without the slot and silently break CDC consumers."
url: "https://swe.quest/articles/blocking-cutovers-to-save-replication-slots-d52d9d5fcc4a6789"
canonical: "https://planetscale.com/blog/how-to-make-a-replication-slot-survive-a-cutover"
source: "PlanetScale"
published: "2026-09-21"
difficulty: "medium"
kind: "How-to"
reading_minutes: 5
tags: ["postgres","replication","event-driven","deployment"]
---

# Blocking cutovers to save replication slots

A post on [PlanetScale](https://swe.quest/sources/planetscale.md), published 2026-09-21, 5 min read, How-to. Original: [https://planetscale.com/blog/how-to-make-a-replication-slot-survive-a-cutover](https://planetscale.com/blog/how-to-make-a-replication-slot-survive-a-cutover)

## Summary

PlanetScale Postgres blocks planned cutovers (resizes, parameter changes, maintenance) when logical replication slots aren't synchronized to the replica being promoted, because vanilla Postgres will promote a replica without the slot and silently break CDC consumers. To make slots promotion-ready, create them with failover = true (or ALTER\_REPLICATION\_SLOT ... (FAILOVER true)) and set hot\_standby\_feedback and sync\_replication\_slots to on. The operator detects misconfiguration, alerts users, waits for slots to be ready, and manages synchronized\_standby\_slots. Enabling hot\_standby\_feedback pins the primary's vacuum horizon and can add bloat, which is why both settings are off by default.

Written by swe.quest, not by the author.

**Difficulty:** Medium: assumes a working developer; shows how it is built or done

## Topics

- [PostgreSQL](https://swe.quest/tags/postgres.md) (Data & databases)
- [Replication](https://swe.quest/tags/replication.md) (Distributed systems)
- [Event-driven architecture](https://swe.quest/tags/event-driven.md) (Backend & APIs)
- [Deployment](https://swe.quest/tags/deployment.md) (Reliability & operations)

## Prerequisites

- Postgres WAL and streaming replication ([easy posts on PostgreSQL](https://swe.quest/tags/postgres.md?difficulty=easy))
- Logical replication and CDC ([easy posts on Replication](https://swe.quest/tags/replication.md?difficulty=easy))
- Replica promotion/failover

## Keywords

PlanetScale, PostgreSQL, logical replication slots, sync\_replication\_slots, hot\_standby\_feedback, pgoutput, Kubernetes operator

## Related posts

- [ClickPipes for Postgres now supports failover replication slots](https://swe.quest/articles/clickpipes-for-postgres-now-supports-failover-replication-slots-63903c6595faed76.md): ClickHouse · 2025-11-11 · Medium · 3 min read · PostgreSQL, Replication, Event-driven architecture, Analytics & OLAP
  Postgres ClickPipes can now create logical replication slots with failover enabled, so CDC pipelines into ClickHouse survive a primary-to-standby promotion.
- [Designing a planned switchover for minimum disruption](https://swe.quest/articles/designing-a-planned-switchover-for-minimum-disruption-c09f9387b5a40465.md): PlanetScale · 2026-10-29 · Hard · 8 min read · PostgreSQL, Replication, Resilience, Deployment
  Neki performs planned Postgres primary switchovers without stopping the old primary.
- [Fencing a Postgres primary that might still be alive](https://swe.quest/articles/fencing-a-postgres-primary-that-might-still-be-alive-67043bdd5aea0f6c.md): ClickHouse · 2026-11-04 · Hard · 10 min read · PostgreSQL, Replication, Resilience, Networking, Cloud platforms
  Before promoting a standby, a managed Postgres control plane must fence the old primary, because promotion and DNS changes alone don't stop writes: async standbys, per-session synchronous\_commit overrides, quorum commit with a remaining standby, and canceled commits already in WAL can all let a still-alive primary accept writes.
- [When SIGTERM Does Nothing: A Postgres Mystery](https://swe.quest/articles/when-sigterm-does-nothing-a-postgres-mystery-0ecf6df7cd549d22.md): ClickHouse · 2025-07-08 · Hard · 11 min read · PostgreSQL, Replication, Debugging, Event-driven architecture
  Creating a logical replication slot on a Postgres hot standby (v16+) can hang indefinitely and ignore pg\_cancel\_backend and pg\_terminate\_backend when a transaction is still open on the primary.
- [Patching the PostgreSQL JDBC Driver](https://swe.quest/articles/patching-the-postgresql-jdbc-driver-47e9400eaa77f0d2.md): Zalando Engineering · 2023-11-08 · Medium · 10 min read · PostgreSQL, Replication, Event-driven architecture, Java & JVM, Open source
  Postgres logical replication slots for clients watching low-traffic tables never advance, so the server retains all WAL generated by other tables until disk fills and the node goes read-only.

Browse: [Latest posts](https://swe.quest/index.md) · [Topics](https://swe.quest/tags.md) · [Sources](https://swe.quest/sources.md) · [Topic map](https://swe.quest/map.md) · [Site guide (llms.txt)](https://swe.quest/llms.txt)
