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

2019-04-15 Thread Tom Lane
Peter Eisentraut writes: > On 2019-04-12 17:57, Tom Lane wrote: >> Those are actually pretty common, for example if you use Red Hat's >> packaging you will have both /var/run/postgresql and /tmp as socket >> directories (since they consider use of /tmp deprecated, but getting >> rid of all clients

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

2019-04-15 Thread Peter Eisentraut
On 2019-04-12 17:57, Tom Lane wrote: >> For a socket connection, directory is important and that >> information I can get from unix_socket_directories parameter (I've >> never seen a setup with multiple socket directories). > Those are actually pretty common, for example if you use Red Hat's > pack

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

2019-04-14 Thread Michael Paquier
On Fri, Apr 12, 2019 at 11:38:52PM +0900, Tatsuo Ishii wrote: > 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. Okay, no objections with a separate, new, column if that's the consensus. -- Michael signature.asc Description: PG

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

2019-04-14 Thread Tatsuo Ishii
> The question is: what is the problem we want to solve? The client_hostname is useful for TCP/IP connections because it indicates which row of the view is related to which standby server. I would like to have the same for UNIX domain socket case as well. > Ishii-san asked > for a socket path. I

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

2019-04-12 Thread Tom Lane
Euler Taveira writes: > The question is: what is the problem we want to solve? Ishii-san asked > for a socket path. If we have already figured out the replica (via > application_name), use the replica PID to find the socket path. A new > column as suggested by Tom could show the desired info. Is i

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

2019-04-12 Thread Euler Taveira
Em sex, 12 de abr de 2019 às 01:39, Michael Paquier escreveu: > > On Thu, Apr 11, 2019 at 10:19:01PM -0300, Euler Taveira wrote: > > application_name. I'm not sure if it solves your complain but Peter > > committed a patch [1] for v12 that distinguishes replicas in the same > > host via cluster_na

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

2019-04-12 Thread Tatsuo Ishii
>> 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 d

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

2019-04-12 Thread Tom Lane
Michael Paquier 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

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

2019-04-11 Thread Michael Paquier
On Thu, Apr 11, 2019 at 10:19:01PM -0300, Euler Taveira wrote: > application_name. I'm not sure if it solves your complain but Peter > committed a patch [1] for v12 that distinguishes replicas in the same > host via cluster_name. Let's be honest, this is just a workaround. > Socket has different

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

2019-04-11 Thread Euler Taveira
Em qui, 11 de abr de 2019 às 21:16, Tatsuo Ishii escreveu: > > 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 t