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 1jhaGL-0002wa-5F for pgsql-bugs@arkaria.postgresql.org; Sat, 06 Jun 2020 14:57:33 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1jhaGI-0007pJ-Gc for pgsql-bugs@arkaria.postgresql.org; Sat, 06 Jun 2020 14:57:30 +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 1jhaGI-0007pB-9a for pgsql-bugs@lists.postgresql.org; Sat, 06 Jun 2020 14:57:30 +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 1jhaGB-0007lE-DI for pgsql-bugs@lists.postgresql.org; Sat, 06 Jun 2020 14:57:29 +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 056EvDAp1673151; Sat, 6 Jun 2020 10:57:13 -0400 From: Tom Lane To: Fabien COELHO cc: Andres Freund , PostgreSQL Bugs , David Rowley , "Jawarilal, Manish" Subject: Re: pgbench bug / limitation In-reply-to: References: <384920.1591027137@sss.pgh.pa.us> <512846.1591057287@sss.pgh.pa.us> <1507639.1591375547@sss.pgh.pa.us> <1509305.1591378355@sss.pgh.pa.us> <20200605174418.zbb4egfe5wxhv2yd@alap3.anarazel.de> <1510961.1591380652@sss.pgh.pa.us> Comments: In-reply-to Fabien COELHO message dated "Sat, 06 Jun 2020 08:59:57 +0200" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <1673149.1591455433.1@sss.pgh.pa.us> Date: Sat, 06 Jun 2020 10:57:13 -0400 Message-ID: <1673150.1591455433@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Fabien COELHO writes: >> Agreed. Seems like the best answer is to get in bed with the Windows >> representation of fd_set, since we cannot avoid knowing that it is >> different from other platforms' versions. I suggest that we might as >> well get all the way in and dodge the FD_SETSIZE limitation altogether, >> as per the attached utterly-untested draft patch. > ISTM that the patch your propose, a full reimplementation of the abstract > poll/select fd set interface for windows, is overkill because it adds > about 80 lines of code. ISTM that just redefining some macros is enough to > get the same performance benefit without adding much to the code base, but > maybe I'm missing something. At least, I do not think that getting rid of > the FD_SETSIZE redefinition for windows is worth all that trouble. I think it's worth doing because it puts the Windows implementation at full feature parity with Unixen, ie, there's no hard-wired limit on the number of connections. I'm also not that thrilled with trying to make one code path work with two fundamentally different implementations. We've found out that just because Microsoft claims their implementation is compatible with POSIX doesn't make it so, and I'd rather not have warts in our source code from trying to paper over that. Lastly, I think it's entirely likely that someone will come up with a Windows-native implementation at some point, so that we'd have the extra code lines anyway. regards, tom lane