Giving postgres roles 'sudo'-like access

Поиск
Список
Период
Сортировка
От Mario Splivalo
Тема Giving postgres roles 'sudo'-like access
Дата
Msg-id 4EEF7C9D.60006@megafon.hr
обсуждение исходный текст
Ответы Re: Giving postgres roles 'sudo'-like access  (Craig James <craig_james@emolecules.com>)
Re: Giving postgres roles 'sudo'-like access  (Greg Smith <greg@2ndQuadrant.com>)
Список pgsql-admin
I need to have postgres role to be able to cancel queries run by that
same role.

I know that I can kill the client connection that started the query, but
I also need to have that role connect to postgres and kill some of it's
running queries.

It's on postgres 9.1.1, running on Debian Squeeze.

One idea that comes to mind is to have a special user account on the box
which would have sudo privileges to the script which will issue 'sh
postgres -c 'psql -c "select pg_cancel_backend(<pid>)"', but before that
run checks that <pid> is actually owned by correct role, etc, etc. But,
all that seems very fishy.

Has anyone had similar requests, and maybe solved them somehow?

    Mario

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: information_schema.tables view does not exist
Следующее
От: Craig James
Дата:
Сообщение: Re: Giving postgres roles 'sudo'-like access