[Bucardo-general] ERROR: duplicate key value violates with master master replication
Rosser Schwarz
rosser.schwarz at gmail.com
Wed May 14 06:00:54 UTC 2014
On Tue, May 13, 2014 at 10:47 PM, Juned Khan <jkhan6722 at gmail.com> wrote:
> On Thu, May 8, 2014 at 12:59 PM, Juned Khan <jkhan6722 at gmail.com> wrote:
>
>> DETAIL: Key (id)=(1) already exists.
>>
>
You might try setting your sequences to be staggered (e.g., so that records
inserted on db server 1 get odd-numbered values from the sequence, and
records on db server 2 get even-numbered values). Look at the docs for the
ALTER SEQUENCE statement, particularly the INCREMENT clause.
Note, for that to work, you'd need *not* to be replicating the sequences,
but only the tables.
I believe the wiki has documentation describing this type of setup, though
it may not be in the most obvious place any more.
rls
--
:wq
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.endcrypt.com/pipermail/bucardo-general/attachments/20140513/c5f4a8b9/attachment.html>
More information about the Bucardo-general
mailing list