Skip site navigation (1) Skip section navigation (2)

Re: Block-level CRC checks

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Bruce Momjian <bruce(at)momjian(dot)us>
Cc: Greg Stark <gsstark(at)mit(dot)edu>, Simon Riggs <simon(at)2ndquadrant(dot)com>, Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>, Aidan Van Dyk <aidan(at)highrise(dot)ca>, Alvaro Herrera <alvherre(at)commandprompt(dot)com>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Block-level CRC checks
Date: 2009-12-01 23:27:54
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackers
Bruce Momjian <bruce(at)momjian(dot)us> writes:
> Tom Lane wrote:
>> I don't think "relatively cheap" is the right criterion here --- the
>> question to me is how many assumptions are you making in order to
>> compute the page's CRC.  Each assumption degrades the reliability
>> of the check, not to mention creating another maintenance hazard.

> I assume you don't want the hint bits in the line pointers because we
> would need to lock the page?

No, I don't want them there because I don't want the CRC check to know
so much about the page layout.

>> Or we could put the hint bits after the pointers, which might be better
>> because the hints would be smaller == cheaper to move.

> I don't see the value there because you would need to move the hint bits
> every time you added a new line pointer.

No, we could add unused line pointers in multiples, exactly the same as
we would add unused hint bits in multiples if we did it the other way.
I don't know offhand which would be more efficient, but you can't just
dismiss one without analysis.

> The bigger problem is that you
> would need to lock the page to update the hint bits if they move around
> on the page.

We are already assuming that things aren't moving around when we update
a hint bit now.  That's what the requirement of shared buffer lock when
calling tqual.c is for.

			regards, tom lane

In response to

pgsql-hackers by date

Next:From: Greg SmithDate: 2009-12-01 23:36:13
Subject: Re: [CORE] EOL for 7.4?
Previous:From: Greg StarkDate: 2009-12-01 23:19:19
Subject: Re: [CORE] EOL for 7.4?

Privacy Policy | About PostgreSQL
Copyright © 1996-2018 The PostgreSQL Global Development Group