Re: Postgresql 8.0 and Cancel/Kill backend functions - Mailing list pgsql-general

From Stuart Bishop
Subject Re: Postgresql 8.0 and Cancel/Kill backend functions
Date
Msg-id 41EB2731.5030806@stuartbishop.net
Whole thread Raw
In response to Re: Postgresql 8.0 and Cancel/Kill backend functions  ("Magnus Hagander" <mha@sollentuna.net>)
List pgsql-general
Magnus Hagander wrote:
> The cancel function is implemented. See
> http://developer.postgresql.org/docs/postgres/functions-admin.html#FUNCT
> IONS-ADMIN-SIGNAL-TABLE.
>
> Kill function was considered too dangerous.

Pity - I would have loved this for my test harnesses. I need to drop and
recreate the database between each test and, unless I can kill them, a
test that fails to close a connection victimizes all subsequent tests.

(But not a showstopper in our case - we replace the connect method with
a wrapper and have the harnesses keep track of the connection. This only
leaves connections opened by spawned processes a problem.)

It would be great if this was available as an external method I could
install into a particular database. Hmm... I guess it wouldn't be
difficult to write this - it would simply involve selecting the procpid
from pg_stat_activity and sending a kill signal to it, wouldn't it?

--
Stuart Bishop <stuart@stuartbishop.net>
http://www.stuartbishop.net/

pgsql-general by date:

Previous
From: Madison Kelly
Date:
Subject: Re: Iis there anyway to do this(see in message)
Next
From: LENGYEL Zoltan
Date:
Subject: pgpsql help