Search Postgresql Archives
Transaction state on connection Idle/Open/Failed
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
- Subject: Transaction state on connection Idle/Open/Failed
- From: David Wall <d.wall@xxxxxxxxxxxx>
- Date: Fri, 16 Aug 2019 12:57:50 -0700
- User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:60.0) Gecko/20100101 Thunderbird/60.8.0
In JDBC (latest version), I'm using the
org.postgresql.jdbc.PgConnection.getTransactionState() that returns an
enumeration of IDLE, OPEN or FAILED.
I am familiar with IDLE, meaning the connection has a new transaction
started, but isn't doing anything. We think of this as the "normal"
state for our connections.
How does OPEN compare to IDLE? If we stop using a connection that's in
the OPEN state, is something wrong? That is, does it have pending
updates that require a commit/rollback?
Same for FAILED. If we no longer need a connection in the FAILED state,
is something wrong? Does it have pending updates that require a
commit/rollback (assuming in this state rollback makes more sense).
I'm really trying to find out what it means for the connection to be in
OPEN or FAILED states compared to IDLE.
Thanks,
David
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]
[Postgresql Jobs]
[Postgresql Admin]
[Postgresql Performance]
[Linux Clusters]
[PHP Home]
[PHP on Windows]
[Kernel Newbies]
[PHP Classes]
[PHP Books]
[PHP Databases]
[Postgresql & PHP]
[Yosemite]