0

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 ]

  • 1
    No, I don't think that is possible. because a slave is always a 1:1 copy of the master. There is no way to merge two masters into one slave with Postgres (and remgr doesn't extend the abilities of Postgres' replication, it only makes it easier to use) – a_horse_with_no_name Sep 6 '14 at 7:53
  • Thanks for the comment. If you want, move it to an answer so that I can close the question with one. – adamo Sep 7 '14 at 7:15
2

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.