Re: Enhance pg_stat_wal_receiver view to display connected host

Поиск
Список
Период
Сортировка
От Michael Paquier
Тема Re: Enhance pg_stat_wal_receiver view to display connected host
Дата
Msg-id 20180104005345.GB2339@paquier.xyz
обсуждение исходный текст
Ответ на Re: Enhance pg_stat_wal_receiver view to display connected host  (Haribabu Kommi <kommi.haribabu@gmail.com>)
Ответы Re: Enhance pg_stat_wal_receiver view to display connected host
Список pgsql-hackers
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.

+    memset(walrcv->host, 0, NAMEDATALEN);
+    if (host)
+        strlcpy((char *) walrcv->host, host, NAMEDATALEN);
+
+    memset(walrcv->hostaddr, 0, NAMEDATALEN);
+    if (hostaddr)
+        strlcpy((char *) walrcv->hostaddr, hostaddr, NAMEDATALEN);
You need to use NI_MAXHOST for both things here.

+    <row>
+     <entry><structfield>remote_hostname</structfield></entry>
+     <entry><type>text</type></entry>
+     <entry>Host name of the PostgreSQL instance this WAL receiver is connected to</entry>
+    </row>
PostgreSQL is usualy referred to with the <productname> markup. Those
should be split on multiple lines. The doc changes are nits though.

I have done some testing with this patch with primary_conninfo using
multiple values of host and port, and the correct values are being
reported, which is a nice feature.
--
Michael

Вложения

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Stephen Frost
Дата:
Сообщение: Re: January CommitFest is underway!
Следующее
От: Gavin Flower
Дата:
Сообщение: Re: LIKE foo% optimization easily defeated by OR?