Re: Stuck "idle in transaction (aborted)" - Mailing list pgsql-general

From Craig Ringer
Subject Re: Stuck "idle in transaction (aborted)"
Date
Msg-id 4D2FEA81.20208@postnewspapers.com.au
Whole thread Raw
In response to Stuck "idle in transaction (aborted)"  (Nimesh Satam <nimesh.zedo@gmail.com>)
List pgsql-general
On 01/14/2011 12:01 PM, Nimesh Satam wrote:
> Hi,
>
> We have a stale connection on one of our machine. The connection is
> shown as follows:
>
> 26286 ?        Ss     1:31 postgres: postgres reporting localhost
> (37118) idle in transaction (aborted)
>
>
> Can anybody let me know how we can get rid of such connection, is there
> are any command which will kill such a aborted transaction in a safe manner?

psql> select pg_terminate_backend(26286);

or

shell$> kill 26286


Do ***NOT*** use "kill -9" or "kill -KILL".

--
Craig Ringer

pgsql-general by date:

Previous
From: Craig Ringer
Date:
Subject: Re: database is growing... 1GB per day basis
Next
From: Craig Ringer
Date:
Subject: Re: Install PostgreSQL as part of a desktop application, but how to coop with existing installations?