Allow pg_read_all_stats to access all stats views again

Magnus Hagander <magnus@hagander.net>

Commit: 212e712a5eed31828e6ffc5e61ca76fd477a519f
Author: Magnus Hagander <magnus@hagander.net>
Date: 2020-04-20T10:56:26Z
Releases: 12.3
Allow pg_read_all_stats to access all stats views again

The views pg_stat_progress_* had not gotten the memo that
pg_read_all_stats is supposed to be able to read all statistics. Also
make a pass over all text-returning pg_stat_xyz functions that could
return "insufficient privilege" and make sure they also respect
pg_read_all_status.

Reported-by: Andrey M. Borodin
Reviewed-by: Andrey M. Borodin, Kyotaro Horiguchi
Discussion: https://postgr.es/m/13145F2F-8458-4977-9D2D-7B2E862E5722@yandex-team.ru

Files

PathChange+/−
src/backend/utils/adt/pgstatfuncs.c modified +12 −11

Discussion