Re: ERROR: cannot read block 15157 of hp_tran: Success

From: Khangelani Gama <Khangelani(dot)Gama(at)ucs-software(dot)co(dot)za>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: "pgsql-admin(at)postgresql(dot)org" <pgsql-admin(at)postgresql(dot)org>
Subject: Re: ERROR: cannot read block 15157 of hp_tran: Success
Date: 2010-04-15 18:20:06
Message-ID: D78A8169F9436B4DB978300336168F3B3359AFDF1E@SWBREXCH00.ucs-software.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Thanks Tom

..but could you please supply with an example on how I should pad the file using dd?

-----Original Message-----
From: pgsql-admin-owner(at)postgresql(dot)org [mailto:pgsql-admin-owner(at)postgresql(dot)org] On Behalf Of Tom Lane
Sent: Thursday, April 15, 2010 7:55 PM
To: Khangelani Gama
Cc: pgsql-admin(at)postgresql(dot)org
Subject: Re: [ADMIN] ERROR: cannot read block 15157 of hp_tran: Success

Khangelani Gama <Khangelani(dot)Gama(at)ucs-software(dot)co(dot)za> 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

--
Sent via pgsql-admin mailing list (pgsql-admin(at)postgresql(dot)org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin

The contents of and attachments to this e-mail are intended for the addressee only, and may contain the confidential information of UCS Group and/or its subsidiaries. Any review, use or dissemination thereof by anyone other than the intended addressee is prohibited. If you are not the intended addressee please notify the writer immediately and destroy the e-mail. UCS Group Limited and its subsidiaries distance themselves from and accept no liability for unauthorised use of their e-mail facilities or e-mails sent other than strictly for business purposes.

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Jose Berardo 2010-04-15 21:22:10 Re: PostgreSQL with SSL
Previous Message Tom Lane 2010-04-15 17:54:48 Re: ERROR: cannot read block 15157 of hp_tran: Success