Re: [GENERAL] pg_dump | pg_sql: insert commands and foreign key constraints

2008-09-25 Thread Tomasz Ostrowski
On 2008-09-24 18:01, William Garrison wrote: > Then I commented-out the constraints from the schema. Then I loaded > the data. Don't forget to restore these constraints back after loading data. > I made a schema only dump, then a data only dump with --inserts. (...) > Unfortunately, the INSERT

Re: [GENERAL] pg_dump | pg_sql: insert commands and foreign key constraints

2008-09-24 Thread William Garrison
Oh good. That's almost what I did: I made a schema only dump, then a data only dump with --inserts. Then I commented-out the constraints from the schema. Then I loaded the data. Unfortunately, the INSERT statements take 24 hours instead of 4 hours to restore. When you say the "default" op

Re: [GENERAL] pg_dump | pg_sql: insert commands and foreign key constraints

2008-09-24 Thread Tomasz Ostrowski
On 2008-09-23 19:03, William Garrison wrote: > I have several .SQL files created from pg_dump, and I find that when I > feed them into psql that I get tons of foreign key errors because the > INSERT statements in the dump are not in the correct order. After > reading the docs, mailing lists, an

Re: [GENERAL] pg_dump | pg_sql: insert commands and foreign key constraints

2008-09-23 Thread Tom Lane
Craig Ringer <[EMAIL PROTECTED]> writes: > IIRC a patch was circulating (maybe applied to 8.4?) that tries to map > foreign-key relationships and where possible dump data in dependency > order so that data-only dumps without circular foreign key references > will restore correctly with no special u

Re: [GENERAL] pg_dump | pg_sql: insert commands and foreign key constraints

2008-09-23 Thread Craig Ringer
Alan Hodgson wrote: > On Tuesday 23 September 2008, William Garrison <[EMAIL PROTECTED]> > wrote: >> 1) other workarounds >> 2) someone else who can confirm that this bug is either fixed, or not >> fixed. If it is supposedly fixed, then I guess I need to make a smaller >> version of my database t

Re: [GENERAL] pg_dump | pg_sql: insert commands and foreign key constraints

2008-09-23 Thread Alan Hodgson
On Tuesday 23 September 2008, William Garrison <[EMAIL PROTECTED]> wrote: > 1) other workarounds > 2) someone else who can confirm that this bug is either fixed, or not > fixed. If it is supposedly fixed, then I guess I need to make a smaller > version of my database to demonstrate the problem.

[GENERAL] pg_dump | pg_sql: insert commands and foreign key constraints

2008-09-23 Thread William Garrison
I have several .SQL files created from pg_dump, and I find that when I feed them into psql that I get tons of foreign key errors because the INSERT statements in the dump are not in the correct order. After reading the docs, mailing lists, and googling, I see posts saying this problem was fixe