Hi team, Today I have noticed that for Cascaded Slave Replication, there is something to do with bucardo_purge_delta function.
Scenario: Table A (master) => Table B (slave) => Table C (cascaded slave) Every change on A replicated to B then to C. After a while, VAC successfully clean delta and track tables on A, but not on B. Table B is listed only one on bucardo.bucardo_delta_targets. While, bucardo registered 2 records on track table, both for A->B and B->C syncs. That is why delta and track records never cleaned up by this SQL in the bucardo_purge_delta function (drows is 1 taken from bucardo.bucardo_delta_targets): 'DELETE FROM bucardo.' || deltatable || ' USING (SELECT txntime AS tt FROM bucardo.' || tracktable || ' GROUP BY 1 HAVING COUNT(*) = ' || drows || ') AS foo' || ' WHERE txntime = tt' || ' AND txntime < now() - interval ' || quote_literal($1); I managed to fix it by modify filter from [HAVING COUNT(*)=] to [HAVING COUNT(*)>=], as follows: 'DELETE FROM bucardo.' || deltatable || ' USING (SELECT txntime AS tt FROM bucardo.' || tracktable || ' GROUP BY 1 HAVING COUNT(*) >= ' || drows || ') AS foo' || ' WHERE txntime = tt' || ' AND txntime < now() - interval ' || quote_literal($1); Please advise whethre it is valid. Regards, Abdul Yadi
_______________________________________________ Bucardo-general mailing list [email protected] https://mail.endcrypt.com/mailman/listinfo/bucardo-general
