Received: from maia.hub.org (maia-5.hub.org [200.46.204.29]) by mail.postgresql.org (Postfix) with ESMTP id B3EB11337B58 for ; Tue, 8 Feb 2011 14:20:14 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.29]) (amavisd-maia, port 10024) with ESMTP id 74658-09 for ; Tue, 8 Feb 2011 18:20:07 +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 C7AAA133616B for ; Tue, 8 Feb 2011 14:20:06 -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 p18IK46f022483; Tue, 8 Feb 2011 13:20:04 -0500 (EST) To: Cyril DE MURCIA cc: pgsql-bugs@postgresql.org Subject: Re: Duplicate table name within the sme schema In-reply-to: <29915_1297170305_4D513F81_29915_307_1_OF91DF327C.DA44FFEF-ONC1257831.004760D6-C1257831.0047D067@dcnsgroup.com> References: <29915_1297170305_4D513F81_29915_307_1_OF91DF327C.DA44FFEF-ONC1257831.004760D6-C1257831.0047D067@dcnsgroup.com> Comments: In-reply-to Cyril DE MURCIA message dated "Tue, 08 Feb 2011 14:05:04 +0100" Date: Tue, 08 Feb 2011 13:20:03 -0500 Message-ID: <22482.1297189203@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/73 X-Sequence-Number: 29345 Cyril DE MURCIA writes: > We use postgresql 7.3.2 under Linux Red Hat 9.0. > We periodically dump and restore our database. I don't know if an error > occured during a dump restore but our DB seems to be corrupted. > Our base contains many pair of table with the same name. My goodness, that's a pretty obsolete system :-(. You do realize that 7.3.x was up to 7.3.21 by the time it was obsoleted? My recollection is that this has been seen to happen when there were for some reason duplicate rows in pg_shadow --- pg_dump does something like "SELECT FROM pg_class JOIN pg_shadow ON relowner = usesysid", so it would get multiple copies of any table that joined to multiple pg_shadow entries. How you got into that state is harder to say, but if you can get rid of the duplicate entries then your dump would go back to a sane state. regards, tom lane