Skip site navigation (1) Skip section navigation (2)

Re: idle in transaction

From: Markus Schaber <schabi(at)logix-tt(dot)com>
To: Sriram Dandapani <sdandapani(at)counterpane(dot)com>
Cc: pgsql-jdbc(at)postgresql(dot)org
Subject: Re: idle in transaction
Date: 2006-09-16 08:26:48
Message-ID: 450BB548.2070506@logix-tt.com (view raw or flat)
Thread:
Lists: pgsql-jdbc
Hi, Sriram,

Sriram Dandapani wrote:
> I use postgres 8.1.2 database and postgres 8.1.404 jdbc driver .
> 
> I keep seeing “idle in transaction” connections on the postgres box all
> the time. The application logic closes all connections, so it makes me
> wonder if the driver is issuing a begin statement after every commit to
> leave a floating transaction open.

Current driver versions (and 8.1.404 is current enough) should not show
this behaviour any more, which was annoying in older drivers.

Are you shure that you have the correct driver version? We occasionally
get reports from users thinking they run a certain driver version, but
they accidentally have another driver earlier in the class search path.
Especially the $JRE/lib/ext directory is dangerous, people tend to drop
.jars there and then forget them.

Another possibility is that you use a broken connection pooling that
fails to reset the connections properly. Could you modify your
application logic to set all connections to autocommit mode before
closing / returning them to the pool?

HTH,
Markus


In response to

pgsql-jdbc by date

Next:From: Albert CardonaDate: 2006-09-16 10:08:43
Subject: Re: about monitoring the input stream
Previous:From: Sriram DandapaniDate: 2006-09-15 18:47:11
Subject: idle in transaction

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group