monitoring queries in pg_stat_activity

From: daniel aristizabal franco <danielaristi(at)gmail(dot)com>
To: pgsql-admin(at)postgresql(dot)org
Subject: monitoring queries in pg_stat_activity
Date: 2017-02-01 17:51:27
Message-ID: CAGZ4V+YSjaMkON9F7Ej2qtUicE3wWqAxb=h=Ubkdjv3sCceH+A@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Hi all:

I have created a nosuperuser for monitoring, but I can't do a select on the
pg_stat_activity table, I get the follow message:

select datid,xact_start,query from pg_catalog.pg_stat_activity;
-[ RECORD 1 ]----+--------------------------------------------
datid | 204816
xact_start |
query | <insufficient privilege>

I have assigned these grants to my user:
GRANT ALL ON SCHEMA pg_catalog to myuser;
GRANT SELECT ON ALL TABLES IN schema pg_catalog TO myuser;

The user not should be a superuser. does there are other way for solve it?

thanks to all

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Keith 2017-02-01 19:05:13 Re: monitoring queries in pg_stat_activity
Previous Message Achilleas Mantzios 2017-02-01 11:49:27 Re: Big sized materialized views break replication