Corrupted Data?

From: "Matthew T(dot) O'Connor" <matthew(at)zeut(dot)net>
To: "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Corrupted Data?
Date: 2004-09-14 03:12:21
Message-ID: 1095131541.1051.8.camel@zedora2
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hello, pg_dump started failing for one of my databases, so I looked in
to it and it appears that I have some corrupted data or something. I
assume this is related to a failed hard disk that was part of the linux
software raid mirror.

I backed up the entire data directory, and did a pg_resetxlog, but that
didn't help. I found the specific row that seems to be the problem, but
I can't delete it.

Anyway, I don't know how to fix this, so if you could please help, I
would appreciate it.

Details are as follows:

[dbmail2(at)dezeut dbmail2]$ psql
Welcome to psql 7.4.2, the PostgreSQL interactive terminal.
dbmail2=# SELECT version();
version
---------------------------------------------------------------------------------------------------------
PostgreSQL 7.4.2 on i686-pc-linux-gnu, compiled by GCC gcc (GCC) 3.2.2
20030222 (Red Hat Linux 3.2.2-5)

dbmail2=# SELECT oid,messageblk_idnr, physmessage_id, blocksize from
messageblks where messageblk_idnr =7718;
oid | messageblk_idnr | physmessage_id | blocksize
---------+-----------------+----------------+-----------
2916427 | 7718 | 3842 | 524288
(1 row)

dbmail2=# SELECT oid,messageblk_idnr, physmessage_id, blocksize,
messageblk from messageblks where messageblk_idnr =7718;
server closed the connection unexpectedly
This probably means the server terminated abnormally
before or while processing the request.
The connection to the server was lost. Attempting reset: Failed.
!> \q
[dbmail2(at)dezeut dbmail2]$ psql
Welcome to psql 7.4.2, the PostgreSQL interactive terminal.
dbmail2=# delete from messageblks where oid = 2916427;
ERROR: could not access status of transaction 3822646358
DETAIL: could not open file "/var/lib/pgsql/data/pg_clog/0E3D": No such
file or directory

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Chester Kustarz 2004-09-14 04:46:24 Re: Corrupted Data?
Previous Message Tom Lane 2004-09-14 00:51:40 Re: Trouble EXITing plpgsql labeled BEGIN blocks with DECLAREs