Re: Improving REINDEX for system indexes (long)

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Improving REINDEX for system indexes (long)
Дата
Msg-id 1393.1064702242@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Improving REINDEX for system indexes (long)  (Bruce Momjian <pgman@candle.pha.pa.us>)
Ответы Re: Improving REINDEX for system indexes (long)  (Bruce Momjian <pgman@candle.pha.pa.us>)
Re: Improving REINDEX for system indexes (long)  (Alvaro Herrera <alvherre@dcc.uchile.cl>)
Список pgsql-hackers
Bruce Momjian <pgman@candle.pha.pa.us> writes:
> Tom, would you summarize what REINDEX currently _doesn't_ do?

As of CVS tip I think the only deficiency is that indexes on the shared
catalogs (pg_database, pg_shadow, pg_group) have to be reindexed in
place, rather than being rebuilt with a new relfilenode as is done for
CLUSTER or TRUNCATE.  In-place reindexing isn't crash-safe, since if
you fail you're left with a half-built (effectively corrupt) index.

I don't see any way to avoid that, though, since we cannot change the
relfilenode value for a shared index.

I was toying with the notion of changing btree index build to not write
the metapage until the index is fully built; in this way, at least the
corrupted state of the index would be obvious.  (You'd get "not a btree"
failures.)
        regards, tom lane


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

Предыдущее
От: "Hiroshi Inoue"
Дата:
Сообщение: Re: 2-phase commit
Следующее
От: "Joshua D. Drake"
Дата:
Сообщение: Re: pg_dump doesn't dump binary compatible casts