| From: | Simon Riggs <simon(at)2ndquadrant(dot)com> | 
|---|---|
| To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> | 
| Cc: | Mark Cave-Ayland <m(dot)cave-ayland(at)webbased(dot)co(dot)uk>, pgsql-hackers(at)postgresql(dot)org | 
| Subject: | Re: Cost of XLogInsert CRC calculations | 
| Date: | 2005-03-08 08:31:35 | 
| Message-ID: | 1110270695.6117.229.camel@localhost.localdomain | 
| Views: | Whole Thread | Raw Message | Download mbox | Resend email | 
| Thread: | |
| Lists: | pgsql-hackers | 
On Mon, 2005-03-07 at 20:50 -0500, Tom Lane wrote:
> Simon Riggs <simon(at)2ndquadrant(dot)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.  
Agreed.
> I would go for CRC32 across
> the board, myself.
Sold.
Best Regards, Simon Riggs
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Christopher Kings-Lynne | 2005-03-08 08:32:57 | Re: Best practices: MERGE | 
| Previous Message | Simon Riggs | 2005-03-08 08:28:06 | Re: Best practices: MERGE |