From: Kevin Grittner <Kevin.Grittner@wicourts.gov>
To: David Ondrejik <David.Ondrejik@noaa.gov>
To: pgsql-admin <pgsql-admin@postgresql.org>
Subject: Re: vacuumdb question/problem
Date: Thu, 21 Jul 2011 15:03:09 -0500
Message-ID: <4E283FAD020000250003F66D@gw.wicourts.gov> (raw)
In-Reply-To: <4E287A0C.5090501@noaa.gov>
References: <4E283B55.5080206@noaa.gov>
<4E2805B4020000250003F657@gw.wicourts.gov>
<4E287A0C.5090501@noaa.gov>
David Ondrejik <David.Ondrejik@noaa.gov> 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-admin@postgresql.org
Cc: Kevin.Grittner@wicourts.gov, David.Ondrejik@noaa.gov
Subject: Re: vacuumdb question/problem
In-Reply-To: <4E283FAD020000250003F66D@gw.wicourts.gov>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox