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

Re: idle in transaction

From: "Sriram Dandapani" <sdandapani(at)counterpane(dot)com>
To: <pgsql-jdbc(at)postgresql(dot)org>
Subject: Re: idle in transaction
Date: 2006-09-17 15:54:21
Message-ID: 6992E470F12A444BB787B5C937B9D4DF05DF1A1B@ca-mail1.cis.local (view raw, whole thread or download thread mbox)
Lists: pgsql-jdbc
I use only the postgres 8.1.404 driver(checked that no other drivers
were in the classpath)

I also set autocommit to true before I close the connection. I use jboss
to get the datasource

The autocommit change does not change the behaviour. I still see idle in

-----Original Message-----
From: Markus Schaber [mailto:schabi(at)logix-tt(dot)com] 
Sent: Saturday, September 16, 2006 1:27 AM
To: Sriram Dandapani
Cc: pgsql-jdbc(at)postgresql(dot)org
Subject: Re: [JDBC] idle in transaction

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
> the time. The application logic closes all connections, so it makes me
> wonder if the driver is issuing a begin statement after every commit
> 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?


pgsql-jdbc by date

Next:From: Laura WangDate: 2006-09-18 00:42:50
Subject: multidimensinal array
Previous:From: Dave CramerDate: 2006-09-16 12:12:24
Subject: Re: about monitoring the input stream

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