Re: timeout implementation issues

From: Jessica Perry Hekman <jphekman(at)dynamicdiagrams(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: timeout implementation issues
Date: 2002-04-01 16:50:16
Message-ID: Pine.LNX.4.21.0204011143410.8553-100000@atalanta.dynamicdiagrams.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, 1 Apr 2002, Tom Lane wrote:

> This assumes that the query timeout should apply to each subsequent
> query, individually, until explicitly canceled. If you want a timeout
> that applies to only one query and is then forgotten, then maybe this
> wouldn't be the most convenient definition. What semantics are you
> trying to obtain, exactly?

The semantices of the JDBC API:

"Transaction::setQueryTimeout(): Sets the number of seconds the driver
will wait for a Statement to execute to the given number of seconds.
If the limit is exceeded, a SQLException is thrown."

So it should apply to all queries on a given transaction. I think that the
above implemenation suggestion (and Bruce's) would apply to all queries,
regardless of which transaction they were associated with. If each
transaction has some kind of unique ID, maybe that could be added to the
SET statement?

Does anyone know how someone else did this (mSQL, mySQL, etc)? It seems
like there ought to already exist some sort of standard. I'll poke around
and see if I can find anything.

j

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2002-04-01 17:19:14 Re: RI triggers and schemas
Previous Message Stephan Szabo 2002-04-01 16:46:58 Re: RI triggers and schemas