Re: Autovacuum Improvements

From: Glen Parker <glenebob(at)nwlink(dot)com>
To: Postgres general mailing list <pgsql-general(at)postgresql(dot)org>
Subject: Re: Autovacuum Improvements
Date: 2006-12-19 23:31:20
Message-ID: 45887648.5080609@nwlink.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-hackers

Matthew O'Connor wrote:
> No, how dirty a table isn't subjective, what is subjective is the
> question "Does it need to be vacuumed?". A that is 1% dirty (to use
> your term) probably doesn't *need* to be vacuumed, but you might choose
> to vacuum it anyway at least you might at night when the system isn't in
> use.

This leads me further from wanting to see a simple time contraint added.
I'd like to see something more dynamic.

Perhaps define a "dirtiness" rating, and then allow a minimum
"dirtiness" to be configured. When autovacuum wakes up, it could build
a list of sufficiently dirty tables sorted in "dirtiness" order, and
could call an optional user defined function for each one, passing it
useful bits of information including each table's "dirtiness". The
function could then decide whether to vacuum or not based on whatever
constraints the admin dreamed up.

It would then be a simple matter to expose a function that, given a
table's OID, could report its "dirtiness" level.

I think that explanation leaves room for refinement, but hopefully the
idea makes sense :-)

-Glen

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Matthew O'Connor 2006-12-19 23:54:56 Re: Autovacuum Improvements
Previous Message Peter Eisentraut 2006-12-19 23:25:27 Re: xml2 install problem

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2006-12-19 23:52:31 Re: effective_cache_size vs units
Previous Message Philip Yarra 2006-12-19 23:27:19 Re: psql: core dumped