problem with pg_dump and subsequent restoration. - Mailing list pgsql-novice

From Morgan Kita
Subject problem with pg_dump and subsequent restoration.
Date
Msg-id 08B420FF5BF7BC42A064212C2EB768801C10C6@neutron.verseon.com
Whole thread Raw
Responses Re: problem with pg_dump and subsequent restoration.  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-novice
Hi,

Yesterday I tried to restore from a data dump of my db from about a week ago. I am running 8.0.1 and have been since I
firststarted use postgresql. 

As an example when I ran the dump I used: pg_dump -a my_db -f my_db_bakup.sql

When restoring the database I first restored the schema from a separate backup of just the schema that I ran as pg_dump
-smy_db -f my_db_schema.sql. 

Then I restored the data like: psql my_db < my_db_bakup.sql.

However, for a few of my major tables I failed on foreign key constraints to tables that had not yet been loaded. Ergo
Ihad a order dependancy issue. 

Now I admit the schema was slightly newer than the data backup... but none of my major tables have changed in the
slightestnor have their foreign key constraints.  
In fact the fk constraints the restore failed on were a few of my most fundamental ones that have been there for quite
sometime. So I am not sure whats happening but 
it looks like the dump did not place the COPY statements for my tables in the correct order. I know the statements are
therethough because entries in the refered table that were not 
there when the fk constraint was checked, show up in the DB at the end.

Suggestions? I have an earlier dump that worked before, but I am concerned that the newer dump has a problem.

Thanks,
Morgan

pgsql-novice by date:

Previous
From: george young
Date:
Subject: Re: How to do mass upload
Next
From: "Walker, Jed S"
Date:
Subject: Is a table temporary