Euler Taveira <eu...@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