restoring databases with intensive foreign key use fails

From: Tino Wildenhain <tino(at)wildenhain(dot)de>
To: pgsql-general(at)postgresql(dot)org
Subject: restoring databases with intensive foreign key use fails
Date: 2002-05-07 22:14:55
Message-ID: 18407047.1020816895@buzzer
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi,

restoring the database only from pg_dump/pg_restore
seems to be impossible if one uses foreign keys much.
The tables referenced are most of the time not available
by the time the referencing tables are created. Even
restoring by OID order does not help.

How are people doing this? The only solution I found was
editing the restore script by hand and transform all
constraints to ALTER TABLE statements at the end.

The other problem was that there are apparently no user
information in the dump to restore users too.

What solutions are available?

I've tried to go thru the source code of pg_dump
buts a bit organic ;) I think it schould move
all constraints out of the table definition and
put them after the whole restore.

Regards
Tino

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Shaun Thomas 2002-05-07 22:18:48 Re: Contrib reindex script:
Previous Message Randall Perry 2002-05-07 21:34:27 Can this be done in one query?