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 1jfvEn-0006gn-K0 for pgsql-bugs@arkaria.postgresql.org; Tue, 02 Jun 2020 00:57:05 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1jfvEm-0008L0-Fp for pgsql-bugs@arkaria.postgresql.org; Tue, 02 Jun 2020 00:57:04 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jfvEm-0008Ks-9q for pgsql-bugs@lists.postgresql.org; Tue, 02 Jun 2020 00:57:04 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jfvEf-0001bb-W3 for pgsql-bugs@lists.postgresql.org; Tue, 02 Jun 2020 00:57:03 +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 0520usJ8513888; Mon, 1 Jun 2020 20:56:54 -0400 From: Tom Lane To: David Rowley cc: "Jawarilal, Manish" , "pgsql-bugs@lists.postgresql.org" 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> Comments: In-reply-to David Rowley message dated "Tue, 02 Jun 2020 12:07:12 +1200" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <513886.1591059414.1@sss.pgh.pa.us> Date: Mon, 01 Jun 2020 20:56:54 -0400 Message-ID: <513887.1591059414@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk David Rowley writes: > ... I can't glean too much from the > socket() documentation for either OS about what the return value is. > I didn't see anything which indicated anything about how the return > value is determined. BTW, as far as that goes, POSIX is perfectly clear about this: 2.14. File Descriptor Allocation All functions that open one or more file descriptors shall, unless specified otherwise, atomically allocate the lowest numbered available (that is, not already open in the calling process) file descriptor at the time of each allocation. It doesn't surprise me a lot to hear that Microsoft couldn't be bothered to adhere to the spec, though. regards, tom lane