Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit1f3bcb4

Browse files
committed
Probe only 127.0.0.1 when looking for ports on Unix.
Commitc098509, later adjusted by commit4ab02e8, probed 0.0.0.0in addition to 127.0.0.1, for the benefit of Windows build farmanimals. It isn't really useful on Unix systems, and turned out tobe a bit inconvenient to users of some corporate firewall software.Switch back to probing just 127.0.0.1 on non-Windows systems.Back-patch to 9.6, like the earlier changes.Discussion:https://postgr.es/m/CA%2BhUKG%2B21EPwfgs4m%2BtqyRtbVqkOUvP8QQ8sWk9%2Bh55Aub1H3A%40mail.gmail.com
1 parent2bc59f8 commit1f3bcb4

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

‎src/test/perl/PostgresNode.pm

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1044,14 +1044,15 @@ sub get_new_node
10441044
# This seems like a good idea on Unixen as well, even though we don't
10451045
# ask the postmaster to open a TCP port on Unix. On Non-Linux,
10461046
# non-Windows kernels, binding to 127.0.0.1/24 addresses other than
1047-
# 127.0.0.1 fails with EADDRNOTAVAIL.
1047+
# 127.0.0.1 might fail with EADDRNOTAVAIL. Binding to 0.0.0.0 is
1048+
# unnecessary on non-Windows systems.
10481049
#
10491050
# XXX A port available now may become unavailable by the time we start
10501051
# the postmaster.
10511052
if ($found == 1)
10521053
{
1053-
foreachmy$addr (qw(127.0.0.1 0.0.0.0),
1054-
$use_tcp ?qw(127.0.0.2 127.0.0.3) : ())
1054+
foreachmy$addr (qw(127.0.0.1),
1055+
$use_tcp ?qw(127.0.0.2 127.0.0.3 0.0.0.0) : ())
10551056
{
10561057
can_bind($addr,$port)or$found = 0;
10571058
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp