conduktor.io ↗
← All errors
high PostgreSQL Replication

ERROR: replication slot "debezium" is active for PID ...

Root cause

Another Debezium task (or pg_recvlogical session) is consuming the slot, or the previous task died but the WAL sender on the PostgreSQL side did not detect it. A common root cause is wal_sender_timeout = 0 (infinite) — PostgreSQL never checks whether the client is gone.

How to fix

  1. Kill the stale WAL sender:
    SELECT pg_terminate_backend(active_pid) FROM pg_replication_slots WHERE slot_name = 'debezium' AND active = true;
  2. Set wal_sender_timeout to a finite value (e.g., 60s) in postgresql.conf so PostgreSQL detects dead clients.
  3. Check for duplicate connector registrations via the Kafka Connect REST API.
  4. Use a unique slot.name per connector instance to avoid conflicts.
Official Debezium documentation ↗