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

Juned Khan jkhan6722 at gmail.com
Thu May 8 07:29:28 UTC 2014


Hi All,

I have just done master master setup using Bucardo. Records are inserting
both Database but it seems some problem with sequence.

Here is the scenario.

*DB server 1 :*
opensips=# insert into
dispatcher(setid,destination,flags,weight,attrs,description) values (1,'sip:
192.168.1.15:5060',0,1,'','FS1');
INSERT 0 1

*Db server 2:*
opensips=# select * from dispatcher;
 id | setid |     destination      | flags | weight | attrs | description
----+-------+----------------------+-------+--------+-------+-------------
  1 |     1 | sip:192.168.1.15:5060 |     0 |      1 |       | FS1
(1 row)

opensips=# insert into
dispatcher(setid,destination,flags,weight,attrs,description) values (2,'sip:
192.168.1.15:5060',0,1,'','FS2');
ERROR:  duplicate key value violates unique constraint "dispatcher_pkey"
DETAIL:  Key (id)=(1) already exists.

opensips=# insert into
dispatcher(setid,destination,flags,weight,attrs,description) values (2,'sip:
192.168.1.15:5060',0,1,'','FS2');
INSERT 0 1

*DB server 1:*
opensips=#  select * from dispatcher;
 id | setid |      destination      | flags | weight | attrs | description
----+-------+-----------------------+-------+--------+-------+-------------
  1 |     1 | sip:41.218.72.6:5060  |     0 |      1 |       | FS1
  2 |     2 | sip:192.168.1.15:5060 |     0 |      1 |       | FS2
(2 rows)

opensips=#  insert into
dispatcher(setid,destination,flags,weight,attrs,description) values (3,'sip:
192.168.1.17:5060',0,1,'','FS3');
ERROR:  duplicate key value violates unique constraint "dispatcher_pkey"
DETAIL:  Key (id)=(2) already exists.
opensips=#  insert into
dispatcher(setid,destination,flags,weight,attrs,description) values (3,'sip:
192.168.1.17:5060',0,1,'','FS3');
INSERT 0 1

Is there anyway to avoid this situation? any parameter or configuration to
avoid this. i am kindda of new to bucardo may be this is a silly question
but really i am just confuse with  this.

Any suggestion and idea will be appreciable.

*Regards*
Juned Khan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.endcrypt.com/pipermail/bucardo-general/attachments/20140508/00f78bc1/attachment.html>


More information about the Bucardo-general mailing list