pg_restore PostgreSQL 9.3.3 problems

From: "Burgess, Freddie" <FBurgess(at)Radiantblue(dot)com>
To: "pgsql-bugs(at)postgresql(dot)org" <pgsql-bugs(at)postgresql(dot)org>
Subject: pg_restore PostgreSQL 9.3.3 problems
Date: 2014-06-12 20:25:20
Message-ID: 3BBE635F64E28D4C899377A61DAA9FE02E2F1B17@NBSVR-MAIL01.radiantblue.local
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Successful pg_dump:

pg_dump -h localhost -p 5432 -U postgres -F c -b -v -f "trackdb.partial.dmp" -t tracker_message -t tracker_event_message_y2010m01 trackdb

Attempted pg_restore:

pg_restore -c -F c -j 3 -U postgres -d trackdb -v "trackdb.partial.dmp"

Error Condition:

pg_restore: [archiver (db)] Error from TOC entry 575; 1259 618063 TABLE tracker_message postgres
pg_restore: [archiver (db)] could not execute query: ERROR: cannot drop table tracker_message because other objects depend on it
DETAIL: constraint tracker_event_message_id_fkey on table tracker_event_message_underflow depends on table tracker_message
constraint tracker_event_message_id_fkey on table tracker_event_message_y2010m01 depends on table tracker_message.

the -c option; Clean is suppose to (drop) database objects before recreating them, but its not doing it because of referential integrity constraints. Do I have to list these tables by child and then parent order for this to work? I thought that pg_restore would automatically order the table dependencies correctly.

The restore is not restoring the data from the backup unless I truncate table tracker_message cascade first and then restore.

What am I doing wrong?

thanks

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message bricklen 2014-06-12 21:08:14 Re: pg_restore PostgreSQL 9.3.3 problems
Previous Message dmitry.batiyevskiy 2014-06-12 11:06:06 BUG #10624: Strange temporary failure in name resolution