Received: from maia.hub.org (maia-5.hub.org [200.46.204.29]) by mail.postgresql.org (Postfix) with ESMTP id C00C963347C for ; Wed, 5 May 2010 10:59:40 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.29]) (amavisd-maia, port 10024) with ESMTP id 22472-10 for ; Wed, 5 May 2010 13:59:33 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from gw.wicourts.gov (gwmta.wicourts.gov [165.219.244.99]) by mail.postgresql.org (Postfix) with ESMTP id 5B77F6322B9 for ; Wed, 5 May 2010 10:59:33 -0300 (ADT) Received: from Courts-MTA by gw.wicourts.gov with Novell_GroupWise; Wed, 05 May 2010 08:59:31 -0500 Message-Id: <4BE1336A02000025000312CE@gw.wicourts.gov> X-Mailer: Novell GroupWise Internet Agent 8.0.1 Date: Wed, 05 May 2010 08:59:21 -0500 From: "Kevin Grittner" To: "pgsql-admin@postgresql.org" , "Khangelani Gama" Subject: Re: Table space grow big - PostgreSQL References: <20100505114210.GD16616@miranda> In-Reply-To: Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Content-Disposition: inline X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-3.482 tagged_above=-10 required=5 tests=AWL=0.728, BAYES_00=-1.9, RCVD_IN_DNSWL_MED=-2.3, T_RP_MATCHES_RCVD=-0.01 X-Spam-Level: X-Archive-Number: 201005/59 X-Sequence-Number: 34532 Khangelani Gama wrote: > There is a script that runs once a month Most likely that should be daily, or at least weekly. > "REINDEX TABLE ${table}" > "VACUUM FULL VERBOSE ${table}" > "VACUUM ANALYZE ${table}" That's the wrong order. Try: "VACUUM FULL VERBOSE ANALYZE ${table}" "REINDEX TABLE ${table}" With your current order, the VACUUM FULL bloats the indexes you've just rebuilt. If you vacuum frequently enough, you should not need to use the FULL option. > Dumping and restoring the database doesn't decrease the space Now, that's odd. You're not restoring back into the same database without dropping it first (using the "clean" option), are you? Perhaps you have some very wide indexes, or a very large number of small tables? > There is nothing set in the postgresql.conf file that has to do > with vacuum analyze. Well, that wasn't the only thing I would look for; however, I'm not sure how many of the things I usually check exist in 7.3 or work the same way. :-( -Kevin