Re: Page Checksums

From: Andres Freund <andres(at)anarazel(dot)de>
To: pgsql-hackers(at)postgresql(dot)org
Cc: Simon Riggs <simon(at)2ndquadrant(dot)com>, Josh Berkus <josh(at)agliodbs(dot)com>, greg <greg(at)2ndquadrant(dot)com>
Subject: Re: Page Checksums
Date: 2011-12-20 18:25:24
Message-ID: 201112201925.24652.andres@anarazel.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Andres Freund 2011-12-20 18:26:33 Re: JSON for PG 9.2
Previous Message Dimitri Fontaine 2011-12-20 18:23:43 Re: JSON for PG 9.2