diff --git a/src/backend/libpq/pqcomm.c b/src/backend/libpq/pqcomm.c
index 1d57415860407867373669a424d4ed36f80963d2..60b2f2e32b5b7bd7e505e88c22bba4405d55d194 100644
--- a/src/backend/libpq/pqcomm.c
+++ b/src/backend/libpq/pqcomm.c
@@ -28,7 +28,7 @@
  *
  * Copyright (c) 1994, Regents of the University of California
  *
- *	$Id: pqcomm.c,v 1.82 1999/08/31 04:26:37 tgl Exp $
+ *	$Id: pqcomm.c,v 1.83 1999/09/08 22:57:12 tgl Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -335,6 +335,10 @@ StreamServerPort(char *hostName, unsigned short portName, int *fdP)
  *		the Postmaster uses select() to tell when the server master
  *		socket is ready for accept().
  *
+ * NB: this can NOT call elog() because it is invoked in the postmaster,
+ * not in standard backend context.  If we get an error, the best we can do
+ * is log it to stderr.
+ *
  * RETURNS: STATUS_OK or STATUS_ERROR
  */
 int
@@ -348,7 +352,7 @@ StreamConnection(int server_fd, Port *port)
 							 (struct sockaddr *) & port->raddr,
 							 &addrlen)) < 0)
 	{
-		elog(ERROR, "postmaster: StreamConnection: accept: %m");
+		perror("postmaster: StreamConnection: accept");
 		return STATUS_ERROR;
 	}
 
@@ -357,7 +361,7 @@ StreamConnection(int server_fd, Port *port)
 	if (getsockname(port->sock, (struct sockaddr *) & port->laddr,
 					&addrlen) < 0)
 	{
-		elog(ERROR, "postmaster: StreamConnection: getsockname: %m");
+		perror("postmaster: StreamConnection: getsockname");
 		return STATUS_ERROR;
 	}
 
@@ -370,13 +374,13 @@ StreamConnection(int server_fd, Port *port)
 		pe = getprotobyname("TCP");
 		if (pe == NULL)
 		{
-			elog(ERROR, "postmaster: getprotobyname failed");
+			perror("postmaster: StreamConnection: getprotobyname");
 			return STATUS_ERROR;
 		}
 		if (setsockopt(port->sock, pe->p_proto, TCP_NODELAY,
 					   &on, sizeof(on)) < 0)
 		{
-			elog(ERROR, "postmaster: setsockopt failed: %m");
+			perror("postmaster: StreamConnection: setsockopt");
 			return STATUS_ERROR;
 		}
 	}