Skip to content

peer-authentication

1 Post

FATAL: Peer authentication failed for user 'postgres', Fixed

'Peer authentication failed for user' means PostgreSQL asked the kernel who you are and your Linux username didn't match the role you asked for. Why sudo -u postgres psql works and psql -U postgres doesn't, and the fixes that don't involve trust.