Re: strange behavior of pg_hba.conf file

From: Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com>
To: Andreas Kretschmer <andreas(at)a-kretschmer(dot)de>, pgsql-general(at)lists(dot)postgresql(dot)org
Subject: Re: strange behavior of pg_hba.conf file
Date: 2023-11-22 18:36:22
Message-ID: d6fc59f5-1fdf-49e5-ae9f-da959fd1802f@aklaver.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general


On 11/22/23 10:01 AM, Adrian Klaver wrote:
>
>
> On 11/22/23 9:55 AM, Andreas Kretschmer wrote:
>>
>>
>> Am 22.11.23 um 18:44 schrieb Atul Kumar:
>>> I am giving this command
>>> psql -d postgres -U postgres -p 5432 -h localhost
>>> Then only I get that error.
>>
>> so localhost resolved to an IPv6 - address ...
>
>
> Yeah, you should take a look at:
>
> /etc/hosts
>
>
> In meantime include a  line for IPv6 in pg_hba.conf. where the address
> would be:
>
> ::1/128

Or you could change

host all postgres 127.0.0.1/32 scram-sha-256

to

host all postgres localhost scram-sha-256

>
>

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2023-11-22 19:27:52 Re: pg_restore enhancements
Previous Message Adrian Klaver 2023-11-22 18:09:41 Re: strange behavior of pg_hba.conf file