On 10/16/07, Jessica Richard <rjessil@yahoo.com> wrote: > select pg_cancel_backend(procpid) solved half of my problem...at least it > 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 local > host. But I have many remote connections coming from different machines... > 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 brought > 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 pg_cancel_backend.
> I need to find a safer, cleaner way to disconnect a user from Postgres when > needed.
---------------------------(end of broadcast)--------------------------- TIP 1: if posting/reading through Usenet, please send an appropriate subscribe-nomail command to majordomo@postgresql.org so that your message can get through to the mailing list cleanly