Received: from localhost (unknown [200.46.204.184]) by postgresql.org (Postfix) with ESMTP id B70662E004D for ; Tue, 19 Feb 2008 04:30:13 -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 76972-09 for ; Tue, 19 Feb 2008 04:30:04 -0400 (AST) Received: from tremor.opencloud.co.nz (tremor.opencloud.co.nz [131.203.101.230]) by postgresql.org (Postfix) with ESMTP id B582A2E0030 for ; Tue, 19 Feb 2008 04:30:07 -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 1JRNra-0007Nk-6Y; Tue, 19 Feb 2008 21:30:06 +1300 Message-ID: <47BA9393.7090007@opencloud.com> Date: Tue, 19 Feb 2008 21:30:11 +1300 From: Oliver Jowett User-Agent: Thunderbird 2.0.0.9 (Windows/20071031) MIME-Version: 1.0 To: Till Toenges CC: PostgreSQL - JDBC , Tom Lane , Gregory Stark Subject: Re: Implementing setQueryTimeout() - round 2 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> <47BA491E.9090603@opencloud.com> <47BA5D9C.5050203@opencloud.com> <47BA92F1.3040707@kyon.de> In-Reply-To: <47BA92F1.3040707@kyon.de> 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/143 X-Sequence-Number: 18350 Till Toenges wrote: > Oliver Jowett wrote: >> - softQueryTimeout: 0=disabled, >0 = timeout in ms, default 0 >> - hardQueryTimeout: 0=disabled, >0 = timeout in ms, default 0 >> - softQueryMargin: -1=disabled, >=0 = margin in ms, default 0 >> - hardQueryMargin: -1=disabled, >=0 = margin in ms, default 60s > > I had to think about how you mean this. Doesn't this reduce to just one > useful parameter, namely hardQueryMargin? If hardQueryMargin is set, > then kill the connection after setQueryTimeout() + hardQueryMargin > seconds? All other cases would be covered by setting appropriate values > for these two. The two Margins are there for applications that are not aware of the extensions and just uses setQueryTimeout(). If your code is aware of the two timeouts, it can set them directly. Or they can be set at the connection level and inherited by all users, even ones that don't use setQueryTimeout at all. > And i'm still not quite convinced that anything but "softQueryTimeout" > should be implemented by the driver, but that's just my personal > opinion. How about starting with the simple case (using set), and then > see how it turns out in the real world? The real world case I am dealing with needs the hardQueryTimeout behaviour. If I'm going to implement anything first, it's that. -O