Re: timeout implementation issues

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Hiroshi Inoue <Inoue(at)tpf(dot)co(dot)jp>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Jan Wieck <janwieck(at)yahoo(dot)com>, Jessica Perry Hekman <jphekman(at)dynamicdiagrams(dot)com>, Barry Lind <barry(at)xythos(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: timeout implementation issues
Date: 2002-04-08 18:05:03
Message-ID: 200204081805.g38I53907776@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hiroshi Inoue wrote:
> > -----Original Message-----
> > From: Bruce Momjian [mailto:pgman(at)candle(dot)pha(dot)pa(dot)us]
> >
> > Hiroshi Inoue wrote:
> > > > I am confused. Above you state you want SET QUERY_TIMEOUT to be
> > > > per-query. I assume you mean that the timeout applies for
> > only the next
> > > > query and is turned off after that.
> > >
> > > Hmm there seems a misunderstanding between you and I but I
> > > don't see what it is. Does *SET QUERY_TIMEOUT* start a timer in
> > > your scenario ? In my scenario *SET QUERY_TIMEOUT* only
> > > registers the timeout value for subsequent queries.
> >
> > SET QUERY_TIMEOUT does not start a timer. It makes sure each query
> > after the SET is timed and automatically canceled if the single query
> > exceeds the timeout interval.
>
> OK using your example, one by one
>
> BEGIN WORK;
> SET query_timeout=20;
> query fails;
> SET query_timeout=0;
>
> For what the SET was issued ?
> What command is issued if the query was successful ?
>
> COMMIT WORK;

Here, SET should only to the query labeled "query fails". However,
right now, because the query failed, the second SET would not be seen,
and the timout would apply to all remaining queries in the session.

--
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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Hiroshi Inoue 2002-04-08 21:14:46 Re: timeout implementation issues
Previous Message Hiroshi Inoue 2002-04-08 17:56:27 Re: timeout implementation issues