Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1sGvnK-0013fV-6D for pgsql-general@arkaria.postgresql.org; Tue, 11 Jun 2024 07:19:51 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1sGvnI-003QhO-Ns for pgsql-general@arkaria.postgresql.org; Tue, 11 Jun 2024 07:19:49 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1sGvnI-003Qh9-8X for pgsql-general@lists.postgresql.org; Tue, 11 Jun 2024 07:19:49 +0000 Received: from mail-ed1-x536.google.com ([2a00:1450:4864:20::536]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1sGvnC-000kvY-6j for pgsql-general@postgresql.org; Tue, 11 Jun 2024 07:19:47 +0000 Received: by mail-ed1-x536.google.com with SMTP id 4fb4d7f45d1cf-57a52dfd081so833780a12.2 for ; Tue, 11 Jun 2024 00:19:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=peoplecall-com.20230601.gappssmtp.com; s=20230601; t=1718090378; x=1718695178; darn=postgresql.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=Vqb/8CDfBDgEdt6o+oqTMOEHn3LUCoARvu4tiBH+GME=; b=pQIOAoFdw/g3CVUzi9Oz+1Gm/uatHk4wsZPgM3f2DhFFPRYLU1BAp1WkJ1G8ZXhXs7 aEh5TkXEPGBeSeCdW13ALBVAhNsPLEXoS4YjcWo4Pg13vxl8OQKU06oxsPTZvXevL6UB TCi2eo/NQmOIhvYWN2yaubsdOGiEy+5Us4LgglHMg7v5xFBeMRm5kbKF8w5NjUFpS8ph KH26UUeZxYFmc2SSfrDvOPim7mmpTt6jhnPmXAEKVNJk5DKmFJwbdgMo61z1aRLZskNB agX5ik3HF6VKzqjl4fPp3WmDnEteXWhlxWwKn3oR5MA76y9SZXMdDrsw/Irv9tUlijCX cJXw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718090378; x=1718695178; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=Vqb/8CDfBDgEdt6o+oqTMOEHn3LUCoARvu4tiBH+GME=; b=AYOZqwaCIMHYD+I7A/wxxbCfZTAjSjcBUPicS7q/GmIYRUPMy0llsQb9L5ugazeoBh XpIrM7UQEC3UyIY+lwtw6VHcG60OLEGgPX9JBykkCrddmrhKrQmpSyDzlxcUhN758UHj gcYnZIYXEvFQhx3FOBlYd7CNoo17TG9ZUwvrfrwg3SIK3qeYUFWX+/FZn/IYw1O/hccF xLFpgbOwkQJl7SNrot6d271j4o+z4EztLRGo7NBwNIzRaowzHk4BbPzryq/SvRTJJIm3 2UhMW8edSKMMMCdUUUMF8pO29NJMR4RhL+pmeO+u2hGiBd1zyea5kIr24Y9zNUD4Pbbm YAgw== X-Forwarded-Encrypted: i=1; AJvYcCUZeT7SbjmrE/8bpXeIGx0e+RGywAo2F6ozYLQawZj9RZ5PQuypqTVheKnm3gT5d3htMdxHJdc20c7BWAS7AG0KJ6o5sbR/zQA/1kYl X-Gm-Message-State: AOJu0YzsKfA+T3yqe21uPqQCRZwRa2OUQ+OrQcLDyowydfswfyg8u1YO UPSrn6qZBU4focq5WAic/+qq57TrFUgJeG0mZm4gW11OsNTTsywVn9rmB/2br24rjxgzSgrOunI leTTqIhqx70VhS6uMMkEGSxpaANe2uLvkPQiK X-Google-Smtp-Source: AGHT+IGyUzneDKkbfTG0mYMTP8jSJ+YdSYfE6kqdL6H4wI5Ot1+TGLGUrd6o1p5iog10tUCNFaipLunsaw0FKE65HK8= X-Received: by 2002:a50:9ea5:0:b0:57c:7396:4b48 with SMTP id 4fb4d7f45d1cf-57c73964b91mr4460438a12.24.1718090378412; Tue, 11 Jun 2024 00:19:38 -0700 (PDT) MIME-Version: 1.0 References: <927473.1718063365@sss.pgh.pa.us> In-Reply-To: <927473.1718063365@sss.pgh.pa.us> From: Francisco Olarte Date: Tue, 11 Jun 2024 09:19:02 +0200 Message-ID: Subject: Re: libpq v17 PQsocketPoll timeout is not granular enough To: Tom Lane Cc: Thomas Munro , Dominique Devienne , pgsql-general@postgresql.org Content-Type: text/plain; charset="UTF-8" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Tom: On Tue, 11 Jun 2024 at 01:49, Tom Lane wrote: > 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. I was thinking on that, but since you need at least 20 bits, so 32, for microseconds I would suggest nanoseconds, which fit in 32 too. Sure, nanos seems too much for the current time but it pushes the future problem further down, nearly forever for comms between different machines until someone develops FTL networks. Francisco Olarte.