postmaster.c ,have a warning: pg_getnameinfo_all() failed

From: "zhaozp(at)uxsino(dot)com" <zhaozp(at)uxsino(dot)com>
To: pgsql-bugs <pgsql-bugs(at)postgresql(dot)org>
Subject: postmaster.c ,have a warning: pg_getnameinfo_all() failed
Date: 2017-03-14 05:53:53
Message-ID: 201703141352529603355@uxsino.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs


static void
4071 BackendInitialize(Port *port)
4072 {
4073 int status;
4074 int ret;
4075 char remote_host[NI_MAXHOST];
4076 char remote_port[NI_MAXSERV];
4077 char remote_ps_data[NI_MAXHOST];
4078

4129
4130 /*
4131 * Get the remote host name and port for logging and status display.
4132 */
4133 remote_host[0] = '\0';
4134 remote_port[0] = '\0';
4135 if ((ret = pg_getnameinfo_all(&port->raddr.addr, port->raddr.salen,
4136 remote_host, sizeof(remote_host),
4137 remote_port, sizeof(remote_port),
4138 (log_hostname ? 0 : NI_NUMERICHOST) | NI_NUMERICSERV)) != 0)
4139 ereport(WARNING,
4140 (errmsg_internal("pg_getnameinfo_all() failed: %s",
4141 gai_strerror(ret))));

Modified below, correct?
4136 remote_host, NI_MAXHOST,
4137 remote_port, NI_MAXSERV,

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2017-03-14 14:25:37 Re: postmaster.c ,have a warning: pg_getnameinfo_all() failed
Previous Message Michael Meskes 2017-03-13 20:05:41 Re: [HACKERS] Two phase commit in ECPG