Re: Block-level CRC checks

From: Gregory Stark <stark(at)enterprisedb(dot)com>
To: Aidan Van Dyk <aidan(at)highrise(dot)ca>
Cc: Greg Stark <greg(dot)stark(at)enterprisedb(dot)com>, Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>, Martijn van Oosterhout <kleptog(at)svana(dot)org>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Alvaro Herrera <alvherre(at)commandprompt(dot)com>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Block-level CRC checks
Date: 2008-11-17 16:47:18
Message-ID: 87abbyjo4p.fsf@oxford.xeocode.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Aidan Van Dyk <aidan(at)highrise(dot)ca> writes:

> * Greg Stark <greg(dot)stark(at)enterprisedb(dot)com> [081117 03:54]:
>> [sorry for top-posting - damn phone]
>>
>> I thought of saying that too but it doesn't really solve the problem.
>> Think of what happens if someone sets a hint bit on a dirty page.
>
> If the page is dirty from a "real change", then it has a WAL backup block
> record already, so the torn-page on disk is going to be fixed with the wal
> replay ... *because* of the torn-page problem already being "solved" in PG.
> You don't get the hint-bits back, but that's no different from the current
> state. But nobody's previously cared if hint-bits wern't set on WAL replay.

Hum. Actually I think you're right.

However you still have a problem that someone could come along and set the
hint bit between calculating the CRC and actually calling write.

--
Gregory Stark
EnterpriseDB http://www.enterprisedb.com
Ask me about EnterpriseDB's 24x7 Postgres support!

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Merlin Moncure 2008-11-17 16:50:58 Re: patch to fix client only builds
Previous Message Simon Riggs 2008-11-17 15:39:42 Re: [PATCHES] Infrastructure changes for recovery (v8)