Re: Cancelling idle in transaction state
Simon Riggs <simon@2ndquadrant.com>
From: Simon Riggs <simon@2ndQuadrant.com>
To: Martijn van Oosterhout <kleptog@svana.org>
Cc: Kris Jurka <books@ejurka.com>, Joachim Wieland <joe@mcknight.de>, Tom Lane <tgl@sss.pgh.pa.us>, Hannu Krosing <hannu@2ndquadrant.com>, James Pye <lists@jwp.name>, pgsql-hackers <pgsql-hackers@postgresql.org>
Date: 2010-01-13T13:43:06Z
Lists: pgsql-hackers
On Sun, 2010-01-03 at 11:55 +0100, Martijn van Oosterhout wrote: > On Fri, Jan 01, 2010 at 03:31:58PM -0500, Kris Jurka wrote: > > The JDBC driver does want "cancel if active" behavior. The JDBC API > > specifies Statement.cancel() where Statement is running one particular > > backend query. So it really does want to cancel just that one query. > > Already this is tough because of the asynchronous nature of the cancel > > protocol and the inability to say exactly what should be cancelled. > > I've looked in the JDBC documentation but I don't quickly see how they > expect this to work with transactions. What is being proposed seems to > me to be: > > If statement active: > put transaction in aborted state > If no statement active: > do nothing > > However, I see that the documentation wants to be able to abort a > *specific* statement, which is not being proposed here. Can that be > implemented on top of the current proposal? That would require Statement-level abort, which we don't have. -- Simon Riggs www.2ndQuadrant.com