pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Khangelani Gama <Khangelani.Gama@ucs-software.co.za>
Cc: pgsql-admin@postgresql.org <pgsql-admin@postgresql.org>
Subject: Re: ERROR: cannot read block 15157 of hp_tran: Success
Date: Thu, 15 Apr 2010 13:54:48 -0400
Message-ID: <4987.1271354088@sss.pgh.pa.us> (raw)
In-Reply-To: <D78A8169F9436B4DB978300336168F3B3359AFDF1D@SWBREXCH00.ucs-software.net>
References: <D78A8169F9436B4DB978300336168F3B3359AFDF1D@SWBREXCH00.ucs-software.net>

Khangelani Gama <Khangelani.Gama@ucs-software.co.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



view thread (3+ messages)  latest in thread

Message-ID: <4987.1271354088@sss.pgh.pa.us>
Permalink:  ../4987.1271354088@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/4987.1271354088@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-admin@postgresql.org
  Cc: tgl@sss.pgh.pa.us, Khangelani.Gama@ucs-software.co.za
  Subject: Re: ERROR: cannot read block 15157 of hp_tran: Success
  In-Reply-To: <4987.1271354088@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox