Re: how to kill a Postgres connection on the list of select * from pg_stat_activity?

From: "Scott Marlowe" <scott(dot)marlowe(at)gmail(dot)com>
To: "Jessica Richard" <rjessil(at)yahoo(dot)com>
Cc: pgsql-admin(at)postgresql(dot)org
Subject: Re: how to kill a Postgres connection on the list of select * from pg_stat_activity?
Date: 2007-08-20 21:21:49
Message-ID: dcc563d10708201421r53e58d09u69f6e506e0c87a67@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

On 8/20/07, Jessica Richard <rjessil(at)yahoo(dot)com> wrote:
> Sometime a script talking to the Postgres has already been killed on the OS
> level, but the Postgres for this script is still listed out of select * from
> pg_stat_activity, saying a particular database is still being accessed by
> this script.
>
> How to kill (release) this connection in this case?
>

see http://www.postgresql.org/docs/8.2/static/functions-admin.html

sepcifically

pg_cancel_backend(pid)

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Tena Sakai 2007-08-21 00:00:21 After adjusting checkpoint related entries in postgresql.conf...
Previous Message Jessica Richard 2007-08-20 20:40:35 how to kill a Postgres connection on the list of select * from pg_stat_activity?