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 36e682920710150650i1ba6b1bfm2376f38537220547@mail.gmail.com
Whole thread Raw
In response to Is there a way to kill a connection from the pg_stat_activitly list?  (Jessica Richard <rjessil@yahoo.com>)
List pgsql-admin
On 10/15/07, Jessica Richard <rjessil@yahoo.com> wrote:
> When you see a hanging Postgres connection (or a job running so long and you
> don't want to continue any more) from
>
> select * from pg_stat_activity
>
> and you want to disconnect it,
>
> how do you do it?

See pg_cancel_backend

You should also look at using statement_timeout if this is a regular occurrence.


--
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: Kenneth Marshall
Date:
Subject: Re: How to update from 8.1 to 8.2 ?
Next
From: Tommy Gildseth
Date:
Subject: Re: Is there a way to kill a connection from the pg_stat_activitly list?