pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Kevin Kempter <kevin@kevinkempterllc.com>
To: pgsql-admin@postgresql.org
Subject: permissions on system catalogs for non-superuser?
Date: Thu, 11 Oct 2007 12:56:10 -0600
Message-ID: <200710111256.11010.kevin@kevinkempterllc.com> (raw)

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



view thread (2+ messages)  latest in thread

Message-ID: <200710111256.11010.kevin@kevinkempterllc.com>
Permalink:  ../200710111256.11010.kevin@kevinkempterllc.com/
Also on:    postgresql.org/message-id/200710111256.11010.kevin@kevinkempterllc.com

 · 

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: pgsql-admin@postgresql.org
  Cc: kevin@kevinkempterllc.com
  Subject: Re: permissions on system catalogs for non-superuser?
  In-Reply-To: <200710111256.11010.kevin@kevinkempterllc.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox