On Saturday, February 14, 2015 5:22:58 PM CEST, Axel Rau wrote:
Abhijit wrote last May, that he will try to find a solution.
I would like to test BDR with a simple app, but learned, that
the current version stops replication on a (remote) UNIQUE
CONSTRAINT violation.
I know how to write a script that recovers from this for the aox database.
Well, actually I don't, because I don't know the first thing about BDR. But
the general principle is simple: Increase all mailboxes.uidvalidity by 1,
renumber all mailbox_messages.uid values, renumber all
mailbox_messages.modseq values, and set mailboxes.uidnext and .nextmodseq
appropriately. Done.
The biggest problem is to integrate it in BDR, so that it's possible to
'update mailbox_messages set uid...' on the complete set, rather than just
what's visible on one side.
It can be done more... gently. I don't think that matters. Recovery will be
unusual enough that bumping all mailboxes instead of just the affected
mailboxes is acceptable.
Arnt