Re: vacuumdb --missing-stats-only and permission issue

Поиск
Список
Период
Сортировка
От Corey Huinker
Тема Re: vacuumdb --missing-stats-only and permission issue
Дата
Msg-id CADkLM=cXLUyr+2bO+ZkhV=U=Wc1GOgceaRp2CSMd0wvza-ow6g@mail.gmail.com
обсуждение исходный текст
Ответ на Re: vacuumdb --missing-stats-only and permission issue  (Nathan Bossart <nathandbossart@gmail.com>)
Ответы Re: vacuumdb --missing-stats-only and permission issue
Список pgsql-hackers
Unfortunately, pg_stats_ext is also different.  The data for that view is
restricted to table owners (or roles that inherit privileges of the table
owner).

 Ok, I took the RLS and permissions quals from pg_stats and pg_stats_ext and put them in the corresponding EXISTs tests. The queries could be written a bit more succinctly (ex. we only need to do the RLS checks once) but putting them in each EXISTS clause drives home the point that we're duplicating the filters in pg_stats/pg_stats_ext.

So now, we avoid probing attributes for stats that we know were going to be filtered out, likewise for extended statistics objects.

The queries don't consult pg_stats_exprs because that's just exposing different stats from the same pg_statistic_ext_data row, and we already know that the row is there or not.
Вложения

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