Re: Online index builds

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Online index builds
Дата
Msg-id 27313.1165964921@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Online index builds (was: [ANNOUNCE] PostgreSQL 8.2 Now Available)  (Bill Moran <wmoran@collaborativefusion.com>)
Ответы Re: Online index builds  (Jeff Davis <pgsql@j-davis.com>)
Список pgsql-general
Gregory Stark <stark@enterprisedb.com> writes:
> You could create a whole new index concurrently, then in a completely new
> (third) transaction drop the old one. The problem there is that there could be
> other things (namely foreign key constraints) depending on the old index.
> Fixing them all to depend on the new one may not be a problem or it may, I
> haven't thought it through. Nor have I thought through whether it would be
> possible to keep the original name.

If the idea is to do REINDEX CONCURRENTLY then ISTM you could just swap
the relfilenodes of the two indexes and then zap the new catalog entries
(and old index contents).  The problem is exactly the same as before,
though: you need exclusive lock to do that.

            regards, tom lane

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

Предыдущее
От: "mikelin"
Дата:
Сообщение: indexed function performance
Следующее
От: Tom Lane
Дата:
Сообщение: Re: indexed function performance