Re: about privileges on pg_stat_activity columns

From: Richard Huxton <dev(at)archonet(dot)com>
To: Jaime Casanova <jcasanov(at)systemguards(dot)com(dot)ec>
Cc: Postgres general mailing list <pgsql-general(at)postgresql(dot)org>
Subject: Re: about privileges on pg_stat_activity columns
Date: 2008-12-04 09:02:34
Message-ID: 49379CAA.9080600@archonet.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Jaime Casanova wrote:
> Hi,
>
> there is an auditor that want to monitor our database activity to see
> the session and the ip they come from, if they are waiting and so
> on... pg_stat_activity and pg_locks views come to my mind...
>
> we created an user to him and give him privileges to pg_locks and
> pg_stat_activity (and the functions pg_stat_activity is calling) but
> still he see the columns that comes from the functions as null... is
> there a way to give him access to that data without give him
> superuser?

I'd create a view or some functions with "security definer" privileges.
That way you can provide precisely the access needed.

--
Richard Huxton
Archonet Ltd

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Wajid Khattak 2008-12-04 09:23:31 Re: Executing a user created function twice give an error
Previous Message Richard Huxton 2008-12-04 09:00:35 Re: Linked server query problem