Received: from makus.postgresql.org (makus.postgresql.org [98.129.198.125]) by mail.postgresql.org (Postfix) with ESMTP id AAA1C1C3D1F for ; Tue, 20 Dec 2011 09:49:48 -0400 (AST) Received: from moutng.kundenserver.de ([212.227.126.171]) by makus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1Rd04d-0007kl-Nt for pgsql-admin@postgresql.org; Tue, 20 Dec 2011 13:49:48 +0000 Received: from [192.168.1.3] (mail.highperformancepostgresql.com [71.179.240.8]) by mrelayeu.kundenserver.de (node=mrbap3) with ESMTP (Nemesis) id 0LZwFx-1QyUNQ2f8f-00liwL; Tue, 20 Dec 2011 14:49:30 +0100 Message-ID: <4EF09268.6090305@2ndQuadrant.com> Date: Tue, 20 Dec 2011 08:49:28 -0500 From: Greg Smith User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.16) Gecko/20111110 Icedove/3.0.11 MIME-Version: 1.0 To: pgsql-admin@postgresql.org Subject: Re: Giving postgres roles 'sudo'-like access References: <4EEF7C9D.60006@megafon.hr> In-Reply-To: <4EEF7C9D.60006@megafon.hr> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Provags-ID: V02:K0:Rgu48BnH9Y0O+js03r9sUVcwWpyOl3YmpyTipw+yUIl 1LKo/vQVCm/5kQ496VUfTqgwBwZzyRuuEVP3Sdfa8Jk1H2ec17 OSuFLepuNzXWvlhIEZ1d4PXBs+zq4JGrpujkSmdF7GpK1VbTnn il7Fgk3WybFC/uI973lsnvQ6ZsWK3i/Gof4E9Y7q6HAp9aHrK7 XcPYHdNinRwt+4duYX1JyyIDDbpUp0MeR2N7DPZ7TMC5V1hMTD tGT8U/DNFA+PKKoEPn3HWJMKfwAIdS252jiwpeuNy/7acqk8tF 92JRgvjfT97awMwAtwiltyB+VpLLYmKglmvlkJyfcSxem48Qjv +H8TJhltPU7Pk882FdR4= X-Pg-Spam-Score: -1.9 (-) X-Archive-Number: 201112/101 X-Sequence-Number: 38859 On 12/19/2011 01:04 PM, Mario Splivalo wrote: > I need to have postgres role to be able to cancel queries run by that > same role. > This feature is close to commit as a new one for PostgreSQL 9.2: http://archives.postgresql.org/message-id/4EEB3A2B.8090102@2ndQuadrant.com http://archives.postgresql.org/pgsql-hackers/2011-12/msg00822.php You might use some of that code and make your own pg_cancel_backend-like function that loads into the database. -- Greg Smith 2ndQuadrant US greg@2ndQuadrant.com Baltimore, MD PostgreSQL Training, Services, and 24x7 Support www.2ndQuadrant.us