Re: timeout implementation issues

Поиск
Список
Период
Сортировка
От Hiroshi Inoue
Тема Re: timeout implementation issues
Дата
Msg-id 3CB23951.BE9EA709@tpf.co.jp
обсуждение исходный текст
Ответ на Re: timeout implementation issues  (Bruce Momjian <pgman@candle.pha.pa.us>)
Ответы Re: timeout implementation issues  (Bruce Momjian <pgman@candle.pha.pa.us>)
Список pgsql-hackers
Bruce Momjian wrote:
> 
> Hiroshi Inoue wrote:
> > > > 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.
> >
> > Does setQueryTimeout() issue a corresponding SET QUERY_TIMEOUT
> > command immediately in the scenario ?
> 
> Yes.  If we don't make the SET rollback-able, we have to do all sorts of
> tricks in jdbc so aborted transactions get the proper SET value.

In my scenario, setQueryTimeout() only saves the timeout
value and issues the corrsponding SET QUERY_TIMEOUT command
immediately before each query if necessary.

regards,
Hiroshi Inoue


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

Предыдущее
От: Fernando Nasser
Дата:
Сообщение: Re: What's the CURRENT schema ?
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: timeout implementation issues