[Bucardo-general] table syncing after type pushdelta has been set

Greg Sabino Mullane greg at endpoint.com
Fri Feb 10 18:55:54 UTC 2012


On Thu, Feb 09, 2012 at 04:11:44PM -0500, jtkells wrote:
> I'm a little confused about the difference between a value of 1 verses
> 2.  Could someone explain the difference?

A onetimecopy value of 1 means to unconditionally copy all rows from 
the source to the target, for each table in the sync, after truncating 
the target. In other words, the "normal" activity.

A value of 2 is special in that the truncation and copy will be skipped 
*if* there are ANY rows in the target table. In other words, if you have 
tables A,B, and C in sync foo, and set foo to onetimecopy=2, then truncate 
A and C, only those two tables on each target will get a copy of all content 
from the source database. This is useful for situations where you know 
that a table is already in sync but you need the other tables in a sync 
brought in sync, or for when someone accidentally modifies a table on 
a target and you want to forcibly wipe it and re-sync it without doing 
the same for the other tables in the sync.

> Also, I will have over a hundred tables within a schema to replicate and 
> some of these tables have a lot of rows (600,000+).  Is there a way to 
> get to a sync state without deleting all the data.  Even though this 
> should be an occasional task the amount of data to be copied combined 
> with the number of tables will have an effect on the applications on 
> the slave node by either having an outage window or missing data for 
> a period of time.

Keep in mind you do not need to put all the tables into a single sync 
unless they are logically related, e.g. with foreign keys. Not sure 
what you mean about "get to a sync state" but there is no way (for example) 
for Bucardo to come into a situation and know which rows are different 
across two tables in two databases. You set them as equal (either by 
onetimecopy or some other method) and then let the triggers on the source 
record which rows need changing.

-- 
Greg Sabino Mullane greg at endpoint.com
End Point Corporation
PGP Key: 0x14964AC8
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 163 bytes
Desc: not available
Url : https://mail.endcrypt.com/pipermail/bucardo-general/attachments/20120210/15dd4f1f/attachment.bin 


More information about the Bucardo-general mailing list