From: Jani Averbach <jaa@jaa.iki.fi>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: pgsql-admin@postgresql.org
Subject: Re: pg_dump --data-only problem with PgSQL 8.0
Date: Mon, 24 Jan 2005 12:15:15 -0700
Message-ID: <20050124191515.GC632@jaa.iki.fi> (raw)
In-Reply-To: <23557.1106592398@sss.pgh.pa.us>
References: <20050124181656.GF23224@jaa.iki.fi>
<23557.1106592398@sss.pgh.pa.us>
On 2005-01-24 13:46-0500, Tom Lane wrote:
> Jani Averbach <jaa@jaa.iki.fi> writes:
>
> > This will fail with lots of these kinds of errors:
> > ERROR: insert or update on table "mytable"
> > violates foreign key constraint "mytable_myattr_fkey"
>
> Try it with --disable-triggers.
>
Thanks a lot! That fixed it.
> > Or have I found an ordering bug with pg_dump
> > when you are doing "--data-only" dumps?
>
> No. pg_dump can't guarantee a safe order for loading data when there
> are pre-existing foreign key constraints in place (since the constraints
> could be circular, and it wouldn't necessarily know what they are anyway).
> So it doesn't try. You have to use --disable-triggers instead.
I was wondering because data-only load from a dump generated with 7.2.5
succeeded, but data only load with dump genererated from 8.0.0
didn't. Any way, it works now, thank you for your help!
BR, Jani
--
Jani Averbach
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: jaa@jaa.iki.fi, tgl@sss.pgh.pa.us
Subject: Re: pg_dump --data-only problem with PgSQL 8.0
In-Reply-To: <20050124191515.GC632@jaa.iki.fi>
References: <20050124181656.GF23224@jaa.iki.fi> <23557.1106592398@sss.pgh.pa.us> <20050124191515.GC632@jaa.iki.fi>
* 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