Re: implementing query timeout

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Jessica Perry Hekman <jphekman(at)dynamicdiagrams(dot)com>
Cc: PostgreSQL jdbc list <pgsql-jdbc(at)postgresql(dot)org>
Subject: Re: implementing query timeout
Date: 2002-06-07 17:35:05
Message-ID: 200206071735.g57HZ5G27915@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

Jessica Perry Hekman wrote:
> I am still unable to post to the hackers list. I sent a second attempt, a
> few days after subscribing; I sent mail to pgsql-hackers-owner (no
> response, though maybe that didn't go through either); I subscribed from a
> second account, waited a few hours, and send mail (twice) from there
> (again, no bounce and it didn't go through). I am at a loss. Is there some
> special way to subscribe? (I filled my address into the form at
> http://webmail.postgresql.org/cgi-bin/mj_wwwusr?domain=postgresql.org&func=lists-long-full&extra=pgsql-hackers,
> but maybe that just lets me read and not post?).
>
> I'm sorry to keep asking for your help on this, but I am frustrated and
> not sure what else to do at this point.

Jessica, you had asked about implementing a jdbc timeout a while back,
and we got stuck on implementing it in the backend with an alarm()
timeout and a Cancel, and the fact that SET in a transaction would not
roll back.

Well, we have committed fixes to the current CVS to roll back a SET in a
transaction:

test=> SHOW australian_timezones;
INFO: australian_timezones is off
test=> BEGIN;
BEGIN
test=> SET australian_timezones TO true;
SET
test=> SHOW australian_timezones;
INFO: australian_timezones is on
test=> ABORT;
ROLLBACK
test=> SHOW australian_timezones;
INFO: australian_timezones is off

This means we can now create a SET variable that does an alarm/cancel
timeout in a transaction, and know that it can safely bracket a
statement because it will reset if the transaction aborts.

Are you still interested in working on this?

--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026

Responses

Browse pgsql-jdbc by date

  From Date Subject
Next Message Robinson 2002-06-07 20:42:24 Re: RE : Java GUI development
Previous Message Dave Cramer 2002-06-07 17:21:53 Re: "No Results were returned by the query" exception