Received: from maia.hub.org (maia-3.hub.org [200.46.204.243]) by mail.postgresql.org (Postfix) with ESMTP id C8FD8B5DC6B for ; Thu, 1 Sep 2011 10:52:42 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.243]) (amavisd-maia, port 10024) with ESMTP id 27100-08 for ; Thu, 1 Sep 2011 13:52:36 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by mail.postgresql.org (Postfix) with ESMTP id 63579B5DC63 for ; Thu, 1 Sep 2011 10:52:36 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.2/8.14.2) with ESMTP id p81DqYSC025645; Thu, 1 Sep 2011 09:52:34 -0400 (EDT) To: Lukasz Brodziak cc: pgsql-admin@postgresql.org Subject: Re: Schema with OID 0 does not exist in pg_dump In-reply-to: References: Comments: In-reply-to Lukasz Brodziak message dated "Thu, 01 Sep 2011 09:32:57 +0200" Date: Thu, 01 Sep 2011 09:52:34 -0400 Message-ID: <25644.1314885154@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-2.404 tagged_above=-10 required=5 tests=BAYES_00=-1.9, RP_MATCHES_RCVD=-0.504 X-Spam-Level: X-Archive-Number: 201109/4 X-Sequence-Number: 38241 Lukasz Brodziak writes: > When I try to make a dump of a database I get the error pg_dump: schema with > OID 0 does not exist. How can I find the schema with this OID? Well, you can't, because it doesn't exist ;-). What you need to find out is what is trying to reference it. I'd start by looking for a zero in one of the catalog columns that reference pg_namespace.oid, such as pg_class.relnamespace. regards, tom lane