Re: issue with reading hostname - Mailing list pgsql-general

From David G. Johnston
Subject Re: issue with reading hostname
Date
Msg-id CAKFQuwagbtfSjzeu6SgZX7AbsiisuUXhKKiQJ2aBRpaGMjAN0A@mail.gmail.com
Whole thread Raw
In response to Re: issue with reading hostname  (Atul Kumar <akumar14871@gmail.com>)
List pgsql-general
On Mon, Apr 22, 2024 at 2:54 PM Atul Kumar <akumar14871@gmail.com> wrote:
I mean, Once I change the hostname then how will the socket read the new hostname ? Does it require a postgres service restart ?


-h doesn't strictly mean hostname (the wording choice here does seem problematic), rather it is simply a direct specification of how and where the psql client looks for and connects to the server.  When the specification is a filename it is that file that is used and hostname and any other networking-related stuff is immaterial.  Though the server does choose to borrow the port number 5432 from networking to construct the unique name out of convenience.

David J.

pgsql-general by date:

Previous
From: Adrian Klaver
Date:
Subject: Re: CLUSTER vs. VACUUM FULL
Next
From: Adrian Klaver
Date:
Subject: Re: issue with reading hostname