Received: from localhost (unknown [200.46.204.182]) by postgresql.org (Postfix) with ESMTP id 0E5089F9468 for ; Thu, 11 Oct 2007 16:52:29 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.182]) (amavisd-maia, port 10024) with ESMTP id 15042-01 for ; Thu, 11 Oct 2007 16:52:20 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.5 Received: from outbound-mail-22.bluehost.com (outbound-mail-22.bluehost.com [69.89.21.17]) by postgresql.org (Postfix) with SMTP id C98099F95D3 for ; Thu, 11 Oct 2007 16:52:21 -0300 (ADT) Received: (qmail 16444 invoked by uid 0); 11 Oct 2007 19:52:16 -0000 Received: from unknown (HELO box54.bluehost.com) (69.89.20.54) by mailproxy2.bluehost.com with SMTP; 11 Oct 2007 19:52:16 -0000 Received: from corp.messageone.com ([66.219.55.2] helo=ematt.austin.messageone.com) by box54.bluehost.com with esmtp (Exim 4.68) (envelope-from ) id 1Ig44t-00023u-Hk for pgsql-admin@postgresql.org; Thu, 11 Oct 2007 13:52:15 -0600 From: Kevin Kempter To: pgsql-admin@postgresql.org Subject: permissions on system catalogs for non-superuser? Date: Thu, 11 Oct 2007 12:56:10 -0600 User-Agent: KMail/1.9.7 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200710111256.11010.kevin@kevinkempterllc.com> X-Identified-User: {840:box54.bluehost.com:kevinkem:kevinkempterllc.com} {sentby:bopbeforesmtp 66.219.55.2 authed with kevinkempterllc.com} X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200710/101 X-Sequence-Number: 27015 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 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 | 24601 | 24600 | 24598 | 24596 | 24594 | 24367 | 24511 | Thanks in advance /Kevin