X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id 7D6FF9FA38E for ; Wed, 17 May 2006 18:33:26 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.208.251]) (amavisd-new, port 10024) with ESMTP id 33717-03 for ; Wed, 17 May 2006 18:33:19 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from noel.decibel.org (noel.decibel.org [67.100.216.10]) by postgresql.org (Postfix) with ESMTP id 093FD9FA2C8 for ; Wed, 17 May 2006 18:33:19 -0300 (ADT) Received: by noel.decibel.org (Postfix, from userid 1001) id 6FB3956437; Wed, 17 May 2006 16:33:17 -0500 (CDT) Received: (hashcash-sendmail, from uid 1001); Wed, 17 May 2006 16:33:16 -0500 Date: Wed, 17 May 2006 16:33:16 -0500 From: "Jim C. Nasby" To: Sriram Dandapani Cc: Alvaro Herrera , pgsql-admin@postgresql.org Subject: Re: autovacuum for large periodic deletes Message-ID: <20060517213316.GB42612@pervasive.com> References: <6992E470F12A444BB787B5C937B9D4DF045AF177@ca-mail1.cis.local> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <6992E470F12A444BB787B5C937B9D4DF045AF177@ca-mail1.cis.local> X-Operating-System: FreeBSD 6.0-RELEASE-p4 amd64 X-Distributed: Join the Effort! http://www.distributed.net User-Agent: Mutt/1.5.11 X-Hashcash: 1:20:060517:sdandapani@counterpane.com::nPurUUGhqqiM8VS4:00000000000 0000000000000000000000000lVY X-Hashcash: 1:20:060517:alvherre@commandprompt.com::cuiMzxKqDWJma02n:00000000000 0000000000000000000000000zNA X-Hashcash: 1:20:060517:pgsql-admin@postgresql.org::1N4Ce3+avxt99Zcy:00000000000 0000000000000000000000001sf2 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200605/242 X-Sequence-Number: 21774 On Wed, May 17, 2006 at 01:39:35PM -0700, Sriram Dandapani wrote: > About 5-10 million rows stay after deletion. There are a few other > tables where the daily deletion totals about 3-6 million. The default autovac settings will only vacuum a table after 40% of the rows are dead. That seems pretty high to me, so I regularly recommend cutting all the thresholds and scale factors in half. > Would a vacuum full/cluster affect other operations. These tables have a > 24x7 high data insertion rate. VACUUM FULL and CLUSTER both aquire exclusive locks. BTW, it sounds like table partitioning might be useful for you. It would allow you to setup a partition for each day, and then drop one day's worth of data very quickly. -- Jim C. Nasby, Sr. Engineering Consultant jnasby@pervasive.com Pervasive Software http://pervasive.com work: 512-231-6117 vcard: http://jim.nasby.net/pervasive.vcf cell: 512-569-9461