From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Thomas Munro <thomas(dot)munro(at)gmail(dot)com> |
Cc: | Dominique Devienne <ddevienne(at)gmail(dot)com>, pgsql-general(at)postgresql(dot)org |
Subject: | Re: libpq v17 PQsocketPoll timeout is not granular enough |
Date: | 2024-06-10 23:49:25 |
Message-ID: | 927473.1718063365@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Thomas Munro <thomas(dot)munro(at)gmail(dot)com> writes:
> On Tue, Jun 11, 2024 at 2:36 AM Dominique Devienne <ddevienne(at)gmail(dot)com> wrote:
>> PQsocketPoll() being based on time_t, it has only second resolution, AFAIK.
>> Despite the [underlying implementation in fe-misc.c][2] supporting at
>> least milliseconds.
> Yeah, that is not nice and your complaint is very reasonable, and we
> should probably do something like what Tom suggested.
> Hmm, but if what I speculated above is true, I wonder if the extern
> function is even worth its bits... but I don't know how to determine
> that completely.
I think if we're going to change anything at all here, we should
define the external API in microseconds not milliseconds. The lesson
we need to be taking from this is that system calls come and go,
but libpq API is forever ;-). Somebody could conceivably want
sub-millisecond wait resolution within the lifespan of libpq.
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Rich Shepard | 2024-06-11 01:10:49 | Re: Gaps in PK sequence numbers [RESOLVED] |
Previous Message | Christophe Pettus | 2024-06-10 23:05:30 | Re: Gaps in PK sequence numbers |