Received: from maia.hub.org (unknown [200.46.208.211]) by mail.postgresql.org (Postfix) with ESMTP id 64094634407 for ; Mon, 5 Apr 2010 01:09:04 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.208.211]) (amavisd-maia, port 10024) with ESMTP id 90441-09 for ; Mon, 5 Apr 2010 04:08:53 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from qw-out-2122.google.com (qw-out-2122.google.com [74.125.92.25]) by mail.postgresql.org (Postfix) with ESMTP id ACC846343DD for ; Mon, 5 Apr 2010 01:08:53 -0300 (ADT) Received: by qw-out-2122.google.com with SMTP id 8so1239530qwh.61 for ; Sun, 04 Apr 2010 21:08:52 -0700 (PDT) Received: by 10.229.230.65 with SMTP id jl1mr8513873qcb.7.1270440532738; Sun, 04 Apr 2010 21:08:52 -0700 (PDT) Received: from [192.168.1.254] ([121.246.205.20]) by mx.google.com with ESMTPS id w30sm4689389qce.16.2010.04.04.21.08.50 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sun, 04 Apr 2010 21:08:52 -0700 (PDT) Message-ID: <4BB9624D.7010600@itech7.com> Date: Mon, 05 Apr 2010 09:38:45 +0530 From: Nilesh Govindarajan User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.9) Gecko/20100330 Shredder/3.0.4 MIME-Version: 1.0 To: Scott Marlowe CC: pgsql-admin@postgresql.org Subject: Re: Execute VACUUM FULL when DB touches a specific size ? References: <4BB94934.3050709@itech7.com> In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-0.703 tagged_above=-10 required=5 tests=AWL=-0.704, BAYES_50=0.001 X-Spam-Level: X-Archive-Number: 201004/23 X-Sequence-Number: 34117 On 04/05/10 08:54, Scott Marlowe wrote: > On Sun, Apr 4, 2010 at 8:21 PM, Nilesh Govindarajan wrote: >> Hi, >> >> I wish to execute VACUUM FULL when DB touches a specific size. How to do it >> ? >> >> I'm aware about the caveats of VACUUM FULL. >> > > Write a bash script that cds to the data dir and runs du -s, grabs the > value, and if it's over a certain size then run vacuum full. That's what I was thinking to do, but how do I distinguish between the databases ? The datadir/base seems have directories whose names are numbers. -- Nilesh Govindarajan Site & Server Administrator www.itech7.com मेरा भारत महान ! मम भारत: महत्तम भवतु !