Received: from makus.postgresql.org ([98.129.198.125]) by malur.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1THePz-0001AL-Qp for pgsql-bugs@postgresql.org; Fri, 28 Sep 2012 17:32:03 +0000 Received: from ch-smtp04.sth.basefarm.net ([80.76.153.5]) by makus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1THePy-0008RO-IQ for pgsql-bugs@postgresql.org; Fri, 28 Sep 2012 17:32:03 +0000 Received: from c83-251-133-196.bredband.comhem.se ([83.251.133.196]:65269 helo=[10.100.0.2]) by ch-smtp04.sth.basefarm.net with esmtp (Exim 4.77) (envelope-from ) id 1THePt-0002TS-D8; Fri, 28 Sep 2012 19:31:58 +0200 Message-ID: <5065DF0E.3050004@mksoft.nu> Date: Fri, 28 Sep 2012 19:31:58 +0200 From: =?ISO-8859-1?Q?Mikael_Kjellstr=F6m?= User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:15.0) Gecko/20120907 Thunderbird/15.0.1 MIME-Version: 1.0 To: Tom Lane CC: pgsql-bugs@postgresql.org Subject: Re: Corrupt view in PostgreSQL 9.0.9 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> <8771.1348853215@sss.pgh.pa.us> In-Reply-To: <8771.1348853215@sss.pgh.pa.us> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: 83.251.133.196 X-Scan-Result: No virus found in message 1THePt-0002TS-D8. X-Scan-Signature: ch-smtp04.sth.basefarm.net 1THePt-0002TS-D8 9c4e2aefef886eef61f8f7fdffc4080d X-Pg-Spam-Score: -2.6 (--) X-Archive-Number: 201209/301 X-Sequence-Number: 34295 On 2012-09-28 19:26, Tom Lane wrote: > =?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. Ok, that did the trick. Now the backup completed. Your recomendation is to restore the backup to a new database and drop the old one, right? /Mikael