Re: timeout implementation issues

Bruce Momjian <pgman@candle.pha.pa.us>

From: Bruce Momjian <pgman@candle.pha.pa.us>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Jan Wieck <janwieck@yahoo.com>, Jessica Perry Hekman <jphekman@dynamicdiagrams.com>, Barry Lind <barry@xythos.com>, pgsql-hackers@postgresql.org
Date: 2002-04-06T01:33:37Z
Lists: pgsql-hackers
Tom Lane wrote:
> Jan Wieck <janwieck@yahoo.com> writes:
> >     Could  we  get  out  of  this  by  defining that "timeout" is
> >     automatically reset at next statement end?
> 
> I was hoping to avoid that, because it seems like a wart.  OTOH,
> it'd be less of a wart than the global changes of semantics that
> Bruce is proposing :-(
> 
> How exactly would you make this happen?  The simplest way I can think of
> to do it (reset timeout in outer loop in postgres.c) would not work,
> because it'd reset the timeout as soon as the SET statement completes.
> How would you get the setting to survive for exactly one additional
> statement?

Sure, you could reset it, but there are going to be cases where you want
to do a timeout=6000 for the entire session.  If it resets after the
first statement, this is hard to do.

-- 
  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, Pennsylvania 19026