Re: Block-level CRC checks

Поиск
Список
Период
Сортировка
От Heikki Linnakangas
Тема Re: Block-level CRC checks
Дата
Msg-id 48E27758.9060402@enterprisedb.com
обсуждение исходный текст
Ответ на Block-level CRC checks  (Alvaro Herrera <alvherre@commandprompt.com>)
Ответы Re: Block-level CRC checks
Список pgsql-hackers
Alvaro Herrera wrote:
> Initially I'm aiming at a CRC32 sum
> for each block.  FlushBuffer would calculate the checksum and store it
> in the CRC fork; ReadBuffer_common would read the page, calculate the
> checksum, and compare it to the one stored in the CRC fork.

There's one fundamental problem with that, related to the way our hint 
bits are written.

Currently, hint bit updates are not WAL-logged, and thus no full page 
write is done when only hint bits are changed. Imagine what happens if 
hint bits are updated on a page, but there's no other changes, and we 
crash so that only one half of the new page version makes it to disk (= 
torn page). The CRC would not match, even though the page is actually valid.

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


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

Предыдущее
От: Markus Wanner
Дата:
Сообщение: Re: Block-level CRC checks
Следующее
От: Greg Smith
Дата:
Сообщение: Re: Block-level CRC checks