Re: Detecting corrupted pages earlier - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Detecting corrupted pages earlier
Date
Msg-id 25738.1049345215@sss.pgh.pa.us
Whole thread Raw
In response to Re: Detecting corrupted pages earlier  (Alvaro Herrera <alvherre@dcc.uchile.cl>)
List pgsql-hackers
Alvaro Herrera <alvherre@dcc.uchile.cl> writes:
> Huh, and what if I accidentaly mistype the number and destroy a valid
> page?  Maybe the command should only succeed if it confirms that the
> page is corrupted.

Good point ... but what if the corruption is subtle enough that the
automatic tests don't notice it?  It could be that only "SELECT * FROM ..."
actually dumps core.  This is an acute problem for tests that are
generic enough to be implemented in just one or a few places --- for
example, the tests I just added have no idea whether they are looking
at a heap or index page, much less what kind of index page.

> There could also be "DESTROY ALL PAGES" and/or "DESTROY n PAGES"
> commands, where the latter zeroes the first n corrupted pages in the
> table, for the case with lots of corrupted pages.  Maybe a command for
> getting a list of the corrupted pages is useful?

We have "DESTROY ALL PAGES", it's called DROP TABLE.  The other doesn't
appeal to me either, because it doesn't say exactly which N pages you're
willing to lose.
        regards, tom lane



pgsql-hackers by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: Detecting corrupted pages earlier
Next
From: Lamar Owen
Date:
Subject: Re: contrib and licensing