Re: [PATCH] pg_statio_all_tables: several rows per table due to invalid TOAST index

Поиск
Список
Период
Сортировка
От Michael Paquier
Тема Re: [PATCH] pg_statio_all_tables: several rows per table due to invalid TOAST index
Дата
Msg-id YaXg2N5gzoHfQjac@paquier.xyz
обсуждение исходный текст
Ответ на [PATCH] pg_statio_all_tables: several rows per table due to invalid TOAST index  (Andrei Zubkov <zubkov@moonset.ru>)
Ответы Re: [PATCH] pg_statio_all_tables: several rows per table due to invalid TOAST index  (Andrei Zubkov <zubkov@moonset.ru>)
Список pgsql-hackers
On Mon, Nov 29, 2021 at 05:04:29PM +0300, Andrei Zubkov wrote:
> However it is possible that the TOAST table will have more than one
> index. For example, this happens when REINDEX CONCURRENTLY operation
> lefts an index in invalid state (indisvalid = false) due to some kind
> of a failure. It's often sufficient to interrupt REINDEX CONCURRENTLY
> operation right after start.
>
> Such index will cause the second row to appear in a
> pg_statio_all_tables view which obvious is unexpected behaviour.

Indeed.  I can see that.

> Now we can have several regular indexes and several TOAST-indexes for
> the same table. Statistics for the regular and TOAST indexes is to be
> calculated the same way so I've decided to use a CTE here.

Hmm.  Why should we care about invalid indexes at all, including
pg_statio_all_indexes?
--
Michael

Вложения

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

Предыдущее
От: Guillaume Lelarge
Дата:
Сообщение: Re: Lots of memory allocated when reassigning Large Objects
Следующее
От: Andrei Zubkov
Дата:
Сообщение: Re: [PATCH] pg_statio_all_tables: several rows per table due to invalid TOAST index