Re: Fix permissions check on pg_stat_get_wal_senders

From: Michael Paquier <michael(dot)paquier(at)gmail(dot)com>
To: Feike Steenbergen <feikesteenbergen(at)gmail(dot)com>
Cc: PostgreSQL mailing lists <pgsql-hackers(at)postgresql(dot)org>, Simon Riggs <simon(at)2ndquadrant(dot)com>
Subject: Re: Fix permissions check on pg_stat_get_wal_senders
Date: 2017-12-21 13:11:07
Message-ID: CAB7nPqQH19tU2NzWwZTDYrXPYqfM8WkmUsFJD+5ZWT4H6MUfng@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, Dec 21, 2017 at 7:30 PM, Feike Steenbergen
<feikesteenbergen(at)gmail(dot)com> wrote:
> Fix permissions check on pg_stat_get_wal_senders
>
> Commit 25fff40798fc4ac11a241bfd9ab0c45c085e2212 introduced the
> possibility for the pg_read_all_stats to have access to all pg_stat_*
> views.
> In the discussion, the pg_stat_replication and pg_stat_wal_receiver
> views were also considered to be part of that, however
> pg_stat_get_wal_senders was somehow not part of that commit, that
> seems an oversight.
>
> 1: https://www.postgresql.org/message-id/CA%2BOCxoyYxO%2BJmzv2Micj4uAaQdAi6nq0w25BPQgLLxsrvTmREw%40mail.gmail.com\

Yes, that's a bug, albeit a minor one.

- * Only superusers can see details. Other users only get the pid value
- * to know whether it is a WAL receiver, but no details.
+ * Only superusers and members of pg_read_all_stats can see details.
+ * Other users only get the pid value to know it's a
walsender, but no details.
You mean a WAL receiver here, not a WAL sender.
--
Michael

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andrew Dunstan 2017-12-21 13:13:29 Re: Reproducible builds: genbki.pl and Gen_fmgrtab.pl
Previous Message Beena Emerson 2017-12-21 13:06:04 Re: [HACKERS] Runtime Partition Pruning