Re: Block-level CRC checks

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Alvaro Herrera <alvherre(at)commandprompt(dot)com>, Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>, Simon Riggs <simon(at)2ndquadrant(dot)com>, decibel <decibel(at)decibel(dot)org>, "Jonah H(dot) Harris" <jonah(dot)harris(at)gmail(dot)com>, jd(at)commandprompt(dot)com, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Aidan Van Dyk <aidan(at)highrise(dot)ca>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Block-level CRC checks
Date: 2009-12-04 20:00:49
Message-ID: 200912042000.nB4K0nB02130@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Robert Haas wrote:
> > Well, I am not sure how we would turn the _space_ used for CRC on and
> > off because you would have to rewrite the entire table/database to turn
> > it on, which seems unfortunate.
>
> Well, presumably you're going to have to do some of that work anyway,
> because even if the space is set aside you're still going to have to
> read the page in, CRC it, and write it back out. However if the space
> is not pre-allocated then you also have to deal with moving tuples to
> other pages. But that problem is going to have to be dealt with
> somewhere along the line no matter what we do, because if you're
> upgrading an 8.3 or 8.4 system to 8.5, you need to add that space
> sometime: either before migration (with a pre-upgrade utility), or
> after migration (by some sort of page converter/tuple mover), or only
> when/if enabling the CRC feature.
>
> One nice thing about making it the CRC feature's problem to make space
> on each page is that people who don't want to use CRCs can still use
> those extra 4 bytes/page for data. That might not be worth the code
> complexity if we were starting from scratch, but I'm thinking that
> most of the code complexity is a given if we want to also support
> in-place upgrade.

My guess is we can find somewhere on a 8.4 heap/index page to add four
bytes.

--
Bruce Momjian <bruce(at)momjian(dot)us> http://momjian.us
EnterpriseDB http://enterprisedb.com

+ If your life is a hard drive, Christ can be your backup. +

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Dimitri Fontaine 2009-12-04 20:51:17 Re: First feature patch for plperl - draft [PATCH]
Previous Message Tim Bunce 2009-12-04 19:40:18 Re: First feature patch for plperl - draft [PATCH]