Re: Function to kill backend
| От | Rod Taylor |
|---|---|
| Тема | Re: Function to kill backend |
| Дата | |
| Msg-id | 1080943345.56361.402.camel@jester обсуждение исходный текст |
| Ответ на | Function to kill backend ("Magnus Hagander" <mha@sollentuna.net>) |
| Список | 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
В списке pgsql-hackers по дате отправления: