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 31803.1555084679@sss.pgh.pa.us
Whole thread Raw
In response to Re: Adding Unix domain socket path and port to pg_stat_get_wal_senders()  (Euler Taveira <euler@timbira.com.br>)
Responses Re: Adding Unix domain socket path and port topg_stat_get_wal_senders()
List pgsql-hackers
Euler Taveira <euler@timbira.com.br> 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 it *really*
> useful? I mean, how many setups have master and replica in the same
> server?

Yeah, I think that argument is why we didn't cover the case in the
original view design.  This additional column would be useless on
Windows, too.  Still, since Ishii-san is concerned about this,
I suppose he has a plausible use-case in mind.

> 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
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' use of it turns out to be really hard).  However,
it's definitely fair to question whether anyone *cares* which of
the server's socket directories a given connection used.  Aren't
they going to be pretty much all equivalent?

            regards, tom lane



pgsql-hackers by date:

Previous
From: Fabien COELHO
Date:
Subject: Re: improve PQexec documentation
Next
From: Andrew Dunstan
Date:
Subject: Re: jsonpath