0

recently we have upgraded our postgres db to version 13.1. after that we are facing strange behaviour with Connection Strings

with PostgresSql 12.3 below command used to connect successfully to DB with out prompting for password

**postgres=# \connect "dbname=dm_test_db4_db user=test_db4 host=localhost port=5432 password=password";
You are now connected to database "dm_test_db4_db" as user "test_db4".*

with PostgresSql 13.1 input for password prompted and if we provide password connection is successful.

*postgres=# \connect "dbname=dm_test_db4_db user=test_db4 host=localhost port=5432 password=password";
Password for user test_db4:
You are now connected to database "dm_test_db4_db" as user "test_db4".*

since these command is part of a sql script no input is given , script is failing with Authentication failure.

Here are my env details

postgres version details: C:\Program Files\PostgreSQL\13\bin>postgres.exe -V postgres (PostgreSQL) 13.1 OS:Windows

these are the settings in pg_hba.conf

 - IPv4 local connections:

host    all             all             127.0.0.1/32            md5

 - IPv6 local connections:

host    all             all             ::1/128                 md5

Any idea what is causing this behavior?

  • 1
    I cannot reproduce that. Did you restart PostgreSQL? Compare the user definitions and `pg_hba.conf` on both systems. – Laurenz Albe Feb 26 '21 at 14:25
  • this is reproduced with 13.1 version after upgrading to 13.2 issue got resolved. – Jeevan Otra Feb 26 '21 at 19:08
  • Laurenz was perhaps using 13.1 of the server, but some other version of the client. That is what I did at first, and couldn't reproduce it at first. – jjanes Feb 27 '21 at 14:48

1 Answers1

2

There is a bug in the 13.1 version of psql (the client program, not the database server). It was fixed in 13.2

jjanes
  • 37,812
  • 5
  • 27
  • 34