Re: 16-bit page checksums for 9.2 - Mailing list pgsql-hackers

From Heikki Linnakangas
Subject Re: 16-bit page checksums for 9.2
Date
Msg-id 4F245E30.20704@enterprisedb.com
Whole thread Raw
In response to Re: 16-bit page checksums for 9.2  (Simon Riggs <simon@2ndQuadrant.com>)
List pgsql-hackers
On 28.01.2012 15:49, Simon Riggs wrote:
> On Fri, Jan 27, 2012 at 9:07 PM, Dan Scales<scales@vmware.com>  wrote:
>
>> Also, I missed this before:  don't you want to add the checksum calculation (PageSetVerificationInfo) to mdextend()
(orpreferably smgrextend()) as well?  Otherwise, you won't be checksumming a bunch of the new pages.
 
>
> You don't need to checksum the extend because no data is written at
> that point.

That's not correct. smgrextend writes a block of data just like 
smgrwrite does. When a relation is extended by the buffer manager, it 
calls smgrextend with an all-zeros block, but not all callers do that. 
See rewriteheap.c and nbtsort.c for counter-examples.

--   Heikki Linnakangas  EnterpriseDB   http://www.enterprisedb.com


pgsql-hackers by date:

Previous
From: Jeff Janes
Date:
Subject: Re: Simulating Clog Contention
Next
From: "David E. Wheeler"
Date:
Subject: Re: Inline Extension