Thread: pg_dump restore problem

pg_dump restore problem

From
"Devi Munandar"
Date:
Hi admin

i have problem with user authentification

I've made a dump from PostgreSQL 7.2.2 under linux 8.0 with the command:
pg_dump -a -b -Fc -f  bakstore -o -v store

and running success, and then i try to restore with the command:
pg_restore -a -d store -Fc -o -v bakstrore

and running unsuccess because i've got message:
pg_restore:[archiver (db)] could not reconnect to database : FATAL 1 : IDENT
authentification failed for user "phpuser"

my post pg_hba.conf
*****************
TYPE         DATABASE        IP_ADDRESS      MASK
AUTH_TYPE        AUTH_ARGUMENT
host            all                          127.0.0.1
255.255.255.255          trust
host            store                     167.205.240.166   255.255.255.0
trust
host            all                          127.0.0.1
255.255.255.255        ident                    phpuser

my post pg_ident.conf
******************
MAP            IDENT            PGUSERNAME
phpuser        phpuser            postgres

NB: i make 'store' database pass through phpPgAdmin2.4.2 with
username:"phpuser" and password:""

Best Regards,

--devi munandar


Re: pg_dump restore problem

From
Peter Eisentraut
Date:
Devi Munandar writes:

> MAP            IDENT            PGUSERNAME
> phpuser        phpuser            postgres

With this setup you can connect if your OS user is "phpuser" and the user
you want to connect as is "postgres".  So log in as "phpuser" on you OS
and run pg_restore with the option -U postgres.

--
Peter Eisentraut   peter_e@gmx.net