repmgr: Can I replicate databases from two different masters to a third slave?
-
08-12-2020 - |
Вопрос
If I have a master node 1 (with database A) and a master node 2 (with database B) can I use repmgr and have both A and B replicated to a hot standby node 3 ?
[ EDIT: They would all be running Postgres 9.3 ]
Решение
PostgreSQL's built-in replication (as used by repmgr) replicates entire PostgreSQL instances - with all databases. The transaction log is shared between all databases.
PostgreSQL can't merge transaction logs from another instance. Nor can it replicate only a subset of databases. You have to replicate exactly one instance to exactly one other instance.
If you want something other than that, there are a variety of other replication options such as Londiste, Slony-I, BDR, etc.
Не связан с dba.stackexchange