Please do not use kill, it sometimes resets all the connection on your db,
you might want to use
pkill -f <string in ps -ef> to kill the connection you want to.
On 10/16/07, Jonah H. Harris <jonah(dot)harris(at)gmail(dot)com> wrote:
> On 10/16/07, Jessica Richard <rjessil(at)yahoo(dot)com> wrote:
> > select pg_cancel_backend(procpid) solved half of my problem...at least
> > terminated the query for that user... but it is still holding a user
> > connection in IDLE state....If I have too many of those, Postgres may
> run of
> > out of user connections....
> > I already knew how to kill a connection if the connection is from the
> > host. But I have many remote connections coming from different
> > hard to kill with unix command "kill"... One time, I was testing to
> kill a
> > particular connection on a testing machine, the entrie Postgres was
> > down....
> That's why I said to write a C stored procedure to do it and install
> it on the server. That way you could call it the same way as
> > I need to find a safer, cleaner way to disconnect a user from Postgres
> > needed.
> At this point in time, there isn't one.
> Jonah H. Harris, Sr. Software Architect | phone: 732.331.1324
> EnterpriseDB Corporation | fax: 732.331.1301
> 499 Thornall Street, 2nd Floor | jonah(dot)harris(at)enterprisedb(dot)com
> Edison, NJ 08837 | http://www.enterprisedb.com/
> ---------------------------(end of broadcast)---------------------------
> TIP 1: if posting/reading through Usenet, please send an appropriate
> subscribe-nomail command to majordomo(at)postgresql(dot)org so that your
> message can get through to the mailing list cleanly
Hobby Site : http://dailyhealthtips.blogspot.com
In response to
pgsql-admin by date
|Next:||From: Jonah H. Harris||Date: 2007-10-17 12:00:35|
|Subject: Re: Is there a way to kill a connection from the pg_stat_activitly list?|
|Previous:||From: Moiz Kothari||Date: 2007-10-17 10:36:11|
|Subject: Re: when inserting to table, text type parameter become NULL (after big assignment to this parameter)|