pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Fischer Ulrich <ulrich.fischer@aerodynamics.ch>
To: pgsql-admin@postgresql.org
Subject: problem with pg_dump and pg_restore
Date: Wed, 21 Apr 2004 14:46:54 +0200
Message-ID: <40866D3E.3060600@aerodynamics.ch> (raw)

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




view thread (5+ messages)  latest in thread

Message-ID: <40866D3E.3060600@aerodynamics.ch>
Permalink:  ../40866D3E.3060600@aerodynamics.ch/
Also on:    postgresql.org/message-id/40866D3E.3060600@aerodynamics.ch

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-admin@postgresql.org
  Cc: ulrich.fischer@aerodynamics.ch
  Subject: Re: problem with pg_dump and pg_restore
  In-Reply-To: <40866D3E.3060600@aerodynamics.ch>
  References: <40866D3E.3060600@aerodynamics.ch>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox