| From: | Mario Splivalo <mario(dot)splivalo(at)megafon(dot)hr> |
|---|---|
| To: | "pgsql-admin(at)postgresql(dot)org" <pgsql-admin(at)postgresql(dot)org> |
| Subject: | Giving postgres roles 'sudo'-like access |
| Date: | 2011-12-19 18:04:13 |
| Message-ID: | 4EEF7C9D.60006@megafon.hr |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | 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
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Craig James | 2011-12-19 18:46:53 | Re: Giving postgres roles 'sudo'-like access |
| Previous Message | Scott Toland | 2011-12-19 16:15:49 | PG export/import encoding issue |