Re: Stuck "idle in transaction (aborted)"

From: Craig Ringer <craig(at)postnewspapers(dot)com(dot)au>
To: Nimesh Satam <nimesh(dot)zedo(at)gmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Stuck "idle in transaction (aborted)"
Date: 2011-01-14 06:17:37
Message-ID: 4D2FEA81.20208@postnewspapers.com.au
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Craig Ringer 2011-01-14 06:35:11 Re: Install PostgreSQL as part of a desktop application, but how to coop with existing installations?
Previous Message Craig Ringer 2011-01-14 05:51:33 Re: database is growing... 1GB per day basis