Hi,
While following the discussion on vacuumdb --missing-stats-only [1],
I noticed that this option queries pg_statistic and pg_statistic_ext_data.
As a result, non-superusers like pg_maintain cannot use it because
by default they lack permission to access those catalogs.
I'm not sure whether --missing-stats-only was intended to work for
non-superusers, but if so, this restriction is inconvenient. Would it
make sense to use the views pg_stats and pg_stats_ext instead?
Since the catalogs are only consulted to check whether statistics exist,
the views should be sufficient. Thought?
Regards,
[1] https://postgr.es/m/20250820104226.8ba51e43164cd590b863ce41@sraoss.co.jp
--
Fujii Masao