How to handle sequences in Bugardo Postgresql multi master

We are creating a database on three different Postgresql servers (and possibly more in the future), currently syncing all tables using multiple bucardo master groups.

We are not syncing sequences; we tried this and we noticed that bucardo causes us to lose data when a concurrent write occurs in the same table on different servers. Since they use the same keys, during synchronization bucardo decides to discard one of the duplicate rows.

Our current approach is to manually number the sequence for each database instance. For example. instance 1 is left as is, all sequences of sequences of instances2 are updated starting from 2 ^ 31/10, instances3 of sequence of tables will be changed to start from 2 ^ 31/10 * 2 .. instances of 10 sequences starting from 2 ^ 31/10 * nine.

How do you feel about this approach and what other tips do you have for setting up multiple Bucardo wizards? Postgresql BDR is not an option as it is not considered a stable release yet.

+3
database postgresql replication database-replication bucardo


source to share


No one has answered this question yet

Check out similar questions:

2302
How does database indexing work?
1719
How to exit the PostgreSQL command line utility: psql
922
How to run PostgreSQL server on Mac OS X?
904
How can I drop all tables in PostgreSQL database?
850
How to change PostgreSQL user password?
643
Making a database copy in PostgreSQL
367
How do I select the nth row in a SQL database table?
4
Postgres sequence out of sync
2
PostgreSQL Replication: Multiple Masters for One Slave
0
Replicating Bucardo from slave to master



All Articles
Loading...
X
Show
Funny
Dev
Pics