Re: Block-level CRC checks

From: Martijn van Oosterhout <kleptog(at)svana(dot)org>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Alvaro Herrera <alvherre(at)commandprompt(dot)com>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Block-level CRC checks
Date: 2008-11-09 17:47:02
Message-ID: 20081109174702.GB16959@svana.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Sun, Nov 09, 2008 at 11:02:32AM -0500, Tom Lane wrote:
> Yes it would :-(. Also, this scheme would point us towards maintaining
> the CRCs *continually* while the page is in memory, rather than only
> recalculating them upon write. So every tuple insert/update/delete
> would require a recalculation of the entire page CRC.

I wasn't thinking of that. I was thinking more of the situation where a
seq scan reads in a page, updates a few hint bits and then goes on to
the next page. For these just doing a few XORs might be cheaper.

> What happened to the plan to double-buffer the writes to avoid this
> issue?

Might be better anyway. A single copy-and-checksum would probably be
quite cheap (pulling the page into L2 cache).

Have a nice day,
--
Martijn van Oosterhout <kleptog(at)svana(dot)org> http://svana.org/kleptog/
> Please line up in a tree and maintain the heap invariant while
> boarding. Thank you for flying nlogn airlines.

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2008-11-09 17:52:05 Re: [PATCH] Recreate Missing WAL Directories (from TODO)
Previous Message Tom Lane 2008-11-09 17:44:40 Re: [PATCH] Recreate Missing WAL Directories (from TODO)