Received: from maia.hub.org (unknown [200.46.208.211]) by mail.postgresql.org (Postfix) with ESMTP id 02FE7632952 for ; Mon, 5 Apr 2010 00:25:22 -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 84485-03 for ; Mon, 5 Apr 2010 03:25:11 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-yw0-f184.google.com (mail-yw0-f184.google.com [209.85.211.184]) by mail.postgresql.org (Postfix) with ESMTP id B45FB6339C9 for ; Mon, 5 Apr 2010 00:24:50 -0300 (ADT) Received: by ywh14 with SMTP id 14so398047ywh.15 for ; Sun, 04 Apr 2010 20:24:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:received:message-id:subject:from:to:cc:content-type; bh=y0J5vfINzWtIduYuHQNPpOofXQdRrJML5tylLK5ZqNQ=; b=pmQfuMbtOS5h0/v4DFKPTn20lXXZMlpV1xMKWdUN7KRXUacCRx3bb87t6Pw4Zxig0Y f29zHXrH5Kbwj7IcZbSz90z+mnKo99RuRUrYhvCJddBj3zeyZ/lnhNhEQhj6vQqYykRN c18Q1DOXPuab9aq/Gf7ahVa0pKRD1Op+SRoXc= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=s/ntVNnmZ2m/K7mspXjPOTyb76hVrnSeG92fOOzzgLX9I5RHnfwbJmEb5b1Xl7risd +9/tCS3AKTSH4NQxTqS8dP1uf1UoURuQbz4MYrAA3B7FoyrOLRuxP6+0oysUxAcG5q7f 2B63Hhe55kLfr0LQchBHzi/eR9gUiQF6UScBA= MIME-Version: 1.0 Received: by 10.151.13.4 with HTTP; Sun, 4 Apr 2010 20:24:50 -0700 (PDT) In-Reply-To: <4BB94934.3050709@itech7.com> References: <4BB94934.3050709@itech7.com> Date: Sun, 4 Apr 2010 21:24:50 -0600 Received: by 10.151.28.16 with SMTP id f16mr928825ybj.124.1270437890045; Sun, 04 Apr 2010 20:24:50 -0700 (PDT) Message-ID: Subject: Re: Execute VACUUM FULL when DB touches a specific size ? From: Scott Marlowe To: Nilesh Govindarajan Cc: pgsql-admin@postgresql.org Content-Type: text/plain; charset=ISO-8859-1 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.71 tagged_above=-10 required=5 tests=AWL=-0.600, BAYES_05=-1.11 X-Spam-Level: X-Archive-Number: 201004/22 X-Sequence-Number: 34116 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.