Thread: How to determine which are "idle in transaction"

How to determine which are "idle in transaction"

From
Mike Bridge
Date:
When I do a "ps ax" I have 7 processes originating from my application
that are permamently "idle in transaction".   First off, is this
something to be concerned about?  It appears to be a vendor library
that's causing it.  Second, how can I tell what these stuck transactions
are?  Is there a way to list them?
(I'm using postgresql  7.1.3)

Thanks,

-Mike

--
Mike Bridge




Re: How to determine which are "idle in transaction"

From
Doug McNaught
Date:
Mike Bridge <mike@bridgecanada.com> writes:

> When I do a "ps ax" I have 7 processes originating from my application
> that are permamently "idle in transaction".   First off, is this
> something to be concerned about?

Yes, it can block VACUUM.

>                                   It appears to be a vendor library
> that's causing it.  Second, how can I tell what these stuck transactions
> are?  Is there a way to list them?

I don't think so, other than turning up logging to the point that SQL
queries are logged, and watching for activity from those clients.
They may be just issuing a BEGIN and then sitting there, which doesn't
cause any problems with other databases...

-Doug
--
Let us cross over the river, and rest under the shade of the trees.
   --T. J. Jackson, 1863