Another possible bug in pg_restore
От | Jie Liang |
---|---|
Тема | Another possible bug in pg_restore |
Дата | |
Msg-id | 7C760DAA511DC74B99E7D22189F786F101BF2157@mail01.stbernard.com обсуждение исходный текст |
Список | pgsql-admin |
I dumped my data from a server(FreeBSD4.5, Pg7.2.0) and I try to restore my whole database on another server(FreeBSD4.6, Pg7.2.1) I try to change the ownership of all the objects in my db on new server, so I created a new user 'reporter' in my new db on new server, originally, all almost of my object were owned by user 'robot', so I use -O tell pg_restore do not use orignal owner and -U give a new owner, however, the result is, original owner cannot be removed with -O(I tried -R also), unless restore a single table with -t, but -t won't restore index at all, this is different from what I see use pg_dump -t in a plain text form which contains related sequence object and indexex. I tried using 'pg_restore -Ovs -U reporter -d test' to restore the schema only, I got the same error msg. Following is the log: wammer:/usr/local/pgsql/bin $createdb test CREATE DATABASE wammer:/usr/local/pgsql/bin $pg_restore -Ov -U reporter -d test /work/wam/tmp/wamdump.0208081536 pg_restore: connecting to database for restore pg_restore: [archiver] WARNING: Data restoration may fail because existing triggers cannot be disabled (no superuser user name specified). This is only a problem when restoring into a database with already existing triggers. pg_restore: creating TABLE waminfo pg_restore: creating ACL waminfo pg_restore: [archiver (db)] could not execute query: ERROR: user "robot" does not exist pg_restore: *** aborted because of error wammer:/usr/local/pgsql/bin $dropdb test DROP DATABASE wammer:/usr/local/pgsql/bin $createdb test CREATE DATABASE wammer:/usr/local/pgsql/bin $pg_restore -Ov -U reporter -S postgres -d test /work/wam/tmp/wamdump.0208081536 pg_restore: connecting to database for restore pg_restore: creating TABLE waminfo pg_restore: creating ACL waminfo pg_restore: [archiver (db)] could not execute query: ERROR: user "robot" does not exist pg_restore: *** aborted because of error wammer:/usr/local/pgsql/bin $dropdb test DROP DATABASE wammer:/usr/local/pgsql/bin $createdb test CREATE DATABASE wammer:/usr/local/pgsql/bin $pg_restore -Ovt waminfo -U reporter -d test /work/wam/tmp/wamdump.0208081536 pg_restore: connecting to database for restore pg_restore: [archiver] WARNING: Data restoration may fail because existing triggers cannot be disabled (no superuser user name specified). This is only a problem when restoring into a database with already existing triggers. pg_restore: creating TABLE waminfo pg_restore: restoring data for table waminfo wammer:/usr/local/pgsql/bin $dropdb test DROP DATABASE wammer:/usr/local/pgsql/bin $createdb test CREATE DATABASE wammer:/usr/local/pgsql/bin $pg_restore -Ovt waminfo -U reporter -Spostgres -d test /work/wam/tmp/wamdump.0208081536 pg_restore: connecting to database for restore pg_restore: creating TABLE waminfo pg_restore: restoring data for table waminfo Jie Liang jie@stbernard.com
В списке pgsql-admin по дате отправления: