Skip site navigation (1) Skip section navigation (2)

Re: Implementing setQueryTimeout()

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Oliver Jowett <oliver(at)opencloud(dot)com>
Cc: Gregory Stark <stark(at)enterprisedb(dot)com>, PostgreSQL - JDBC <pgsql-jdbc(at)postgresql(dot)org>
Subject: Re: Implementing setQueryTimeout()
Date: 2008-02-19 01:20:54
Message-ID: 17814.1203384054@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-jdbc
Oliver Jowett <oliver(at)opencloud(dot)com> writes:
> I'd argue that "close connection on network timeout if setQueryTimeout() 
> is set" is better than "do absolutely nothing special if 
> setQueryTimeout() is set", anyway. If you don't want queries being 
> aborted because they are taking too long to complete.. don't set a query 
> timeout!

I think it's a serious, serious conceptual error to tie network timeouts
to query timeouts.  Maybe your specific application needs them to be the
same, but implementing something that forces them to be the same is a
good way to guarantee that your work won't be generally useful or
acceptable for the mainstream driver.

			regards, tom lane

In response to

Responses

pgsql-jdbc by date

Next:From: Paul TomblinDate: 2008-02-19 01:23:45
Subject: Re: Getting "This ResultSet is closed" exceptions
Previous:From: Jan de VisserDate: 2008-02-19 01:17:58
Subject: Re: Getting "This ResultSet is closed" exceptions

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group