Autovacuum maintenance window (was Re: Adjust autovacuum naptime automatically)

From: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
To: "Matthew T(dot) O'Connor" <matthew(at)zeut(dot)net>
Cc: ITAGAKI Takahiro <itagaki(dot)takahiro(at)oss(dot)ntt(dot)co(dot)jp>, pgsql-hackers(at)postgresql(dot)org, pgsql-patches(at)postgresql(dot)org
Subject: Autovacuum maintenance window (was Re: Adjust autovacuum naptime automatically)
Date: 2006-08-17 15:21:44
Message-ID: 20060817152144.GO318@alvh.no-ip.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches

Matthew T. O'Connor wrote:

> My vision of the maintenance window has always been very simple, that
> is, during the maintenance window the thresholds get reduced by some
> factor (probably a GUC variable) so during the day it might take 10000
> updates on a table to cause a vacuum but during the naptime it might be
> 10% of that, 1000. Is this in-line with what others were thinking?

My vision is a little more complex than that. You define group of
tables, and separately you define time intervals. For each combination
of group and interval you can configure certain parameters, like a
multiplier for the autovacuum thresholds and factors; and also the
"enable" bit. So you can disable vacuum for some intervals, and refine
the equation factors for some others. This is all configured in tables,
not in GUC, so you have more flexibility in choosing stuff for different
groups of tables (say, you really want the small-but-high-update tables
to be still vacuumed even during peak periods, but you don't want that
big fat table to be vacuumed at all during the same period).

I had intended to work on this during the code sprint, but got
distracted. I intend to do it for 8.3 instead.

--
Alvaro Herrera http://www.CommandPrompt.com/
The PostgreSQL Company - Command Prompt, Inc.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Josh Berkus 2006-08-17 15:30:01 Re: BugTracker (Was: Re: 8.2 features status)
Previous Message Chris Mair 2006-08-17 15:18:16 Re: selecting large result sets in psql using cursors

Browse pgsql-patches by date

  From Date Subject
Next Message Matthew T. O'Connor 2006-08-17 15:50:24 Re: [HACKERS] Autovacuum maintenance window (was Re: Adjust autovacuum
Previous Message Chris Mair 2006-08-17 15:18:16 Re: selecting large result sets in psql using cursors