Postgresql – How to keep the sync active with Bucardo

bucardomulti-masterpostgresqlreplication

I have a master-master sync setup between 3 nodes or 3 different host machines using bucardo. All works good.

However when one of the database or a host is not reachable or goes down for some reason, the other 2 nodes go out of sync too. It stalls the sync and goes into inactive state.

I would like to keep the sync active between the other 2 nodes at the least. And the third one should catchup once its back online. Is this possible?

Let me know how should I go about setting up bucardo sync for such a scenario.

Best Answer

I solved this problem by made separate syncs i.e.

  • host1->host2
  • host2->host3
  • host3->host1

And, for resurect from "stalled" status, made cron's script that check db status and sync status and activate it.