Re: PANIC: corrupted item lengths - Mailing list pgsql-hackers

From Tom Lane
Subject Re: PANIC: corrupted item lengths
Date
Msg-id 13164.1244124154@sss.pgh.pa.us
Whole thread Raw
In response to PANIC: corrupted item lengths  (Simon Riggs <simon@2ndQuadrant.com>)
Responses Re: PANIC: corrupted item lengths  (Simon Riggs <simon@2ndQuadrant.com>)
List pgsql-hackers
Simon Riggs <simon@2ndQuadrant.com> writes:
> What seems strange about the various errors generated in bufpage.c is
> that they are marked as ERRORs, yet are executed within a critical
> section causing the system to PANIC.

The reason we PANIC there is to reduce the probability that bad data
will be written back to disk.  Of course, if the bad data was read off
disk in the first place, there's no hope --- but we have checks on
incoming pages for that.  What seems significantly more likely if we
detect a problem here is that we somehow corrupted the page while it
sits in shared buffers.  So, there's some hope that the corruption will
not get back to disk, so long as we PANIC and thereby cause
shared-memory contents to be flushed.

> Votes?

+1 for no change.

We could make the page-read-time validation checks stricter, if there's
some specific pattern you're seeing that gets past those checks now.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Greg Stark
Date:
Subject: Re: PANIC: corrupted item lengths
Next
From: Tom Lane
Date:
Subject: Re: It's June 1; do you know where your release is?