Re: invalid page header - Mailing list pgsql-general

From Markus Schiltknecht
Subject Re: invalid page header
Date
Msg-id 46B7150A.5030902@bluegap.ch
Whole thread Raw
In response to Re: invalid page header  (Markus Schiltknecht <markus@bluegap.ch>)
List pgsql-general
Hi,

Markus Schiltknecht wrote:
> I've done that (zeroing out the pg_toast table page) and hope
 > the running pg_dump goes through fine.

Unfortunately, pg_dump didn't go through. I already did some REINDEXing
and VACUUMing. Vacuum fixed something (sorry, don't I recall the
message), but SELECTing from the table still fails, as some fields of
course reference now deleted toast data:

ERROR:  missing chunk number 0 for toast value 479667

Is there any way to find this toast value 479667? Something like the
following query:

SELECT id FROM my_corrupt_table
     WHERE pg_is_toasted('column')
         AND pg_toasted_value('column') == 479667;


Again, I'm fine loosing the data in the toasted fields in question. But
I'd rather like to save the remaining data. I've already tried UPDATing
a field I've found manually (by trial and error). That helped and I can
now select that row again (having lost only the field's content).

Is there some sort of error recovery tool? Or should VACUUM fix such
things on special request?

Regards

Markus

pgsql-general by date:

Previous
From: Henrik Zagerholm
Date:
Subject: Planner making wrong decisions 8.2.4. Insane cost calculations.
Next
From: Gregory Stark
Date:
Subject: Re: [PERFORM] Planner making wrong decisions 8.2.4. Insane cost calculations.