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

From Ron Johnson
Subject Re: issue with reading hostname
Date
Msg-id CANzqJaARXp8O6tzsB=uG8tt3pPub7aYhTA5VvZHNJAW7eeR3Og@mail.gmail.com
Whole thread Raw
In response to issue with reading hostname  (Atul Kumar <akumar14871@gmail.com>)
Responses Re: issue with reading hostname
List pgsql-general
On Mon, Apr 22, 2024 at 4:14 PM Atul Kumar <akumar14871@gmail.com> wrote:
Hi,

I have postgresql  version 15 running on centos7.

I have below query that reads hostname from /tmp directory:

psql postgres -A -t -p 5432 -h /tmp/ -c 'SELECT pg_is_in_recovery();'


If you installed from the PGDG repository (possibly also the CENTOS repos, but I'm not sure), then the domain socket also lives in :
/var/run/postgresql

* I find that more expressive than /tmp.
* No need to specify the host when using sockets.
* Using a socket name makes parameterizing the hostname easier in scripts.


pgsql-general by date:

Previous
From: Adrian Klaver
Date:
Subject: Re: CLUSTER vs. VACUUM FULL
Next
From: Ron Johnson
Date:
Subject: Re: CLUSTER vs. VACUUM FULL