Received: from localhost (maia-5.hub.org [200.46.204.182]) by postgresql.org (Postfix) with ESMTP id C21619FB642 for ; Thu, 25 Jan 2007 11:54:31 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.182]) (amavisd-new, port 10024) with ESMTP id 28479-04 for ; Thu, 25 Jan 2007 11:54:21 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey-1.7.4 Received: from noel.decibel.org (noel.decibel.org [67.100.216.10]) by postgresql.org (Postfix) with ESMTP id 14A6D9FB590 for ; Thu, 25 Jan 2007 11:54:27 -0400 (AST) Received: by noel.decibel.org (Postfix, from userid 1001) id 589B75648C; Thu, 25 Jan 2007 09:54:26 -0600 (CST) Received: (hashcash-sendmail, from uid 1001); Thu, 25 Jan 2007 09:54:24 -0600 Date: Thu, 25 Jan 2007 09:54:24 -0600 From: "Jim C. Nasby" To: Tomas Vondra Cc: pgsql-performance@postgresql.org Subject: Re: how to plan for vacuum? Message-ID: <20070125155424.GG64372@nasby.net> References: <45B6F0A8.1050705@oss.ntt.co.jp> <20070125033917.GD64372@nasby.net> <45B8602E.7000606@fuzzy.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <45B8602E.7000606@fuzzy.cz> X-Operating-System: FreeBSD 6.1-RELEASE-p10 amd64 X-Distributed: Join the Effort! http://www.distributed.net User-Agent: Mutt/1.5.13 (2006-08-11) X-Hashcash: 1:20:070125:tv@fuzzy.cz::OQeJV62kI6GVMA2L:0000000uq7 X-Hashcash: 1:20:070125:pgsql-performance@postgresql.org::DRvzUy9qLpVZKlVo:00000 0000000000000000000000004DuB X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200701/370 X-Sequence-Number: 22971 Please cc the list so others can reply as well... On Thu, Jan 25, 2007 at 08:45:50AM +0100, Tomas Vondra wrote: > > On Wed, Jan 24, 2007 at 02:37:44PM +0900, Galy Lee wrote: > >> 1. How do we know if autovacuum is enough for my application, or should > >> I setup a vacuum manually from cron for my application? > > > > Generally I trust autovac unless there's some tables where it's critical > > that they be vacuumed frequently, such as a queue table or a web session > > table. > > You can tune thresholds and scale factors for that particular table > using pg_autovacuum. If you lower them appropriately, the vacuum will be > fired more often for that table - but don't lower them too much, just go > step by step until you reach values that are fine for you. That doesn't work well if autovac gets tied up vacuuming a very large table. Granted, when that happens there are considerations about the long-running vacuum transaction (prior to 8.2), but in many systems you'll still get some use out of other vacuums. -- Jim C. Nasby, Database Architect jim@nasby.net 512.569.9461 (cell) http://jim.nasby.net