public inbox for [email protected]
help / color / mirror / Atom feedFrom: Adrian Klaver <[email protected]>
To: avi Singh <[email protected]>
To: [email protected]
To: [email protected]
Subject: Re: [GENERAL] grant select on pg_stat_activity
Date: Fri, 18 Mar 2016 14:46:46 -0700
Message-ID: <[email protected]> (raw)
In-Reply-To: <CAETvN5hKTWmAT7LLnzPnemFWwPi9odGSzKDbHEa5EtXBPL7OOg@mail.gmail.com>
References: <CAETvN5hKTWmAT7LLnzPnemFWwPi9odGSzKDbHEa5EtXBPL7OOg@mail.gmail.com>
List-Unsubscribe: <mailto:[email protected]?body=unsub%20pgsql-performance>
On 03/18/2016 01:09 PM, avi Singh wrote:
> Guys
> Whats the best way to grant select on pg_stat_activity so that
> non super user can access this view.
They should be able to, see below. If that is not your case, then more
information is needed.
guest@test=> select current_user;
current_user
--------------
guest
(1 row)
guest@test=> \du guest
List of roles
Role name | Attributes | Member of
-----------+------------+-----------
guest | | {}
guest@test=> select * from pg_stat_activity;
-[ RECORD 1 ]----+--------------------------------
datid | 16385
datname | test
pid | 2622
usesysid | 1289138
usename | guest
application_name | psql
client_addr |
client_hostname |
client_port | -1
backend_start | 2016-03-18 14:41:43.906754-07
xact_start | 2016-03-18 14:44:22.550742-07
query_start | 2016-03-18 14:44:22.550742-07
state_change | 2016-03-18 14:44:22.550746-07
waiting | f
state | active
backend_xid |
backend_xmin | 58635
query | select * from pg_stat_activity;
>
> Thanks
> Avi
--
Adrian Klaver
[email protected]
--
Sent via pgsql-performance mailing list ([email protected])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-performance
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected], [email protected], [email protected]
Subject: Re: [GENERAL] grant select on pg_stat_activity
In-Reply-To: <[email protected]>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox