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

Re: Block-level CRC checks

From: pgsql(at)mohawksoft(dot)com
To: "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: "Aidan Van Dyk" <aidan(at)highrise(dot)ca>, "Gregory Stark" <stark(at)enterprisedb(dot)com>, "Jonah H(dot) Harris" <jonah(dot)harris(at)gmail(dot)com>, pgsql(at)mohawksoft(dot)com, "Hannu Krosing" <hannu(at)2ndquadrant(dot)com>, "Decibel!" <decibel(at)decibel(dot)org>, "Alvaro Herrera" <alvherre(at)commandprompt(dot)com>, "Pg Hackers" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Block-level CRC checks
Date: 2008-10-01 21:51:33
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackers
> Aidan Van Dyk <aidan(at)highrise(dot)ca> writes:
>> One possibility would be to "double-buffer" the write... i.e. as you
>> calculate your CRC, you're doing it on a local copy of the block, which
>> you hand to the OS to write...  If you're touching the whole block of
>> memory to CRC it, it isn't *ridiculously* more expensive to copy the
>> memory somewhere else as you do it...
> That actually seems like a really good idea.  We don't have to increase
> the buffer locking requirements, or make much of any change at all in
> the existing logic.  +1, especially if this is intended to be an
> optional feature (which I agree with).
I don't think it make sense at all!!!

If you are going to double buffer, one presumes that for some non-zero
period of time, the block must be locked during which it is copied. You
wouldn't want it changing "mid-copy" would you? How is this any less of a
hit than just calculating the checksum?

In response to


pgsql-hackers by date

Next:From: David E. WheelerDate: 2008-10-01 22:10:18
Subject: Re: [Review] Tests citext casts by David Wheeler.
Previous:From: Dennis BrakhaneDate: 2008-10-01 21:20:47
Subject: Re: Transactions within a function body

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