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