Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jhGD4-0005NB-4K for pgsql-bugs@arkaria.postgresql.org; Fri, 05 Jun 2020 17:32:50 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1jhGD2-0006bJ-DV for pgsql-bugs@arkaria.postgresql.org; Fri, 05 Jun 2020 17:32:48 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jhGD2-0006bB-6z for pgsql-bugs@lists.postgresql.org; Fri, 05 Jun 2020 17:32:48 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jhGCy-0004r5-A3 for pgsql-bugs@lists.postgresql.org; Fri, 05 Jun 2020 17:32:47 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 055HWZ5b1509306; Fri, 5 Jun 2020 13:32:35 -0400 From: Tom Lane To: Andres Freund cc: pgsql-bugs@lists.postgresql.org, David Rowley , Fabien COELHO , "Jawarilal, Manish" Subject: Re: pgbench bug / limitation In-reply-to: References: <7221.1590687090@sss.pgh.pa.us> <10327.1590763515@sss.pgh.pa.us> <384920.1591027137@sss.pgh.pa.us> <512846.1591057287@sss.pgh.pa.us> <1507639.1591375547@sss.pgh.pa.us> Comments: In-reply-to Andres Freund message dated "Fri, 05 Jun 2020 10:18:40 -0700" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <1509304.1591378355.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Fri, 05 Jun 2020 13:32:35 -0400 Message-ID: <1509305.1591378355@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Andres Freund writes: > On June 5, 2020 9:45:47 AM PDT, Tom Lane wrote: >> The idea that I vaguely had was to build our own array of socket FDs >> (bypassing the unnecessary de-duplication logic in FD_SET) and then >> call WaitForMultipleObjects() or similar directly. > IIRC WaitForMultiple* only supports 64 objects or such. Which might be p= roblematic here. Ugh, so it does. I'd also just noted that its timeout resolution is only in msec, which is exactly why we want to use ppoll() not poll() here on Unix-oid OS's. So WaitForMultipleObjects() is out. I still suppose that select(2) is not a native API for Windows. Since we know that it can be made to support more than 64 FDs, it must not be built on top of WaitForMultipleObjects ... but then what *is* it built on? regards, tom lane