]> granicus.if.org Git - postgresql/commit
Test both 0.0.0.0 and 127.0.0.x addresses to find a usable port.
authorNoah Misch <noah@leadboat.com>
Mon, 15 Apr 2019 03:02:19 +0000 (20:02 -0700)
committerNoah Misch <noah@leadboat.com>
Mon, 15 Apr 2019 03:03:48 +0000 (20:03 -0700)
commit4543ef36f0efee9d8c6d7950a05c951a480c0f3a
tree78e373ef81030957c3ef84afb7fdfe8834042598
parent2bc0474792e346c6c7f16cdc33607568e9e92c74
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
src/test/perl/PostgresNode.pm