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

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Euler Taveira <euler(at)timbira(dot)com(dot)br>
Cc: Michael Paquier <michael(at)paquier(dot)xyz>, Tatsuo Ishii <ishii(at)sraoss(dot)co(dot)jp>, PostgreSQL Hackers <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 15:57:59
Message-ID: 31803.1555084679@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Euler Taveira <euler(at)timbira(dot)com(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andrew Dunstan 2019-04-12 16:09:05 Re: jsonpath
Previous Message Fabien COELHO 2019-04-12 15:51:29 Re: improve PQexec documentation