Re: Enhance pg_stat_wal_receiver view to display connected host

Michael Paquier <michael.paquier@gmail.com>

From: Michael Paquier <michael.paquier@gmail.com>
To: Haribabu Kommi <kommi.haribabu@gmail.com>
Cc: Pg Hackers <pgsql-hackers@postgresql.org>
Date: 2018-01-04T12:24:14Z
Lists: pgsql-hackers
On Thu, Jan 04, 2018 at 05:21:02PM +1100, Haribabu Kommi wrote:
> On Thu, Jan 4, 2018 at 11:53 AM, Michael Paquier <michael.paquier@gmail.com>
> wrote:
> 
> > On Wed, Jan 03, 2018 at 06:48:07PM +1100, Haribabu Kommi wrote:
> > > On Wed, Jan 3, 2018 at 12:25 PM, Haribabu Kommi <
> > kommi.haribabu@gmail.com>
> > > Last patch has undefined symbol, corrected patch attached.
> >
> 
> Thanks for the review.

Almost there.

Sorry, I have just noticed that the comment on top of
libpqrcv_get_conninfo() needs a refresh. With your patch more
information than a siple connection string are returned to the caller.

Some initialization of the return values should happen directly inside
walrcv_get_conninfo(), or get the feeling that we'll be trapped in the
future if this gets called somewhere else.

[nit]
+     <entry>
+      port number of the <productname>PostgreSQL</productname> instance
+      this WAL receiver is connected to.
+     </entry>
Missing an upper case at the beginning of the sentence here.
[/nit]
--
Michael

Commits

  1. Enhance pg_stat_wal_receiver view to display host and port of sender server.

  2. Allow multiple hostaddrs to go with multiple hostnames.

  3. libpq: Fix inadvertent change in PQhost() behavior.

  4. libpq: Allow connection strings and URIs to specify multiple hosts.