Re: droped out precise time calculations in src/interfaces/libpq/fe-connect.c - Mailing list pgsql-hackers

From Tom Lane
Subject Re: droped out precise time calculations in src/interfaces/libpq/fe-connect.c
Date
Msg-id 11923.1034603607@sss.pgh.pa.us
Whole thread Raw
In response to Re: droped out precise time calculations in src/interfaces/libpq/fe-connect.c  (Denis A Ustimenko <denis@oldham.ru>)
Responses Re: droped out precise time calculations in src/interfaces/libpq/fe-connect.c
List pgsql-hackers
Denis A Ustimenko <denis@oldham.ru> writes:
> On Sun, Oct 13, 2002 at 10:59:40PM -0700, Joe Conway wrote:
>> Well, if we were specifying the timeout in microseconds instead of seconds, 
>> it would make sense to have better resolution. But when you can only 
>> specify the timeout in seconds, the internal time comparison doesn't need 
>> to be any more accurate than seconds (IMHO anyway).

> Actually we have the state machine in connectDBComplete() and the timeout is
> set for machine as the whole. Therefore if 1 second timeout is seted for the
> connectDBComplete() the timeout of particualr iteration of loop can be less
> then 1 second. 

However, the code's been restructured so that we don't need to keep
track of the exact time spent in any one iteration.  The error is only
on the overall delay.  I agree with Joe that it's not worth the effort
needed (in the Win32 case) to make the timeout accurate to < 1 sec.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Alessio Bragadini
Date:
Subject: Re: Changing Column Order (Was Re: MySQL vs PostgreSQL.)
Next
From: Tom Lane
Date:
Subject: Re: Let's get 7.3 done