Re: safelly erasing dirs/files

From: Greg Stark <gsstark(at)mit(dot)edu>
To: Joao Ferreira gmail <joao(dot)miguel(dot)c(dot)ferreira(at)gmail(dot)com>
Cc: pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: Re: safelly erasing dirs/files
Date: 2009-11-14 20:12:11
Message-ID: 407d949e0911141212r1bc6bd21q5edbbadc4e9fd885@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Sat, Nov 14, 2009 at 7:42 PM, Joao Ferreira gmail
<joao(dot)miguel(dot)c(dot)ferreira(at)gmail(dot)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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Andreas Kretschmer 2009-11-14 20:44:46 Re: 8.5devel: alter constraint ?
Previous Message Jeff Davis 2009-11-14 20:04:04 Re: 8.5devel: alter constraint ?