[Bucardo-general] How to ignore 'duplicate key value violates unique constraint' exceptions

Sijo Pappachan sijo.pappachan at outlook.com
Mon Jan 5 11:02:03 UTC 2015


Each of the master nodes at geographically remote sites cater to local inserts.So I am imagining maybe there were similar inserts from any of the 2 separate nodes at the same time and the syncs trying to resolve to the latest, fails on the unique constraint.
Like a text entry with unique constraint value 'fruit::apple::red' was created on different nodes, and the sync tries to replicatethe same to the other master and finds it already existing. 
Just thinking out loud.Let me know if I am missing anything.
Thanks,~Sijo
> Date: Mon, 5 Jan 2015 11:38:27 +0100
> From: michelle at sorbs.net
> To: sijo.pappachan at outlook.com
> CC: bucardo-general at bucardo.org
> Subject: Re: [Bucardo-general] How to ignore 'duplicate key value violates unique constraint' exceptions
> 
> Sijo Pappachan wrote:
> > Hi, 
> >
> > I have a 3 node master-master setup with conflict strategy as
> > bucardo_latest. 
> > All has been well, but the sync aborts on unique constraint violation
> > on few tables.
> >
> > The error looks something like this :
> >
> >     Sync "dpixACsync" public."MediaObject" Reason: DBD::Pg::db
> >     pg_putcopyend failed: ERROR:  duplicate key value violates unique
> >     constraint "mo_uniq_path_index"
> >
> >
> 
> The obvious question would be, 'why?' if you have these violations then
> your table is most obviously out of sync.
> 
> Regards,
> 
> Michelle
> 
> -- 
> Michelle Sullivan
> http://www.mhix.org/
> 
 		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.endcrypt.com/pipermail/bucardo-general/attachments/20150105/bd3fc740/attachment.html>


More information about the Bucardo-general mailing list