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

From: Joe Conway <mail(at)joeconway(dot)com>
To: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
Cc: Denis A Ustimenko <denis(at)oldham(dot)ru>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: droped out precise time calculations in src/interfaces/libpq/fe-connect.c
Date: 2002-10-14 05:15:52
Message-ID: 3DAA5308.3040300@joeconway.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Bruce Momjian wrote:
> So, this is what needs to be dealt with to get it working.
>

More to the point, why is sub-second precision needed in this function?
Connection timeout is given to us in whole seconds (1.205 code, i.e. prior to
the patch in question):

remains.tv_sec = atoi(conn->connect_timeout);
if (!remains.tv_sec)
{
conn->status = CONNECTION_BAD;
return 0;
}
remains.tv_usec = 0;
rp = &remains;

So there is no way to bail out prior to one second. Once you accept that the
timeout is >= 1 second, and in whole second increments, why does it need
sub-second resolution?

Joe

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2002-10-14 05:48:41 Re: droped out precise time calculations in src/interfaces/libpq/fe-connect.c
Previous Message Bruce Momjian 2002-10-14 05:00:07 Re: droped out precise time calculations in src/interfaces/libpq/fe-connect.c