> Here's an idea:
>
> We read the page that we would have backed up, calc the CRC and
> write a short WAL record with just the CRC, not the block. When
> we recover we re-read the database page, calc its CRC and
> compare it with the CRC from the transaction log. If they
> differ, we know that the page was torn and we know the database
> needs recovery. (So we calc the CRC when we log AND when we recover).
Won't work, since the page on disk may have x different contents
between 2 checkpoints (bgwriter from lru).
Only workable solution would imho be to write the LSN to each 512
byte block (not that I am propagating that idea).
Andreas