canceling query due to user request

From: Anthony Presley <anthony(at)resolution(dot)com>
To: pgsql-jdbc(at)postgresql(dot)org
Subject: canceling query due to user request
Date: 2009-03-04 23:11:10
Message-ID: 1236208270.3656.46.camel@dellLaptop.resolution.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

Hi,

We recently acquired a multi-threaded JDBC reporting tool (for which we
do not have the source), which are running against PostgreSQL 8.3.6,
using the latest Type3 JDBC driver (I have also tried the Type4).

After a number of requests for reports (which are all fine), PostgreSQL
appears to start dropping connections, and we start seeing these in the
logs:

[ERROR] Mar 4, 2009 4:46:17 PM: ERROR: canceling statement due to user
request
org.postgresql.util.PSQLException: ERROR: canceling statement due to
user request
at
org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:1608)
at
org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1343)
at
org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:194)

After doing a lot of Google searching, it appears that Oliver Jowett
encountered this problem a number of years ago (2003?), and discovered a
race condition in the JDBC driver relating to a Statement.Cancel
command.

However, later in 2004 and again in 2005, I found these threads:

http://archives.postgresql.org/pgsql-jdbc/2004-09/msg00027.php

http://archives.postgresql.org/pgsql-jdbc/2005-09/msg00046.php

Which imply that the patch hasn't been addressed.

I haven't ruled out that the report vendor isn't messing up their own
query cancellations, but I'm doing what I can to make sure that the
problem is on their end.

Has the patch to stop this condition been applied? If not, what do I
need to do to apply it?

Is it likely that the problem is the vendor, or is this due to the
Statement Cancel being called?

Thanks very much.

--
Anthony

Browse pgsql-jdbc by date

  From Date Subject
Next Message Hannu Krosing 2009-03-05 08:31:40 What do people use for connection pooling with PostgreSQL JDBC
Previous Message Thomas Kellerer 2009-03-04 07:46:40 Re: Inserting into a uuid column