Re: A problem with pg_dump? - Mailing list pgsql-hackers

From Tom Lane
Subject Re: A problem with pg_dump?
Date
Msg-id 24383.988900423@sss.pgh.pa.us
Whole thread Raw
In response to A problem with pg_dump?  (Alessio Bragadini <alessio@albourne.com>)
List pgsql-hackers
Alessio Bragadini <alessio@albourne.com> writes:
> It should work fine if rows would be dumped according to oid. Can this
> be considered a bug?

No; or at least, that solution would be equally buggy.  It's not much
harder than your given example to construct cases where dumping the rows
in OID order would be wrong too (just takes some UPDATEs).  In fact, I
could easily build a version of your table in which there is a circular
chain of dependencies and so *no* dump order will work.

pg_dump scripts ordinarily turn off foreign-key checking while loading
data, and this sort of consideration is the reason why.  It looks to me
like you may have some pre-release copy of pg_dump that gets this wrong
(the comment format in your example is not exactly like current pg_dump,
which seems suspicious).  Try pg_dump -V to see what it says.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Raoul Callaghan
Date:
Subject: perlDBD::pg error! Please help (have all details in post)
Next
From: Bruce Momjian
Date:
Subject: Re: \c connects as another user instead I want in psql