problem with pg_dump and pg_restore

Поиск
Список
Период
Сортировка
От Fischer Ulrich
Тема problem with pg_dump and pg_restore
Дата
Msg-id 40866D3E.3060600@aerodynamics.ch
обсуждение исходный текст
Ответы Re: problem with pg_dump and pg_restore  (Grega Bremec <grega.bremec@noviforum.si>)
Список pgsql-admin
Hi

I try to move my datas from a postresql 7.3.2 to a postgresql 7.4.1. The
database was dumped with:

   pg_dumpall -g GLOBALobjects.sql
   pg_dump -s DATABASE > DBschema.sql
   pg_dump -Fc DATABASE > DBdata.tar

and rebuilt on the new system with:

   createdb DATABASE
   psql DATABASE < GLOBALobjects.sql
   psql DATABASE < tsearch2.sql
   psql DATABASE < DBschema.sql
   pg_restore -N -a -v -d DATABASE DBdata.tar

All semms to go well except the restoring. pg_restore prints the
following report:

   fi@susi179:/tmp> pg_restore -N -a -v -d codasdb codasdbdump-d.tar
   pg_restore: connecting to database for restore
   pg_restore: executing SEQUENCE SET anschrift_ansid_seq
   :
   pg_restore: executing SEQUENCE SET dokument_docnum_paper_seq
   pg_restore: restoring data for table "linkthemen"
   pg_restore: restoring data for table "links"
   pg_restore: restoring data for table "anschrift"
   pg_restore: restoring data for table "kontakt"
   pg_restore: restoring data for table "mitarbeiter"
   pg_restore: restoring data for table "kunde"
   pg_restore: restoring data for table "kontaktperson"
   pg_restore: restoring data for table "versuch"
   pg_restore: [archiver (db)] could not execute query: ERROR:  insert or
   update on table "versuch" violates foreign key constraint "$1"
   DETAIL:  Key (proid)=(0) is not present in table "projekt".
   pg_restore: *** aborted because of error



Why are the tables not restored or better dumped in the correct order?
Is there a solution to solve this problem?

Thanks for any help

Ulrich



--
Ulrich G. Fischer                       Dipl. Natw. ETH
Center Aerodynamics                     Ruag Aerospace
P.O. Box 301                            CH-6032 Emmen
Tel. +41 41 268 23 53                   Fax. +41 41 268 38 97
ulrich.fischer@aerodynamics.ch          www.ruag.com


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

Предыдущее
От: Geoffrey
Дата:
Сообщение: Re: unsubscribe
Следующее
От: Grega Bremec
Дата:
Сообщение: Re: problem with pg_dump and pg_restore