Re: who can view pg_stat_activity?

From: Mark Steben <mark(dot)steben(at)drivedominion(dot)com>
To: Cory Nemelka <cnemelka(at)gmail(dot)com>
Cc: Shreeyansh Dba <shreeyansh2014(at)gmail(dot)com>, pgsql-admin <pgsql-admin(at)postgresql(dot)org>
Subject: Re: who can view pg_stat_activity?
Date: 2018-02-07 17:43:42
Message-ID: CADyzmywsD9ROAPFjEZJeP-ShZ1KptcP3K5um=gM7-iPEYMo_PQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

ok thanks for everyone's response.

On Wed, Feb 7, 2018 at 12:38 PM, Cory Nemelka <cnemelka(at)gmail(dot)com> wrote:

> sweet! :)
>
> --cnemelka
>
> On Wed, Feb 7, 2018 at 10:31 AM, Mark Steben <
> mark(dot)steben(at)drivedominion(dot)com> wrote:
>
>> Thank you for your prompt answer Shreeyansh
>>
>> I granted all privileges to the pg_stat_activity view to the newmail
>> account and still get this result when trying to access:
>>
>> select * from pg_stat_activity limit 4;
>> datid | datname | pid | usesysid | usename | application_name
>> | client_addr | client_hostname | client_port | backend_start | xact_start
>> | query_start | state_change | waiting | state | backend_xid | backend_xmin
>> | query
>> -------+------------------+-------+----------+---------+----
>> --------------+-------------+-----------------+-------------
>> +---------------+------------+-------------+--------------+-
>> --------+-------+-------------+--------------+--------------------------
>> 16459 | prime_production | 6133 | 16395 | prime |
>> | | | | |
>> | | | | | |
>> | <insufficient privilege>
>> 16459 | prime_production | 57677 | 16395 | prime |
>> | | | | |
>> | | | | | |
>> | <insufficient privilege>
>> 16459 | prime_production | 5806 | 16395 | prime |
>> | | | | |
>> | | | | | |
>> | <insufficient privilege>
>> 16459 | prime_production | 17532 | 16395 | prime |
>> | | | | |
>> | | | | | |
>> | <insufficient privilege>
>>
>>
>>
>>
>> On Wed, Feb 7, 2018 at 12:17 PM, Shreeyansh Dba <shreeyansh2014(at)gmail(dot)com
>> > wrote:
>>
>>> Hi Mark Steben,
>>>
>>> There is no superuser required to view pg_stat_activity, a normal user
>>> can also view or access.
>>>
>>>
>>> <http://www.shreeyansh.com>
>>>
>>> On Wed, Feb 7, 2018 at 10:27 PM, Mark Steben <
>>> mark(dot)steben(at)drivedominion(dot)com> wrote:
>>>
>>>> Good morning,
>>>>
>>>> We currently run postgres 9.4. The only way to view the
>>>> pg_stat_activity view that I can see is that you must be a superuser. I
>>>> couldn't find anything in the documentation to confirm or refute this.
>>>> Could you please confirm if this is true or if not, what privileges are
>>>> required?
>>>>
>>>> Thank you for your time.
>>>>
>>>>
>>>> --
>>>> *Mark Steben*
>>>> Database Administrator
>>>> @utoRevenue <http://www.autorevenue.com/> | Autobase
>>>> <http://www.autobase.net/>
>>>> CRM division of Dominion Dealer Solutions
>>>> 95D Ashley Ave.
>>>> <https://maps.google.com/?q=95D+Ashley+Ave.+West+Springfield,+MA+01089&entry=gmail&source=g>
>>>> West Springfield, MA 01089
>>>> <https://maps.google.com/?q=95D+Ashley+Ave.+West+Springfield,+MA+01089&entry=gmail&source=g>
>>>> t: 413.327-3045
>>>> f: 413.383-9567
>>>>
>>>> www.fb.com/DominionDealerSolutions
>>>> www.twitter.com/DominionDealer
>>>> www.drivedominion.com <http://www.autorevenue.com/>
>>>>
>>>> <http://autobasedigital.net/marketing/DD12_sig.jpg>
>>>>
>>>>
>>>>
>>>>
>>>> <http://www.drivedominion.com/transform-your-vue/>
>>>
>>>
>>>
>>
>>
>> --
>> *Mark Steben*
>> Database Administrator
>> @utoRevenue <http://www.autorevenue.com/> | Autobase
>> <http://www.autobase.net/>
>> CRM division of Dominion Dealer Solutions
>> 95D Ashley Ave.
>> <https://maps.google.com/?q=95D+Ashley+Ave.+West+Springfield,+MA+01089+%3Chttps://maps.google.com/?q%3D95D%2BAshley%2BAve.%2BWest%2BSpringfield,%2BMA%2B01089%26entry%3Dgmail%26source%3Dg%3E&entry=gmail&source=g>
>> West Springfield, MA 01089
>> <https://maps.google.com/?q=95D+Ashley+Ave.+West+Springfield,+MA+01089+%3Chttps://maps.google.com/?q%3D95D%2BAshley%2BAve.%2BWest%2BSpringfield,%2BMA%2B01089%26entry%3Dgmail%26source%3Dg%3E&entry=gmail&source=g>
>> t: 413.327-3045
>> f: 413.383-9567
>>
>> www.fb.com/DominionDealerSolutions
>> www.twitter.com/DominionDealer
>> www.drivedominion.com <http://www.autorevenue.com/>
>>
>> <http://autobasedigital.net/marketing/DD12_sig.jpg>
>>
>>
>>
>>
>> <http://www.drivedominion.com/transform-your-vue/>
>
>
>

--
*Mark Steben*
Database Administrator
@utoRevenue <http://www.autorevenue.com/> | Autobase
<http://www.autobase.net/>
CRM division of Dominion Dealer Solutions
95D Ashley Ave.
West Springfield, MA 01089
t: 413.327-3045
f: 413.383-9567

www.fb.com/DominionDealerSolutions
www.twitter.com/DominionDealer
www.drivedominion.com <http://www.autorevenue.com/>

<http://autobasedigital.net/marketing/DD12_sig.jpg>

--
<http://www.drivedominion.com/transform-your-vue/>

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Azimuddin Mohammed 2018-02-07 20:28:32 LDAP for postgres
Previous Message Cory Nemelka 2018-02-07 17:38:47 Re: who can view pg_stat_activity?