pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Robert Gravsjö <robert@blogg.se>
To: Kevin Kempter <kevin@kevinkempterllc.com>
Cc: pgsql-admin@postgresql.org
Subject: Re: permissions on system catalogs for non-superuser?
Date: Fri, 12 Oct 2007 10:50:43 +0200
Message-ID: <470F3563.9050804@blogg.se> (raw)
In-Reply-To: <200710111256.11010.kevin@kevinkempterllc.com>
References: <200710111256.11010.kevin@kevinkempterllc.com>

Kevin Kempter wrote:
> 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;

IIRC you need select priv on pg_authid too.

Regards,
roppert

> 
> 
> 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
> 
> ---------------------------(end of broadcast)---------------------------
> TIP 6: explain analyze is your friend
> 




view thread (2+ messages)

Message-ID: <470F3563.9050804@blogg.se>
Permalink:  ../470F3563.9050804@blogg.se/
Also on:    postgresql.org/message-id/470F3563.9050804@blogg.se

 · 

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: robert@blogg.se, kevin@kevinkempterllc.com
  Subject: Re: permissions on system catalogs for non-superuser?
  In-Reply-To: <470F3563.9050804@blogg.se>

* 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