Re: Re: What to do if space for database decrease and no additional hard drive is possible?

From: Greg Smith <greg(at)2ndquadrant(dot)com>
To: "A(dot) Kretschmer" <andreas(dot)kretschmer(at)schollglas(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Re: What to do if space for database decrease and no additional hard drive is possible?
Date: 2010-07-26 19:15:34
Message-ID: 4C4DDED6.50000@2ndquadrant.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)2ndQuadrant(dot)com www.2ndQuadrant.us

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Scott Marlowe 2010-07-26 19:31:39 Re: What to do if space for database decrease and no additional hard drive is possible?
Previous Message Scott Frankel 2010-07-26 17:19:34 Re: sql dump