Skip to content

Commit 2b32ac2

Browse files
committed
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
1 parent 100871c commit 2b32ac2

File tree

1 file changed

+11
-4
lines changed

1 file changed

+11
-4
lines changed

src/backend/libpq/pqcomm.c

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -561,10 +561,17 @@ StreamServerPort(int family, char *hostName, unsigned short portNumber,
561561
continue;
562562
}
563563

564-
ereport(LOG,
565-
/* translator: first %s is IPv4, IPv6, or Unix */
566-
(errmsg("listening on %s address \"%s\"",
567-
familyDesc, addrDesc)));
564+
#ifdef HAVE_UNIX_SOCKETS
565+
if (addr->ai_family == AF_UNIX)
566+
ereport(LOG,
567+
(errmsg("listening on Unix socket \"%s\"",
568+
addrDesc)));
569+
else
570+
#endif
571+
ereport(LOG,
572+
/* translator: first %s is IPv4 or IPv6 */
573+
(errmsg("listening on %s address \"%s\", port %d",
574+
familyDesc, addrDesc, (int) portNumber)));
568575

569576
ListenSocket[listen_index] = fd;
570577
added++;

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy