Re: Adding Unix domain socket path and port to pg_stat_get_wal_senders()

From: Tatsuo Ishii <ishii(at)sraoss(dot)co(dot)jp>
To: tgl(at)sss(dot)pgh(dot)pa(dot)us
Cc: michael(at)paquier(dot)xyz, euler(at)timbira(dot)com(dot)br, ishii(at)sraoss(dot)co(dot)jp, pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: Adding Unix domain socket path and port to pg_stat_get_wal_senders()
Date: 2019-04-12 14:38:52
Message-ID: 20190412.233852.402026504405270572.t-ishii@sraoss.co.jp
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

>> client_addr does not seem the right place to store this information,
>> and it is already documented for years that NULL is used when using a
>> Unix socket. But I think that we could change *client_hostname* so as
>> the path name is reported instead of NULL when connecting through a
>> Unix domain socket, and there is no need to switch the field type for
>> that.
>
> That seems like a hack, and I think it could still break apps that
> are expecting particular semantics for that field. Why not add a
> new column instead?

Actually I aready proposed to add new column to pg_stat_get_wal_senders():

> 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.

If we were ok to add a new column to pg_stat_activity view or
pg_stat_replication view as well, that will be great.

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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Euler Taveira 2019-04-12 14:55:26 Re: Adding Unix domain socket path and port to pg_stat_get_wal_senders()
Previous Message Tom Lane 2019-04-12 14:05:31 Re: Calling pgstat_report_wait_end() before ereport(ERROR)