Re: Problem using pg_restore with -a option

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Luís Sousa <llsousa(at)ualg(dot)pt>
Cc: pgsql-admin <pgsql-admin(at)postgresql(dot)org>
Subject: Re: Problem using pg_restore with -a option
Date: 2006-09-01 16:02:04
Message-ID: 5509.1157126524@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

=?ISO-8859-1?Q?Lu=EDs_Sousa?= <llsousa(at)ualg(dot)pt> writes:
> Using the schema below, doing a pg_dump -Fc, delete all data, and a
> pg_restore -a, the sequence of inserting data isn't correct issuing an
> error.

Data-only restores make no attempt to avoid foreign-key constraint
problems --- in general there is no solution, since you could have
circular constraints.

You could drop and re-add the FK constraints, or if you trust that the
data is valid there's the --disable-triggers option to suppress FK
constraint checking.

regards, tom lane

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Scott Marlowe 2006-09-01 16:42:50 Re: problem with initlocation
Previous Message Alvaro Herrera 2006-09-01 15:43:04 Re: Problem using pg_restore with -a option