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