Re: safelly erasing dirs/files - Mailing list pgsql-general

From Greg Stark
Subject Re: safelly erasing dirs/files
Date
Msg-id 407d949e0911141212r1bc6bd21q5edbbadc4e9fd885@mail.gmail.com
Whole thread Raw
In response to Re: safelly erasing dirs/files  (Joao Ferreira gmail <joao.miguel.c.ferreira@gmail.com>)
List pgsql-general
On Sat, Nov 14, 2009 at 7:42 PM, Joao Ferreira gmail
<joao.miguel.c.ferreira@gmail.com> wrote:
> vacuum/reindex is saying: I can't do it cause I have no space :(

Hm, vacuum shouldn't require any extra space. I suppose you need
enough space for the transaction log though. You can probably get away
with a pretty small amount of extra space. Try removing older stuff
from /var/log/ to make some extra space or using tune2fs -m (or tunefs
-m on bsd i think) to lower the reserved percentage then run vacuum.
reindex will require a lot of extra space though.

Better is probably to create a new tablespace on a new filesystem and
do ALTER TABLE SET TABLESPACE and ALTER INDEX SET TABLESPACE to the
new tablespace. Then CLUSTER the table in the new tablespace to
compact it. Cluster needs enough space to hold the old and new table
at the same time but when it's done it'll have compacted both the
table and the indexes better than vacuum does.


--
greg

pgsql-general by date:

Previous
From: Jeff Davis
Date:
Subject: Re: 8.5devel: alter constraint ?
Next
From: Andreas Kretschmer
Date:
Subject: Re: 8.5devel: alter constraint ?