pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
permissions on system catalogs for non-superuser?
2+ messages / 2 participants
[nested] [flat]

* permissions on system catalogs for non-superuser?
@ 2007-10-11 18:56 Kevin Kempter <kevin@kevinkempterllc.com>
  2007-10-12 08:50 ` Re: permissions on system catalogs for non-superuser? Robert Gravsjö <robert@blogg.se>
  0 siblings, 1 reply; 2+ messages in thread

From: Kevin Kempter @ 2007-10-11 18:56 UTC (permalink / raw)
  To: 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



^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: permissions on system catalogs for non-superuser?
  2007-10-11 18:56 permissions on system catalogs for non-superuser? Kevin Kempter <kevin@kevinkempterllc.com>
@ 2007-10-12 08:50 ` Robert Gravsjö <robert@blogg.se>
  0 siblings, 0 replies; 2+ messages in thread

From: Robert Gravsjö @ 2007-10-12 08:50 UTC (permalink / raw)
  To: Kevin Kempter <kevin@kevinkempterllc.com>; +Cc: pgsql-admin

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
> 




^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2007-10-12 08:50 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2007-10-11 18:56 permissions on system catalogs for non-superuser? Kevin Kempter <kevin@kevinkempterllc.com>
2007-10-12 08:50 ` Robert Gravsjö <robert@blogg.se>

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