Re: display previous query string of idle-in-transaction

From: Guillaume Smet <guillaume(dot)smet(at)gmail(dot)com>
To: Simon Riggs <simon(at)2ndquadrant(dot)com>
Cc: Tatsuhito Kasahara <kasahara(dot)tatsuhito(at)oss(dot)ntt(dot)co(dot)jp>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: display previous query string of idle-in-transaction
Date: 2009-03-27 09:57:44
Message-ID: 1d4e0c10903270257v5f0f2fdev6b742066e13fd974@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, Mar 27, 2009 at 9:07 AM, Simon Riggs <simon(at)2ndquadrant(dot)com> wrote:
> Or take it further back still and think about why "idle in transaction"
> occurs at all and fix *that*. Maybe not in Postgres at all, possibly in
> the driver or even higher up client stack.

From my experience, the main reasons for this problem are:
- a poorly coded connection pool (a lot of people think they really
should write their connection pooling solution themselves...);
- a poorly coded application;
- bugs in the code.

So you really should try to fix them in your application first.

That said, I have one case in mind where I wasn't able to fix
completely the connection pool and the application and we still
encounter idle in transaction connections from time to time.

For this sort of case, a timeout would be a nice solution.

--
Guillaume

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Guillaume Smet 2009-03-27 10:21:04 Re: 8.4 open items list
Previous Message Hitoshi Harada 2009-03-27 09:18:21 Re: tuplestore API problem