Re: timeout implementation issues - Mailing list pgsql-hackers

From Jessica Perry Hekman
Subject Re: timeout implementation issues
Date
Msg-id Pine.LNX.4.21.0204011300570.9532-100000@atalanta.dynamicdiagrams.com
Whole thread Raw
In response to Re: timeout implementation issues  (Bruce Momjian <pgman@candle.pha.pa.us>)
List pgsql-hackers
On Mon, 1 Apr 2002, Bruce Momjian wrote:

> I don't know which people want, and maybe this is why we need both GUC
> and BEGIN WORK timeouts.  I don't remember this distinction in previous
> discussions but it may be significant.  Of course, the GUC could behave
> at a transaction level as well.  It will be tricky to manage multiple
> alarms in a single process, but it can be done by creating an alarm
> queue.

I think we should do just BEGIN WORK (transaction-level) timeouts; that is
all that the JDBC spec asks for. Does that sound good to people?

So the work that would need to be done is asking the driver to request the
timeout via "BEGIN WORK TIMEOUT 5"; getting the backend to parse that
request and set the alarm on each query in that transaction; getting the
backend to send a cancel request if the alarm goes off. I am right now in
the process of finding the place where BEGIN-level queries are parsed. Any
pointers to the right files to read would be appreciated.

j





pgsql-hackers by date:

Previous
From: Stephan Szabo
Date:
Subject: Re: RI triggers and schemas
Next
From: Jessica Perry Hekman
Date:
Subject: Re: timeout implementation issues