I have tried using host variable PGPASSWORD
and .pgpass
and neither of these two will allow me to authenticate to the database. I have chmod
'd .pgpass
to appropriate permissions and also tried:
export PGPASSWORD=mypass and PGPASSWORD=mypass
The password DOES contain a \
however I was encasing it in single quotes PGPASS='mypass\'
and it still will not authenticate.
I'm running:
pg_dump dbname -U username -Fc
and I still receive
pg_dump: [archiver (db)] connection to database "dbname" failed: FATAL: Peer authentication failed for user "username"