Re: vacuumdb --missing-stats-only and permission issue
От | Nathan Bossart |
---|---|
Тема | Re: vacuumdb --missing-stats-only and permission issue |
Дата | |
Msg-id | aKh4QIO0NoF7zyYL@nathan обсуждение исходный текст |
Ответ на | Re: vacuumdb --missing-stats-only and permission issue (Corey Huinker <corey.huinker@gmail.com>) |
Ответы |
Re: vacuumdb --missing-stats-only and permission issue
|
Список | pgsql-hackers |
On Thu, Aug 21, 2025 at 07:27:23PM -0400, Corey Huinker wrote: > 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. Looks reasonable to me. It's unfortunate that we have to be so restrictive, but since this is primarily intended for administrators to use post-upgrade, I think it's okay for v18. For v19, perhaps we should provide a view or function that returns whether stats are missing. That could require MAINTAIN on the relation to match what's needed for ANALYZE. We'll also need documentation and test updates, of course. For the docs, I'd try to borrow some of the wording from pg_stats and pg_stats_ext: This view allows access only to rows of pg_statistic that correspond to tables the user has permission to read... This view allows access only to rows of pg_statistic_ext and pg_statistic_ext_data that correspond to tables the user owns... -- nathan
В списке pgsql-hackers по дате отправления: