Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id CBF8F475992; Fri, 9 Aug 2002 14:09:07 -0400 (EDT) Received: from MAIL01.stbernard.com (mail01.stbernard.com [64.154.93.162]) by postgresql.org (Postfix) with ESMTP id 1E564475864; Fri, 9 Aug 2002 14:09:07 -0400 (EDT) Received: by mail01.stbernard.com with Internet Mail Service (5.5.2653.19) id ; Fri, 9 Aug 2002 11:09:07 -0700 Message-ID: <7C760DAA511DC74B99E7D22189F786F101BF2157@mail01.stbernard.com> From: Jie Liang To: 'Bruce Momjian ' , 'Tom Lane ' Cc: "'pgsql-admin@postgresql.org '" , "'pgsql-bugs@postgresql.org'" Subject: Another possible bug in pg_restore Date: Fri, 9 Aug 2002 11:09:07 -0700 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2653.19) Content-Type: text/plain; charset="iso-8859-1" X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200208/97 X-Sequence-Number: 5212 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