Re: Fix for pg_statio_all_tables

Поиск
Список
Период
Сортировка
От Michael Paquier
Тема Re: Fix for pg_statio_all_tables
Дата
Msg-id 20200421013654.GB77439@paquier.xyz
обсуждение исходный текст
Ответ на Fix for pg_statio_all_tables  (Alexander Korotkov <a.korotkov@postgrespro.ru>)
Ответы Re: Fix for pg_statio_all_tables
Re: Fix for pg_statio_all_tables
Список pgsql-hackers
On Tue, Apr 21, 2020 at 02:44:45AM +0300, Alexander Korotkov wrote:
> Among all the joined tables, only "pg_index I" is expected to have
> multiple rows associated with single relation.  But we do sum() for
> toast index "pg_index X" as well.  As the result, we multiply
> statistics for toast index by the number of relation indexes.  This is
> obviously wrong.

Oops.

> As a bugfix, I think this should be backpatched.  But this patch
> requires catalog change.  Were  similar cases there before?  If so,
> how did we resolve them?

A backpatch can happen in such cases, see for example b6e39ca9.  In
this case, the resolution was done with a backpatch to
system_views.sql and the release notes include an additional note
saying that the fix applies itself only on already-initialized
clusters.  For other clusters, it was necessary to apply a SQL query,
given also in the release notes, to fix the issue (just grep for
CVE-2017-7547 in release-9.6.sgml on the REL9_6_STABLE branch).
--
Michael

Вложения

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

Предыдущее
От: James Coleman
Дата:
Сообщение: Binary search in ScalarArrayOpExpr for OR'd constant arrays
Следующее
От: Michael Paquier
Дата:
Сообщение: Re: Adding missing object access hook invocations