Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

can't pg_dump the PostgreSQL db. config help?

D Mitchell March 31, 2022

So over the last couple of upgrades to Jira, we've had to upgrade PostgreSQL as well for compatibility.     So we're now at:

Jira 8.20.1

PostgreSQL 10

 

But when I try to dump the db, it complains (I'm running this as root if that matters, it didn't used to):

-bash-4.1$ pg_dump -U jiradbuser jiradb -f jira-11-06-18.sql
pg_dump: [archiver (db)] connection to database "jiradb" failed: FATAL: Peer authentication failed for user "jiradbuser"

 

 

Seems like a config issue, so here is my:  /data/pgsql/10/data/pg_hba.conf

# TYPE DATABASE USER ADDRESS METHOD

# "local" is for Unix domain socket connections only
local all all peer
# IPv4 local connections:
host all all 127.0.0.1/32 trust
# IPv6 local connections:
host all all ::1/128 ident
# Allow replication connections from localhost, by a user with the
# replication privilege.
local replication all peer
host replication all 127.0.0.1/32 ident
host replication all ::1/128 ident

 

What am I missing here?   Any thoughts?

Thanks in advance.

 

1 answer

0 votes
Nic Brough -Adaptavist-
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 31, 2022

This is what it says it is - your jiradbuser did not authenticate with the credentials you have used.   

I note that your command doesn't contain anything to do with the password that you should have set on the database for that user.

Suggest an answer

Log in or Sign up to answer