Received: from maia.hub.org (maia-3.hub.org [200.46.204.243]) by mail.postgresql.org (Postfix) with ESMTP id 9191BB5DC10 for ; Thu, 21 Jul 2011 17:03:26 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.243]) (amavisd-maia, port 10024) with ESMTP id 83758-02-7 for ; Thu, 21 Jul 2011 20:03:20 +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 2F713B5DC14 for ; Thu, 21 Jul 2011 17:03:19 -0300 (ADT) Received: from Courts-MTA by gw.wicourts.gov with Novell_GroupWise; Thu, 21 Jul 2011 15:03:18 -0500 Message-Id: <4E283FAD020000250003F66D@gw.wicourts.gov> X-Mailer: Novell GroupWise Internet Agent 8.0.1 Date: Thu, 21 Jul 2011 15:03:09 -0500 From: "Kevin Grittner" To: "David Ondrejik" , "pgsql-admin" Subject: Re: vacuumdb question/problem References: <4E283B55.5080206@noaa.gov> <4E2805B4020000250003F657@gw.wicourts.gov> <4E287A0C.5090501@noaa.gov> In-Reply-To: <4E287A0C.5090501@noaa.gov> 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.093 tagged_above=-10 required=5 tests=BAYES_00=-1.9, RP_MATCHES_RCVD=-1.193 X-Spam-Level: X-Archive-Number: 201107/159 X-Sequence-Number: 37938 David Ondrejik wrote: > I think I see a (my) fatal flaw that will cause the cluster to > fail. > Kevin Grittner stated: >> If you have room for a second copy of your data, that is almost >> always much faster, and less prone to problems. > > I looked at the sizes for the tables in the database and the table > I am trying to run the cluster on is 275G and I only have 57G > free. I don't know how much of that 275G has data in it and how > much is empty to allow for a second copy of the data. I am > guessing the cluster would fail due to lack of space. Seems quite likely although not certain, depending (as you said) on the level of bloat. > Are there any other options?? > > If I unload the table to a flat file; then drop the table from > the database; then recreate the table; and finally reload the data > - will that reclaim the space? Yeah, but you don't necessarily need to go quite that far. You can pg_dump an individual table with the -t option (to some medium where you have room), and then drop and restore the table. It would be prudent to make very sure of your dump of the table before dropping it, of course. I'm just paranoid enough to probably make sure I have an up-to-date PITR-style dump, too, before issuing the DROP TABLE command. -Kevin