Re: Block-level CRC checks

Поиск
Список
Период
Сортировка
От Mark Mielke
Тема Re: Block-level CRC checks
Дата
Msg-id 48E3ACB4.2090900@mark.mielke.cc
обсуждение исходный текст
Ответ на Re: Block-level CRC checks  (Aidan Van Dyk <aidan@highrise.ca>)
Список pgsql-hackers
Aidan Van Dyk wrote:
> 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...
>   

Coming in to this late - so apologies if this makes no sense - but 
doesn't writev() provide the required capability?

Also, what is the difference between the OS not writing the block at 
all, and writing the block but missing the checksum? This window seems 
to be small enough (most of the time being faster than the system can 
schedule the buffer to be dumped?) that the "additional risk" seems 
theoretical rather than real. Unless there is evidence that writev() 
performs poorly, I'd suggest that avoiding double-buffering by using 
writev() would be preferred.

Cheers,
mark

-- 
Mark Mielke <mark@mielke.cc>



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Paul Schlie
Дата:
Сообщение: Re: Block-level CRC checks
Следующее
От: Mark Mielke
Дата:
Сообщение: Re: Block-level CRC checks