Re: Adding Unix domain socket path and port to pg_stat_get_wal_senders() - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Adding Unix domain socket path and port to pg_stat_get_wal_senders()
Date
Msg-id 15919.1555076614@sss.pgh.pa.us
Whole thread Raw
In response to Re: Adding Unix domain socket path and port topg_stat_get_wal_senders()  (Michael Paquier <michael@paquier.xyz>)
Responses Re: Adding Unix domain socket path and port topg_stat_get_wal_senders()
List pgsql-hackers
Michael Paquier <michael@paquier.xyz> writes:
> On Thu, Apr 11, 2019 at 10:19:01PM -0300, Euler Taveira wrote:
>> Socket has different semantic from TCP/UDP. We can't add socket
>> information into client_addr unless we are prepared to break this view
>> (client_addr has type inet and it would be necessary to change it to
>> text). It could break a lot of applications.

Agreed.

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

            regards, tom lane



pgsql-hackers by date:

Previous
From: Daniel Gustafsson
Date:
Subject: Re: PostgreSQL pollutes the file system
Next
From: Julien Rouhaud
Date:
Subject: Re: Checksum errors in pg_stat_database