Skip site navigation (1) Skip section navigation (2)

Re: [JDBC] ERROR: canceling query due to user request

From: Paul Thomas <paul(at)tmsl(dot)demon(dot)co(dot)uk>
To: Tore Halset <halset(at)pvv(dot)ntnu(dot)no>
Cc: pgsql-general(at)postgresql(dot)org, pgsql-jdbc(at)postgresql(dot)org
Subject: Re: [JDBC] ERROR: canceling query due to user request
Date: 2004-09-09 08:53:21
Message-ID: 20040909095321.A789@bacon (view raw or flat)
Thread:
Lists: pgsql-generalpgsql-jdbc
On 09/09/2004 08:15 Tore Halset wrote:
> On Sep 8, 2004, at 16:00, Tom Lane wrote:
> 
>> This is a smoking gun: your client *is* issuing cancel requests, whether
>> you know it or not.  (Either that or some other process has magically
>> acquired the secret cancel key that was issued to your connection.)
> 
> Thanks! I think I found the problem and a solution to it. The java 
> framework reused Statement objects and issued a st.cancel() between every 
> query performed with the Statement object. I just commented out the 
> st.cancel() line and everything seems to work ok. I googled for others 
> having the same problem and found this one:
> 
> http://archives.postgresql.org/pgsql-jdbc/2003-09/msg00167.php
> 
> Perhaps it is the same problem? Is this something that can be fixed in 
> the jdbc driver or are PostgreSQL(+jdbc) doing the right thing here?
> 
> Regards,
>  - Tore.

Given that statement.cancel() should only be used to cancel a running 
query, I think the problem is more in your framework's misuse of cancel() 
rather than in the driver itself.

-- 
Paul Thomas
+------------------------------+-------------------------------------------+
| Thomas Micro Systems Limited | Software Solutions for Business           |
| Computer Consultants         | http://www.thomas-micro-systems-ltd.co.uk |
+------------------------------+-------------------------------------------+

In response to

Responses

pgsql-jdbc by date

Next:From: Oliver JowettDate: 2004-09-09 09:41:07
Subject: Re: [JDBC] ERROR: canceling query due to user request
Previous:From: Tore HalsetDate: 2004-09-09 07:15:09
Subject: Re: ERROR: canceling query due to user request

pgsql-general by date

Next:From: Oliver JowettDate: 2004-09-09 09:41:07
Subject: Re: [JDBC] ERROR: canceling query due to user request
Previous:From: Jerome LylesDate: 2004-09-09 08:29:25
Subject: Re: Postgresql and scripting [SOLVED]

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group