diff options
author | Simon Riggs <simon@2ndQuadrant.com> | 2018-01-28 16:14:31 +0000 |
---|---|---|
committer | Simon Riggs <simon@2ndQuadrant.com> | 2018-01-28 16:14:31 +0000 |
commit | 76e117dbed8c0fee084fbfc06f15c6c377690f59 (patch) | |
tree | a3741c059b1b688943edf81c1a6339ae36b2cae7 /src/backend/replication/walreceiver.c | |
parent | 2d71b2700b20f2a2274d69598c6fc979cba7f9b5 (diff) |
Default monitoring roles - errata
25fff40798fc4ac11a241bfd9ab0c45c085e2212 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
Diffstat (limited to 'src/backend/replication/walreceiver.c')
-rw-r--r-- | src/backend/replication/walreceiver.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/backend/replication/walreceiver.c b/src/backend/replication/walreceiver.c index c85ffb0908b..8c90d6ce1dd 100644 --- a/src/backend/replication/walreceiver.c +++ b/src/backend/replication/walreceiver.c @@ -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)); |