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

From: "Jonah H(dot) Harris" <jonah(dot)harris(at)gmail(dot)com>
To: "Jessica Richard" <rjessil(at)yahoo(dot)com>
Cc: pgsql-admin(at)postgresql(dot)org
Subject: Re: Is there a way to kill a connection from the pg_stat_activitly list?
Date: 2007-10-15 13:50:15
Message-ID: 36e682920710150650i1ba6b1bfm2376f38537220547@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

On 10/15/07, Jessica Richard <rjessil(at)yahoo(dot)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(dot)harris(at)enterprisedb(dot)com
Edison, NJ 08837 | http://www.enterprisedb.com/

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Jonah H. Harris 2007-10-15 15:42:40 Re: Distributed DataBases
Previous Message Tommy Gildseth 2007-10-15 13:23:21 Re: Is there a way to kill a connection from the pg_stat_activitly list?