want to use logical replication with a postgresql10 cluster (that is not using logical replication)

dba.stackexchange https://dba.stackexchange.com/questions/273330

  •  06-03-2021
  •  | 
  •  

Question

We presently have an active/standby postgresql 10 cluster (based on PAF/clusterlabs). Anyways, the servers are kept in sync using: wal_level = replica

This is fine and working.

However, we would like to replicate a single database from the cluster to a standalone instance (for analytics), for this we figured a logical replication of the single database would do nicely, however we then realized we would need change the replication type on the cluster (which would essentially break it)

wal_level = logical

Is the above assumption correct (cant mix "replica and logical")? Are there any other suggestion on how to achieve the same result (replicating a single database out of the cluster with many databases)

Thanks for any feedback/suggestions

Was it helpful?

Solution

Replicating a single database can only be done using logical replication.

You just need to change the wal_level from replica to logical.

The level logical includes all the information that replica includes, plus some more that's required for logical replication. So changing it, won't break your streaming (physical) replication.

Licensed under: CC-BY-SA with attribution
Not affiliated with dba.stackexchange
scroll top