Re: Is there a way to kill a connection from the pg_stat_activitly list? - Mailing list pgsql-admin

From Jonah H. Harris
Subject Re: Is there a way to kill a connection from the pg_stat_activitly list?
Date
Msg-id 36e682920710160500u260077fbm981e12538eea2827@mail.gmail.com
Whole thread Raw
In response to Re: Is there a way to kill a connection from the pg_stat_activitly list?  (Jessica Richard <rjessil@yahoo.com>)
List pgsql-admin
On 10/16/07, Jessica Richard <rjessil@yahoo.com> wrote:
> If the connection is from the local machine, I can find it with "ps -ef |
> grep procpid", then kill it with Unix command "kill" outside Postgres...
>
> But I have many remote connections coming from different machines...it is
> hard to kill on the OS level outside Postgres on the postgres host...
>
> I am looking for something to kill a Postgres user connection within
> Postgres...
> Some thing like, you find the user connection with select * from
> pg_stat_activity...then you pick a procpid and kill right there...

Write a C stored procedure that takes a pid and calls kill(2), install
it on the server, and call it from SQL.

--
Jonah H. Harris, Sr. Software Architect | phone: 732.331.1324
EnterpriseDB Corporation                | fax: 732.331.1301
499 Thornall Street, 2nd Floor          | jonah.harris@enterprisedb.com
Edison, NJ 08837                        | http://www.enterprisedb.com/

pgsql-admin by date:

Previous
From: Jessica Richard
Date:
Subject: Re: Is there a way to kill a connection from the pg_stat_activitly list?
Next
From: Jessica Richard
Date:
Subject: Re: Is there a way to kill a connection from the pg_stat_activitly list?