From: Mario Splivalo <mario.splivalo@megafon.hr>
To: pgsql-admin@postgresql.org
Subject: Re: Giving postgres roles 'sudo'-like access
Date: Tue, 20 Dec 2011 09:14:25 +0100
Message-ID: <4EF043E1.4010808@megafon.hr> (raw)
In-Reply-To: <4EEF869D.9060703@emolecules.com>
References: <4EEF7C9D.60006@megafon.hr>
<4EEF869D.9060703@emolecules.com>
On 12/19/2011 07:46 PM, Craig James wrote:
> Backend Postgres processes run as the Postgres user, so they have
> permission to kill each other. You write an add-on function that just
> kills a process:
>
> select my_kill_backend(pid);
>
> Naturally, this is very dangerous. There are all sorts of security
> implications. You want to use signal 2 or 15, not 9. And so forth.
That 'my_kill_backend' actually calls kill, not pg_cancel/terminate_backend?
I'm thinking into creating this function, and granting particular role
access to it, and then make sure, in the function, that it can kill only
processes 'owned' by that role.
Mario
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-admin@postgresql.org
Cc: mario.splivalo@megafon.hr
Subject: Re: Giving postgres roles 'sudo'-like access
In-Reply-To: <4EF043E1.4010808@megafon.hr>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox