[Bucardo-general] Syncs are aborted if one of the involved DBs is offline

Michelle Sullivan michelle at sorbs.net
Tue Apr 9 09:41:01 UTC 2013

Greg Sabino Mullane wrote:
>> sync is performed.  All my remote nodes are slave only so it's not too
>> much of an issue that way for me, however I do have a cluster of 4
>> masters (2 east coast, 2 west cost) that should a master fail it should
>> be placed in read-only on startup whilst the DB is synced with
>> outstanding changes.  Greg, would this be possible to look at?
> Well, the case with one or more "targets" being down in a simple 
> single-source-many-targets is fixable, and I will do that once I get 
> some tuits. The multi-source case is a lot trickier. It wouldn't need 
> to necessarily be put into any mode on startup, it could simply run 
> when ready. The problem is how to handle conflicts, and how to deal 
> with the fact that the "dead" source db is going to have some 
> stored up delta rows that may be quite outdated when compared to the 
> other databases. I will think this over some more. Feel free to let 
> me know what the ideal behavior would be for your particular situation(s), 
> so I can keep that in mind.

That's easy... apply the conflict rules that have been applied in the
config.  However, whilst performing the first sync when first online it
should go into a 'read only' mode so it cannot accept any changes until
it's back in sync.  That will be the trickier part... how does the first
host to be started know it should be in read-only mode?  The obvious
answer would be on bucardo first connecting make all DBs read-only then
when they have performed their 'first sync' go back to read-write... 
additionally if the DB crashes have it automatically go into read-only
upon start up - maybe the local DB knows it's part of a bucardo cluster
and become read-write after a bucardo process tells it (eg using the
'replica' built-in) ... this should be set also for any leaf/delta
target nodes automatically to prevent someone writing to a slave in a tree.


Michelle Sullivan

More information about the Bucardo-general mailing list