Re: timeout implementation issues

Поиск
Список
Период
Сортировка
От Bruce Momjian
Тема Re: timeout implementation issues
Дата
Msg-id 200204082115.g38LFfQ00224@candle.pha.pa.us
обсуждение исходный текст
Ответ на Re: timeout implementation issues  ("Hiroshi Inoue" <Inoue@tpf.co.jp>)
Список pgsql-hackers
Hiroshi Inoue wrote:
> > -----Original Message-----
> > From: Bruce Momjian [mailto:pgman@candle.pha.pa.us]
> > > 
> > > 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". 
> 
> Why should the SET query_timeout = 0 command be issued
> only when the query failed ? Is it a JDBC driver's requirement
> or some applications' requirements which uses the JDBC driver ?

They want the timeout for only the one statement, so they have to set it
to non-zero before the statement, and to zero after the statement.  In
our current code, if the query fails, the setting to zero is ignored,
meaning all following queries have the timeout, even ones outside that
transaction.

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


В списке pgsql-hackers по дате отправления:

Предыдущее
От: "Hiroshi Inoue"
Дата:
Сообщение: Re: timeout implementation issues
Следующее
От: Hiroshi Inoue
Дата:
Сообщение: Re: timeout implementation issues