Re: Block-level CRC checks

From: Aidan Van Dyk <aidan(at)highrise(dot)ca>
To: Greg Stark <greg(dot)stark(at)enterprisedb(dot)com>
Cc: 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>, Gregory Stark <stark(at)enterprisedb(dot)com>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Block-level CRC checks
Date: 2008-11-17 13:41:20
Message-ID: 20081117134120.GS31053@yugib.highrise.ca
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

* 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.

The tradeoff for CRC is:

1) Are hint-bits "worth saving"? (noting that with CRC the goal is the
ability of detecting blocks that aren't *exactly* as we wrote them)
2) Are hint-bits "nice, but not worth IO" (noting that this case can be
mitigated to only pages which are hint-bit *only* changed, not dirty with
already-wal-logged changes)

--
Aidan Van Dyk Create like a god,
aidan(at)highrise(dot)ca command like a king,
http://www.highrise.ca/ work like a slave.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Heikki Linnakangas 2008-11-17 13:44:19 Re: Synchronous replication patch v2
Previous Message Magnus Hagander 2008-11-17 12:39:09 Re: Client certificate authentication