Re: BUG #5480: Autovacuum interferes with operations (e.g. truncate) on very large databases - Mailing list pgsql-bugs

From Greg Stark
Subject Re: BUG #5480: Autovacuum interferes with operations (e.g. truncate) on very large databases
Date
Msg-id AANLkTikcUljpZfqzqlyoSnFr4YSrA22G2WOHbgRrE8xA@mail.gmail.com
Whole thread Raw
In response to BUG #5480: Autovacuum interferes with operations (e.g. truncate) on very large databases  ("Sakari Maaranen" <sam@iki.fi>)
Responses Re: BUG #5480: Autovacuum interferes with operations (e.g. truncate) on very large databases  ("Sakari A. Maaranen" <sam@iki.fi>)
List pgsql-bugs
On Fri, May 28, 2010 at 2:02 PM, Sakari Maaranen <sam@iki.fi> wrote:
> The documentation says that the best way to use autovacuum is to let the
> database vacuum often. However when the tables are very large, this can take
> a very long time.
>

In addition to Tom's comments, as of 8.4 this is no longer true as
well. The running time of VACUUM should be related to the amount of
the table which has been dirtied, not the total size of the table.

It's not perfect (yet) though. If you have large indexes they have to
be scanned as well, and periodically a vacuum freeze has to happen
which does have to scan the whole table but that's at a much longer
interval than the frequent vacuums.

--
greg

pgsql-bugs by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: BUG #5469: regexp_matches() has poor behaviour and more poor documentation
Next
From: "Kevin Grittner"
Date:
Subject: Re: BUG #5477: CREATE DOMAIN NOT NULL constraints not always enforced for INSERT with subquery