From: | Oliver Jowett <oliver(at)opencloud(dot)com> |
---|---|
To: | JN <jim(dot)newsham(at)gmail(dot)com> |
Cc: | pgsql-jdbc(at)postgresql(dot)org |
Subject: | Re: Statement.cancel() doesn't seem to work |
Date: | 2010-04-06 05:52:18 |
Message-ID: | 4BBACC12.9050204@opencloud.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-jdbc |
JN wrote:
> Hi, I'm trying to cancel a long-running statement (takes about 400
> seconds) by calling PreparedStatement.cancel() from another thread,
> but it's not working. Specifically, the call to
> PreparedStatement.cancel() completes normally, but the executing
> statement seems to complete normally (i.e., it still takes the same
> amount of time to complete, and it does not throw any exception). The
> sql being executed is a delete ("delete from qos_data where
> report_time < ?"). Is PreparedStatement.cancel() not implemented?
It is implemented, but it just requests that the backend cancels any
query in progress - there are no guarantees that it will be effective.
Does the query get canceled if you manually send a SIGINT to the
relevant backend?
-O
From | Date | Subject | |
---|---|---|---|
Next Message | Breno BF | 2010-04-06 15:01:11 | Re: An I/O error occured while sending to the backend. |
Previous Message | Craig Ringer | 2010-04-06 04:09:42 | Re: An I/O error occured while sending to the backend. |