Re: Cancelling idle in transaction state

From: Martijn van Oosterhout <kleptog(at)svana(dot)org>
To: Kris Jurka <books(at)ejurka(dot)com>
Cc: Simon Riggs <simon(at)2ndQuadrant(dot)com>, Joachim Wieland <joe(at)mcknight(dot)de>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Hannu Krosing <hannu(at)2ndquadrant(dot)com>, James Pye <lists(at)jwp(dot)name>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Cancelling idle in transaction state
Date: 2010-01-03 10:55:31
Message-ID: 20100103105531.GB11071@svana.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

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?

Have a nice day,
--
Martijn van Oosterhout <kleptog(at)svana(dot)org> http://svana.org/kleptog/
> Please line up in a tree and maintain the heap invariant while
> boarding. Thank you for flying nlogn airlines.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tatsuo Ishii 2010-01-03 12:00:33 Re: exec_execute_message crash
Previous Message Martijn van Oosterhout 2010-01-03 10:48:56 Re: So do we really *need* those substring() ops in tab-completion queries?