On Sat, Apr 2, 2022 at 6:37 PM Wong Simon <thbytwo@live.cn> wrote:
If I run multiple instances on one server with local socket, how can I distinguish them?I think the port is need.
You do have the right idea, but you need to inspect the static configuration setting the server is using as opposed to the connection state reported by the function.
The TCP port the server listens on; 5432 by default. Note that the same port number is used for all IP addresses the server listens on. This parameter can only be set at server start.