git.postgresql.org Git - postgresql.git/commitdiff

git projects / postgresql.git / commitdiff
? search:
summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 100871c)
Include port number when logging successful binding to a TCP port.
2017年3月14日 17:18:27 +0000 (13:18 -0400)
2017年3月14日 17:18:38 +0000 (13:18 -0400)
Per suggestion from Andres Freund.

Discussion: https://postgr.es/m/20170314033842.st7gifec55yigz2h@alap3.anarazel.de


diff --git a/src/backend/libpq/pqcomm.c b/src/backend/libpq/pqcomm.c
index aa934569da33d1eccd36986dc4d55d7d8551dcb3..0fad8060b17bff28b566fe65929f75b73a445867 100644 (file)
--- a/src/backend/libpq/pqcomm.c
+++ b/src/backend/libpq/pqcomm.c
@@ -561,10 +561,17 @@ StreamServerPort(int family, char *hostName, unsigned short portNumber,
continue;
}
- ereport(LOG,
- /* translator: first %s is IPv4, IPv6, or Unix */
- (errmsg("listening on %s address \"%s\"",
- familyDesc, addrDesc)));
+#ifdef HAVE_UNIX_SOCKETS
+ if (addr->ai_family == AF_UNIX)
+ ereport(LOG,
+ (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;
added++;
This is the main PostgreSQL git repository.
RSS Atom

AltStyle によって変換されたページ (->オリジナル) /