Skip site navigation (1) Skip section navigation (2)

Deadline-Based Vacuum Delay

From: Galy Lee <lee(dot)galy(at)oss(dot)ntt(dot)co(dot)jp>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Deadline-Based Vacuum Delay
Date: 2006-12-28 07:09:18
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackers

I'd like to propose a new feature, Deadline-Based Vacuum Delay, the
syntax is something like "VACUUM IN 6 HOURS".

Vacuum is a non-trivial task to be performed. The database needs to be
vacuumed before the system performance suffers from the garbage; it also
needs to ensure the system won't be hammered during the vacuum operation.

The cost-based delay vacuum can reduce the impact of the disk I/O storm,
but sometimes it can last for several hours and it is hard to know when
it will end. So there are many complains about the unpredictable
execution time of vacuum.

On the other hand, several users want to run vacuum in their maintenance
window. Also, autovacuum kicks vacuum when a certain amount of garbage
has been generated. It restricts the interval of each vacuum for a relation.

So I am thinking another way to perform vacuum. For example vacuum can
be refined in a maintenance time frame like "VACUUM IN 6 HOURS", and
then vacuum operation will be performed within the window. The delay
time is adjusted internally to spread the disk I/O over the time frame.
This may make vacuum more predictable, also ensures vacuum doesn't have
side effect on the producing system outside the maintenance window.

Any ideas or comments?

Best Regards,
Galy Lee
NTT Open Source Software Center


pgsql-hackers by date

Next:From: Heikki LinnakangasDate: 2006-12-28 07:12:43
Subject: Re: Dead Space Map for vacuum
Previous:From: ITAGAKI TakahiroDate: 2006-12-28 05:50:07
Subject: Dead Space Map for vacuum

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group