On Fri, May 18, 2007 at 12:52:20PM +0200, Robert Mach wrote:
> Before presenting possible errors, I divided them into physical and 
> logical errors. Physical errors will refer to errors in the structure of 
> pages and tuples, whereas logical errors will depict errors that cause 
> incorrect performance of postgresql, but are correct according the 
> structure of data files.

Have you looked at pgfsck? I think you also need to check much lower
level stuff also. Let:
- Page headers
- Are all the item pointers in order an non-overlapping
- Is each item correctly structured, do the XIDs look OK. What about
the HINT bits. Can the tuple be decoded properly. One common problem
with data corruption is that postgres with see a varlen header which
says the daa is 2K (or 2M) whereas the item is only 50bytes long, so
that's obviously broken.

Only once you're sure about the actual structure can you worry about
thing like toast pointer (which are important, but less likely to crash
postgres).

All this applies to index pages also.

Hope this helps,
-- 
Martijn van Oosterhout   <[EMAIL PROTECTED]>   http://svana.org/kleptog/
> From each according to his ability. To each according to his ability to 
> litigate.

Attachment: signature.asc
Description: Digital signature

Reply via email to