X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 69F593A54E6 for ; Mon, 24 Jan 2005 19:15:20 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 87168-04 for ; Mon, 24 Jan 2005 19:15:15 +0000 (GMT) Received: from hal9000.jaa.iki.fi (gw.jaa.iki.fi [64.81.100.231]) by svr1.postgresql.org (Postfix) with ESMTP id 8FA803A5413 for ; Mon, 24 Jan 2005 19:15:15 +0000 (GMT) Received: by hal9000.jaa.iki.fi (Postfix, from userid 500) id C52843408F; Mon, 24 Jan 2005 12:15:15 -0700 (MST) Date: Mon, 24 Jan 2005 12:15:15 -0700 From: Jani Averbach To: Tom Lane Cc: pgsql-admin@postgresql.org Subject: Re: pg_dump --data-only problem with PgSQL 8.0 Message-ID: <20050124191515.GC632@jaa.iki.fi> References: <20050124181656.GF23224@jaa.iki.fi> <23557.1106592398@sss.pgh.pa.us> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <23557.1106592398@sss.pgh.pa.us> User-Agent: Mutt/1.5.6i X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0 tagged_above=0 required=5 tests= X-Spam-Level: X-Archive-Number: 200501/259 X-Sequence-Number: 16118 On 2005-01-24 13:46-0500, Tom Lane wrote: > Jani Averbach 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