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


source to share





All Articles