Re: Connection Idle in transaction

From: "David Wall" <d(dot)wall(at)computer(dot)org>
To: <pgsql-jdbc(at)postgresql(dot)org>
Subject: Re: Connection Idle in transaction
Date: 2004-04-10 00:32:05
Message-ID: 06f501c41e93$5426a0e0$3201a8c0@rasta
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

> In my application, connections come from a connection pool that I
> control, so I set autocommit to true when adding or returning
> connections to the pool, and set it to false when retrieving connections
> from the pool. The connections that are sitting idle in the pool aren't
> actually "idle in transaction".

While this may work, it seems rather expensive since I believe turning on
and off the autocommit feature actually sends a message from the JDBC driver
to the backend server. It's probably not a big deal, but it seems like two
more roundtrips to the DB each time a connection is used is a bit much.

David

In response to

Browse pgsql-jdbc by date

  From Date Subject
Next Message Oliver Jowett 2004-04-10 00:48:50 Re: Column size BUG with text/bytea with 7.4 JDBC Driver (build
Previous Message Oliver Jowett 2004-04-10 00:29:20 Re: Boolean/Bit BUG with 7.4 JDBC Driver (build 213)