Re: [SPAM?]: Re: Block-level CRC checks

Поиск
Список
Период
Сортировка
От Hannu Krosing
Тема Re: [SPAM?]: Re: Block-level CRC checks
Дата
Msg-id 1222936137.12899.5.camel@huvostro
обсуждение исходный текст
Ответ на Re: Block-level CRC checks  (Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>)
Список pgsql-hackers
On Thu, 2008-10-02 at 09:35 +0300, Heikki Linnakangas wrote:
> Jonah H. Harris wrote:
> > Rather than potentially letting this slide past 8.4, I threw together
> > an extremely quick-hack patch at the smgr-layer for block-level
> > checksums.
> 
> One hard problem is how to deal with torn pages with non-WAL-logged 
> changes. Like heap hint bit updates, killing tuples in index pages 
> during a scan, and the new FSM pages.

Hit bit updates and killing tuples in index pages during a scan can
probably be brute-forced quite cheaply after we find a CRC mismatch.
Not sure about new FSM pages.

> Currently, a torn page when writing a hint-bit-updated page doesn't 
> matter, but it would break the checksum.

Another idea is to just ignore non-WAL-logged bits when calculating
CRC-s, by masking them out before adding corresponding bytes to CRC.

This requires page-type aware CRC functions and is more expensive to
calculate. How much more expensive is something that only testing can
tell. Probably not very much, as everything needed should be in L1
caches already.

---------------
Hannu




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

Предыдущее
От: Dimitri Fontaine
Дата:
Сообщение: Re: FSM rewrite committed, loose ends
Следующее
От: Zdenek Kotala
Дата:
Сообщение: Re: FSM rewrite committed, loose ends