[Bucardo-general] newbie questions
Greg Sabino Mullane
greg at endpoint.com
Mon Jun 14 14:31:13 UTC 2010
Welcome to the list, Joe.
On Sat, Jun 12, 2010 at 02:40:14PM -0700, Joe Conway wrote:
> If I want to set up a swap sync:
> 1) Is there a bucardo_ctl function to set "standard_conflict"
> or does it need to be done by manually modifying goat?
You can do it via bucardo_ctl on a table-by-table basis:
bucardo_ctl update table gregtest standard_conflict=source
Or a bunch at once:
bucardo_ctl update table 'r*' standard_conflict=source
Or all at once:
bucardo_ctl update table '*' standard_conflict=source
> 2) What should "standard_conflict" be set to for sequences?
> 3) How do sequences behave in a multi-master scenario?
Sequences have additional standard_conflict methods of
"highest" and "lowest". However, the recommended method is to
offset your sequences so that they never collide. In other words,
assuming sequences are initially identical on master1 and master2:
psql -h master1 -c "SELECT nextval('tab_id_seq')"
psql -h master1 -c 'ALTER SEQUENCE tab_id_seq INCREMENT BY 2'
psql -h master2 -c 'ALTER SEQUENCE tab_id_seq INCREMENT BY 2'
If that is in place, you can set the standard_conflict to 'skip'
for the sequences.
Greg Sabino Mullane greg at endpoint.com
End Point Corporation
PGP Key: 0x14964AC8
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 163 bytes
Desc: not available
Url : https://mail.endcrypt.com/pipermail/bucardo-general/attachments/20100614/2b29d744/attachment.bin
More information about the Bucardo-general