Re: Enhance pg_stat_wal_receiver view to display connected host

From: Haribabu Kommi <kommi(dot)haribabu(at)gmail(dot)com>
To: Michael Paquier <michael(dot)paquier(at)gmail(dot)com>
Cc: Pg Hackers <pgsql-hackers(at)postgresql(dot)org>, Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
Subject: Re: Enhance pg_stat_wal_receiver view to display connected host
Date: 2018-03-28 00:28:32
Message-ID: CAJrrPGewNH=OQdmmOTESQCBzf+xT_TEkmCx-MupmHKcuT8E5Lg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Jan 30, 2018 at 4:02 PM, Michael Paquier <michael(dot)paquier(at)gmail(dot)com>
wrote:

> On Tue, Jan 30, 2018 at 03:10:12PM +1100, Haribabu Kommi wrote:
> > Ok, understood. As the libpq gives preference to hostaddr connection
> > parameter than host while connecting. How about going with one column
> > "remote_host" that displays either hostaddr(if exists) or hostname. So
> that
> > one column that displays the actual remote host to where it connected?
> >
> > Note : The one column approach for both host and hostaddr will depend on
> > how we go with PQhostaddr() function.
>
> Yeah, we don't want to begin a open battle for that. Using one column as
> a first step would still be useful anyway. If the discussion about
> PQhostaddr() comes to a result at some point, then it could make sense
> to integrate that with pg_stat_wal_receiver. The problem with PQhost
> handling strangely multiple host values is inconsistent though.
>

I updated the pg_stat_wal_receiver patch with the new PQhost() function
behavior
and updated the view with two columns, (remote_server and remote_port)
instead
of three as earlier.

Updated patch attached.

Regards,
Hari Babu
Fujitsu Australia

Attachment Content-Type Size
pg_stat_wal_receiver-to-display-remote-server-info_v2.patch application/octet-stream 12.1 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tomas Vondra 2018-03-28 00:34:17 Re: [HACKERS] PATCH: multivariate histograms and MCV lists
Previous Message Andrew Dunstan 2018-03-28 00:11:47 Re: Changing WAL Header to reduce contention during ReserveXLogInsertLocation()