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

From Simon Riggs
Subject Re: 16-bit page checksums for 9.2
Date
Msg-id CA+U5nMLQ=m177gv3tcPi+E+WLfXFL2USybdazvJKTD8MvMOKFg@mail.gmail.com
Whole thread Raw
In response to Re: 16-bit page checksums for 9.2  (Dan Scales <scales@vmware.com>)
Responses Re: 16-bit page checksums for 9.2  (Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>)
List pgsql-hackers
On Fri, Jan 27, 2012 at 9:07 PM, Dan Scales <scales@vmware.com> wrote:

> The advantage of putting the checksum calculation in smgrwrite() (or mdwrite()) is that it catches a bunch of page
writesthat don't go through the buffer pool (see calls to smgrwrite() in nbtree.c, nbtsort.c, spginsert.c) 

I'll have another look at that. Seems like we can make it various
ways, we just need to decide the code placement.

> 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. It create a new block that will become dirty at some point
and then be written out, which will trigger the checksum.

--
 Simon Riggs                   http://www.2ndQuadrant.com/
 PostgreSQL Development, 24x7 Support, Training & Services


pgsql-hackers by date:

Previous
From: "Fred&Dani&Pandora"
Date:
Subject: Re: Multithread Query Planner
Next
From: Simon Riggs
Date:
Subject: Re: CLOG contention, part 2