Re: strange behavior of pg_hba.conf file

From: Ron Johnson <ronljohnsonjr(at)gmail(dot)com>
To: "pgsql-generallists(dot)postgresql(dot)org" <pgsql-general(at)lists(dot)postgresql(dot)org>
Subject: Re: strange behavior of pg_hba.conf file
Date: 2023-11-22 17:11:27
Message-ID: CANzqJaBCb2z9OOrJWgH+4VWn5+fqHc5H=DP56BU0qtsP8zwT=w@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

The error message is EXPLICIT, and DOES NOT LIE. Either someone removed
the ::1 entry, or you're now using IPv6.

On Wed, Nov 22, 2023 at 12:03 PM Atul Kumar <akumar14871(at)gmail(dot)com> wrote:

> The entries that I changed were to replace the md5 with scram-sha-256 and
> remove unnecessary remote IPs.
>
> But it has nothing to do with connecting the server locally with "psql -d
> postgres -U postgres -h localhost"
>
> But when I try to connect it locally I get this error. So it is related to
> local connections only and when I pass the hostname or ip of the server it
> works fine without any issue.
>
>
>>>>
>>>> The entry of pg_hba.conf is like below:
>>>>
>>>> # TYPE DATABASE USER ADDRESS METHOD
>>>>
>>>>
>>>>
>>>> # "local" is for Unix domain socket connections only
>>>>
>>>> local all all
>>>> scram-sha-256
>>>>
>>>> # IPv4 local connections:
>>>>
>>>> host all postgres 127.0.0.1/32
>>>> scram-sha-256
>>>>
>>>>
>>>>
>>>> What I am missing here, please suggest.
>>>>
>>>
>>> A definition for host "::1", user "postgres", database "postgres".
>>> It's right there in the error message.
>>>
>>

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Adrian Klaver 2023-11-22 17:15:07 Re: strange behavior of pg_hba.conf file
Previous Message Atul Kumar 2023-11-22 17:03:03 Re: strange behavior of pg_hba.conf file