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

Поиск
Список
Период
Сортировка
От Nathan Bossart
Тема Re: vacuumdb --missing-stats-only and permission issue
Дата
Msg-id aKdgTiSpo8p_YVgX@nathan
обсуждение исходный текст
Ответ на Re: vacuumdb --missing-stats-only and permission issue  (Nathan Bossart <nathandbossart@gmail.com>)
Ответы Re: vacuumdb --missing-stats-only and permission issue
Список pgsql-hackers
On Thu, Aug 21, 2025 at 12:59:52PM -0500, Nathan Bossart wrote:
> I think there's a problem with the privilege checks for pg_stats (and
> friends) versus ANALYZE.  pg_stats checks for SELECT privileges on the
> column, while ANALYZE checks for MAINTAIN privileges.  If a role lacks
> SELECT on the columns, it will always try to analyze the table.  If a role
> lacks MAINTAIN on the table, it will fail if it tries to analyze the table.

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).

-- 
nathan



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