Allow GRANT on pg_log_backend_memory_contexts().
authorJeff Davis <jdavis@postgresql.org>
Tue, 26 Oct 2021 20:13:52 +0000 (13:13 -0700)
committerJeff Davis <jdavis@postgresql.org>
Tue, 26 Oct 2021 20:31:38 +0000 (13:31 -0700)
commitf0b051e322d530a340e62f2ae16d99acdbcb3d05
tree204674f9392134074f581a36c5ed405401c0f2cd
parent5fedf7417b69295294b154a219edd8a26eaa6ab6
Allow GRANT on pg_log_backend_memory_contexts().

Remove superuser check, allowing any user granted permissions on
pg_log_backend_memory_contexts() to log the memory contexts of any
backend.

Note that this could allow a privileged non-superuser to log the
memory contexts of a superuser backend, but as discussed, that does
not seem to be a problem.

Reviewed-by: Nathan Bossart, Bharath Rupireddy, Michael Paquier, Kyotaro Horiguchi, Andres Freund
Discussion: https://postgr.es/m/e5cf6684d17c8d1ef4904ae248605ccd6da03e72.camel@j-davis.com
doc/src/sgml/func.sgml
src/backend/catalog/system_functions.sql
src/backend/utils/adt/mcxtfuncs.c
src/include/catalog/catversion.h
src/test/regress/expected/misc_functions.out
src/test/regress/sql/misc_functions.sql