Re: Is there a way to kill a connection from the pg_stat_activitly list?

Поиск
Список
Период
Сортировка
От Jonah H. Harris
Тема Re: Is there a way to kill a connection from the pg_stat_activitly list?
Дата
Msg-id 36e682920710160500u260077fbm981e12538eea2827@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Is there a way to kill a connection from the pg_stat_activitly list?  (Jessica Richard <rjessil@yahoo.com>)
Список 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 по дате отправления:

Предыдущее
От: Jessica Richard
Дата:
Сообщение: Re: Is there a way to kill a connection from the pg_stat_activitly list?
Следующее
От: Jessica Richard
Дата:
Сообщение: Re: Is there a way to kill a connection from the pg_stat_activitly list?