Re: Block-level CRC checks

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема Re: Block-level CRC checks
Дата
Msg-id 20081029183248.GE4331@alvh.no-ip.org
обсуждение исходный текст
Ответ на Re: Block-level CRC checks  (Simon Riggs <simon@2ndQuadrant.com>)
Ответы Re: Block-level CRC checks  (Alvaro Herrera <alvherre@commandprompt.com>)
Re: Block-level CRC checks  (Alvaro Herrera <alvherre@commandprompt.com>)
Re: Block-level CRC checks  (Alvaro Herrera <alvherre@commandprompt.com>)
Re: Block-level CRC checks  (Zdenek Kotala <Zdenek.Kotala@Sun.COM>)
Список pgsql-hackers
Simon Riggs wrote:

> But perhaps writing a single WAL record if you scan whole page and set
> all bits at once. Then it makes sense in some cases.

So this is what I ended up doing; attached.

There are some gotchas in this patch:

1. it does not consider hint bits other than the ones defined in htup.h.
Some index AMs use hint bits to "kill" tuples (LP_DEAD mostly, I think).
This means that CRCs will be broken for such pages when pages are torn.

2. some parts of the code could be considered modularity violations.
For example, tqual.c is setting a bit in a Page structure; bufmgr.c is
later checking that bit to determine when to log.

3. the bgwriter is seen writing WAL entries at checkpoint.  At shutdown,
this might cause an error to be reported on how there was not supposed
to be activity on the log.  I didn't save the exact error report and I
can't find it in the source :-(


So it "mostly works" at this time.  I very much welcome opinions to
improve the weak points.

--
Alvaro Herrera                                http://www.CommandPrompt.com/
The PostgreSQL Company - Command Prompt, Inc.

Вложения

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

Предыдущее
От: "Dann Corbit"
Дата:
Сообщение: Re: Multi CPU Queries - Feedback and/or suggestions wanted!
Следующее
От: "Noah Freire"
Дата:
Сообщение: autovacuum: I need some explanation