Re: issue with reading hostname

From: Ron Johnson <ronljohnsonjr(at)gmail(dot)com>
To: pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: Re: issue with reading hostname
Date: 2024-04-22 21:44:43
Message-ID: CANzqJaD4A1h-0UV3X=H8c5crBmqQf4zm8CGfg9_EnApe44udrA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

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 <akumar14871(at)gmail(dot)com> wrote:

> Can we edit the socket to change the hostname in it ?
>
> Regards.
>
> On Tue, Apr 23, 2024 at 2:41 AM Ron Johnson <ronljohnsonjr(at)gmail(dot)com>
> wrote:
>
>> On Mon, Apr 22, 2024 at 4:14 PM Atul Kumar <akumar14871(at)gmail(dot)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.
>>
>>
>>

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Adrian Klaver 2024-04-22 21:49:26 Re: issue with reading hostname
Previous Message David Rowley 2024-04-22 21:43:47 Re: Performance degradation after upgrading from 9.5 to 14