Re: permissions on system catalogs for non-superuser?

Поиск
Список
Период
Сортировка
От Robert Gravsjö
Тема Re: permissions on system catalogs for non-superuser?
Дата
Msg-id 470F3563.9050804@blogg.se
обсуждение исходный текст
Ответ на permissions on system catalogs for non-superuser?  (Kevin Kempter <kevin@kevinkempterllc.com>)
Список pgsql-admin
Kevin Kempter wrote:
> Hi List;
>
> we have some monitoring/alert scripts which run sql against the database
> (8.1.4) as a non-superuser. The problem is I get <insufficient privilege>
> when trying to access current_query from pg_stat_activity.
>
> I ran these grant statements but still no joy:
> grant select on pg_stat_activity to monitor_user;
> grant select on pg_database to monitor_user;

IIRC you need select priv on pg_authid too.

Regards,
roppert

>
>
> Here's what I get while logged into psql as monitor_user:
>
> select procpid, current_query from pg_stat_activity;
>  procpid |      current_query
> ---------+--------------------------
>    24589 | <IDLE>
>    24601 | <insufficient privilege>
>    24600 | <insufficient privilege>
>    24598 | <insufficient privilege>
>    24596 | <insufficient privilege>
>    24594 | <insufficient privilege>
>    24367 | <insufficient privilege>
>    24511 | <insufficient privilege>
>
>
> Thanks in advance
>
> /Kevin
>
> ---------------------------(end of broadcast)---------------------------
> TIP 6: explain analyze is your friend
>


В списке pgsql-admin по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Postgres database is not logging any messages after the reboot
Следующее
От: "Dennis, Allan"
Дата:
Сообщение: pg_ctl start doesn't daemonize properly