From: Tom Lane <tgl@sss.pgh.pa.us>
To: Lukasz Piskorz <lpiskorz@ists.pwr.wroc.pl>
Cc: pgsql-admin@postgresql.org
Subject: Re: Help - postgresql 7.0 and cannot read block 7959 of pg_log
Date: Thu, 19 Feb 2004 09:49:53 -0500
Message-ID: <1832.1077202193@sss.pgh.pa.us> (raw)
In-Reply-To: <003701c3f6ea$33909780$0400a8c0@vivid.pl>
References: <003701c3f6ea$33909780$0400a8c0@vivid.pl>
"Lukasz Piskorz" <lpiskorz@ists.pwr.wroc.pl> writes:
> When I check all tables only one (very important in my database) is
> corrupted:
> database=>select * from table;
> ERROR: cannot read block 7959 of pg_log: Success
This looks like something is trying to access the commit status of an
out-of-range transaction number, which is usually the first failure you
get when a row header has been corrupted. (In more recent PG versions,
you'd get a complaint about trying to access a nonexistent pg_clog
file.) The odds are that the corruption has damaged an entire page of
that table.
I'm afraid there's no question that you've lost some data. You might be
able to partially recover by zeroing out the broken page --- that would
at least let you dump the data in the remaining pages of the table.
See the mail list archives concerning methods for locating data
corruption more precisely.
> Could you help me? What can I do? Can I remove this table and restore from
> backup?
If you have a recent backup that might be the way to go.
> What do you think about software
> http://svana.org/kleptog/pgsql/pgfsck.html ?
I dunno if that works on versions as old as 7.0.
One thing you should definitely do as soon as you've extracted as much
data as you can is to update to some newer version. 7.0.* was a long
time and a lot of bug fixes ago.
regards, tom lane
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 from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-admin@postgresql.org
Cc: tgl@sss.pgh.pa.us, lpiskorz@ists.pwr.wroc.pl
Subject: Re: Help - postgresql 7.0 and cannot read block 7959 of pg_log
In-Reply-To: <1832.1077202193@sss.pgh.pa.us>
References: <003701c3f6ea$33909780$0400a8c0@vivid.pl> <1832.1077202193@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