Re: Improving REINDEX for system indexes (long)

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема Re: Improving REINDEX for system indexes (long)
Дата
Msg-id 20030928001021.GA9141@dcc.uchile.cl
обсуждение исходный текст
Ответ на Re: Improving REINDEX for system indexes (long)  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: Improving REINDEX for system indexes (long)  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
On Sat, Sep 27, 2003 at 06:37:22PM -0400, Tom Lane wrote:
> 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.

What about creating a separate filenode anyway and renaming the files
afterwards?  It would not be an atomic operation anyway, but it would be
better than the current setup IMHO.

(It seems unlikely that one would have > 1GB indexes for shared
relations...)

-- 
Alvaro Herrera (<alvherre[a]dcc.uchile.cl>)
"La espina, desde que nace, ya pincha" (Proverbio africano)


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

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: Improving REINDEX for system indexes (long)
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Improving REINDEX for system indexes (long)