pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Paul Thomas <paul@tmsl.demon.co.uk>
To: Tore Halset <halset@pvv.ntnu.no>
Cc: pgsql-general@postgresql.org
Cc: pgsql-jdbc@postgresql.org
Subject: Re: [JDBC] ERROR: canceling query due to user request
Date: Thu, 9 Sep 2004 09:53:21 +0100
Message-ID: <20040909095321.A789@bacon> (raw)
In-Reply-To: <FBD2DEDA-022F-11D9-9D99-000A95CD827E@pvv.ntnu.no>
References: <CB968022-00C1-11D9-8D0A-000A95CD827E@pvv.ntnu.no>
	<714.1094568878@sss.pgh.pa.us>
	<471AEDA2-00EA-11D9-B8FE-000A95CD827E@pvv.ntnu.no>
	<2445.1094580196@sss.pgh.pa.us>
	<AF83CF68-0165-11D9-A26A-000A95CD827E@pvv.ntnu.no>
	<19720.1094652023@sss.pgh.pa.us>
	<FBD2DEDA-022F-11D9-9D99-000A95CD827E@pvv.ntnu.no>


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 |
+------------------------------+-------------------------------------------+



view thread (22+ messages)  latest in thread

Message-ID: <20040909095321.A789@bacon>
Permalink:  ../20040909095321.A789@bacon/
Also on:    postgresql.org/message-id/20040909095321.A789@bacon

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-jdbc@postgresql.org
  Cc: paul@tmsl.demon.co.uk, halset@pvv.ntnu.no, pgsql-general@postgresql.org
  Subject: Re: [JDBC] ERROR: canceling query due to user request
  In-Reply-To: <20040909095321.A789@bacon>
  References: <CB968022-00C1-11D9-8D0A-000A95CD827E@pvv.ntnu.no> <714.1094568878@sss.pgh.pa.us> <471AEDA2-00EA-11D9-B8FE-000A95CD827E@pvv.ntnu.no> <2445.1094580196@sss.pgh.pa.us> <AF83CF68-0165-11D9-A26A-000A95CD827E@pvv.ntnu.no> <19720.1094652023@sss.pgh.pa.us> <FBD2DEDA-022F-11D9-9D99-000A95CD827E@pvv.ntnu.no> <20040909095321.A789@bacon>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox