| From: | Michael Paquier <michael(at)paquier(dot)xyz> |
|---|---|
| To: | Haribabu Kommi <kommi(dot)haribabu(at)gmail(dot)com> |
| Cc: | Fujii Masao <masao(dot)fujii(at)gmail(dot)com>, Michael Paquier <michael(dot)paquier(at)gmail(dot)com>, 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-30 00:34:54 |
| Message-ID: | 20180330003454.GD1368@paquier.xyz |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
On Fri, Mar 30, 2018 at 10:52:02AM +1100, Haribabu Kommi wrote:
> On Fri, Mar 30, 2018 at 7:26 AM, Fujii Masao <masao(dot)fujii(at)gmail(dot)com> wrote:
>> @@ -753,4 +753,6 @@ CREATE VIEW pg_stat_wal_receiver AS
>> s.latest_end_time,
>> s.slot_name,
>> + s.remote_server,
>> + s.remote_port,
>>
>> As the column names, aren't sender_host and sender_port more intuitive
>> rather than remote_server and remote_port?
>
> OK. Changed accordingly.
No problems with those names.
+ ret = PQhost(conn->streamConn);
+ if (ret && (strcmp(ret,"") != 0))
+ *sender_host = pstrdup(ret);
The code tends to use more strlen to check for empty strings,
particularly libpq. A small nit it is.
--
Michael
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Tatsuo Ishii | 2018-03-30 00:48:02 | Re: [HACKERS] [PATCH] Lockable views |
| Previous Message | Andres Freund | 2018-03-30 00:26:36 | Re: [HACKERS] [PATCH] Lockable views |