Re: Idle in Transaction

From: RW <postgres(at)tauceti(dot)net>
To: manugarciac(at)hotmail(dot)com
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Idle in Transaction
Date: 2010-02-05 14:49:16
Message-ID: 4B6C2FEC.3070000@tauceti.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Normally I get "Idle in Transaction" when there is
already a connection which is holding a lock on a
database object (e.g. a table). You've to check if there
is a query holding a lock which causes all the other
transactions to go in "Idle in Transaction" state.
Look for other locks than AccesShareLock in
the pg_locks view e.g. ExclusiveLock. Or maybe
the vacuum process is locking a table.

- Robert

manugarciac(at)hotmail(dot)com wrote:
> I see that every once in a while I get an Idle in Transaction that never
> ends. This eventually becames a problem, as this Idle in Transaction holds
> AccessShareLocks. Even if it didn't, if I reach the maximum number of
> transactions my application dies. Is there any way to know what the
> transaction did in the past so that I can now which particular query causes
> this problem within my application? Or at least a way to set a timeout to
> this transactions? The ideal solution would be to avoid it from happening,
> but at least a timeout would make it less dangerous.
>

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Albe Laurenz 2010-02-05 14:59:06 Re: Query to find list of dates between two dates
Previous Message Sam Mason 2010-02-05 14:45:34 Re: How to escape apostrophes when apostrophes already used to escape something else