Don't connect() to a wildcard address in test_postmaster_connection().

Noah Misch <noah@leadboat.com>

Commit: 24379a45c5ecbc35fde93952346be67112a96fe0
Author: Noah Misch <noah@leadboat.com>
Date: 2015-11-08T22:31:21Z
Releases: 9.4.6
Don't connect() to a wildcard address in test_postmaster_connection().

At least OpenBSD, NetBSD, and Windows don't support it.  This repairs
pg_ctl for listen_addresses='0.0.0.0' and listen_addresses='::'.  Since
pg_ctl prefers to test a Unix-domain socket, Windows users are most
likely to need this change.  Back-patch to 9.1 (all supported versions).
This could change pg_ctl interaction with loopback-interface firewall
rules.  Therefore, in 9.4 and earlier (released branches), activate the
change only on known-affected platforms.

Reported (bug #13611) and designed by Kondo Yuta.

Files

PathChange+/−
src/bin/pg_ctl/pg_ctl.c modified +14 −1