[Bucardo-general] Replication of tables without primary keys

Joseph W jbw at hilltopgroup.com
Tue Sep 13 15:21:07 UTC 2016


Thanks for that information; knowing what to search for showed those options to me in the Bucardo wiki (https://bucardo.org/wiki/Sync).  This would probably work for what I need, though it's certainly not an ideal solution (as the wiki even mentions). 

That said, it looks like that documentation is older than the software I have; it refers to "herds" instead of "relgroups" etc.  It's also using the "bucardo_ctl" command instead of just "bucardo" which is what my system is using.

Looking through the man pages for "bucardo" on my system, under "add sync" there is no mention of the "Type" field.  The closest options I have are "conflict_strategy" and "onetimecopy", neither of which seem to match what I'm looking for.  

When I try it anyway, I get:

root at sqltest1:~ # bucardo add sync davical_sync relgroup=davical dbs=davical autokick=0 type=fullcopy
Unknown option 'type'

and then the dump of the manpage for "bucardo add sync".

So I'm still stuck;  it doesn't look like I have those options, or at least I don't know how to utilize them.  Any suggestions?

Thanks,
Joseph

On Tue, Sep 13, 2016 at 08:13:21PM +0800, Om Prakash Jaiswal wrote:
> without primary key a table ca
> 
> n be sync using sync type fullcopy. if table have primary key sync type can be used pushdelta .
> 
> 
> 
> Sent from Yahoo Mail odn Android
> 
> From:"bucardo-general-request at bucardo.org" <bucardo-general-request at bucardo.org>
> Date:Tue, 13 Sep, 2016 at 5:30 pm
> Subject:Bucardo-general Digest, Vol 107, Issue 5
> 
> Send Bucardo-general mailing list submissions to
> ??? bucardo-general at bucardo.org
> 
> To subscribe or unsubscribe via the World Wide Web, visit
> ??? https://mail.endcrypt.com/mailman/listinfo/bucardo-general
> or, via email, send a message with subject or body 'help' to
> ??? bucardo-general-request at bucardo.org
> 
> You can reach the person managing the list at
> ??? bucardo-general-owner at bucardo.org
> 
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of Bucardo-general digest..."
> 
> 
> Today's Topics:
> 
> ? 1. Re: Bucardo-general Digest, Vol 107, Issue 1
> ? ? ? (Balman, Matthew D. (GSFC-428.0)[Embedded Flight Systems, Inc])
> ? 2. Replication of tables without primary keys (Joseph W)
> 
> 
> ----------------------------------------------------------------------
> 
> Message: 1
> Date: Mon, 12 Sep 2016 13:31:35 +0000
> From: "Balman, Matthew D. (GSFC-428.0)[Embedded Flight Systems, Inc]"
> ??? <matthew.d.balman at nasa.gov>
> To: "bucardo-general at bucardo.org" <bucardo-general at bucardo.org>
> Subject: Re: [Bucardo-general] Bucardo-general Digest, Vol 107, Issue
> ??? 1
> Message-ID: <D3FC2557.4E5C%matthew.d.balman at nasa.gov>
> Content-Type: text/plain; charset="iso-8859-1"
> 
> Hi Saiful,
> 
> 
> >Commands:
> >$ bucardo add db bcrdrds1 dbname=bucardotest username=bucardo host=
> >xxxxxx.master.rds.amazonaws.com port=5432
> >$ bucardo add db bcrdrds2 dbname=bucardotest
> >$ bucardo add table tb_department db=bcrdrds1 --herd=bcrdherd --verbose
> >$ bucardo add dbgroup bcrdgroup1 bcrdrds1:source bcrdrds2:target
> >?$ bucardo add sync bcrdsync herd=bcrdherd dbs=bcrdgroup1
> 
> 1. You need to run ?add db? for each database with full
> username/password/host information (like you did for bcrdrds1)
> 2. You need to run ?add table? for each database.
> 3. I suggest this: "bucardo add sync bcrdsync relgroup=bcrdherd
> dbs=bcrdgroup1:source,bcrdrds2:target? (and then don?t call ?add dbgroup?)
> 
> Also make sure the perl bindings (and all other bucardo dependencies) for
> postgres are installed on each database VM, not just the main machine.
> 
> Hope that helps.
> 
> 
> 
> ------------------------------
> 
> Message: 2
> Date: Mon, 12 Sep 2016 22:07:44 -0400
> From: Joseph W <jbw at hilltopgroup.com>
> To: bucardo-general at bucardo.org
> Subject: [Bucardo-general] Replication of tables without primary keys
> Message-ID: <18544fb1-abc6-d15a-b5db-c1ccbc505d79 at hilltopgroup.com>
> Content-Type: text/plain; charset="utf-8"
> 
> Hi all,
> 
> I'm attempting to get a redundant Davical installation online (I have a
> standalone installation my company has been using for several years) and
> after a lot of searching, Bucardo looked like the best of the
> master-master postgres replication solutions I could find.
> 
> Davical, unfortunately, has several tables with no primary key or unique
> ID; I of course find this out after I've gotten all the way to creating
> the Bucardo sync between the two devices.
> 
> The first table it got to without a primary key threw the following message:
> 
> Failed to add sync: DBD::Pg::st execute failed: ERROR:? Table
> "public.addressbook_address_adr" must specify a primary key! at line
> 117. at line 30.
> CONTEXT:? PL/Perl function "validate_sync" at /usr/local/bin/bucardo
> line 4612
> 
> Is there anything I've missed so far as making Bucardo replicate those
> tables, or do I have to look for another solution (and if that's the
> case, does anyone have a suggestion so far as tools go)? 
> 
> Regards,
> 
> Joseph
> 
> 
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: <https://mail.endcrypt.com/pipermail/bucardo-general/attachments/20160912/69755dde/attachment-0001.html>
> 
> ------------------------------
> 
> _______________________________________________
> Bucardo-general mailing list
> Bucardo-general at bucardo.org
> https://mail.endcrypt.com/mailman/listinfo/bucardo-general
> 
> 
> End of Bucardo-general Digest, Vol 107, Issue 5
> ***********************************************
> 

> _______________________________________________
> Bucardo-general mailing list
> Bucardo-general at bucardo.org
> https://mail.endcrypt.com/mailman/listinfo/bucardo-general



More information about the Bucardo-general mailing list