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 1jhGu3-0006m4-1S for pgsql-bugs@arkaria.postgresql.org; Fri, 05 Jun 2020 18:17:15 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1jhGu0-0007fB-A3 for pgsql-bugs@arkaria.postgresql.org; Fri, 05 Jun 2020 18:17:12 +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 1jhGu0-0007eE-3v for pgsql-bugs@lists.postgresql.org; Fri, 05 Jun 2020 18:17:12 +0000 Received: from courriel-2.mines-paristech.fr ([77.158.173.19] helo=antispam-1.ensmp.fr) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jhGtv-0005Cr-PA for pgsql-bugs@lists.postgresql.org; Fri, 05 Jun 2020 18:17:11 +0000 Received: from smtp-4.mines-paristech.fr (smtp-4.ensmp.fr [77.158.173.143]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by antispam-1.ensmp.fr (antispam.mines-paristech.fr) with ESMTPS id CD89356ED7; Fri, 5 Jun 2020 20:17:05 +0200 (CEST) Received: from pseudo (159.237.219.88.rev.sfr.net [88.219.237.159]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp-4.mines-paristech.fr (Postfix) with ESMTPSA id 789C32C027D; Fri, 5 Jun 2020 20:17:04 +0200 (CEST) Date: Fri, 5 Jun 2020 20:17:01 +0200 (CEST) From: Fabien COELHO X-X-Sender: fabien@pseudo To: Tom Lane cc: David Rowley , "Jawarilal, Manish" , "pgsql-bugs@lists.postgresql.org" Subject: Re: pgbench bug / limitation In-Reply-To: <1507639.1591375547@sss.pgh.pa.us> Message-ID: 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> User-Agent: Alpine 2.22 (DEB 394 2020-01-19) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="2056645051-1678680992-1591381025=:32228" X-CLAMAV-SCAN: ok X-VRSPAM-SCORE: -100 X-VRSPAM-STATE: legit X-VRSPAM-CAUSE: gggruggvucftvghtrhhoucdtuddrgeduhedrudegfedguddtkecutefuodetggdotefrucfrrhhofhhilhgvmecuggftfghnshhusghstghrihgsvgenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujfgurhepfffhvffujgfkfhgfgggtsehmtderredtredvnecuhfhrohhmpefhrggsihgvnhcuvefqgffnjffquceotghovghlhhhosegtrhhirdgvnhhsmhhprdhfrheqnecuggftrfgrthhtvghrnhepheekudehtdejheelheethfejfeegvdfgledtgeettddthedtgeevudfgfeelledvnecukfhppeekkedrvdduledrvdefjedrudehleenucfrrghrrghmpehmohguvgepshhmthhpohhuth X-VRSPAM-EXTCAUSE: mhhouggvpehsmhhtphhouhht List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. --2056645051-1678680992-1591381025=:32228 Content-Type: text/plain; format=flowed; charset=US-ASCII Hello Tom, > More to the point, this does nothing to get around the O(N^2) cost of > adding N FDs to the fd_set with Microsoft's implementation; so I do not > think it's really going to fix the problem for people who want to use > lots of connections on Windows. > Alternatively, if we're going to get in bed with the internals of > Windows' fd_set implementation anyway, we could implement our own > version of FD_SET that doesn't do the de-duplication. Yes. See attached, which I cannot test. -- Fabien. --2056645051-1678680992-1591381025=:32228 Content-Type: text/x-diff; name=pgbench-select-win-3.patch Content-Transfer-Encoding: BASE64 Content-ID: Content-Description: Content-Disposition: attachment; filename=pgbench-select-win-3.patch ZGlmZiAtLWdpdCBhL3NyYy9iaW4vcGdiZW5jaC9wZ2JlbmNoLmMgYi9zcmMv YmluL3BnYmVuY2gvcGdiZW5jaC5jDQppbmRleCAwOGE1OTQ3YTllLi5mOTRh MTM3NTBjIDEwMDY0NA0KLS0tIGEvc3JjL2Jpbi9wZ2JlbmNoL3BnYmVuY2gu Yw0KKysrIGIvc3JjL2Jpbi9wZ2JlbmNoL3BnYmVuY2guYw0KQEAgLTY2OTgs MTAgKzY2OTgsMjYgQEAgY2xlYXJfc29ja2V0X3NldChzb2NrZXRfc2V0ICpz YSkNCiAJc2EtPm1heGZkID0gLTE7DQogfQ0KIA0KKyNpZm5kZWYgV0lOMzIN CisjZGVmaW5lIEZEX0lTX1ZBTElEKGZkLCBzZXQpICgoZmQpID49IDAgJiYg KGZkKSA8IEZEX1NFVFNJWkUpDQorI2Vsc2UNCisvKg0KKyAqIFdpbmRvd3Mg aW1wbGVtZW50YXRpb24gaXMgYm9ndXM6IGl0IGRvZXMgbm90IGFsbG9jYXRl IGZkIHdpdGggdGhlIGxvd2VzdA0KKyAqIHBvc3NpYmxlIG51bWJlciwgYW5k IEZEX1NFVCBpcyBpbXBsZW1lbnRlZCBhcyBhIHNpbXBsZSBhcnJheS4NCisg Kg0KKyAqIEZpbGxpbmcgdGhlIHNldCBpcyBpbiBPKE5eMikgYmVjYXVzZSBv ZiBkZWR1cGxpY2F0aW9uLCBidXQgdGhpcyBpcw0KKyAqIHVubmVjZXNzYXJ5 IGhlcmUgc28gd2UganVzdCBvdmVycmlkZSB0aGUgbWFjcm8uDQorICovDQor I2RlZmluZSBGRF9JU19WQUxJRChmZCwgc2V0KSAoKGZkKSA+PSAwICYmIChz ZXQpLT5mZF9jb3VudCA8IEZEX1NFVFNJWkUpDQorI3VuZGVmIEZEX1NFVA0K Ky8qIG5vIGFycmF5IG92ZX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