Re: safelly erasing dirs/files

Поиск
Список
Период
Сортировка
От Greg Stark
Тема Re: safelly erasing dirs/files
Дата
Msg-id 407d949e0911141212r1bc6bd21q5edbbadc4e9fd885@mail.gmail.com
обсуждение исходный текст
Ответ на Re: safelly erasing dirs/files  (Joao Ferreira gmail <joao.miguel.c.ferreira@gmail.com>)
Список 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 по дате отправления:

Предыдущее
От: Jeff Davis
Дата:
Сообщение: Re: 8.5devel: alter constraint ?
Следующее
От: Andreas Kretschmer
Дата:
Сообщение: Re: 8.5devel: alter constraint ?