Root cause
The previous connector instance stopped unexpectedly without dropping the PostgreSQL logical replication slot. PostgreSQL allows only one consumer per slot.
How to fix
- Drop the stale slot:
SELECT pg_drop_replication_slot('debezium'); - Restart the connector. It will recreate the slot automatically.
- To avoid this in dev/test, set slot.drop.on.stop=true in the connector config.
⚠ Do NOT set slot.drop.on.stop=true in production — dropping the slot loses the WAL position and forces a re-snapshot.
Official Debezium documentation ↗