Received: from maia.hub.org (maia-3.hub.org [200.46.204.243]) by mail.postgresql.org (Postfix) with ESMTP id CFB151337BB4 for ; Tue, 22 Feb 2011 12:54:41 -0400 (AST) 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 40147-05 for ; Tue, 22 Feb 2011 16:54:34 +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 014521337B34 for ; Tue, 22 Feb 2011 12:54:33 -0400 (AST) 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 p1MGsUc3001653; Tue, 22 Feb 2011 11:54:30 -0500 (EST) To: Daniel Farina cc: pgsql-bugs@postgresql.org Subject: Re: Re: 8.3.5: Types with typnamespace pointing at non-existent pg_namespace oid In-reply-to: References: Comments: In-reply-to Daniel Farina message dated "Tue, 22 Feb 2011 00:48:57 -0800" Date: Tue, 22 Feb 2011 11:54:30 -0500 Message-ID: <1652.1298393670@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.91 tagged_above=-5 required=5 tests=BAYES_00=-1.9, T_RP_MATCHES_RCVD=-0.01 X-Spam-Level: X-Archive-Number: 201102/193 X-Sequence-Number: 29465 Daniel Farina writes: > From what I can tell, people only see this problem with pg_dump, which > is interesting. This symptom has a very long history: Yeah. There seems to be some well-hidden bug whereby dropping an object sometimes fails to drop (some of?) its dependencies. I'm still looking for a reproducible case, or even a hint as to what the trigger condition might be. > In my case, there are two "missing" pg_namespace entries, and both > have the same missing relations. Uh, what do you mean by "same missing relations"? > * There's also a valid version of all these relations/objects that > *are* connected to the schema that's alive and expected. And this isn't making any sense to this onlooker, either. Could you provide a more detailed explanation of the usage pattern in this database? I speculate that what you mean is the user periodically drops and recreates a schema + its contents, but please be explicit. > Sadly, for whatever reason, pg_dump --schema=public didn't seem to > help me out. We do need a workaround if we wish to keep doing > forensics. Yeah, pg_dump is written to glom onto everything listed in the catalogs and sort it out later. So it tends to notice inconsistencies that you might not notice in regular usage of the database. It's sort of hard to avoid, since for example a --schema switch depends on seeing which objects belong to which schema ... regards, tom lane