Re: When/if to Reindex

Поиск
Список
Период
Сортировка
От Mark Kirkwood
Тема Re: When/if to Reindex
Дата
Msg-id 46CE6883.10104@paradise.net.nz
обсуждение исходный текст
Ответ на Re: When/if to Reindex  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: When/if to Reindex  ("Steven Flatt" <steven.flatt@gmail.com>)
Список pgsql-performance
Tom Lane wrote:
>
> The fly in the ointment is that after collecting the pg_index definition
> of the index, plancat.c also wants to know how big it is --- it calls
> RelationGetNumberOfBlocks.  And that absolutely does look at the
> physical storage, which means it absolutely is unsafe to do in parallel
> with a REINDEX that will be dropping the old physical storage at some
> point.
>
> So maybe we are stuck and we have to say "that doesn't work anymore".
> But it feels like we might not be too far away from letting it still
> work.  Thoughts, ideas?
>

A suggestion that seems a bit like a leap backwards in time - maybe just
use the pg_class.relpages entry for the index size?

I'm punting that with autovacuum being enabled by default now, the
relpages entries for all relations will be more representative than they
used to in previous releases.

Cheers

Mark


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: When/if to Reindex
Следующее
От: Gregory Stark
Дата:
Сообщение: Re: When/if to Reindex