Re: Statement.cancel() doesn't seem to work

Поиск
Список
Период
Сортировка
От Oliver Jowett
Тема Re: Statement.cancel() doesn't seem to work
Дата
Msg-id 4BBACC12.9050204@opencloud.com
обсуждение исходный текст
Ответ на Statement.cancel() doesn't seem to work  (JN <jim.newsham@gmail.com>)
Список 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

В списке pgsql-jdbc по дате отправления:

Предыдущее
От: JN
Дата:
Сообщение: Statement.cancel() doesn't seem to work
Следующее
От: Breno BF
Дата:
Сообщение: Re: An I/O error occured while sending to the backend.