Received: from localhost (maia-2.hub.org [200.46.204.187]) by postgresql.org (Postfix) with ESMTP id 47C209F9700 for ; Fri, 10 Aug 2007 13:53:55 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.187]) (amavisd-maia, port 10024) with ESMTP id 85255-06-3 for ; Fri, 10 Aug 2007 13:53:47 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.5 Received: from mail03.imteam.it (unknown [87.241.52.130]) by postgresql.org (Postfix) with ESMTP id 7D2759F9745 for ; Fri, 10 Aug 2007 13:53:47 -0300 (ADT) Received: (qmail 19763 invoked by uid 89); 10 Aug 2007 16:53:45 -0000 Received: from unknown (HELO ?127.0.0.1?) (192.168.10.132) by mail03 with SMTP; 10 Aug 2007 16:53:45 -0000 Message-ID: <46BC9819.4000807@imteam.it> Date: Fri, 10 Aug 2007 18:53:45 +0200 From: Andrea Spinelli User-Agent: Mozilla Thunderbird 1.0 (Windows/20041206) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Kris Jurka CC: pgsql-jdbc@postgresql.org Subject: Re: executeQuery hangs on busy server - PROPOSAL: socketTimeout parameter References: <46BC20B6.4080409@imteam.it> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200708/58 X-Sequence-Number: 17371 Kris Jurka wrote: > On Fri, 10 Aug 2007, Andrea Spinelli wrote: > > > I believe this is a bug in the 8.1 windows port. What's the exact > version you are using? I think this was fixed in 8.1.6. The exact version I am using is 8.1.4 - so my version is old - good! There is hope that upgrading will fix everything! > > People want the query to be stopped, but they don't want their whole > connection to be killed which is what your change does. > I see your point, but - as far as I know - there is no way of interrupting a running query (short of exiting from the main executable); so maybe a (large) timeout would be a safe way of protecting against trouble. As to killing the connection, using a connection pool may mitigate the problem. Better a broken connection in a running thread than a useless thread which cannot be interrupted! Of course, my perspective is mainly related to web applications - standalone applications might use other techniques. Anyway, if you plan to support query timeouts, as you suggest in another message, that would be perfect. IMHO, depending on your plans, the "socketTimeout" strategy could be a temporary fix if the "setQueryTimeout" is too far in the future. Just my suggestions after a week of stress-testing a busy server! I love postgreSQL and thank everybody for their efforts here! Andrea Spinelli