Search Postgresql Archives

Re: pg_dump dumping data in order? (used to in 7.4 but not now in 8?)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Miles Keaton <mileskeaton@xxxxxxxxx> writes:
> When I do a pg_dump, (--data-only), PG7 used to dump the data out in
> order, so that all foreign-key checks worked correctly when loading
> the data back in.

If it did so, it was by pure luck.

In general it is not possible for pg_dump to guarantee this works;
consider circular FK constraints, or FK constraints added since the
dump occurred.  In view of that, pg_dump has never tried to ensure
that data-only dumps are in a "valid" order at all.  The usual
approach is to use --disable-triggers to short-circuit the FK
constraints during the load.

			regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
    (send "unregister YourEmailAddressHere" to majordomo@xxxxxxxxxxxxxx)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux