Received: from localhost (maia-5.hub.org [200.46.204.182]) by postgresql.org (Postfix) with ESMTP id E5E899F972F for ; Fri, 10 Aug 2007 13:20:52 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.182]) (amavisd-maia, port 10024) with ESMTP id 25998-07 for ; Fri, 10 Aug 2007 13:20:44 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.5 Received: from mail63.csoft.net (leary.csoft.net [205.205.214.5]) by postgresql.org (Postfix) with SMTP id AE61B9F96EC for ; Fri, 10 Aug 2007 13:20:46 -0300 (ADT) Received: (qmail 692 invoked by uid 1112); 10 Aug 2007 16:20:45 -0000 Date: Fri, 10 Aug 2007 12:20:45 -0400 (EDT) From: Kris Jurka X-X-Sender: books@leary.csoft.net To: Tom Lane cc: Andrea Spinelli , pgsql-jdbc@postgresql.org, Alessandro Magnolo , Valerio Mazzoleni Subject: Re: executeQuery hangs on busy server - PROPOSAL: socketTimeout parameter In-Reply-To: <3763.1186762494@sss.pgh.pa.us> Message-ID: References: <46BC20B6.4080409@imteam.it> <3763.1186762494@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200708/57 X-Sequence-Number: 17370 On Fri, 10 Aug 2007, Tom Lane wrote: > Kris Jurka writes: >> People want the query to be stopped, but they don't want their whole >> connection to be killed which is what your change does. > > Can't you just "set statement_timeout = something" if you don't want to > let long queries complete? > Unfortunately the timeout is set on a Statement object, not the Connection, so any number of different timeouts may be floating around and we'd need to set and reset the timeout on each query execution to ensure we're executing with the right timeout. So that's how it will be implemented eventually, but it's not just a trivial SET that we're missing. Kris Jurka