Re: Disk is full, what's cool to get rid of?

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Disk is full, what's cool to get rid of?
Дата
Msg-id 4529.1154032565@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Disk is full, what's cool to get rid of?  (Andrew Sullivan <ajs@crankycanuck.ca>)
Ответы Re: Disk is full, what's cool to get rid of?  (Erik Jones <erik@myemma.com>)
Список pgsql-sql
Andrew Sullivan <ajs@crankycanuck.ca> writes:
> If the data isn't critical, you maybe could truncate a table to clear
> enough space.  Deleting anything under pg_xlog is more or less
> guaranteed to mean your database is garbage.

If you're desperate you could shut down the postmaster, run
pg_resetxlog, restart the postmaster.  This would cut xlog contents
to the minimum --- however, they'd probably soon grow back to whatever
they are now, so it's not much of a long-term solution.  It might give
you some breathing room to look for other places to trim though.

If the database hasn't been maintained well then you likely are
suffering from table bloat and/or index bloat.  A desperation measure
for fixing that is drop all indexes, vacuum full, recreate all indexes.
(There are other procedures you may find recommended, such as CLUSTER,
but they have transient disk-space requirements that you're not gonna
be able to afford when your back is to the wall.)
        regards, tom lane


В списке pgsql-sql по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: PostgreSQL server terminated by signal 11
Следующее
От: "Wilkinson Charlie E"
Дата:
Сообщение: Re: Disk is full, what's cool to get rid of?