Re: pg_stat_activity howto - Mailing list pgsql-admin

From raf
Subject Re: pg_stat_activity howto
Date
Msg-id 20091106031417.GA16315@raf.org
Whole thread Raw
In response to Re: pg_stat_activity howto  ("Kevin Grittner" <Kevin.Grittner@wicourts.gov>)
Responses Re: pg_stat_activity howto  ("Kevin Grittner" <Kevin.Grittner@wicourts.gov>)
List pgsql-admin
Kevin Grittner wrote:

> If a query is currently running, you will see the start of it.  If no
> query is running on a connection, the connection will show '<IDLE>' or
> '<IDLE> in transaction' depending on whether the client has started a
> database transaction on that connection.  While a transaction remains
> open it can interfere with the work of other connections, including
> some important maintenance activities (particularly VACUUM), so if
> connections linger in '<IDLE> in transaction' state for a long time,
> you should investigate.  It is normally a client-side programming bug.

hi,

that's a worry :) i have a pygresql-using user application
(postgres-8.3.7, python-2.6, pygresql-3.8.1) that is always
idle in transaction when it is idle. upon connecting, it
calls a few database functions, committing after each one.
after that, it's idle in transaction until the next bout of
db activity.

can anyone explain what i'm doing wrong in the attached example?

cheers,
raf


Attachment

pgsql-admin by date:

Previous
From: Vladimir Rusinov
Date:
Subject: Re: fighting ' in transaction'
Next
From: David Schnur
Date:
Subject: REINDEX disk space requirements