[Bucardo-general] Replication problems? data overwritten?

eric machine eric.machine at hotmail.com
Sun Aug 25 14:51:48 UTC 2013


Thanks Joshua.

I have some problems here. My sync is not that consistent.

2 out of 10 when I run "bucardo status", I will see "good" status.

if I try to "delete existing bucardo db" and do "bucardo install" again. Follow 100% same way.

8 out of 10, I will get this problem.

 Name     State              Last good    Time    Last I/D    Last bad    Time  
========+==================+============+=======+===========+===========+=======
 foobar | No records found |            |       |           |           |  

Any idea why I keep getting no records found? I can't figure out what went wrong.

if I do "bucardo status all", this what i get.

======================================================================
Sync name                : foobar
Current state            : No records found
Source relgroup/database : therd / dbbranch
Tables in sync           : 937
Status                   : Active
Check time               : None
Overdue time             : 00:00:00
Expired time             : 00:00:00
Stayalive/Kidsalive      : Yes / Yes
Rebuild index            : No
Autokick                 : No
Onetimecopy              : No
Post-copy analyze        : Yes
Last error:              : 
======================================================================

My tested scenarios (my bucardo is on separate server which is 192.168.56.11):-

Same db/server
==============
bucardo add database dbbranch host=192.168.56.12 dbname=branch1
bucardo add database dbbranch1 host=192.168.56.12 dbname=branch2
bucardo add database dbbranch2 host=192.168.56.12 dbname=branch3
bucardo add database dbhq host=192.168.56.12 dbname=hq

Different db/server
==============
bucardo add database dbbranch host=192.168.56.12 dbname=branch1
bucardo add database dbbranch1 host=192.168.56.13 dbname=branch2
bucardo add database dbbranch2 host=192.168.56.14 dbname=branch3
bucardo add database dbhq host=192.168.56.15 dbname=hq

I am using the latest from github.

Should I fall back with 4.99.7 version? Probably more stable?

Any help? Thanks.

> Date: Fri, 23 Aug 2013 11:22:17 -0600
> From: josh at endpoint.com
> To: eric.machine at hotmail.com
> CC: bucardo-general at bucardo.org
> Subject: Re: [Bucardo-general] Replication problems? data overwritten?
> 
> On Fri, Aug 23, 2013 at 04:27:52PM +0000, eric machine wrote:
> >    a) If I change the sequence in postgres just like that, will that
> >    normally affect the overall database design from the open source
> >    system? I mean will it crash the system?
> 
> It's awfully unlikely that it would.
> 
> >    b) And when you do this?
> >    CREATE SEQUENCE some_id_seq INCREMENT BY 2;
> >    Will that sequence reflects to all tables automatically? Or just
> >    specific table?
> 
> The sequence in question most likely underlies only one primary key, so you'll
> probably have to find all the sequences for all of the tables you want to
> replicate, and modify each one.
> 
> >    c) If I follow your approach on updating the sequences, do I still run
> >    this command?
> >    bucardo add all sequences herd=therd
> 
> No, you don't want Bucardo setting the current value on these sequences for
> you.
> 
> >    d) Lastly, for this command
> >    SELECT setval('some_id_seq'::regclass, 104);
> >    I assume I run this only once right?
> 
> Right.
> 
> >    However for new database from fresh, I can just ignore this. Correct?
> 
> If you've set the sequences in one database to start with an even number when
> you created it, you don't need to set the value separately. You do that this
> way:
> 
>     CREATE SEQUENCE whatever ... START WITH 2
> 
> >    e) Can bucardo do streaming replication? I mean always sync when
> >    there's data changes?
> 
> Bucardo tries to replicate each time a sync is "kicked", which by default
> happens every few seconds. You can turn on "autokick" to get it to kick the
> sync every time something changes.
> 
> -- 
> Josh Tolley   josh at endpoint.com   801-987-0252
> End Point Corporation  http://www.endpoint.com

 		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.endcrypt.com/pipermail/bucardo-general/attachments/20130825/81add335/attachment.html>


More information about the Bucardo-general mailing list