Re: Re: What to do if space for database decrease and no additional hard drive is possible? - Mailing list pgsql-general

From Greg Smith
Subject Re: Re: What to do if space for database decrease and no additional hard drive is possible?
Date
Msg-id 4C4DDED6.50000@2ndquadrant.com
Whole thread Raw
In response to Re: Re: What to do if space for database decrease and no additional hard drive is possible?  ("A. Kretschmer" <andreas.kretschmer@schollglas.com>)
List pgsql-general
A. Kretschmer wrote:
> buy external USB-Drive, and create a new tablespace, and move some large
> table into this new tablespace and/or use the new tablespace for new
> tables. You can also use table-partitioning with different tablespaces.
>

There are zero USB drives on the market I'd trust to put a database on.
That interface was not designed with things like the proper write
caching controls needed for reliable operation.

There are some eSATA ones that might be useful for this purpose.  Those
are essentially no different than directly connecting a drive.  Note
that you have to be concerned about redundancy when you start doing this
sort of thing.  External drives are more fragile than internal
ones--there's a reason why the warranties are usually much shorter.

As for the original question here, I would look for tables that might
have lots of dead space on them (located via VACUUM VERBOSE or
pg_stat_user_tables) and run CLUSTER on them to try and reclaim some
space, *before* you run out completely.  Once space is extremely
limited, it becomes dramatically more difficult to reclaim it using that
approach.

--
Greg Smith  2ndQuadrant US  Baltimore, MD
PostgreSQL Training, Services and Support
greg@2ndQuadrant.com   www.2ndQuadrant.us


pgsql-general by date:

Previous
From: Scott Frankel
Date:
Subject: Re: sql dump
Next
From: Scott Marlowe
Date:
Subject: Re: What to do if space for database decrease and no additional hard drive is possible?