Re: Enabling Checksums

Simon Riggs <simon@2ndquadrant.com>

From: Simon Riggs <simon@2ndQuadrant.com>
To: Heikki Linnakangas <hlinnakangas@vmware.com>
Cc: Kevin Grittner <kgrittn@ymail.com>, Jeff Davis <pgsql@j-davis.com>, Ants Aasma <ants@cybertec.at>, Bruce Momjian <bruce@momjian.us>, Greg Smith <greg@2ndquadrant.com>, PostgreSQL-development <pgsql-hackers@postgresql.org>
Date: 2013-04-08T08:16:40Z
Lists: pgsql-hackers
On 6 April 2013 08:40, Heikki Linnakangas <hlinnakangas@vmware.com> wrote:


> AFAICS that could be easily avoided by doing a simple PageGetLSN() like we
> used to, if checksums are not enabled. In XLogCheckBuffer:
>
>          /*
>>          * XXX We assume page LSN is first data on *every* page that can
>> be passed
>>          * to XLogInsert, whether it otherwise has the standard page
>> layout or
>>          * not. We don't need the buffer header lock for PageGetLSN
>> because we
>>          * have exclusive lock on the page and/or the relation.
>>          */
>>         *lsn = BufferGetLSNAtomic(rdata->**buffer);
>>
>
> Also, the second sentence in the above comment is completely bogus now.


Both points addressed on separate commits.

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