[Bucardo-general] ERROR: duplicate key value violates with master master replication

Juned Khan jkhan6722 at gmail.com
Wed May 14 06:13:35 UTC 2014


Thanks for the answer, if i use this command to add all tables then
sequence will be added automatically for replication ?

bucardo add all tables db=master1 herd=mherd
>

with live database whenever first master will go down then second master db
will be used for write process, how do i manage that with sequence ?



On Wed, May 14, 2014 at 11:30 AM, Rosser Schwarz
<rosser.schwarz at gmail.com>wrote:

> 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
>



-- 
Thanks,
Juned Khan
iNextrix Technologies Pvt Ltd.
www.inextrix.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.endcrypt.com/pipermail/bucardo-general/attachments/20140514/ccac592a/attachment.html>


More information about the Bucardo-general mailing list