Re: Autovacuum Improvements

Glen Parker <glenebob@nwlink.com>

From: Glen Parker <glenebob@nwlink.com>
To: Postgres general mailing list <pgsql-general@postgresql.org>
Date: 2006-12-19T21:19:39Z
Lists: pgsql-hackers
> 1) Allow multiple "autovacuum workers":  Currently Autovacuum is only 
> capable of ordering one vacuum command at a time, for most work loads 
> this is sufficient but falls down when a hot (very actively updated 
> table) goes unvacuumed for a long period of time because a large table 
> is currently being worked on.
> 
> 2) Once we can have multiple autovacuum workers: Create the concept of 
> hot tables that require more attention and should never be ignored for 
> more that X minutes, perhaps have one "autovacuum worker" per hot table? 
> (What do people think of this?)
> 
> 3) Create "Maintenance Windows" for autovacuum: Currently autovacuum 
> makes all of it's decisions based on a single per-table threshold value, 
> maintenance windows would allow the setting of a per-window, per-table 
> threshold.  This makes it possible to, for example, forbid (or strongly 
> discourage) autovacuum from doing maintenance work during normal 
> business hours either for the entire system or for specific tables.
> 
> None of those three items are on the todo list, however I think there is 
> general consensus that they (at least 1 & 3) are good ideas.

If it isn't there somewhere already, I would ask to add:

4) Expose all information used by autovacuum to form its decisions.

5) Expose a very easy way to discover autovacuum's opinion about a 
particular table, for example "table_needs_vacuum(oid)", ignoring any 
time constraints that may be in place.

-Glen