Supported Versions: Current (16) / 15 / 14 / 13 / 12
Development Versions: devel
Unsupported versions: 11 / 10 / 9.6 / 9.5 / 9.4 / 9.3 / 9.2 / 9.1 / 9.0 / 8.4 / 8.3 / 8.2 / 8.1 / 8.0 / 7.4 / 7.3 / 7.2 / 7.1
This documentation is for an unsupported version of PostgreSQL.
You may want to view the same page for the current version, or one of the other supported versions listed above instead.

4.3. Authentication problems

Genuine authentication failures and related problems generally manifest themselves through error messages like the following.

No pg_hba.conf entry for host, user joeblow, database testdb
This is what you are most likely to get if you succeed in contacting the server, but it doesn't want to talk to you. As the message suggests, the server refused the connection request because it found no authorizing entry in its pg_hba.conf configuration file.
Password authentication failed for user 'joeblow'
Messages like this indicate that you contacted the server, and it's willing to talk to you, but not until you pass the authorization method specified in the pg_hba.conf file. Check the password you're providing, or check your Kerberos or IDENT software if the complaint mentions one of those authentication types.
FATAL 1:  user "joeblow" does not exist
The indicated user name was not found in pg_shadow.
FATAL 1:  Database "testdb" does not exist in the system catalog.
The database you're trying to connect to doesn't exist. Note that if you don't specify a database name, it defaults to the database user name, which may or may not be the right thing.