Re: Block-level CRC checks

Поиск
Список
Период
Сортировка
От Heikki Linnakangas
Тема Re: Block-level CRC checks
Дата
Msg-id 48E4D5D7.7060300@enterprisedb.com
обсуждение исходный текст
Ответ на Re: Block-level CRC checks  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: Block-level CRC checks  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
Tom Lane wrote:
> Heikki Linnakangas <heikki.linnakangas@enterprisedb.com> writes:
>> Brian Hurt wrote:
>>> Another possibility is to just not checksum the hint bits...
> 
>> That would work. But I'm afraid it'd make the implementation a lot more 
>> invasive, and also slower. The buffer manager would have to know what 
>> kind of a page it's dealing with, heap or index or FSM or what, to know 
>> where the hint bits are. Then it would have to follow the line pointers 
>> to locate the hint bits, and mask them out for the CRC calculation.
> 
> Right.  The odds are that this'd actually be slower than the
> double-buffer method, because of all the added complexity.

I was thinking that masking out the hint bits would be implemented by 
copying the page to the temporary buffer, ANDing out the hint bits 
there, and then calculating the CRC and issuing the write. So we'd still 
need to double-buffer.

> The problem we still have to solve is torn pages when writing back a
> hint-bit update ...

Not checksumming the hint bits *is* a solution to the torn page problem.

--   Heikki Linnakangas  EnterpriseDB   http://www.enterprisedb.com


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Block-level CRC checks
Следующее
От: Andrew Chernow
Дата:
Сообщение: Re: Block-level CRC checks