X-Original-To: pgsql-jdbc-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by postgresql.org (Postfix) with ESMTP id 1A26F9DC859 for ; Thu, 5 Jan 2006 20:58:42 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 51387-02 for ; Thu, 5 Jan 2006 20:58:45 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey- Received: from yass.opencloud.co.nz (yass.opencloud.co.nz [131.203.101.226]) by postgresql.org (Postfix) with ESMTP id CBF549DC802 for ; Thu, 5 Jan 2006 20:58:39 -0400 (AST) Received: from 203-79-104-60.cable.paradise.net.nz ([203.79.104.60] helo=[192.168.0.21]) by yass.opencloud.co.nz with asmtp (TLS-1.0:DHE_RSA_AES_128_CBC_SHA:16) (Exim 4.34) id 1EufwI-0006Da-0C; Fri, 06 Jan 2006 13:58:42 +1300 Message-ID: <43BDC0C6.1080205@opencloud.com> Date: Fri, 06 Jan 2006 00:58:46 +0000 From: Oliver Jowett User-Agent: Mozilla Thunderbird 0.8 (Windows/20040913) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Fabrice.Sznajderman@devoteam.com CC: pgsql-jdbc@postgresql.org Subject: Re: [IDLE in TRANSACTION] when I do TOP -c References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=0.106 required=5 tests=[AWL=0.106] X-Spam-Score: 0.106 X-Spam-Level: X-Archive-Number: 200601/21 X-Sequence-Number: 14472 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