Received: from makus.postgresql.org ([98.129.198.125]) by malur.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1TEp4c-0005Fo-0C for pgsql-bugs@postgresql.org; Thu, 20 Sep 2012 22:18:18 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1TEp4a-0004CT-QJ for pgsql-bugs@postgresql.org; Thu, 20 Sep 2012 22:18:17 +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 q8KMIC97016859; Thu, 20 Sep 2012 18:18:12 -0400 (EDT) From: Tom Lane To: Andres Freund cc: pgsql-bugs@postgresql.org, mayank.mittal.1982@hotmail.com Subject: Re: BUG #7562: could not read block 0 in file "base/16385/16585": read only 0 of 8192 bytes In-reply-to: <201209210010.35352.andres@2ndquadrant.com> References: <201209202331.35967.andres@2ndquadrant.com> <15918.1348177132@sss.pgh.pa.us> <201209210010.35352.andres@2ndquadrant.com> Comments: In-reply-to Andres Freund message dated "Fri, 21 Sep 2012 00:10:35 +0200" Date: Thu, 20 Sep 2012 18:18:12 -0400 Message-ID: <16858.1348179492@sss.pgh.pa.us> X-Pg-Spam-Score: -2.4 (--) X-Archive-Number: 201209/237 X-Sequence-Number: 34231 Andres Freund writes: > On Thursday, September 20, 2012 11:38:52 PM Tom Lane wrote: >> Sure, but what about the heap? The case I was speculating about was >> that the heap had been truncated, but because of the corruption problem, >> the index still had heap pointers in it. We don't know what file 16585 >> is supposed to be. > Wouldn't the truncation have created a completely new index relation? If it were an actual TRUNCATE, yeah. But it could be a case of VACUUM truncating a now-empty table to zero blocks. But nothing like this would explain the OP's report that corruption is completely reproducible for him. So I like your theory about hash index use better. We really oughta get some WAL support in there. regards, tom lane