permissions on system catalogs for non-superuser?

From: Kevin Kempter <kevin(at)kevinkempterllc(dot)com>
To: pgsql-admin(at)postgresql(dot)org
Subject: permissions on system catalogs for non-superuser?
Date: 2007-10-11 18:56:10
Message-ID: 200710111256.11010.kevin@kevinkempterllc.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Hi List;

we have some monitoring/alert scripts which run sql against the database
(8.1.4) as a non-superuser. The problem is I get <insufficient privilege>
when trying to access current_query from pg_stat_activity.

I ran these grant statements but still no joy:
grant select on pg_stat_activity to monitor_user;
grant select on pg_database to monitor_user;

Here's what I get while logged into psql as monitor_user:

select procpid, current_query from pg_stat_activity;
procpid | current_query
---------+--------------------------
24589 | <IDLE>
24601 | <insufficient privilege>
24600 | <insufficient privilege>
24598 | <insufficient privilege>
24596 | <insufficient privilege>
24594 | <insufficient privilege>
24367 | <insufficient privilege>
24511 | <insufficient privilege>

Thanks in advance

/Kevin

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Milen A. Radev 2007-10-11 19:35:43 Re: how to create an user with ONLY select permission and nothing else?
Previous Message Jessica Richard 2007-10-11 18:33:24 how to create an user with ONLY select permission and nothing else?