[Bucardo-general] duplicate key value violates unique constraint "bucardo_sequences_tablename"

Jonathan Brinkman jb at blackskytech.com
Sat Aug 10 12:00:42 UTC 2013


That's clever, thank you.
I am using 4.5.0
How did you create the DBGroup with bucardo_ctl?
There are 4 syncs total, 2 are push from Master to the slaves as discussed,
and 1 push-delta sync comes from each slave to Master. Those other 2 (from
slave to master) work fine.

-----Original Message-----
From: Michelle Sullivan [mailto:michelle at sorbs.net] 
Sent: Saturday, August 10, 2013 7:48 AM
To: Jonathan Brinkman
Cc: bucardo-general at bucardo.org
Subject: Re: [Bucardo-general] duplicate key value violates unique
constraint "bucardo_sequences_tablename"

I ran into this very problem a couple of days ago.

The work around I found is to delete the syncs, then create a DBGroup with
the 2 slaves in it, and add a single sync with the DB group as the target.

If you have other seperate syncs to the 2 slaves it's a good idea to do the
same with them, but if you can't you can create this setup manually by
manipulating the bucardo config tables (I don't know if you can do it with
Bucardo_ctl as I didn't try.)

NB: I'm working with 4.5.0, I have no idea whether this will work with
4.99.7 (but it *should*)

Regards,

Michelle

Jonathan Brinkman wrote:
>
> Greetings
>
> Trying to make a push-delta go to two slaves.
>
> Getting this error when making a change in the master. The update 
> succeeds in the first slave, but fails in the second.
>
> Can you point me towards a fix?
>
> Thank you!
>
> Jonathan
>
>  
>
> From log.bucardo:
>
> [LOG]
>
> DBI::db=HASH(0xa0bdd24)->disconnect invalidates 1 active statement 
> handle (either destroy statement handles or call finish on them before
> disconnecting) at /usr/local/share/perl/5.14.2/Bucardo.pm line 3590.
>
> [Fri Aug  9 22:50:05 2013]  KID Marking as done in the q table, 
> notifying controller
>
> [Fri Aug  9 22:50:05 2013]  KID Finished syncing to cmsfgcc_gate2.
> Time: 0. Updates: 0 Inserts: 1 Deletes: 1 Sync:
> cmsfgcc_pushdelta_main_to_gate2. Keepalive: 1
>
> [Fri Aug  9 22:50:05 2013]  KID Final database backend PID is 26689
>
> [Fri Aug  9 22:50:05 2013]  KID Kid exiting at cleanup_kid. Reason:
> DBD::Pg::st execute failed: ERROR:  duplicate key value violates 
> unique constraint "bucardo_sequences_tablename"
>
> DETAIL:  Key (tablename)=(17814) already exists. at 
> /usr/local/share/perl/5.14.2/Bucardo.pm line 4450.
>
> [/LOG].
>
>  
>
> They were originally created with these commands:
>
> [CODE]
>
> bucardo_ctl add herd cmsfgcc_gate1_to_main
>
> bucardo_ctl add table clientdata.clearanceevents 
> herd=cmsfgcc_gate1_to_main db=cmsfgcc_gate1
>
> bucardo_ctl add sync cmsfgcc_pushdelta_gate1_to_main 
> source=cmsfgcc_gate1_to_main targetdb=cmsfgcc_main type=pushdelta
>
> bucardo_ctl add herd cmsfgcc_gate2_to_main
>
> bucardo_ctl add table clientdata.clearanceevents 
> herd=cmsfgcc_gate2_to_main db=cmsfgcc_gate2
>
> bucardo_ctl add sync cmsfgcc_pushdelta_gate2_to_main 
> source=cmsfgcc_gate2_to_main targetdb=cmsfgcc_main type=pushdelta
>
> [/CODE]
>
> ----------------------------------------------------------------------
> --
>
> _______________________________________________
> Bucardo-general mailing list
> Bucardo-general at bucardo.org
> https://mail.endcrypt.com/mailman/listinfo/bucardo-general
>   


--
Michelle Sullivan
http://www.mhix.org/




More information about the Bucardo-general mailing list