X-Original-To: pgsql-general-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 8A91D329EA9; Thu, 9 Sep 2004 09:54:02 +0100 (BST) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 38376-02; Thu, 9 Sep 2004 08:53:57 +0000 (GMT) Received: from curry.tmsl.demon.co.uk (tmsl-adsl.demon.co.uk [80.177.114.181]) by svr1.postgresql.org (Postfix) with ESMTP id 10B61329EB7; Thu, 9 Sep 2004 09:53:56 +0100 (BST) Received: from bacon.tmsl.demon.co.uk (bacon.tmsl.demon.co.uk [192.168.7.102]) by curry.tmsl.demon.co.uk (8.11.6/8.11.6) with ESMTP id i898rQW06463; Thu, 9 Sep 2004 09:53:26 +0100 Date: Thu, 9 Sep 2004 09:53:21 +0100 From: Paul Thomas To: Tore Halset Cc: pgsql-general@postgresql.org, pgsql-jdbc@postgresql.org Subject: Re: [JDBC] ERROR: canceling query due to user request Message-ID: <20040909095321.A789@bacon> References: <714.1094568878@sss.pgh.pa.us> <471AEDA2-00EA-11D9-B8FE-000A95CD827E@pvv.ntnu.no> <2445.1094580196@sss.pgh.pa.us> <19720.1094652023@sss.pgh.pa.us> Mime-Version: 1.0 Content-Type: text/plain; format=flowed; charset=ISO-8859-1 In-Reply-To: ; from halset@pvv.ntnu.no on Thu, Sep 09, 2004 at 08:15:09 +0100 X-Mailer: Balsa 1.2.3 Lines: 32 X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.0 tagged_above=0.0 required=5.0 tests= X-Spam-Level: X-Archive-Number: 200409/379 X-Sequence-Number: 65585 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 | +------------------------------+-------------------------------------------+