pgbench-tools failed authentication

Posted on

Question :

I’m trying to configure pgbench-tools and went to run it per the README and got this error

-bash-4.2$ ./newset 'Initial Config'
psql: FATAL:  Ident authentication failed for user "postgres"
psql: FATAL:  Ident authentication failed for user "postgres"

I looked at my pg_hba.conf file and local is set to trust, so not sure where the error is coming, I made sure the pgbench-tools/config file is set for user postgres. Trying to figure out where this problem is coming from and haven’t seen anywhere on pgbench-tools repository that shines any light.

Answer :

I strongly believe that only the “local” record is set to trust.
try something like that:

local   all             all                                     trust
host    all             all             127.0.0.1/32            trust
host    all             all             ::1/128                 trust

this should work for all kinds of local connections.

Leave a Reply

Your email address will not be published. Required fields are marked *