mirror of
https://github.com/postgres/postgres.git
synced 2025-11-10 17:42:29 +03:00
Default monitoring roles - errata
25fff40798 introduced
default monitoring roles. Apply these corrections:
* Allow access to pg_stat_get_wal_senders()
by role pg_read_all_stats
* Correct comment in pg_stat_get_wal_receiver()
to show it is no longer superuser-only.
Author: Feike Steenbergen
Reviewed-by: Michael Paquier
Apply to HEAD, then later backpatch to 10
This commit is contained in:
@@ -1442,7 +1442,8 @@ pg_stat_get_wal_receiver(PG_FUNCTION_ARGS)
|
||||
if (!is_member_of_role(GetUserId(), DEFAULT_ROLE_READ_ALL_STATS))
|
||||
{
|
||||
/*
|
||||
* Only superusers can see details. Other users only get the pid value
|
||||
* Only superusers and members of pg_read_all_stats can see details.
|
||||
* Other users only get the pid value
|
||||
* to know whether it is a WAL receiver, but no details.
|
||||
*/
|
||||
MemSet(&nulls[1], true, sizeof(bool) * (tupdesc->natts - 1));
|
||||
|
||||
Reference in New Issue
Block a user