Received: from localhost (unknown [200.46.204.191]) by postgresql.org (Postfix) with ESMTP id EAF529FB990 for ; Wed, 17 Oct 2007 20:01:41 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.191]) (amavisd-maia, port 10024) with ESMTP id 34934-02 for ; Wed, 17 Oct 2007 20:01:39 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.5 Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by postgresql.org (Postfix) with ESMTP id F0FD99FBE3A for ; Wed, 17 Oct 2007 20:01:38 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.1/8.14.1) with ESMTP id l9HN1XPk012598; Wed, 17 Oct 2007 19:01:33 -0400 (EDT) To: Jesper Krogh cc: pgsql-admin@postgresql.org Subject: Re: Upgrade time, dump+restore trouble. In-reply-to: <47165E55.4020807@krogh.cc> References: <471619AD.9020903@krogh.cc> <7031.1192637434@sss.pgh.pa.us> <47165E55.4020807@krogh.cc> Comments: In-reply-to Jesper Krogh message dated "Wed, 17 Oct 2007 21:11:17 +0200" Date: Wed, 17 Oct 2007 19:01:33 -0400 Message-ID: <12597.1192662093@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200710/159 X-Sequence-Number: 27073 Jesper Krogh writes: > Tom Lane wrote: >> Drop the constraints in the source database. > That would be my workaround for the problem. But isn't it somehow > desirable that pg_dumpall | psql "allways" would work? Well, sure. The reason why this sort of thing is deprecated is exactly that the database can't promise it will work all the time. The DB has no way to know that your constraints do something they're not supposed to, and in particular no way to infer that there's a specific data loading order needed to keep the constraint from failing. We do allow you to do it, but if it breaks you get to keep both pieces. regards, tom lane