From: | "George Wilk" <gwilk(at)ellacoya(dot)com> |
---|---|
To: | <pgsql-admin(at)postgresql(dot)org> |
Subject: | pg_restore ERROR |
Date: | 2007-08-08 18:41:15 |
Message-ID: | 024301c7d9eb$b3b5b340$1f7ca8c0@ellacoya.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-admin |
After running pg_dumpall on my database cluster like this:
$PGBIN/pg_dumpall -c -U ipscdb | gzip > /var/db/pgsql_bkp/pg_dump_file.gz
I subsequently delete the PGDATA directory for the backed up database and
initialize a new database. Next I attempt to run the restore using
initialized database like this:
cat /var/db/pgsql_bkp/pg_dump_file.gz | gunzip | $PGBIN/psql postgres >
/dev/null
This results in a couple of error messages:
ERROR: current user cannot be dropped
ERROR: role "ipscdb" already exists
Since I ran initdb to initialize my database after the pg_dumpall as
"ipscdb" user, and subsequently am running the restore as "ipscdb" user, it
does make sense that I see these errors. The first one is caused by the -c
switch on pg_dumpall which generates the script to drop all database objects
before restore is done. The second is a consequence of the first one -
script is attempting to create a role, which already exists.
My questions are:
1) What would be the right way to do this? (other than pg_restore
with the create option)
2) Does the restore go forward despite the two errors shown above -
meaning that I can pretty much ignore these errors?
Thanks in advance,
~george
From | Date | Subject | |
---|---|---|---|
Next Message | Decibel! | 2007-08-08 20:46:49 | Re: Specific questions about wraparound and vacuum |
Previous Message | Chris Browne | 2007-08-08 18:37:11 | Re: use replication on a database only on selected schemes? |