Geoffrey <lists@xxxxxxxxxxxxxxxxxxxxx> writes: > Shane Ambler wrote: >> You would have two choices - clean up the data in 7.4 before the export >> or clean up after the import and before the fk constraints are added. > The latter is likely the plan. The primary concern is that we don't > lose any data. There seem to be two possibilities: either the data was actually inconsistent in the 7.4 database (in which case it would be good to find out how it got that way), or the data is fine but the pg_dump script tried to do the ALTER ADD CONSTRAINT too soon (in which case it would be good to find out why pg_dump got confused about that). In either case I'm hoping you still have the 7.4 installation available for inspection ... regards, tom lane