Re: Block-level CRC checks

Поиск
Список
Период
Сортировка
От Heikki Linnakangas
Тема Re: Block-level CRC checks
Дата
Msg-id 4B142ACA.3070409@enterprisedb.com
обсуждение исходный текст
Ответ на Re: Block-level CRC checks  (Simon Riggs <simon@2ndQuadrant.com>)
Ответы Re: Block-level CRC checks
Re: Block-level CRC checks
Re: Block-level CRC checks
Список pgsql-hackers
Simon Riggs wrote:
> Proposal
> 
> * We reserve enough space on a disk block for a CRC check. When a dirty
> block is written to disk we calculate and annotate the CRC value, though
> this is *not* WAL logged.

Imagine this:
1. A hint bit is set. It is not WAL-logged, but the page is dirtied.
2. The buffer is flushed out of the buffer cache to the OS. A new CRC is
calculated and stored on the page.
3. Half of the page is flushed to disk (aka torn page problem). The CRC
made it to disk but the flipped hint bit didn't.

You now have a page with incorrect CRC on disk.

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


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

Предыдущее
От: Greg Smith
Дата:
Сообщение: Re: [PATCH 4/4] Add tests to dblink covering use of COPY TO FUNCTION
Следующее
От: Dimitri Fontaine
Дата:
Сообщение: Re: Application name patch - v4