From: Jonah H. Harris <jonah.harris@gmail.com>
To: Jessica Richard <rjessil@yahoo.com>
Cc: Kevin Grittner <Kevin.Grittner@wicourts.gov>
Cc: pgsql-admin@postgresql.org, "Tommy Gildseth" <tommy.gildseth@usit.uio.no>
Subject: Re: Is there a way to kill a connection from the pg_stat_activitly list?
Date: Tue, 16 Oct 2007 08:00:07 -0400
Message-ID: <36e682920710160500u260077fbm981e12538eea2827@mail.gmail.com> (raw)
In-Reply-To: <561035.86032.qm@web56402.mail.re3.yahoo.com>
References: <47136772.EE98.0025.0@wicourts.gov>
<561035.86032.qm@web56402.mail.re3.yahoo.com>
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/
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-admin@postgresql.org
Cc: jonah.harris@gmail.com, rjessil@yahoo.com, Kevin.Grittner@wicourts.gov, tommy.gildseth@usit.uio.no
Subject: Re: Is there a way to kill a connection from the pg_stat_activitly list?
In-Reply-To: <36e682920710160500u260077fbm981e12538eea2827@mail.gmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox