1

I am new to bucardo and need to install it for database replication. The idea is to replicate 3 databases with the same content.

I have a database which I will call it "db1" installed on a local machine.

I have a second database and I will call it "db2" on a cloud server.

I have a third database and I will call it "db3" on a local machine phisically distanced from db1 and db2.

I need to have bucardo to replicate the 3 databases on the following way:

  • db1 replicates with db2;

  • db3 replicates with db2;

I believe that this approach will allow me to have the same data on the 3 databases, is it correct?

Also, I believe that I will have to install bucardo JUST on servers with db1 and db3, is it correct?

Thank you very much for your support

Regards

Paulo

Craig Ringer
  • 307,061
  • 76
  • 688
  • 778
pmatos
  • 276
  • 4
  • 18
  • Do you expect all of them to be masters, i.e. accept writes? If so, you *must* understand the *serious limitations* with multi-master asynchronous replication, creation of data conflicts, etc. If only one need to accept writes you should use streaming replication + WAL archiving instead. – Craig Ringer Oct 01 '14 at 13:08
  • Hi Craig, the ideia is to have the same data on 3 databases. Users will be using any database at any time and I need bucardo to replicate this data for the other databases. For instance, data entered on db1 must be replicated to db2, and data entered on db2 must be on db1 and db3 also. I believe all must accept writes... – pmatos Oct 02 '14 at 07:05
  • I'm afraid you're looking for the magical conflict-free asynchronous multi-master replication solution that doesn't exist then. You'll have to accept a limitation. Your options: (a) Only one node can accept writes; (b) Any node can accept writes, but must take exclusive locks on all the tables being written to on all other nodes first, and all writes must be synchronous; or (c) Conflicts can happen where data gets modified in multiple places and cannot be merged correctly or requires application-specific logic to merge. – Craig Ringer Oct 02 '14 at 07:09
  • 1
    Read up on Bucardo's multi-master support. Only the very newest Bucardo release supports multi-master on more than two nodes, and it has serious limitations that *will* bite you unless you know what you are getting into – Craig Ringer Oct 02 '14 at 07:10

0 Answers0