RE: [EXTERNAL] Re: Cannot connect local with ttrust (pg_upgrade assumes it) - Mailing list pgsql-general

From Abraham, Danny
Subject RE: [EXTERNAL] Re: Cannot connect local with ttrust (pg_upgrade assumes it)
Date
Msg-id SA1PR02MB9698711388AFA3FE147BBF278EB42@SA1PR02MB9698.namprd02.prod.outlook.com
Whole thread Raw
In response to Re: [EXTERNAL] Re: Cannot connect local with ttrust (pg_upgrade assumes it)  ("David G. Johnston" <david.g.johnston@gmail.com>)
Responses Re: [EXTERNAL] Re: Cannot connect local with ttrust (pg_upgrade assumes it)
Re: [EXTERNAL] Re: Cannot connect local with ttrust (pg_upgrade assumes it)
List pgsql-general

Thanks again.

 

  1. No other PG instances on this Linux machine.
  2. RHEL9
  3. Our compiled PG which is embedded within our product/site
  4. I am not aware of an env variable that changes the top down matching on pg_hba.conf

 

Danny

 

From: David G. Johnston <david.g.johnston@gmail.com>
Sent: Wednesday, April 9, 2025 10:34 PM
To: Abraham, Danny <danny_abraham@bmc.com>
Cc: Adrian Klaver <adrian.klaver@aklaver.com>; Francisco Olarte <folarte@peoplecall.com>; pgsql-general@lists.postgresql.org
Subject: Re: [EXTERNAL] Re: Cannot connect local with ttrust (pg_upgrade assumes it)

 

On Wed, Apr 9, 2025, 12:21 Abraham, Danny <danny_abraham@bmc.com> wrote:

Thanks again.
Here is the example:
>>>>>>>>
dba-tlv-x6y64k% cat pg_hba.conf
# TYPE  DATABASE    USER        CIDR-ADDRESS          METHOD
local   all         all                               trust
host    all         all         0.0.0.0/0                   scram-sha-256

dba-tlv-x6y64k% pg_ctl reload
server signaled
dba-tlv-x6y64k% psql -Upostgres
Password for user postgres:
psql (17.4)
Type "help" for help.

ctrlmdb=#
>>>>>>>
PSQL should not have asked for the password.
Thanks
Danny

 

Suggests there are environment variables coming into play making non-default choices for you.  Namely, making you not use local as the connection method.

 

David J.

 

pgsql-general by date:

Previous
From: "David G. Johnston"
Date:
Subject: Re: [EXTERNAL] Re: Cannot connect local with ttrust (pg_upgrade assumes it)
Next
From: Adrian Klaver
Date:
Subject: Re: [EXTERNAL] Re: Cannot connect local with ttrust (pg_upgrade assumes it)