From: Oliver Jowett <oliver@opencloud.com>
To: JN <jim.newsham@gmail.com>
Cc: pgsql-jdbc@postgresql.org
Subject: Re: Statement.cancel() doesn't seem to work
Date: Tue, 06 Apr 2010 17:52:18 +1200
Message-ID: <4BBACC12.9050204@opencloud.com> (raw)
In-Reply-To: <123b6e3e-7744-4bd6-a470-59e98e1b9141@r27g2000yqn.googlegroups.com>
References: <123b6e3e-7744-4bd6-a470-59e98e1b9141@r27g2000yqn.googlegroups.com>
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-jdbc@postgresql.org
Cc: oliver@opencloud.com, jim.newsham@gmail.com
Subject: Re: Statement.cancel() doesn't seem to work
In-Reply-To: <4BBACC12.9050204@opencloud.com>
References: <123b6e3e-7744-4bd6-a470-59e98e1b9141@r27g2000yqn.googlegroups.com> <4BBACC12.9050204@opencloud.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox