X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id 63734D1E137 for ; Thu, 19 Feb 2004 14:49:54 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024) with ESMTP id 83539-03 for ; Thu, 19 Feb 2004 10:49:59 -0400 (AST) Received: from sss.pgh.pa.us (unknown [192.204.191.242]) by svr1.postgresql.org (Postfix) with ESMTP id 2F9BED1E13C for ; Thu, 19 Feb 2004 10:49:49 -0400 (AST) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.12.11/8.12.11) with ESMTP id i1JEnrUD001833; Thu, 19 Feb 2004 09:49:54 -0500 (EST) To: "Lukasz Piskorz" Cc: pgsql-admin@postgresql.org Subject: Re: Help - postgresql 7.0 and cannot read block 7959 of pg_log In-reply-to: <003701c3f6ea$33909780$0400a8c0@vivid.pl> References: <003701c3f6ea$33909780$0400a8c0@vivid.pl> Comments: In-reply-to "Lukasz Piskorz" message dated "Thu, 19 Feb 2004 14:13:42 +0100" Date: Thu, 19 Feb 2004 09:49:53 -0500 Message-ID: <1832.1077202193@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200402/281 X-Sequence-Number: 12455 "Lukasz Piskorz" 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