Bug #546: un-pg_restore-able pg_dump

Поиск
Список
Период
Сортировка
От pgsql-bugs@postgresql.org
Тема Bug #546: un-pg_restore-able pg_dump
Дата
Msg-id 200112311650.fBVGo3i80681@postgresql.org
обсуждение исходный текст
Ответы Re: Bug #546: un-pg_restore-able pg_dump  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-bugs
mike south (msouth@fulcrum.org) reports a bug with a severity of 3
The lower the number the more severe it is.

Short Description
un-pg_restore-able pg_dump

Long Description
HI,

I'm trying to do a dump/restore on a database.

I created the dump like this:
 pg_dump -u -Fc db_xref_qa >db_xref_qa.dump

I attempted to restore it like this:

[postgres@chef postgres]$  pg_restore -u -Fc -d remove_this_db  db_xref_qa.dump

and this is the output:


Username: postgres
Password:

Connecting to remove_this_db as postgres
Password:

Connecting to remove_this_db as kerneladmin
Password:

NOTICE:  CREATE TABLE/PRIMARY KEY will create implicit index 'kernel_maker_pkey' for table 'kernel_maker'
NOTICE:  CREATE TABLE/PRIMARY KEY will create implicit index 'kernel_status_pkey' for table 'kernel_status'
NOTICE:  CREATE TABLE/PRIMARY KEY will create implicit index 'kernel_pkey' for table 'kernel'
NOTICE:  CREATE TABLE/PRIMARY KEY will create implicit index 'netraverse_kernel_pkey' for table 'netraverse_kernel'
NOTICE:  CREATE TABLE/PRIMARY KEY will create implicit index 'obsolete_kernel_group_pkey' for table
'obsolete_kernel_group'
NOTICE:  CREATE TABLE/PRIMARY KEY will create implicit index 'stock_kernel_pkey' for table 'stock_kernel'
Connecting to remove_this_db as postgres
Password:

Archiver(db): Could not execute query. Code = 7. Explanation from backend: 'ERROR:  Relation 'test2' does not exist
'.


I also did a plain dump ( pg_dump -u db_xref_qa >db_xref_qa.plaindump ), and when I looked through it I noticed (I
gatherfrom the bug reporting instructions that I am not supposed to speculate about what the problem is, so you may
stopreading now) that the lines to create the ACL entry on the view "test2" came before the lines that created the view
"test2".

An excerpt from db_xref_qa.plaindump, in which TOC entry ID 24 precedes TOC Entry ID 23, (which looked odd to me, but
whatdo I know?): 

[begin excerpt]--
-- TOC Entry ID 24 (OID 187523)
--
-- Name: test2 Type: ACL Owner:
--

REVOKE ALL on "test2" from PUBLIC;
GRANT ALL on "test2" to "postgres";
GRANT ALL on "test2" to "kerneladmin";

--
-- TOC Entry ID 23 (OID 187533)
--
-- Name: test2 Type: VIEW Owner: postgres
--

CREATE VIEW "test2" as ((SELECT [end excerpt]

I have the full dump, both with -Fc and plain, at

http://fulcrum.org/test/db_xref_qa.dump.gz

and

http://fulcrum.org/test/db_xref_qa.plaindump.gz

in case that might be helpful.

mike

Sample Code


No file was uploaded with this report

В списке pgsql-bugs по дате отправления:

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: Bug #534: factorial function
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Bug #546: un-pg_restore-able pg_dump