From: | Brad Nicholson <bnichols(at)ca(dot)afilias(dot)info> |
---|---|
To: | Alvaro Herrera <alvherre(at)commandprompt(dot)com> |
Cc: | Michael Fuhr <mike(at)fuhr(dot)org>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, John Lister <john(dot)lister-ps(at)kickstone(dot)com>, pgsql-admin(at)postgresql(dot)org |
Subject: | Re: controlling autovacuum during the day. |
Date: | 2008-12-17 19:35:51 |
Message-ID: | 1229542551.6302.13.camel@bnicholson-desktop |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-admin |
On Wed, 2008-12-17 at 13:31 -0300, Alvaro Herrera wrote:
> Michael Fuhr wrote:
> > On Wed, Dec 17, 2008 at 09:47:23AM -0500, Tom Lane wrote:
> > > "John Lister" <john(dot)lister-ps(at)kickstone(dot)com> writes:
> > > > Cheers for the quick reply. I've tweaked them quite a bit, but we have quite
> > > > a few heavily updated tables that i'd like vacuuming to keep them in check.
> > > > Unfortunately the autovacuum does a FULL vacuum every so often locking the
> > > > tables for quite a long time, i'd like to move these to the evening if
> > > > possible.
> > >
> > > Huh? Autovacuum *never* does VACUUM FULL.
> >
> > Perhaps autovacuum is shrinking the table after finding lots of empty
> > pages at the end, as in what VACUUM VERBOSE is logging here:
> >
> > INFO: "foo": truncated 11944384 to 8877366 pages
> >
> > I think this acquires an AccessExclusiveLock. I've seen this take
> > hours in the case of a table with a lot of empty pages.
>
> There was a bug in earlier versions which caused lazy vacuum to do
> cost-based delays during this phase, which caused the lock to be held
> for ridiculous lengths of time. This was fixed in 8.2.something; it
> shouldn't sleep anymore, but it does need to scan those pages in order
> to truncate, so it can still take a while.
Does this mean that if you are using autovac on 8.1, you should not use
the cost delay feature?
--
Brad Nicholson 416-673-4106
Database Administrator, Afilias Canada Corp.
From | Date | Subject | |
---|---|---|---|
Next Message | Alvaro Herrera | 2008-12-17 19:46:38 | Re: controlling autovacuum during the day. |
Previous Message | salman | 2008-12-17 16:43:56 | PITR - archive_status/%p.done files |