Received: from localhost (unknown [200.46.204.184]) by postgresql.org (Postfix) with ESMTP id 1CB692E003A for ; Mon, 18 Feb 2008 23:12:32 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.184]) (amavisd-maia, port 10024) with ESMTP id 93943-05 for ; Mon, 18 Feb 2008 23:12:20 -0400 (AST) Received: from tremor.opencloud.co.nz (tremor.opencloud.co.nz [131.203.101.230]) by postgresql.org (Postfix) with ESMTP id F2D9B2E002C for ; Mon, 18 Feb 2008 23:12:28 -0400 (AST) Received: from 219-89-100-120.jetstart.xtra.co.nz ([219.89.100.120] helo=[192.168.1.3]) by tremor.opencloud.co.nz with esmtpsa (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.63) (envelope-from ) id 1JRIu7-00066Q-JC; Tue, 19 Feb 2008 16:12:23 +1300 Message-ID: <47BA491E.9090603@opencloud.com> Date: Tue, 19 Feb 2008 16:12:30 +1300 From: Oliver Jowett User-Agent: Thunderbird 2.0.0.9 (Windows/20071031) MIME-Version: 1.0 To: Tom Lane CC: Gregory Stark , PostgreSQL - JDBC Subject: Re: Implementing setQueryTimeout() References: <47B8E200.2020307@opencloud.com> <5350.1203299903@sss.pgh.pa.us> <47B8EB1C.8090802@opencloud.com> <87ejbao6bg.fsf@oxford.xeocode.com> <47BA2A6E.6050907@opencloud.com> <17814.1203384054@sss.pgh.pa.us> <47BA470A.8000904@opencloud.com> <19443.1203390470@sss.pgh.pa.us> In-Reply-To: <19443.1203390470@sss.pgh.pa.us> 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: 200802/135 X-Sequence-Number: 18342 Tom Lane wrote: > Oliver Jowett writes: >> Tom Lane wrote: >>> I think it's a serious, serious conceptual error to tie network timeouts >>> to query timeouts. > >> Why? I don't understand this argument. > > Because the failure mechanisms that you're worried about are completely > different in the two cases, and don't necessarily have similar timeout > requirements (to say nothing of the appropriate recovery actions). Which is fair enough .. but I have a single JDBC method to work with here. I could implement something driver-specific but it seems a little silly to have timeout behaviour in the driver but have the standard method unimplemented. Note that you could implement different recovery behaviour by looking at the SQLState of the thrown exception easily enough. -O