Re: Block-level CRC checks - Mailing list pgsql-hackers

From Gregory Stark
Subject Re: Block-level CRC checks
Date
Msg-id 87tzbug9qt.fsf@oxford.xeocode.com
Whole thread Raw
In response to Re: Block-level CRC checks  (Aidan Van Dyk <aidan@highrise.ca>)
Responses Re: Block-level CRC checks
List pgsql-hackers
Aidan Van Dyk <aidan@highrise.ca> writes:

>> Wal logged changes are safe because of full_page_writes. Hint bits are  
>> safe because either the old or the new value will be on disk and we  
>> don't care which. It doesn't matter if some hint bits are set and some  
>> aren't.
>> 
>> However the checksum won't match because the checksum will have been  
>> calculated on the whole block and part of it was never written.
>
> Correct.  But now doesn't full-page-writes give us the same protection
> here against a half-write as it did for the previous case?
>
> On recovery after a torn-page write, won't the recovery of the
> full_page_write WAL + WAL changes get us back to the page as it was
> before the buffer+checksum+write?  

Hint bit setting doesn't trigger a WAL record.

--  Gregory Stark EnterpriseDB          http://www.enterprisedb.com Ask me about EnterpriseDB's PostGIS support!


pgsql-hackers by date:

Previous
From: Aidan Van Dyk
Date:
Subject: Re: Block-level CRC checks
Next
From: "Jonah H. Harris"
Date:
Subject: Re: Block-level CRC checks