From: | Rod Taylor <rbt(at)rbt(dot)ca> |
---|---|
To: | Magnus Hagander <mha(at)sollentuna(dot)net> |
Cc: | PostgreSQL Development <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Function to kill backend |
Date: | 2004-04-02 22:02:25 |
Message-ID: | 1080943345.56361.402.camel@jester |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Fri, 2004-04-02 at 16:52, Magnus Hagander wrote:
> Hi!
>
> When debugging on win32, I've created myself a little function that I
> feel should be added to the "backend proper". While it adds a lot of
> vlaue on win32, I think it adds quite a bit of value on non-win32
> platforms as well...
>
> The function is pg_kill_backend(<pid>,<signal>). superuser-only, of
> course. Which simply sends a signal to the specified backend -
> querycancel, terminate, etc.
Nice.. My new favourite command is going to be:
SELECT pg_kill_backend(procpid, 'TERM') FROM pg_stat_activity WHERE
current_query LIKE '<IDLE>%';
--
Rod Taylor <rbt [at] rbt [dot] ca>
Build A Brighter Lamp :: Linux Apache {middleware} PostgreSQL
PGP Key: http://www.rbt.ca/signature.asc
From | Date | Subject | |
---|---|---|---|
Next Message | jeff.greco | 2004-04-02 22:09:19 | namespace dilemma |
Previous Message | Manfred Koizar | 2004-04-02 21:53:29 | Re: [GENERAL] Large DB |