Re: timeout implementation issues - Mailing list pgsql-hackers

From Hiroshi Inoue
Subject Re: timeout implementation issues
Date
Msg-id 3CB229F7.C4716E31@tpf.co.jp
Whole thread Raw
In response to Re: timeout implementation issues  (Bruce Momjian <pgman@candle.pha.pa.us>)
Responses Re: timeout implementation issues  (Bruce Momjian <pgman@candle.pha.pa.us>)
List pgsql-hackers
Bruce Momjian wrote:
> 
> 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.

Does setQueryTimeout() issue a corresponding SET QUERY_TIMEOUT
command immediately in the scenario ?

regards,
Hiroshi Inoue


pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: timeout implementation issues
Next
From: Bruce Momjian
Date:
Subject: Re: timeout implementation issues