Re: issue with reading hostname

2024-04-22 Thread David G. Johnston
On Mon, Apr 22, 2024 at 2:54 PM 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

Re: issue with reading hostname

2024-04-22 Thread Adrian Klaver
On 4/22/24 14:54, 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 ? The host name of the machine? On Tue, Apr 23, 2024 at 3:19 AM Adrian Klaver > wrote:

Re: issue with reading hostname

2024-04-22 Thread David G. Johnston
On Mon, Apr 22, 2024 at 1:14 PM Atul Kumar wrote: > > so below are my questions: > > 1. Is the psql client reading the socket file that resides in the /tmp > directory to fetch the hostname ? > > 2. I saw the socket file in /tmp and it is empty. Then how is the psql > client still reading the

Re: issue with reading hostname

2024-04-22 Thread Atul Kumar
I mean, Once I change the hostname then how will the socket read the new hostname ? Does it require a postgres service restart ? On Tue, Apr 23, 2024 at 3:19 AM Adrian Klaver wrote: > On 4/22/24 14:37, Atul Kumar wrote: > > Can we edit the socket to change the hostname in it ? > > On Ubuntu

Re: issue with reading hostname

2024-04-22 Thread Adrian Klaver
On 4/22/24 14:37, Atul Kumar wrote: Can we edit the socket to change the hostname in it ? On Ubuntu 22.04 install, given: srwxrwxrwx 1 postgres postgres0 Apr 22 14:01 .s.PGSQL.5432= -rw--- 1 postgres postgres 68 Apr 22 14:01 .s.PGSQL.5432.lock The contents of

Re: issue with reading hostname

2024-04-22 Thread Ron Johnson
There's no hostname in a socket directory. Do you mean :"change the socket name from /tmp or /var/run/postgresql to something else?" If so, then https://www.postgresql.org/docs/16/runtime-config-connection.html mentions sockets. On Mon, Apr 22, 2024 at 5:37 PM Atul Kumar wrote: > Can we edit

Re: issue with reading hostname

2024-04-22 Thread Atul Kumar
Can we edit the socket to change the hostname in it ? Regards. On Tue, Apr 23, 2024 at 2:41 AM Ron Johnson wrote: > On Mon, Apr 22, 2024 at 4:14 PM Atul Kumar wrote: > >> Hi, >> >> I have postgresql version 15 running on centos7. >> >> I have below query that reads hostname from /tmp

Re: issue with reading hostname

2024-04-22 Thread Ron Johnson
On Mon, Apr 22, 2024 at 4:14 PM Atul Kumar 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

Re: issue with reading hostname

2024-04-22 Thread Adrian Klaver
On 4/22/24 13:13, Atul Kumar 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();' so below are my questions: 1. Is the psql client reading the socket

issue with reading hostname

2024-04-22 Thread Atul Kumar
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();' so below are my questions: 1. Is the psql client reading the socket file that resides in the /tmp directory