Re: pg_stat_activity - Mailing list pgsql-general

From Tom Lane
Subject Re: pg_stat_activity
Date
Msg-id 14130.1059776277@sss.pgh.pa.us
Whole thread Raw
In response to pg_stat_activity  (Mat Proud <matproud@bigfoot.com>)
List pgsql-general
Mat Proud <matproud@bigfoot.com> writes:
> What permissions do I need to grant to a db-user so they can see
> the current query column in
> SELECT * FROM pg_stat_activity;

Non-superusers can only see their own queries in pg_stat_activity
(that is, the query of any backend running under the same PG user id).
This is not configurable.

I think that the original implementation only allowed superusers to
see query texts at all, and the exception for other backends of your own
userid was added later.  So if it doesn't seem to work as stated above,
maybe you need a newer Postgres release.

            regards, tom lane

pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: changing column type
Next
From: DeJuan Jackson
Date:
Subject: Re: CREATE TABLE with a column of type {table name}