[Bucardo-general] scenario advice

Greg Sabino Mullane greg at endpoint.com
Mon Aug 24 15:56:15 UTC 2009


> Im new to bucardo but am pleased at what it is doing for me already. I
> have a scenario that I would like to ask advice on.

I've read this over a few times but I'm still having problems getting my
head wrapped around it. Nonetheless, I'll take a stab.

> This is all about field F2. Each database has to have exactly one record
> in table A for unique value of F2. F1 is just an integer sequential
> Primary Key and provides glue between table B records and table A as a
> Foreign key. F2 must be consistent across all versions on all databases,
> but F1 must remain consistent (if it already exists) to the local
> database context. Try to put this into english, a book can have a
> different reference number(F1) in multiple shops but has to have the
> same title(F2).

Seems like you need to make everything use interleaving (offset)
sequence numbers, not just the PKs of A.

> Question:
>         Is it possible in a bucardo conflict management script to
> determine if the conflict was about duplicate values in field F2.

Yes, you can define an exception handler. The main hash it is passed in
has the following keys of interest: dbi_error, source_error,
target_error. About line 5438 of Bucardo.pm:

dbi_error    => $DBI::errstr,
source_error => $sourcedbh->err ? 1 : 0,
target_error => $targetdbh->err ? 1 : 0,

> 1.  Anyone think this might be done better or differently ?

Probably, but you might need to simplify and/or make a diagram. :)

> 2. Is there a way to create a one to many replication so that each tower
> will replicate to every other tower (kind of a fully meshed replication)?

If you mean two-way between all towers, then no. That comes often enough
to be a FAQ I think. The short answer is 'no'. The long answer is
'maybe, in theory, but nobody has gotten it to work yet'.

-- 
Greg Sabino Mullane greg at endpoint.com
End Point Corporation
PGP Key: 0x14964AC8

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 226 bytes
Desc: OpenPGP digital signature
Url : https://mail.endcrypt.com/pipermail/bucardo-general/attachments/20090824/fbbd5d69/attachment.bin 


More information about the Bucardo-general mailing list