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 Michael Paquier <michael@paquier.xyz>
Re: [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 Tom Lane <tgl@sss.pgh.pa.us>
Re: [PATCH] pg_statio_all_tables: several rows per table due to invalid TOAST index Tom Lane <tgl@sss.pgh.pa.us>
Re: [PATCH] pg_statio_all_tables: several rows per table due to invalid TOAST index Tom Lane <tgl@sss.pgh.pa.us>
Re: [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 Tom Lane <tgl@sss.pgh.pa.us>
Re: [PATCH] pg_statio_all_tables: several rows per table due to invalid TOAST index Andrei Zubkov <zubkov@moonset.ru>
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
Дата:
От: Andrei Zubkov
Дата:
FAQ