Another possible bug in pg_restore

From: Jie Liang <jie(at)stbernard(dot)com>
To: 'Bruce Momjian ' <pgman(at)candle(dot)pha(dot)pa(dot)us>, 'Tom Lane ' <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: "'pgsql-admin(at)postgresql(dot)org '" <pgsql-admin(at)postgresql(dot)org>, "'pgsql-bugs(at)postgresql(dot)org'" <pgsql-bugs(at)postgresql(dot)org>
Subject: Another possible bug in pg_restore
Date: 2002-08-09 18:09:07
Message-ID: 7C760DAA511DC74B99E7D22189F786F101BF2157@mail01.stbernard.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)stbernard(dot)com

Browse pgsql-admin by date

  From Date Subject
Next Message Jie Liang 2002-08-09 18:27:55 Re: problem with select into and timestamp.
Previous Message Tom Lane 2002-08-09 16:31:09 Re: What to do about a vacuum...