Re: unable to dump database, toast errors - Mailing list pgsql-general

From Tom Lane
Subject Re: unable to dump database, toast errors
Date
Msg-id 28720.1049384191@sss.pgh.pa.us
Whole thread Raw
In response to Re: unable to dump database, toast errors  (Lonni J Friedman <lfriedman@vasoftware.com>)
Responses Re: unable to dump database, toast errors  (Lonni J Friedman <lfriedman@vasoftware.com>)
List pgsql-general
Lonni J Friedman <lfriedman@vasoftware.com> writes:
>> The real question is did pg_dump get any better after you did this?

> unfortunately, no.

Oh well.  Have you checked that the reportedly-broken index is in fact
the index for the TOAST table associated with the artifact_file table?
(artifact_file's pg_class row will have the OID of its toast table in
reltoastrelid, and then the reltoastidxid field of the toast table's
row is the OID of its index.)  It could be that you've got more than
one problem :-(

If you've actually lost a chunk from a toast value, as seems probable,
I can't think of much to do except manually insert a substitute chunk.
It would run something like

    insert into pg_toast_302323 values (7685119, 0, '');

When you dump you will find whichever field value had used that toast
chunk will be corrupted, but at least you'll be able to extract the rest
of the table.

I am somewhat curious as to what happened to the missing chunk, but
I dunno how much effort you want to spend on investigation.  A minimum
bit of prudence would be to update this installation to 7.2.4; we don't
make dot-releases just for amusement.

            regards, tom lane


pgsql-general by date:

Previous
From: Richard Huxton
Date:
Subject: Re: Help with array constraints
Next
From: Jason Hihn
Date:
Subject: Re: Help with array constraints