[Bucardo-general] Questions on `add sync` params
Greg Sabino Mullane
greg at endpoint.com
Thu Nov 1 17:58:47 UTC 2012
> I've still no idea WTF makedelta is or why one would want to use it, though
It works for B4 (and has been used in production), but is not working
yet for B5. In a nutshell, it creates dummy entries so that a table
can be updated by more than one sync. So say I have a sync x that
does multimaster between databases A and B. I also have a sync y
that does a source->target sync from database B to C. When someone
changes a rows on table foobar on database A, Bucardo pushes that
change out to B.foobar via the x sync. However, because we disable
all triggers and rules when we do the DELETE/COPY, the bucardo_delta
table for B.foobar will NOT have the primary keys we just changed.
Thus, as far as sync y is concerned, B.foobar has no changes and
thus they do not get pushed out to C (all of these could also be source-target,
source-source, source-source-target, or whatever).
We cannot simply leave those triggers on, else we get into an infinite loop
as A.foobar adds a record to B, and then the same sync sees that B has a
change and pushes it out to A, which then records the change...
Thus, makedelta: it adds an entry in bucardo_delta for that table, but
also adds an entry to bucardo_track. In the example above, it will
add a bucardo_delta entry for B.foobar, and a matching bucardo_track
entry so that sync x thinks it has already processed that change (which
Greg Sabino Mullane greg at endpoint.com
End Point Corporation
PGP Key: 0x14964AC8
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 163 bytes
Desc: not available
More information about the Bucardo-general