Aidan Van Dyk <aidan@highrise.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).
regards, tom lane