Re: Page Checksums - Mailing list pgsql-hackers

From Andres Freund
Subject Re: Page Checksums
Date
Msg-id 201112201925.24652.andres@anarazel.de
Whole thread Raw
In response to Re: Page Checksums  (Simon Riggs <simon@2ndQuadrant.com>)
List pgsql-hackers
On Tuesday, December 20, 2011 06:44:48 PM Simon Riggs wrote:
> Currently, setting hints can be done while holding a share lock on the
> buffer. Preventing that would require us to change the way buffer
> manager works to make it take an exclusive lock while writing out,
> since a hint would change the CRC and so allowing hints to be set
> while we write out would cause invalid CRCs. So we would need to hold
> exclusive lock on buffers while we calculate CRCs.
While hint bits are a problem that specific problem is actually handled by 
copying the buffer onto a separate buffer and calculating the CRC on that copy. 
Given that we already rely on the fact that the flags can be read consistently 
from the individual backends thats fine.

Andres


pgsql-hackers by date:

Previous
From: Dimitri Fontaine
Date:
Subject: Re: JSON for PG 9.2
Next
From: Andres Freund
Date:
Subject: Re: JSON for PG 9.2