Re: user's process shows as "idle in transaction"
Michael Barton <[email protected]>
| Newsgroups | gmane.comp.python.db.psycopg.devel |
|---|---|
| Message-ID | <[email protected]> |
On Mon, Jun 29, 2009 at 2:26 PM, Janet Jacobsen<jsjacobsen-/[email protected]> wrote: > Is there something missing from his code sample, like a commit or > a set_isolation_level, that if added would prevent the "idle in > transaction" from happening? He could set_isolation_level to ISOLATION_LEVEL_AUTOCOMMIT (in psycopg2.extensions) to tell psycopg to not start any transactions, but it'd probably be easier to just do a conn.commit() before the sleep, or conn.rollback() if he isn't modifying anything. -Mike