SQLSTATE 28P01Severity mediumLab verified

Incident brief

Invalid password

A connection attempt supplied the wrong password for a password-authenticated role. PostgreSQL rejected the connection before it was ever established.

Reproduced on PostgreSQL 16.14Verified 2026-07-16 (Docker lab, PostgreSQL 16.14)Reviewed by Verified against PostgreSQL 16.14 in an isolated lab environment

In 10 seconds

What
Invalid password
What triggers it
Connect with a role that requires password authentication (not trust).
The fix
Reconnect with the correct password.
Proof
Reproduced on PostgreSQL 16.14 → Connecting with the wrong password, over a network path that genuinely enforces password authentication, was rejected with SQLSTATE 28P01. The correct password, tried right afterward, succeeded.

The fix

What to do right now

The immediate, application-level response to this error.

  • Reconnect with the correct password.
  • Reset the role's password with ALTER ROLE ... PASSWORD if it's genuinely been lost, rather than working around authentication.
  • Never 'fix' this by adding a trust rule to pg_hba.conf — see the counterexample for exactly what that gives up.
Fix — SQL
-- reconnect with the correct password
SELECT 1 AS connected_successfully;

Related & next steps

Follow the thread

Everything this error touches — jump straight to the sibling error, term, runbook, or parameter.

Verification

PG 16.14
Last verified
2026-07-16 (Docker lab, PostgreSQL 16.14)
Reviewed by
Verified against PostgreSQL 16.14 in an isolated lab environment
Audit status
reviewed