Adding Unix domain socket path and port topg_stat_get_wal_senders()

Поиск
Список
Период
Сортировка
От Tatsuo Ishii
Тема Adding Unix domain socket path and port topg_stat_get_wal_senders()
Дата
Msg-id 20190412.091627.1006481076692343036.t-ishii@sraoss.co.jp
обсуждение исходный текст
Ответы Re: Adding Unix domain socket path and port to pg_stat_get_wal_senders()  (Euler Taveira <euler@timbira.com.br>)
Список pgsql-hackers
Currently pg_stat_replication view does not tell useful information
regarding client connections if UNIX domain sockets are used for
communication between sender and receiver. So it is not possible to
tell which row corresponds to which standby server.

test=# select client_addr, client_hostname, client_port,sync_state client_port from pg_stat_replication;
 client_addr | client_hostname | client_port | client_port 
-------------+-----------------+-------------+-------------
             |                 |          -1 | async
             |                 |          -1 | async
(2 rows)

This is due to that pg_stat_replication is created from
pg_stat_get_activity view. pg_stat_get_activity view calls
pg_stat_get_activity() which returns always NULL, NULL, -1 for
client_add, client_hostname and client_port.

                else if (beentry->st_clientaddr.addr.ss_family == AF_UNIX)
                {
                    /*
                     * Unix sockets always reports NULL for host and -1 for
                     * port, so it's possible to tell the difference to
                     * connections we have no permissions to view, or with
                     * errors.
                     */

Changing this behavior would affect existing pg_stat_get_activity view
users and I hesitate to do so. I wonder if we could add receiver's
UNIX domain socket path to from pg_stat_get_wal_senders() (which is
called from pg_stat_replication view) so that the poor UNIX domain
socket users could make their own view or access
pg_stat_get_wal_senders() to get the UNIX domain socket path.

Best regards,
--
Tatsuo Ishii
SRA OSS, Inc. Japan
English: http://www.sraoss.co.jp/index_en.php
Japanese:http://www.sraoss.co.jp



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

Предыдущее
От: Daniel Gustafsson
Дата:
Сообщение: Re: Enable data checksums by default
Следующее
От: Kyotaro HORIGUCHI
Дата:
Сообщение: Re: finding changed blocks using WAL scanning