Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1THeL5-00089C-Ms for pgsql-bugs@postgresql.org; Fri, 28 Sep 2012 17:26:59 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1THeL3-0005as-VZ for pgsql-bugs@postgresql.org; Fri, 28 Sep 2012 17:26:59 +0000 Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.5/8.14.5) with ESMTP id q8SHQtbf008772; Fri, 28 Sep 2012 13:26:55 -0400 (EDT) From: Tom Lane To: =?ISO-8859-1?Q?Mikael_Kjellstr=F6m?= cc: pgsql-bugs@postgresql.org Subject: Re: Corrupt view in PostgreSQL 9.0.9 In-reply-to: <5065DCDE.1080109@mksoft.nu> References: <5065AFAB.1030305@mksoft.nu> <22618.1348842939@sss.pgh.pa.us> <5065CA70.7010500@mksoft.nu> <4179.1348851715@sss.pgh.pa.us> <5065DCDE.1080109@mksoft.nu> Comments: In-reply-to =?ISO-8859-1?Q?Mikael_Kjellstr=F6m?= message dated "Fri, 28 Sep 2012 19:22:38 +0200" Date: Fri, 28 Sep 2012 13:26:55 -0400 Message-ID: <8771.1348853215@sss.pgh.pa.us> X-Pg-Spam-Score: -2.7 (--) X-Archive-Number: 201209/300 X-Sequence-Number: 34294 =?ISO-8859-1?Q?Mikael_Kjellstr=F6m?= writes: > I tried the reindex and then the manual delete of the view from > pg_class. That took care of the rows in pg_attribute but when I tried > to run pg_dump I now get this: > pg_dump: failed sanity check, parent table OID 16547 of pg_rewrite entry > OID 16550 not found Oh, okay, pg_dump is doing more cross-checking than I remembered. That's the ON SELECT rule for the broken view. You'll need to delete it manually too, and perhaps also the pg_type row if pg_dump chances to notice that. I doubt you'll need to clean up the pg_attribute rows. regards, tom lane