Re: BUG #17454: Using psql without ipv4 address,the inet_server_port do not return PORT. - Mailing list pgsql-bugs

From David G. Johnston
Subject Re: BUG #17454: Using psql without ipv4 address,the inet_server_port do not return PORT.
Date
Msg-id CAKFQuwZm==rNg0z9XYG5OSCB0oiMJn=6d9x+rdTpbsz7G0TVvQ@mail.gmail.com
Whole thread Raw
In response to BUG #17454: Using psql without ipv4 address,the inet_server_port do not return PORT.  (PG Bug reporting form <noreply@postgresql.org>)
List pgsql-bugs
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.


port

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.

David J.

pgsql-bugs by date:

Previous
From: Wong Simon
Date:
Subject: 回复: BUG #17454: Using psql without ipv4 address,the inet_server_port do not return PORT.
Next
From: Francisco Olarte
Date:
Subject: Re: BUG #17454: Using psql without ipv4 address,the inet_server_port do not return PORT.