Re: Improvements for statement cancellation

From: John R Pierce <pierce(at)hogranch(dot)com>
To: pgsql-jdbc(at)postgresql(dot)org
Subject: Re: Improvements for statement cancellation
Date: 2013-04-11 01:55:49
Message-ID: 51661825.5010308@hogranch.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Browse pgsql-jdbc by date

  From Date Subject
Next Message Valentine Gogichashvili 2013-04-12 01:40:01 Re: type cache info fix
Previous Message Pawel Veselov 2013-04-11 01:47:45 Improvements for statement cancellation