pgsql: Test both 0.0.0.0 and 127.0.0.x addresses to find a usable port.

From: Noah Misch <noah(at)leadboat(dot)com>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Test both 0.0.0.0 and 127.0.0.x addresses to find a usable port.
Date: 2019-04-15 03:14:16
Message-ID: E1hFs4W-0005Yn-Ne@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Test both 0.0.0.0 and 127.0.0.x addresses to find a usable port.

Commit c098509927f9a49ebceb301a2cb6a477ecd4ac3c changed
PostgresNode::get_new_node() to probe 0.0.0.0 instead of 127.0.0.1, but
the new test was less effective for Windows native Perl. This increased
the failure rate of buildfarm members bowerbird and jacana. Instead,
test 0.0.0.0 and concrete addresses. This restores the old level of
defense, but the algorithm is still subject to its longstanding time of
check to time of use race condition. Back-patch to 9.6, like the
previous change.

Discussion: https://postgr.es/m/GrdLgAdUK9FdyZg8VIcTDKVOkys122ZINEb3CjjoySfGj2KyPiMKTh1zqtRp0TAD7FJ27G-OBB3eplxIB5GhcQH5o8zzGZfp0MuJaXJxVxk=@yesql.se

Branch
------
REL_11_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/0bdf6d635e42f415c023393503a575d047940722

Modified Files
--------------
src/test/perl/PostgresNode.pm | 62 ++++++++++++++++++++++++++++---------------
1 file changed, 41 insertions(+), 21 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Michael Paquier 2019-04-15 03:35:56 pgsql: Fix SHOW ALL command for non-superusers with replication connect
Previous Message Alexander Korotkov 2019-04-15 02:21:38 Re: pgsql: Increase upper limit for vacuum_cleanup_index_scale_factor