Index recreation in vacuum

Поиск
Список
Период
Сортировка
От Hiroshi Inoue
Тема Index recreation in vacuum
Дата
Msg-id 002101bf6195$09437360$2801007e@tpf.co.jp
обсуждение исходный текст
Ответы Re: [HACKERS] Index recreation in vacuum  (Bruce Momjian <pgman@candle.pha.pa.us>)
Список pgsql-hackers
Hi all,

I'm trying to implement REINDEX command.

REINDEX operation itself is available everywhere and
I've thought about applying it to VACUUM.
.
My plan is as follows.

Add a new option to force index recreation in vacuum
and if index recreation is specified.
 1) invalidate all indexes of the target table 2) vacuum the target table(heap table only) 3) internal commit and
truncation4) recreate and validate all indexes of the table.
 

The problem is how to invalidate/validate indexes.
Of cource natural way is to drop/create indexes but the
definition of indexes would be lost in case of abort/crash.
Now I'm inclined to use relhasindex of pg_class to
validate/invalidate indexes of a table at once. 
I remember many people have referred to index recreation
in vacuum.

Any comment would be greatly appreciated.

Regards.

Hiroshi Inoue
Inoue@tpf.co.jp


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: [HACKERS] Is pg_dump still broken?
Следующее
От: Michael Meskes
Дата:
Сообщение: FETCH syntax