Search code examples
postgresqldebeziumlogical-replicationlogical-decoding

How to do logical replication on cascading standby server on postgres?


Is it possible to enable logical replication on standby server which is in cascading replication mode?


Solution

  • According Debezium connector for PostgreSQL docs:

    As of release 12, PostgreSQL allows logical replication slots only on primary servers. This means that you can point a Debezium PostgreSQL connector to only the active primary server of a database cluster. Also, replication slots themselves are not propagated to replicas. If the primary server goes down, a new primary must be promoted.

    Note. There are discussions in the PostgreSQL community around a feature called failover slots that would help mitigate this problem, but as of PostgreSQL 12, they have not been implemented.

    This feature is not implemented for the latest PostgreSQL release 13.

    https://debezium.io/documentation/reference/connectors/postgresql.html