Re: Detecting corrupted pages earlier

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Alvaro Herrera <alvherre(at)dcc(dot)uchile(dot)cl>
Cc: Andrew Sullivan <andrew(at)libertyrms(dot)info>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Detecting corrupted pages earlier
Date: 2003-04-03 04:46:55
Message-ID: 25738.1049345215@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Alvaro Herrera <alvherre(at)dcc(dot)uchile(dot)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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Lamar Owen 2003-04-03 04:53:38 Re: contrib and licensing
Previous Message Christopher Kings-Lynne 2003-04-03 04:36:36 Re: Detecting corrupted pages earlier