[Bucardo-general] How does bucardo administrate autoincrement values ?

Greg Sabino Mullane greg at endpoint.com
Tue Dec 12 21:39:32 UTC 2017


Sory, been to busy to reply but I can do this one super quick:

> ERROR: duplicated key
..
> How can I tell bucardo that I have a column With Autoincrement value?

You cannot. The canonical solution is to adjust the sequences on both 
ends such that they cannot collide.

Server A: ALTER SEQUENCE foo_id_seq RESTART WITH 10000 INCREMENT BY 2;

Server B: ALTER SEQUENCE foo_id_seq RESTART WITH 10001 INCREMENT BY 2;

-- 
Greg Sabino Mullane greg at endpoint.com
End Point Corporation
PGP Key: 2529 DF6A B8F7 9407 E944  45B4 BC9B 9067 1496 4AC8
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 163 bytes
Desc: not available
URL: <https://mail.endcrypt.com/pipermail/bucardo-general/attachments/20171212/8952c2d1/attachment.sig>


More information about the Bucardo-general mailing list