Received: from localhost (maia-1.hub.org [200.46.204.191]) by postgresql.org (Postfix) with ESMTP id 01CF19FB24A for ; Wed, 10 Jan 2007 23:42:09 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.191]) (amavisd-new, port 10024) with ESMTP id 97222-02 for ; Wed, 10 Jan 2007 23:42:03 -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 C113F9FA2FC for ; Wed, 10 Jan 2007 23:42:03 -0400 (AST) Received: by noel.decibel.org (Postfix, from userid 1001) id 3D3EC56423; Wed, 10 Jan 2007 21:42:02 -0600 (CST) Received: (hashcash-sendmail, from uid 1001); Wed, 10 Jan 2007 21:42:00 -0600 Date: Wed, 10 Jan 2007 21:42:00 -0600 From: "Jim C. Nasby" To: Jeremy Haile , pgsql-performance@postgresql.org Subject: Re: High inserts, bulk deletes - autovacuum vs scheduled vacuum Message-ID: <20070111034159.GJ12217@nasby.net> References: <1168363601.5177.1168380907@webmail.messagingengine.com> <20070110203556.GX12217@nasby.net> <1168461780.9408.1168619515@webmail.messagingengine.com> <20070110212125.GZ12217@nasby.net> <1168465722.17889.1168630713@webmail.messagingengine.com> <20070111012709.GG12217@nasby.net> <20070111031034.GG15378@alvh.no-ip.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20070111031034.GG15378@alvh.no-ip.org> 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:070111:jhaile@fastmail.fm::LS03fIN4Pl0PbPIu:0000000000000000000 0000000000000000000000004ARt X-Hashcash: 1:20:070111:pgsql-performance@postgresql.org::t9s3gBkl5iVIa/J5:00000 0000000000000000000000002z1a X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200701/165 X-Sequence-Number: 22766 On Thu, Jan 11, 2007 at 12:10:34AM -0300, Alvaro Herrera wrote: > Jim C. Nasby wrote: > > > > Is the best way to do that usually to lower the scale factors? Is it > > > ever a good approach to lower the scale factor to zero and just set the > > > thresholds to a pure number of rows? (when setting it for a specific > > > table) > > > > The problem is what happens if autovac goes off and starts vacuuming > > some large table? While that's going on your queue table is sitting > > there bloating. If you have a separate cronjob to handle the queue > > table, it'll stay small, especially in 8.2. > > You mean "at least in 8.2". In previous releases, you could vacuum > that queue table until you were blue on the face, but it would achieve > nothing because it would consider that the dead tuples were visible to a > running transaction: that running the vacuum on the large table. This > is an annoyance that was fixed in 8.2. True, but in many environments there are other transactions that run long enough that additional vacuums while a long vacuum was running would still help. -- Jim Nasby jim@nasby.net EnterpriseDB http://enterprisedb.com 512.569.9461 (cell)