pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Alexey Kondratov <a.kondratov@postgrespro.ru>
Cc: pgsql-hackers@lists.postgresql.org
Subject: Re: Free port choosing freezes when PostgresNode::use_tcp is used on BSD systems
Date: Mon, 19 Apr 2021 19:22:47 -0400
Message-ID: <459595.1618874567@sss.pgh.pa.us> (raw)
In-Reply-To: <82e271a9a11928337fcb5b5e57b423c0@postgrespro.ru>
References: <20210127213658.GA736@alvherre.pgsql>
	<55c6c1526b94d2caf54c33262fe00674@postgrespro.ru>
	<e15777decc533006c9dbe4988bd66d31@postgrespro.ru>
	<YBTC0IYIGmyYfiIn@paquier.xyz>
	<1c506564e2a732ec17790bd8c34f042e@postgrespro.ru>
	<YBiro+n0767QDXSA@paquier.xyz>
	<YBpEsxZxIVn0zyFM@paquier.xyz>
	<66bad38beb87fb32952d89602e467444@postgrespro.ru>
	<82e271a9a11928337fcb5b5e57b423c0@postgrespro.ru>

Alexey Kondratov <a.kondratov@postgrespro.ru> writes:
> And this is an absolute true, on BSD-like systems (macOS and FreeBSD 
> tested) it hangs on looping through the entire ports range over and over 
> when $PostgresNode::use_tcp = 1 is set, since bind fails with:

Hm.

> That way, if it really could happen why not to just skip binding to 
> 127.0.0/24 addresses other than 127.0.0.1 outside of Linux/Windows as 
> per attached patch_PostgresNode.diff?

That patch seems wrong, or at least it's ignoring the advice immediately
above about binding to 0.0.0.0 only on Windows.

I wonder whether we could get away with just replacing the $use_tcp
test with $TestLib::windows_os.  It's not really apparent to me
why we should care about 127.0.0.not-1 on Unix-oid systems.

			regards, tom lane





view thread (6+ messages)  latest in thread

Message-ID: <459595.1618874567@sss.pgh.pa.us>
Permalink:  ../459595.1618874567@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/459595.1618874567@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-hackers@postgresql.org
  Cc: tgl@sss.pgh.pa.us, a.kondratov@postgrespro.ru, pgsql-hackers@lists.postgresql.org
  Subject: Re: Free port choosing freezes when PostgresNode::use_tcp is used on BSD systems
  In-Reply-To: <459595.1618874567@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox