From: Oliver Jowett <oliver@opencloud.com>
To: Fabrice.Sznajderman@devoteam.com
Cc: pgsql-jdbc@postgresql.org
Subject: Re: [IDLE in TRANSACTION] when I do TOP -c
Date: Fri, 06 Jan 2006 00:58:46 +0000
Message-ID: <43BDC0C6.1080205@opencloud.com> (raw)
In-Reply-To: <OFCC35E596.69D597E4-ONC12570ED.00511060-C12570ED.0051A970@devoteam.com>
References: <OFCC35E596.69D597E4-ONC12570ED.00511060-C12570ED.0051A970@devoteam.com>
Fabrice.Sznajderman@devoteam.com wrote:
> I look the processes on my server where was installed Postgres Database.
> I can saw, when I do top command, many process named : idle in transaction.
>
> What happend with this process? what is the cause of this message?
Each process corresponds to a single client connection to the database.
"idle in transaction" means that connection has a transaction open but
is not currently doing any work. If I had to guess at the cause of this
I'd say that you are using a connection pool and a 7.4 driver.
The JDBC driver would cause these idle transactions itself (mostly
harmlessly) in 7.4 and earlier releases when autocommit was off: a
commit or rollback would automatically start a new transaction even
before any queries had been run.
With 8.0 and later drivers a new transaction is only started when the
first query after a commit or rollback is done, so if you are using
these drivers it probably indicates an application bug where it is not
correctly closing transactions it begins.
-O
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-jdbc@postgresql.org
Cc: oliver@opencloud.com, Fabrice.Sznajderman@devoteam.com
Subject: Re: [IDLE in TRANSACTION] when I do TOP -c
In-Reply-To: <43BDC0C6.1080205@opencloud.com>
References: <OFCC35E596.69D597E4-ONC12570ED.00511060-C12570ED.0051A970@devoteam.com> <43BDC0C6.1080205@opencloud.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox