Alvaro Herrera wrote:


Here is a first cut at autovacuum integration.  Please have a look at
it.  Note that this patch automatically creates three new files:

Couple more things that I didn't think about while we were talking about this the other day.

XID wraparound: The patch as submitted doesn't handle XID wraparound issues. The old contrib autovacuum would do an XID wraparound check as it's 1st operation upon connecting to a database. If XID wraparound was looks like it's going to be a problem soon, then the whole database would be vacuumed, eliminating the need to check specific tables.

Better logging of autovacuum activity: I think the we could use some more detail in the debug elog statements. For example showing exactly what autovacuum believes the threshold and current count is.

How to deal with shared relations: As an optimization, the contrib version of autovacuum treated shared relations different than it treated the rest when connected to any database that is not template1. That is, when connected to a DB other than template1, autovacuum would not issue vacuum commands. rather it would only issue analyze commands. When autovacuum got around to connecting to template1, it would then issue the vacuum command. The hope was that this would reducing a shared relation from getting vacuumed n times (where n is the number of databases in a cluster) whenever it crossed over it's threshold. I'm not sure if this optimizaion is really important, or even exactly correct.

---------------------------(end of broadcast)---------------------------
TIP 4: Don't 'kill -9' the postmaster

Reply via email to