Re: strange behavior of pg_hba.conf file

Поиск
Список
Период
Сортировка
От Atul Kumar
Тема Re: strange behavior of pg_hba.conf file
Дата
Msg-id CA+ONtZ7+383OhJ1Z37V5dJUo9ivU01HmhXZ_oL2hmkoSL-SEVg@mail.gmail.com
обсуждение исходный текст
Ответ на strange behavior of pg_hba.conf file  (Atul Kumar <akumar14871@gmail.com>)
Ответы Re: strange behavior of pg_hba.conf file
Re: strange behavior of pg_hba.conf file
Список pgsql-general
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.


Regards.


On Wed, Nov 22, 2023 at 10:31 PM Atul Kumar <akumar14871@gmail.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.


Regards.


On Wed, Nov 22, 2023 at 9:55 PM Ron Johnson <ronljohnsonjr@gmail.com> wrote:
On Wed, Nov 22, 2023 at 11:22 AM Atul Kumar <akumar14871@gmail.com> wrote:
Hi,

I have postgres 12 running in centos 7, recently I changed the authentication of entries of pg_hba.conf to scram-sh-256 for localhost.


I think you changed something else, at the same time.
 
Since then I have started getting the below error:

no pg_hba.conf entry for host "::1", user "postgres", database "postgres




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.

В списке pgsql-general по дате отправления:

Предыдущее
От: "Efrain J. Berdecia"
Дата:
Сообщение: Re: pg_restore enhancements
Следующее
От: Ron Johnson
Дата:
Сообщение: Re: strange behavior of pg_hba.conf file