Thread: a question from robbie
dear sir,
1.First Question :Under Linux I Use pg_dump -Ft -h 192.168.0.2 -U dbusername -d db > /home/pgsql/back.tar
And Then pg_restore -c -h 192.168.0.2 -U dbusername -d db /home/pgsql/back.tar The Error shows Like this...What Can I Do??
pg_restore: [archiver (db)] Error while PROCESSING TOC:
pg_restore: [archiver (db)] Error from TOC entry 5318; 16386 6987405 FK CONSTRAINT tbl_workuser_work_id janson
pg_restore: [archiver (db)] could not execute query: ERROR: must be owner of schema public
Command was: DROP SCHEMA public;
pg_restore: [archiver (db)] Error from TOC entry 5; 16672 2200 SCHEMA public pgsql
pg_restore: [archiver (db)] could not execute query: ERROR: schema "public" already exists
Command was: CREATE SCHEMA public;
pg_restore: [archiver (db)] Error from TOC entry 5974; 0 0 COMMENT SCHEMA public pgsql
pg_restore: [archiver (db)] could not execute query: ERROR: must be owner of schema public
Command was: COMMENT ON SCHEMA public IS 'Standard public schema';
2.Second Question:I use pg_dump -Ft -h 192.168.0.2 -U dbusername -d db > back.tar Under Windows
And Then pg_restore -c -h 192.168.0.2 -U dbusername -d db back.tar And Shows Error Like
pg_restore: [archiver (db)] connection to database "dbusername" failed: FATAL: pass
word authentication failed for user "dbusername"
its telling me that the password is wrong,but im pretty sure that my password is right,because when i use pg_dump,it ask me to put in password,and everything works fine。
−−−−−
Its 8.0 database。but if i use server and use trust to check,everything looks fine,after i changed my password, all the question show like above.
Hope you can reply my mail.
And Then pg_restore -c -h 192.168.0.2 -U dbusername -d db /home/pgsql/back.tar The Error shows Like this...What Can I Do??
pg_restore: [archiver (db)] Error while PROCESSING TOC:
pg_restore: [archiver (db)] Error from TOC entry 5318; 16386 6987405 FK CONSTRAINT tbl_workuser_work_id janson
pg_restore: [archiver (db)] could not execute query: ERROR: must be owner of schema public
Command was: DROP SCHEMA public;
pg_restore: [archiver (db)] Error from TOC entry 5; 16672 2200 SCHEMA public pgsql
pg_restore: [archiver (db)] could not execute query: ERROR: schema "public" already exists
Command was: CREATE SCHEMA public;
pg_restore: [archiver (db)] Error from TOC entry 5974; 0 0 COMMENT SCHEMA public pgsql
pg_restore: [archiver (db)] could not execute query: ERROR: must be owner of schema public
Command was: COMMENT ON SCHEMA public IS 'Standard public schema';
2.Second Question:I use pg_dump -Ft -h 192.168.0.2 -U dbusername -d db > back.tar Under Windows
And Then pg_restore -c -h 192.168.0.2 -U dbusername -d db back.tar And Shows Error Like
pg_restore: [archiver (db)] connection to database "dbusername" failed: FATAL: pass
word authentication failed for user "dbusername"
its telling me that the password is wrong,but im pretty sure that my password is right,because when i use pg_dump,it ask me to put in password,and everything works fine。
−−−−−
Its 8.0 database。but if i use server and use trust to check,everything looks fine,after i changed my password, all the question show like above.
Hope you can reply my mail.
best regards
robbie.xu