public inbox for [email protected]  
help / color / mirror / Atom feed
From: Tom Lane <[email protected]>
To: Thomas Munro <[email protected]>
Cc: Dominique Devienne <[email protected]>
Cc: [email protected]
Subject: Re: libpq v17 PQsocketPoll timeout is not granular enough
Date: Mon, 10 Jun 2024 19:49:25 -0400
Message-ID: <[email protected]> (raw)
In-Reply-To: <CA+hUKGKgvN=jjCcTtfEHiyiWkivgz1POLe2GPbeDPajZGkF_Ew@mail.gmail.com>
References: <CAFCRh-8hf=7V8UoF63aLxSkeFmXX8-1O5tRxHL61Pngb7V9rcw@mail.gmail.com>
	<CA+hUKGKgvN=jjCcTtfEHiyiWkivgz1POLe2GPbeDPajZGkF_Ew@mail.gmail.com>

Thomas Munro <[email protected]> writes:
> On Tue, Jun 11, 2024 at 2:36 AM Dominique Devienne <[email protected]> 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






view thread (4+ messages)  latest in thread

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected], [email protected], [email protected]
  Subject: Re: libpq v17 PQsocketPoll timeout is not granular enough
  In-Reply-To: <[email protected]>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox