[Bucardo-general] Running maintenance routines inside of Bucardo

Jon Jensen jon at endpoint.com
Wed Dec 16 08:55:22 UTC 2009


On Fri, 11 Dec 2009, Selena Deckelmann wrote:

> We've got this todo item:
>
> - Have Bucardo do the cleanups based on PG version, rather than cronjobs
>   (e.g. vacuum pg_listener, purge_bucardo_delta)
>
> I started thinking it through, and am wondering: Which process (or processes) should take care of
> these maintenance routines?
>
> I whittled down the universe of possibilities to:
>
> * Have maintenance routines run as special type of KID
> -- PROs: independent, easy to clean up
> -- CONs: Extra connections to the databases

The extra connections to the databases would be only in comparison to a 
nonexistent ideal, right? Because current cron jobs for maintenance do 
require extra connections anyway.

This is the way I'd lean -- separate and less likely to interfere with 
other things and complicate the already complex kid code.

> * Have maintenance routines run inside of KIDs
> -- PROs: Already have all the database handles
> -- CONs: (maybe) not very modular; might bog down syncs/slow down replication

One possible counter to the "separate and simpler" note above is that 
having maintenance run inside of a kid would mean the kid wouldn't be 
contending for locks on the same rows, etc. during maintenance. It's 
possible it's better to have the kid wait till maintenance is done.

Jon


-- 
Jon Jensen
End Point Corporation
http://www.endpoint.com/


More information about the Bucardo-general mailing list