Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rz1hf-001ZNT-GQ for pgsql-general@arkaria.postgresql.org; Mon, 22 Apr 2024 21:59:59 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1rz1he-000o4X-5f for pgsql-general@arkaria.postgresql.org; Mon, 22 Apr 2024 21:59:58 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rz1hd-000o3H-Qc for pgsql-general@lists.postgresql.org; Mon, 22 Apr 2024 21:59:57 +0000 Received: from mail-oo1-xc2e.google.com ([2607:f8b0:4864:20::c2e]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1rz1hb-0049ap-En for pgsql-general@postgresql.org; Mon, 22 Apr 2024 21:59:56 +0000 Received: by mail-oo1-xc2e.google.com with SMTP id 006d021491bc7-5aa2bd6f651so3172017eaf.0 for ; Mon, 22 Apr 2024 14:59:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1713823195; x=1714427995; darn=postgresql.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=Tbc7qsCLabLz4OT7eODBqLtjHxCJkUwFCbo0yPsjAmg=; b=mYWtaTg5gguocyKbDjAf+fThCTi2lwc1p+cbsL7bEzEiwFTK4qjAP3x/TpdLNRPe61 gjPPrlaA9h4/loe9JQwVEIN0kIfbTafUTY5FX4UcwR8y3mgQHK90ahGMlSLeJyaP5Qvp EaUAqoLuthxzbAEt0TD2jOujvusw/wS7zidlR2kEoTNlZTy418tdM/beMwj+q5cKqCS6 yY6LonJPhGrQ5j5FycGuz007RpQjvGJO6Fxj03dGWI4hKYrgdJNC9GpAenOuop4sS4On zrD49+qOhJoZmhZIMTuJtJnkzzCoMTzoczXAQUmjuQMmJo2+uQiJUG441q2VnEb+3FW0 WUVw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713823195; x=1714427995; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=Tbc7qsCLabLz4OT7eODBqLtjHxCJkUwFCbo0yPsjAmg=; b=Dv1PuP6uMKt4vLvY00czgC8I8zs+Mwy0fbWVU9Yk6swuloXrISyGSl/5QcFZ/25Ug7 aDYssr75A1f5JbweLkiE31sW1CVpBbcfNc2AdYfMvJq6UU4K80Q88dqqP4BrC6dO9Ru6 Yh17aDwpyu7rs3w9S4d8m/5vYUJq4Yag/iYgsSZgE/ve+79r+qh54WKQtsrBAkxiow5/ 5qyn32Xwv8ADWFsW7DO14ph5QvejOrNfCZmGqlMHSMB5iWU8m5TDce2tCDvaRbD2KHT3 K40avobC4CP+f9TfoyFnmj2joSbfzwOrFAZ5nTDPRbscU1/NA6FzN8w3NxWSh38VEYUs JVgQ== X-Forwarded-Encrypted: i=1; AJvYcCVqkpYzfjPD0eajkd8PD8O+0p/e6lPdeoVD9dNt1d96J9x/zZ0e6bED3FPbVA/mugu78ghWAni84yoS7sYq/jEnQd93GxgPK5Fj6Hlj X-Gm-Message-State: AOJu0YzwoLluG9yx5HstbvF2UnzN6gyY+g/6oxVJ3SRUjCsRuWWOpai8 GMrV2l6GWQOCrLcMq8RNtnYzpjofx9I71c/UP2LA03gQBH4RDrS4jrcO+RVTAyBOlpq1hDf5oMc FCA3d0oA4duRb73gtt4kpLFVe5MozoQ== X-Google-Smtp-Source: AGHT+IFi0b8Q/6NR/iGV4W/7rC5/B7yDXx2t6QeMbd3mY3asxkDX59UJL2HR8QjpWjAggA8VJHloUrhVfyGH/8Riyj4= X-Received: by 2002:a4a:5783:0:b0:5af:2f43:1e69 with SMTP id u125-20020a4a5783000000b005af2f431e69mr893877ooa.8.1713823194812; Mon, 22 Apr 2024 14:59:54 -0700 (PDT) MIME-Version: 1.0 References: <2015f756-b188-4840-922d-6f927997ab51@aklaver.com> In-Reply-To: From: "David G. Johnston" Date: Mon, 22 Apr 2024 14:59:17 -0700 Message-ID: Subject: Re: issue with reading hostname To: Atul Kumar Cc: Adrian Klaver , pgsql-general Content-Type: multipart/alternative; boundary="000000000000bc1a130616b68efd" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --000000000000bc1a130616b68efd Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Mon, Apr 22, 2024 at 2:54=E2=80=AFPM Atul Kumar = 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. --000000000000bc1a130616b68efd Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
On Mon, Apr 22, 2024 at 2:54=E2=80=AFPM Atul Kumar <akumar14871@gmail.com> wrote:<= /span>
I mean, Once I change the hostname= then how will the socket read the new hostname ? Does it require a postgre= s service restart ?


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

David J.

=
--000000000000bc1a130616b68efd--