Re: BUG #5480: Autovacuum interferes with operations (e.g. truncate) on very large databases

From: Greg Stark <gsstark(at)mit(dot)edu>
To: Sakari Maaranen <sam(at)iki(dot)fi>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #5480: Autovacuum interferes with operations (e.g. truncate) on very large databases
Date: 2010-05-29 13:59:52
Message-ID: AANLkTikcUljpZfqzqlyoSnFr4YSrA22G2WOHbgRrE8xA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Fri, May 28, 2010 at 2:02 PM, Sakari Maaranen <sam(at)iki(dot)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

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Kevin Grittner 2010-05-29 14:17:51 Re: BUG #5477: CREATE DOMAIN NOT NULL constraints not always enforced for INSERT with subquery
Previous Message Pascal Van Puymbroeck 2010-05-29 13:20:36 BUG #5483: PQescapeStringConn behaviour ??