From: Jie Liang <jie@stbernard.com>
To: Bruce Momjian <pgman@candle.pha.pa.us>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: 'pgsql-admin@postgresql.org ' <pgsql-admin@postgresql.org>
Cc: 'pgsql-bugs@postgresql.org' <pgsql-bugs@postgresql.org>
Subject: Another possible bug in pg_restore
Date: Fri, 9 Aug 2002 11:09:07 -0700
Message-ID: <7C760DAA511DC74B99E7D22189F786F101BF2157@mail01.stbernard.com> (raw)
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-admin@postgresql.org
Cc: jie@stbernard.com, pgman@candle.pha.pa.us, tgl@sss.pgh.pa.us, pgsql-bugs@postgresql.org
Subject: Re: Another possible bug in pg_restore
In-Reply-To: <7C760DAA511DC74B99E7D22189F786F101BF2157@mail01.stbernard.com>
References: <7C760DAA511DC74B99E7D22189F786F101BF2157@mail01.stbernard.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox