Re: REINDEX disk space requirements

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: REINDEX disk space requirements
Дата
Msg-id 14016.1257528022@sss.pgh.pa.us
обсуждение исходный текст
Ответ на REINDEX disk space requirements  (David Schnur <dnschnur@gmail.com>)
Ответы Re: REINDEX disk space requirements  (Anj Adu <fotographs@gmail.com>)
Re: REINDEX disk space requirements  (David Schnur <dnschnur@gmail.com>)
Список pgsql-admin
David Schnur <dnschnur@gmail.com> writes:
> One large installation we're working with is seeing 'out of disk space'
> errors when performing the REINDEX.  I don't have precise numbers at the
> moment, but here's what I know:

> - Total DB size is ~100 GB
> - Size of the main table is ~60 GB (~1B rows)
> - Size of the main table PK index is ~20 GB
> - Free space on disk is ~35 GB

Out of disk space is 100% guaranteed here, because it'll take about
twice the index size to do a REINDEX --- there's a sort file that's
roughly the size of the index, plus the new index itself, and we
don't risk deleting the old index until the transaction commits.

Possibly you could drop and recreate the index instead of using REINDEX,
if you're going to have the table locked anyway.  But it seems to me
that you're likely to need more disk pretty soon, unless this DB is
more static than most.  Maybe just spring for more hardware now.

            regards, tom lane

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

Предыдущее
От: Alvaro Herrera
Дата:
Сообщение: Re: REINDEX disk space requirements
Следующее
От: "Kevin Grittner"
Дата:
Сообщение: Re: pg_stat_activity howto