[Bucardo-general] Merging two datasets
Greg Sabino Mullane
greg at endpoint.com
Sun Jul 26 02:41:53 UTC 2015
> Sadly no, they are overlapping :( There are 4 cases I think, for
> each record:
>
> - PK exists in A and B, and they have the same associated data (=no
> action needed)
>
> - PK exists in A and B, but they have different associated data (=conflict)
>
> - PK used to exist in A at the time of the "duplication" but it has
> been deleted, while in B it still exists (=PK should be deleted from
> B too)
>
> - PK has been added to A or B after the duplication (=PK should be
> inserted into the other DB too)
Well all except the conflict can be handled by simply "touching" the rows
on both sides, such that Bucardo thinks that all the rows on both sides
need to be replicated. Could be as simple as this on each side:
UPDATE mytable SET pkcol=pkcol;
If that turns out to be too expensive, you could also simulate the
effects of the trigger on the table by hand populating the
correct bucardo delta table.
--
Greg Sabino Mullane greg at endpoint.com
End Point Corporation
PGP Key: 0x14964AC8
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 163 bytes
Desc: Digital signature
URL: <https://mail.endcrypt.com/pipermail/bucardo-general/attachments/20150725/be599d2d/attachment.sig>
More information about the Bucardo-general
mailing list