Received: from maia.hub.org (unknown [200.46.204.183]) by mail.postgresql.org (Postfix) with ESMTP id 9797765A01A for ; Mon, 15 Mar 2010 19:35:57 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 41804-06 for ; Mon, 15 Mar 2010 22:35:46 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from spinlock.commandprompt.com (host-215.commandprompt.net [207.173.203.215]) by mail.postgresql.org (Postfix) with ESMTP id 29613659FA6 for ; Mon, 15 Mar 2010 19:35:46 -0300 (ADT) Received: from localhost (localhost [127.0.0.1]) by spinlock.commandprompt.com (Postfix) with ESMTP id 7DFCB34803D; Mon, 15 Mar 2010 15:35:45 -0700 (PDT) Received: from spinlock.commandprompt.com ([127.0.0.1]) by localhost (spinlock.commandprompt.com.commandprompt.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id AkyQe4MeCGXs; Mon, 15 Mar 2010 15:35:45 -0700 (PDT) Received: from perhan.alvh.no-ip.org (200-85-214-83.bk4-dsl.surnet.cl [200.85.214.83]) by spinlock.commandprompt.com (Postfix) with ESMTPSA id 1926C34803A; Mon, 15 Mar 2010 15:35:45 -0700 (PDT) Received: by perhan.alvh.no-ip.org (Postfix, from userid 1000) id 2C7EC6E8D4; Mon, 15 Mar 2010 19:35:43 -0300 (CLST) Date: Mon, 15 Mar 2010 19:35:43 -0300 From: Alvaro Herrera To: Scott Whitney Cc: pgsql-admin@postgresql.org Subject: Re: Autovac vs manual with analyze Message-ID: <20100315223543.GH3323@alvh.no-ip.org> References: <18735708.169861268677235843.JavaMail.root@zimbra.int.journyx.com> <896915.170461268681046161.JavaMail.root@zimbra.int.journyx.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <896915.170461268681046161.JavaMail.root@zimbra.int.journyx.com> User-Agent: Mutt/1.5.20 (2009-06-14) X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-2.599 tagged_above=-10 required=5 tests=BAYES_00=-2.599 X-Spam-Level: X-Archive-Number: 201003/104 X-Sequence-Number: 33903 Scott Whitney wrote: > So, my questions are: > > a) Is the manual vacuum needed for performance reasons, or is auto-vac sufficient? > b) How do my settings look? > c) Is there a way that the clogs get cleared via autovac, would a full vac of just template1/template0 (if that last is possible) do it? > Autovacuum should be sufficient, provided that the FSM settings are large enough to hold 20% (plus a bit of slack) of your database total size in dead tuples. If they are not, your database starts to bloat and you need ugly hacks like vacuum full to recover the dead space. In 8.1, clog is only cleared by database-wide vacuums, which IIRC autovac doesn't do unless it does a for-Xid-wraparound run, which is not often. Probably a weekly database-wide vacuum (not full, i.e. vacuumdb without -f) is enough. -- Alvaro Herrera http://www.CommandPrompt.com/ The PostgreSQL Company - Command Prompt, Inc.