Re: pg_dump and pg_restore problem - Mailing list pgsql-general

From Alan Hodgson
Subject Re: pg_dump and pg_restore problem
Date
Msg-id 200904301519.25461@hal.medialogik.com
Whole thread Raw
In response to pg_dump and pg_restore problem  (Michele Petrazzo - Unipex <michele.petrazzo@unipex.it>)
List pgsql-general
On Wednesday 29 April 2009, "Michele Petrazzo - Unipex"
<michele.petrazzo@unipex.it> wrote:
> The unique solution that I found it's that to export with pg_dump all my
> tables except the table_three and, after, exporting only that and on the
> other host and import that alone...
>
> It's this a normal behavior, a "missing feature", or...?

pg_dump and pg_restore correctly backup and restore complete databases.
Partial backups and restores work, but of course can create expected
dependency problems that only the operator is in a position to resolve.

In your case you restored the complete schema and then tried to import data,
which failed due to a foreign key constraint. In a full backup and restore,
all the table data would have been restored prior to that constraint being
created.

--
Even a sixth-grader can figure out that you can’t borrow money to pay off
your debt

pgsql-general by date:

Previous
From: David Fetter
Date:
Subject: Re: triggers and execute...
Next
From: "DaNieL..!"
Date:
Subject: Re: ERROR: syntax error at or near "IF"... why?