[Bucardo-general] Cascading replication

Sherrylyn Branchaw sbranchaw at campaignmonitor.com
Fri Apr 9 13:05:22 UTC 2021

Is there a recommended way to get cascading replication set up from
database A to database B to database C? I've tried three ways, two of which
worked, but none of which feels like the "right" way.

1) I tried following the steps at
https://bucardo.org/Bucardo/operations/makedelta, but the technique
described on that page doesn't seem to have worked since about 2011.

2) I set up two completely separate bucardo runs, one from A -> B and one
from B->C. Separate bucardo databases, separate daemons, separate piddirs,
separate logs, separate everything.

I enabled makedelta on B.

This worked except for notifying the B->C sync of the change, so I set the
kick trigger on the tables on database B to ENABLE ALWAYS. Then I had
cascading replication.

3) I set up one bucardo run with two syncs, one from A->B and one from
B->C. Again, I enabled makedelta on B.

Because the syncs were on different databases, I was unable to create the
second herd. I got an error about all the tables in a relgroup needing to
be from the same database.

I tracked the cause of this down to the herdcheck trigger function. By
changing the logic in that function, I was able to get the herd created.
The original herdcheck logic looks like this:

*-- All goats in a herd must be from the same databasePERFORM herd FROM
herdmap h, goat g WHERE h.goat=g.id <http://g.id> GROUP BY 1 HAVING
a relgroup must be from the same database';END IF;*


I replaced

*RAISE EXCEPTION 'All tables must within a relgroup must be from the same



And then it simply didn't insert the rows that would violate the condition.
And then cascading replication worked.

But both solutions (2) and (3) feel like I'm working against Bucardo
instead of with it. There might also be consequences that I'm not aware of.
Is there a "Bucardo" way to do what I want?

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://bucardo.org/pipermail/bucardo-general/attachments/20210409/c3c12505/attachment.htm>

More information about the Bucardo-general mailing list