Received: from localhost (unknown [200.46.204.183]) by mail.postgresql.org (Postfix) with ESMTP id 2D2C464FD5F for ; Wed, 17 Dec 2008 11:54:52 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 00627-10 for ; Wed, 17 Dec 2008 11:54:49 -0400 (AST) X-Greylist: delayed 00:25:18.377186 by SQLgrey-1.7.6 Received: from tigger.fuhr.org (72-55-215-38.mammothnetworks.com [72.55.215.38]) by mail.postgresql.org (Postfix) with ESMTP id 4C61F64FD3B for ; Wed, 17 Dec 2008 11:54:49 -0400 (AST) Received: from winnie.fuhr.org (winnie.fuhr.org [10.1.0.1]) by tigger.fuhr.org (8.13.8/8.13.8) with ESMTP id mBHFT48v093129 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Wed, 17 Dec 2008 08:29:07 -0700 (MST) Received: from winnie.fuhr.org (localhost [127.0.0.1]) by winnie.fuhr.org (8.14.2/8.14.2) with ESMTP id mBHFT4dU037611; Wed, 17 Dec 2008 08:29:04 -0700 (MST) (envelope-from mfuhr@winnie.fuhr.org) Received: (from mfuhr@localhost) by winnie.fuhr.org (8.14.2/8.14.2/Submit) id mBHFT4pj037610; Wed, 17 Dec 2008 08:29:04 -0700 (MST) (envelope-from mfuhr) Date: Wed, 17 Dec 2008 08:29:03 -0700 From: Michael Fuhr To: Tom Lane Cc: John Lister , pgsql-admin@postgresql.org Subject: Re: controlling autovacuum during the day. Message-ID: <20081217152903.GA37436@winnie.fuhr.org> References: <2BB7361E57C4417A975C0474610BA4C3@squarepi.com> <27759.1229521625@sss.pgh.pa.us> <742A9D77A1BA4171AF52BBBF6F5F2C75@squarepi.com> <28510.1229525243@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <28510.1229525243@sss.pgh.pa.us> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.1 tagged_above=0 required=5 tests=RDNS_DYNAMIC=0.1 X-Spam-Level: X-Archive-Number: 200812/130 X-Sequence-Number: 30963 On Wed, Dec 17, 2008 at 09:47:23AM -0500, Tom Lane wrote: > "John Lister" 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. -- Michael Fuhr