Re: Corrupted Data? - Mailing list pgsql-general

From Alvaro Herrera
Subject Re: Corrupted Data?
Date
Msg-id 20040915043906.GB25236@dcc.uchile.cl
Whole thread Raw
In response to Re: Corrupted Data?  ("Matthew T. O'Connor" <matthew@zeut.net>)
Responses Re: Corrupted Data?  ("Matthew T. O'Connor" <matthew@zeut.net>)
List pgsql-general
On Tue, Sep 14, 2004 at 10:01:21PM -0400, Matthew T. O'Connor wrote:
> Alvaro Herrera wrote:
> >Huh, sorry, the directions only created the first block of the file, but
> >you needed the 17th ...
> >
> >dd if=/dev/zero bs=8k count=17 of=/path/to/data/pg_clog/0E3D
> >
> >I may be subject of a fencepost problem here, so if it doesn't work try
> >with 18.
>
> I don't know if we are making progress but I am getting a different
> error now :-)
>
> I did the dd command again this time with count=18.  Now when I try to
> delete the tuple I get this:
>
> dbmail2=# delete from messageblks where oid = 2916427;
> ERROR:  attempted to delete invisible tuple

I think I know what is going on, but I'm not sure how to solve the
problem.  If I were in your situation I'd edit the data file and stash
FrozenTransactionId in the Xmin and InvalidTransactionId in Xmax for
that tuple.  Short of using an hex editor, I'm not sure how to do that,
however, and before doing anything that foolish I'd backup the file two
or three times just to be sure.

You may try using pgfsck (http://svana.org/kleptog/pgsql/pgfsck.html) or
pg_filedump (http://sources.redhat.com/rhdb) and see how lucky you get
with the hex editor ...


(memories of cheating in VGA Planets by use of said hex editor many
years ago now come to my mind ...)

--
Alvaro Herrera (<alvherre[a]dcc.uchile.cl>)
Major Fambrough: You wish to see the frontier?
John Dunbar: Yes sir, before it's gone.


pgsql-general by date:

Previous
From: Jerome Lyles
Date:
Subject: Re: Spacing in output
Next
From: Tom Lane
Date:
Subject: Re: fedora core2 pgaccess