David Ondrejik <David(dot)Ondrejik(at)noaa(dot)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