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

Re: Block-level CRC checks

From: Gregory Stark <stark(at)enterprisedb(dot)com>
To: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Greg Stark <greg(dot)stark(at)enterprisedb(dot)com>, Martijn van Oosterhout <kleptog(at)svana(dot)org>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Block-level CRC checks
Date: 2008-11-10 23:31:33
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackers
Alvaro Herrera <alvherre(at)commandprompt(dot)com> writes:

> Gregory Stark wrote:
>> I think you could checksum the block including the hint bits then go back and
>> remove them from the checksum.
> I'm not sure what you're proposing here.  It sounds to me like you are
> saying that we can read the page, make it available to other users, and
> then check the CRC.  I don't think this works though, because if you do
> that the possibly-invalid buffer is available to the other readers.

No, I just meant that you could calculate the CRC by scanning the whole buffer
efficiently using one of the good word-wise CRC algorithms, then look at the
line pointers to find the hint bits and subtract them out of the CRC. The
result should be zero after adjusting for the hint bits.

It doesn't solve much though.

  Gregory Stark
  Ask me about EnterpriseDB's Slony Replication support!

In response to


pgsql-hackers by date

Next:From: Bruce MomjianDate: 2008-11-10 23:32:33
Subject: Re: gram.y=>preproc.y
Previous:From: Alvaro HerreraDate: 2008-11-10 22:44:32
Subject: Re: Block-level CRC checks

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