[Bucardo-general] Abort on constraint violations

Alex Balashov abalashov at evaristesys.com
Sat Apr 6 02:37:28 UTC 2013


Hello!

I have a swap sync with Bucardo 4.99 in which Bucardo occasionally dies 
due to unique constraint violations:

[Fri Apr 5 11:11:28 2013] KID Warning! Aborting due to exception for
public.cdr.id: 2000000062 Error was DBD::Pg::st execute failed:
ERROR: duplicate key value violates unique constraint
"cdr_call_id_idx"\nDETAIL: Key (call_id)=(CXC-37-6cbf19e8-b9f5ed0-
13c4-515e1fd7-46eba190-21322dbf at xxx.xxx.xxx.xxx) already exists. at
/usr/local/share/perl5/Bucardo.pm line 5781.

These are an unfortunate, but unavoidable part of our workflow, because 
third parties misbehave.  But, we'd like to keep the UNIQUE constraint 
on the index for that column in place, because the value is supposed to 
be a GUID.

So, the question is, is there some way I can configure Bucardo to just 
skip over these problems instead of dying?  This is what happens next:

DBI::db=HASH(0x2191e98)->disconnect invalidates 25 active statement 
handles (either destroy statement handles or call finish on them before 
disconnecting) at /usr/local/share/perl5/Bucardo.pm line 3590.
DBI::db=HASH(0x21a0350)->disconnect invalidates 8 active statement 
handles (either destroy statement handles or call finish on them before 
disconnecting) at /usr/local/share/perl5/Bucardo.pm line 3591.
[Fri Apr 5 11:11:28 2013] KID Final database backend PID is 15282
[Fri Apr 5 11:11:28 2013] KID Kid exiting at cleanup_kid. Reason: Died 
at /usr/local/share/perl5/Bucardo.pm line 5835.
[Fri Apr 5 11:11:28 2013] KID Removed pid file 
"/var/run/bucardo.kid.sync.csrp_sync.csrp_dest.pid"
[Fri Apr 5 11:11:32 2013] CTL Warning! Kid 15267 seems to have died. 
Sync "csrp_sync"
[Fri Apr 5 11:11:52 2013] CTL Too many kids have been killed for 
csrp_dest (3).Will not create this until a kick.

My standard_conflict policy is set to 'source', and I'd generally like 
to keep it that way.

Thanks in advance!

-- Alex

-- 
Alex Balashov - Principal
Evariste Systems LLC
235 E Ponce de Leon Ave
Suite 106
Decatur, GA 30030
United States
Tel: +1-678-954-0670
Web: http://www.evaristesys.com/, http://www.alexbalashov.com/


More information about the Bucardo-general mailing list