Commit 2b32ac2a authored by Tom Lane's avatar Tom Lane

Include port number when logging successful binding to a TCP port.

Per suggestion from Andres Freund.

Discussion: https://postgr.es/m/20170314033842.st7gifec55yigz2h@alap3.anarazel.de
parent 100871c2
...@@ -561,10 +561,17 @@ StreamServerPort(int family, char *hostName, unsigned short portNumber, ...@@ -561,10 +561,17 @@ StreamServerPort(int family, char *hostName, unsigned short portNumber,
continue; continue;
} }
ereport(LOG, #ifdef HAVE_UNIX_SOCKETS
/* translator: first %s is IPv4, IPv6, or Unix */ if (addr->ai_family == AF_UNIX)
(errmsg("listening on %s address \"%s\"", ereport(LOG,
familyDesc, addrDesc))); (errmsg("listening on Unix socket \"%s\"",
addrDesc)));
else
#endif
ereport(LOG,
/* translator: first %s is IPv4 or IPv6 */
(errmsg("listening on %s address \"%s\", port %d",
familyDesc, addrDesc, (int) portNumber)));
ListenSocket[listen_index] = fd; ListenSocket[listen_index] = fd;
added++; added++;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment