Skip site navigation (1) Skip section navigation (2)

Re: pg_dump --data-only problem with PgSQL 8.0

From: Jani Averbach <jaa(at)jaa(dot)iki(dot)fi>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-admin(at)postgresql(dot)org
Subject: Re: pg_dump --data-only problem with PgSQL 8.0
Date: 2005-01-24 19:15:15
Message-ID: (view raw or whole thread)
Lists: pgsql-admin
On 2005-01-24 13:46-0500, Tom Lane wrote:
> Jani Averbach <jaa(at)jaa(dot)iki(dot)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

In response to

pgsql-admin by date

Next:From: Kavan, Dan (IMS)Date: 2005-01-24 19:19:18
Subject: Re: benchmarks with pgbench
Previous:From: Tom LaneDate: 2005-01-24 19:13:41
Subject: Re: Trouble Escaping Quotes

Privacy Policy | About PostgreSQL
Copyright © 1996-2015 The PostgreSQL Global Development Group