[Bucardo-general] Bad Plan for Bucardo Query

David Christensen david at endpoint.com
Tue Sep 24 16:25:19 UTC 2019


> Anyone run into something like this before? Can we adjust the table statistics to fix the problem?
> 
> Oh, and why are there so many records in the deltas table? I thought bucardo cleaned records out once replication completed.

This particular sentence stands out to me; if the delta tables are not getting cleaned out then I would expect some sort of eventual performance penalty as records just stacked up.  Bucardo is supposed to clean these up itself, but it will keep delta rows around if there are multiple targets that it thinks it still needs to replicate to; I would assume you’ve already checked if there are old targets in-place in the bucardo_delta_targets table?

The cleanup function runs from bucardo_purge_delta_oid(), which has the logic for cleanup of the delta tables based on track tables and dbgroups.  I’d try running some of those queries manually and seeing if you can find out why it’s not purging the records in question; not sure if it could have to do with some of the custom conflict handling logic changing records in such a way that the matching conditions aren’t working, but that or some old data that makes bucardo think it needs to hang onto seem like possible suspects here.

HTH,

David
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: Message signed with OpenPGP
URL: <https://bucardo.org/pipermail/bucardo-general/attachments/20190924/26db4469/attachment.sig>


More information about the Bucardo-general mailing list