[Bucardo-general] Merging two datasets

Federico Fanton federico at panizzolo.it
Tue Jul 21 14:43:22 UTC 2015


On 21/07/2015 16:27, Greg Sabino Mullane wrote:
> On Tue, Jul 21, 2015 at 11:31:22AM +0200, Federico Fanton wrote:
>> Now we need to merge those datasets back again and keep them in
>> sync, so I'm setting up Bucardo to handle the job. My problem is
>> that I need to replicate the changes that were made since the split
>> too, is there a way to do that with Bucardo?
>
> If I am understanding correctly, you have two non-overlapping tables
> which need to be merged both ways. While you *could* use Bucardo to
> do this, it would be far simpler to just COPY A->B and B->A:


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)


More information about the Bucardo-general mailing list