Re: Allow pg_signal_backend members to use pg_log_backend_memory_stats().
Michael Paquier <michael@paquier.xyz>
From: Michael Paquier <michael@paquier.xyz>
To: "Bossart, Nathan" <bossartn@amazon.com>
Cc: Jeff Davis <pgsql@j-davis.com>, "pgsql-hackers@postgresql.org" <pgsql-hackers@postgresql.org>
Date: 2021-10-23T23:41:52Z
Lists: pgsql-hackers
On Sat, Oct 23, 2021 at 08:42:29PM +0000, Bossart, Nathan wrote: > Otherwise, presumably we will need to update func.sgml and the comment > above pg_log_backend_memory_contexts() in mcxtfuncs.c. Yes, the documentation of any SQL function whose hardcoded superuser() check is removed needs a refresh to outline that its execution can be GRANT-ed post-initialization, and it should also document which system roles are able to use it. See for instance pg_database_size(), that mentions roles need to be a member of pg_read_all_stats. > This is unrelated to this patch, but should we also consider opening > up pg_reload_conf() and pg_rotate_logfile() to members of > pg_signal_backend? Those are the other "server signaling functions" I > see in the docs. Yes, there is that as well. +CREATE ROLE testrole1 IN ROLE pg_signal_backend; +CREATE ROLE testrole2; Any role created in the regression test needs to be prefixed with "regress_", or builds with -DENFORCE_REGRESSION_TEST_NAME_RESTRICTIONS will complain (I just add that by default to not fall into this trap again). -- Michael
Commits
-
Allow GRANT on pg_log_backend_memory_contexts().
- f0b051e322d5 15.0 landed