Re: Cost of XLogInsert CRC calculations - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Cost of XLogInsert CRC calculations
Date
Msg-id 1881.1110246601@sss.pgh.pa.us
Whole thread Raw
In response to Re: Cost of XLogInsert CRC calculations  (Simon Riggs <simon@2ndquadrant.com>)
Responses Re: Cost of XLogInsert CRC calculations  (Greg Stark <gsstark@mit.edu>)
Re: Cost of XLogInsert CRC calculations  (Simon Riggs <simon@2ndquadrant.com>)
Re: Cost of XLogInsert CRC calculations  ("Mark Cave-Ayland" <m.cave-ayland@webbased.co.uk>)
List pgsql-hackers
Simon Riggs <simon@2ndquadrant.com> writes:
> Well, we're using the CRC in 3 separate places...
> (1) for xlog records
> (2) for complete blocks copied to xlog
> (3) for control files

> For (1), records are so short that probably CRC16 would be sufficient
> without increasing the error rate noticeably.

> I think I'd like to keep (3) at CRC64...its just too important. Plus
> thats slightly less code to change.

The control files are so short that CRC16 would be plenty.

> My money is on (2) being the source of most of that run-time anyway,

Undoubtedly, so there's not going to be much win from micro-optimization
by having several different CRC functions.  I would go for CRC32 across
the board, myself.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Gaetano Mendola
Date:
Subject: A bad plan
Next
From: Greg Stark
Date:
Subject: Re: Cost of XLogInsert CRC calculations