Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1TjLlS-000194-9F for pgsql-admin@arkaria.postgresql.org; Fri, 14 Dec 2012 03:16:42 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.72) (envelope-from ) id 1TjLlR-0003NF-CZ for pgsql-admin@arkaria.postgresql.org; Fri, 14 Dec 2012 03:16:41 +0000 Received: from makus.postgresql.org ([98.129.198.125]) by malur.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1TjLlQ-0003N9-D6 for pgsql-admin@postgresql.org; Fri, 14 Dec 2012 03:16:40 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1TjLlN-0003cd-6P for pgsql-admin@postgresql.org; Fri, 14 Dec 2012 03:16:39 +0000 Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.5/8.14.5) with ESMTP id qBE3GaW3018308; Thu, 13 Dec 2012 22:16:36 -0500 (EST) From: Tom Lane To: Greg Williamson cc: "pgsql-admin@postgresql.org" Subject: Re: allow a user to see current_query in pg_stat_activity in 8.4 In-reply-to: <1355453967.41645.YahooMailNeo@web125905.mail.ne1.yahoo.com> References: <1355453967.41645.YahooMailNeo@web125905.mail.ne1.yahoo.com> Comments: In-reply-to Greg Williamson message dated "Thu, 13 Dec 2012 18:59:27 -0800" Date: Thu, 13 Dec 2012 22:16:36 -0500 Message-ID: <18307.1355454996@sss.pgh.pa.us> X-Pg-Spam-Score: -1.9 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-admin Precedence: bulk Sender: pgsql-admin-owner@postgresql.org Greg Williamson writes: > We want to create a role used by a monitor to check for " in Transaction" with the most restrictive permissions we can on a 8.4.13 instance. > The user has been granted connect privilege to the database and some limited permissions to user tabhles that need to be monitored. But pg_stat_activity shows only "" Yup. You can only see the query of another session if (1) you are a superuser, or (2) you are the same user the other session is logged in as. Table permissions have nothing to do with this. regards, tom lane -- Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-admin