Re: Autovacuum Improvements

From: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
To: Glen Parker <glenebob(at)nwlink(dot)com>
Cc: Postgres General <pgsql-general(at)postgresql(dot)org>
Subject: Re: Autovacuum Improvements
Date: 2006-12-20 01:25:50
Message-ID: 20061220012550.GW3036@alvh.no-ip.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-hackers

Glen Parker wrote:
> >The idea that has been discussed in the past is the concept of
> >maintenance windows, that is for any given period of time, you can set
> >different vacuum thresholds. So at night you might make the thresholds
> >very low so that nearly everything gets vacuumed but during the day you
> >might only vacuum when something really needs it. This accomplishes
> >what you are asking for in a more general way that can accommodate a
> >wide variety of usage patterns.
>
> That really seems like something that, if it's powerful, would also be
> very complicated. If the autovacuum system could just call a user
> defined function, all the complexity could be dropped back into the
> admin's lap (which is fine with me :-).

I have a quote by Larry Wall about something similar:

"In fact, the basic problem with Perl 5's subroutines is that they're
not crufty enough, so the cruft leaks out into user-defined code
instead, by the Conservation of Cruft Principle."
(Larry Wall, Apocalypse 6)

With the system described above, you can have it very simple by just not
configuring anything. Or you can have a very complex scenario involving
holidays and weekends and off-hours and "the two hours of the month when
you do all the nasty stuff" by doing a very elaborate and complicated
setup. Or you could have a middle ground just defining "off hours"
(weekends and nights) which would be just a couple of commands.

--
Alvaro Herrera http://www.CommandPrompt.com/
PostgreSQL Replication, Consulting, Custom Development, 24x7 support

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Matthew O'Connor 2006-12-20 01:33:59 Re: Autovacuum Improvements
Previous Message Alvaro Herrera 2006-12-20 01:18:19 Re: Autovacuum Improvements

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Eisentraut 2006-12-20 01:33:41 Re: effective_cache_size vs units
Previous Message Tom Dunstan 2006-12-20 01:23:02 Re: Enums patch v2