Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1aqU1s-0004y5-49 for pgsql-hackers@arkaria.postgresql.org; Wed, 13 Apr 2016 23:17:00 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1aqU1r-0003y7-MJ for pgsql-hackers@arkaria.postgresql.org; Wed, 13 Apr 2016 23:16:59 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1aqU0U-0000t7-Ib for pgsql-hackers@postgresql.org; Wed, 13 Apr 2016 23:15:34 +0000 Received: from smtp-auth.no-ip.com ([8.23.224.61] helo=out.smtp-auth.no-ip.com) by makus.postgresql.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84_2) (envelope-from ) id 1aqU0Q-0000Kx-Uq for pgsql-hackers@postgresql.org; Wed, 13 Apr 2016 23:15:33 +0000 X-No-IP: alvh.no-ip.org@noip-smtp X-Report-Spam-To: abuse@no-ip.com Received: from alvin.alvh.no-ip.org (unknown [200.83.202.40]) (Authenticated sender: alvh.no-ip.org@noip-smtp) by smtp-auth.no-ip.com (Postfix) with ESMTPA id B5BDF400999; Wed, 13 Apr 2016 16:15:25 -0700 (PDT) Received: by alvin.alvh.no-ip.org (Postfix, from userid 1000) id BF284309; Wed, 13 Apr 2016 20:15:23 -0300 (CLT) Date: Wed, 13 Apr 2016 20:15:23 -0300 From: Alvaro Herrera To: Michael Paquier Cc: Tom Lane , Magnus Hagander , Amit Kapila , pgsql-hackers Subject: Re: Why doesn't src/backend/port/win32/socket.c implement bind()? Message-ID: <20160413231523.GA151032@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) X-Pg-Spam-Score: -1.1 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-hackers Precedence: bulk Sender: pgsql-hackers-owner@postgresql.org Michael Paquier wrote: > On Wed, Apr 13, 2016 at 10:33 PM, Tom Lane wrote: > > Michael Paquier writes: > >> On Wed, Apr 13, 2016 at 9:06 AM, Tom Lane wrote: > >>> If there's other stuff using high ports on a particular buildfarm machine, > >>> you'd expect occasional random test failures due to this. The observed > >>> fact that some buildfarm critters are much more prone to this type of > >>> failure than others is well explained by this hypothesis. > > > >> Each test run uses its own custom unix_socket_directories, PGHOST is > >> enforced to use it, and all the port tests go through that as well. > > > > By that argument, we don't need the free-port-searching code on Unix at > > all. But this discussion is mostly about Windows machines. > > Well, yes. That's true, we could do without. Even if this could give > an indication about a node running, as long as a port has been > associated to a node once, we just need to be sure that a new port is > not allocated. On Windows, I am not sure that it is worth the > complication to be honest, and the current code gives a small safety > net, which is better than nothing. If we need to fix the test so that it works in a wider environment for Windows, I don't think it makes sense to remove anything -- rather we should change the test as Tom suggests to verify that the port is really free rather than just doing the pg_isready test. Maybe the additional test will be useless in non-Windows environment, but why cares? It will work all the same. -- Álvaro Herrera http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers