[Bucardo-general] Can bucardo do this?

Rosser Schwarz rosser.schwarz at gmail.com
Thu Aug 22 01:24:12 UTC 2013


No, Bucardo can't "detect" that the data in the two locations is
semantically different, and that it shouldn't be overwritten, but instead
modified so as not to conflict. (As far as I know, no replication system in
the world can do that.) If you updated something on BR_HR's record with id
= 1, then HQ_HR's record with id = 1 would be overwritten entirely. This
probably isn't what you want.

The two most common idioms for avoiding this kind of conflict are:

1. To have a multi-column primary key, where one of the columns indicates
which "location" is "home" for that record — e.g., your primary key for
BR_HR's record 1 might be (1, "BR"), and HQ_HR's (1, "HQ"). This is
basically what you describe in your final case, where the pkey is the (id,
uid) tuple.

2. To have the auto-incrementing primary key mod-N, where N is the number
of databases involved. So, in your case, HQ's id sequence might be the odd
values (1, 3, 5, 7...), and BR's the even (2, 4, 6, 8...), for example. In
such a configuration, you want to make sure Bucardo is only replicating the
tables, and not also the associated sequences that populate the
auto-increment primary key.

As for your question about Bucardo's stability, there are people using
4.99.x in production right now. There's always the possibility of as-yet
undiscovered bugs — it is a beta release, after all — but it hasn't eaten
anyone's data yet that I'm aware of...

(/me touches wood to be safe...)

rls



On Wed, Aug 21, 2013 at 5:02 PM, eric machine <eric.machine at hotmail.com>wrote:

>  Thanks Josh, that helps.
>
> I assume the v5 is this one right?
> https://github.com/bucardo/bucardo
>
> Hopefully it is stable for production use, what do you think?
>
> Can bucardo sync 100 - 200 tables?
>
> Last question,
>
> let's say I have this table
>
> HQ_HR
> ----------
> ID | uid | Name
> 1  | john | susan
> 2  | john | michelle
>
> then in branch
>
> BR_HR
> ----------
> ID | uid | Name
> 1  | Josh | Ally
> 2  | Josh | Rebecca
>
> If I sync one way from BR_HR to HQ_HR, will the expected results like
> below?
>
> HQ_HR
> ----------
> ID | uid | Name
> 1  | john | susan
> 2  | john | michelle
> 1  | Josh | Ally
> 2  | Josh | Rebecca
>
> Note: ID is an auto increment number
>
> Wouldn't the above cause conflicts? Or will it be replicated as below?
>
> HQ_HR
> ----------
> ID | uid | Name
> 1  | john | susan
> 2  | john | michelle
> 3  | Josh | Ally
> 4  | Josh | Rebecca
>
> Unless this table supports 2 primary keys, then below is possible right?
>
> HQ_HR
> ----------
> ID | uid | Name
> 1  | john | susan
> 2  | john | michelle
> 1  | Josh | Ally
> 2  | Josh | Rebecca
>
> Any help? Thanks.
>
>
> > Date: Wed, 21 Aug 2013 14:50:21 -0600
>
> > From: josh at endpoint.com
> > To: eric.machine at hotmail.com
> > CC: bucardo-general at bucardo.org
> > Subject: Re: [Bucardo-general] Can bucardo do this?
> >
> > On Wed, Aug 21, 2013 at 05:44:55PM +0000, eric machine wrote:
> > > Is there a v5? I though the latest was v4.99.7?
> >
> > My fault -- 4.99.7 is "Bucardo 5 beta", so the version you suggested
> you'd try
> > to use is, in fact, "Bucardo 5" such as it exists now.
> >
> > > Is it possible when I use bucardo to sync from HQ to Branch, it will
> > > auto create the missing 10 tables for Branch?
> >
> > No, Bucardo won't create new tables for you. You'll need to create the
> tables
> > in both databases and tell Bucardo about them if you want them to be
> > replicated.
> >
> > --
> > Josh Tolley josh at endpoint.com 801-987-0252
> > End Point Corporation http://www.endpoint.com
>
> _______________________________________________
> Bucardo-general mailing list
> Bucardo-general at bucardo.org
> https://mail.endcrypt.com/mailman/listinfo/bucardo-general
>
>


-- 
:wq
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.endcrypt.com/pipermail/bucardo-general/attachments/20130821/1925eda8/attachment-0001.html>


More information about the Bucardo-general mailing list