Re: BUG #17454: Using psql without ipv4 address,the inet_server_port do not return PORT.

From: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
To: Wong Simon <thbytwo(at)live(dot)cn>
Cc: "pgsql-bugs(at)lists(dot)postgresql(dot)org" <pgsql-bugs(at)lists(dot)postgresql(dot)org>
Subject: Re: BUG #17454: Using psql without ipv4 address,the inet_server_port do not return PORT.
Date: 2022-04-03 01:40:32
Message-ID: CAKFQuwZm==rNg0z9XYG5OSCB0oiMJn=6d9x+rdTpbsz7G0TVvQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Sat, Apr 2, 2022 at 6:37 PM Wong Simon <thbytwo(at)live(dot)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.

https://www.postgresql.org/docs/current/runtime-config-connection.html#RUNTIME-CONFIG-CONNECTION-SETTINGS

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.

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Francisco Olarte 2022-04-03 15:35:56 Re: BUG #17454: Using psql without ipv4 address,the inet_server_port do not return PORT.
Previous Message Wong Simon 2022-04-03 01:37:53 回复: BUG #17454: Using psql without ipv4 address,the inet_server_port do not return PORT.