Re: Block-level CRC checks - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Block-level CRC checks
Date
Msg-id 9938.1222871272@sss.pgh.pa.us
Whole thread Raw
In response to Re: Block-level CRC checks  (pgsql@mohawksoft.com)
Responses Re: Block-level CRC checks
Re: Block-level CRC checks
Re: Block-level CRC checks
List pgsql-hackers
pgsql@mohawksoft.com writes:
>> No, it's all about time penalties and loss of concurrency.

> I don't think that the amount of time it would take to calculate and test
> the sum is even important. It may be in older CPUs, but these days CPUs
> are so fast in RAM and a block is very small. On x86 systems, depending on
> page alignment, we are talking about two or three pages that will be "in
> memory" (They were used to read the block from disk or previously
> accessed).

Your optimism is showing ;-).  XLogInsert routinely shows up as a major
CPU hog in any update-intensive test, and AFAICT that's mostly from the
CRC calculation for WAL records.

We could possibly use something cheaper than a real CRC, though.  A
word-wide XOR (ie, effectively a parity calculation) would be sufficient
to detect most problems.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Common Table Expressions (WITH RECURSIVE) patch
Next
From: "Greg Stark"
Date:
Subject: Re: Common Table Expressions (WITH RECURSIVE) patch