Received: from maia.hub.org (unknown [200.46.208.211]) by mail.postgresql.org (Postfix) with ESMTP id B6EF9633672 for ; Thu, 15 Apr 2010 14:55:00 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.208.211]) (amavisd-maia, port 10024) with ESMTP id 20350-10 for ; Thu, 15 Apr 2010 17:54:47 +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 EEA69632DFC for ; Thu, 15 Apr 2010 14:54:49 -0300 (ADT) 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 o3FHsnfe004988; Thu, 15 Apr 2010 13:54:49 -0400 (EDT) To: Khangelani Gama cc: "pgsql-admin@postgresql.org" Subject: Re: ERROR: cannot read block 15157 of hp_tran: Success In-reply-to: References: Comments: In-reply-to Khangelani Gama message dated "Thu, 15 Apr 2010 19:41:34 +0200" Date: Thu, 15 Apr 2010 13:54:48 -0400 Message-ID: <4987.1271354088@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-2.117 tagged_above=-10 required=5 tests=AWL=-0.207, BAYES_00=-1.9, T_RP_MATCHES_RCVD=-0.01 X-Spam-Level: X-Archive-Number: 201004/198 X-Sequence-Number: 34292 Khangelani Gama writes: > Please bear with us we are in process of upgrade but many servers are still using version 7.3.4 of PostgreSQL running on RedHat5 Egad... > A certain table seems to be corrupt when trying to select everything from this table, it throws out an error. See the error below > db0303=# SELECT count(*) from hp_tran; > ERROR: cannot read block 15157 of hp_tran: Success This probably indicates that the table has been truncated in mid-block, ie the file isn't a multiple of 8K long. Recent versions of PG would give you a message that made that clearer, but I don't think 7.3 will. You could try using dd to pad the file out to the next 8K boundary (with zeroes), but I expect you'll find that the data on that page is trashed and you'll have to truncate it away instead in order to not get errors. > There is no problem with the disc If the underlying OS is as unmaintained as the database is, you might well be encountering kernel bugs :-( regards, tom lane