Re: Improvements for statement cancellation - Mailing list pgsql-jdbc

From John R Pierce
Subject Re: Improvements for statement cancellation
Date
Msg-id 51661825.5010308@hogranch.com
Whole thread Raw
In response to Improvements for statement cancellation  (Pawel Veselov <pawel.veselov@gmail.com>)
List pgsql-jdbc
On 4/10/2013 6:47 PM, Pawel Veselov wrote:
> pgpool-II has a special code that sleeps for one second before
> releasing cancel request (rather, between sending cancel requests to
> all backends involved in a connection). It has its reasons for doing
> that sleep.

there may be reasons, but anything that relies on an arbitrary timeout
like 1 second is, IMHO, poorly designed.

>
> This leaves me with a neraly-locked up system sometimes, as the
> cancellation process can take a very long time (these seconds do add
> up). Below is a sample stack trace of how it looks like, code path-wise.
>
> I'm wondering if it's possible if Postgres JDBC could change the
> implementation of cancel() so that cancelQuery() is only sent if the
> statement being called is the actual statement that is being executed
> on the connection, and otherwise be a no-op.

why use pgpool then?   use weblogic's native java connection queuing.



--
john r pierce                                      37N 122W
somewhere on the middle of the left coast



pgsql-jdbc by date:

Previous
From: Pawel Veselov
Date:
Subject: Improvements for statement cancellation
Next
From: Valentine Gogichashvili
Date:
Subject: Re: type cache info fix