Discussion:
Can't restore from pg_dump. Authentication failed
(too old to reply)
Greg
2004-05-26 11:08:33 UTC
Permalink
Hi,

Frankly I don't know what should I do more. The problem is:
I've made a pg_dump from shell like that:
pg_dump -Upostgres -O -D -Fc --file=baza.sql

Copied the file to new server and from shell executed:
linux:~ # pg_restore -d ppr -U postgres -i baza.sql
The result is
pg_restore: [archiver (db)] connection to database "ppr" failed:
FATAL: IDENT authentication failed for user "postgres"

I don't know what is going on since I can login to ppr database like
that
(in shell)
su - postgres
psql -dppr

Could anybody help me.
Gaetano Mendola
2004-05-26 12:56:29 UTC
Permalink
Post by Greg
Hi,
pg_dump -Upostgres -O -D -Fc --file=baza.sql
linux:~ # pg_restore -d ppr -U postgres -i baza.sql
The result is
FATAL: IDENT authentication failed for user "postgres"
I don't know what is going on since I can login to ppr database like
that
(in shell)
su - postgres
psql -dppr
try in this way:

su - postgres
psql -f baza.sql dppr


Regards
Gaetano Mendola
Tom Lane
2004-05-31 04:24:10 UTC
Permalink
Post by Greg
linux:~ # pg_restore -d ppr -U postgres -i baza.sql
FATAL: IDENT authentication failed for user "postgres"
You can't use "-U" or similar switches when you've selected IDENT
authentication --- the whole point of that auth method is that your
Postgres userid must be the same as your logged-in Unix userid.

If this is not what you want, select another auth method in
pg_hba.conf.

Or if you want to get tricky, you can play around with an ident
map file. See the documentation.

regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 4: Don't 'kill -9' the postmaster

Loading...