Re: Block-level CRC checks

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема Re: Block-level CRC checks
Дата
Msg-id 20081002201812.GH4151@alvh.no-ip.org
обсуждение исходный текст
Ответ на Re: Block-level CRC checks  ("Jonah H. Harris" <jonah.harris@gmail.com>)
Ответы Re: Block-level CRC checks  (Aidan Van Dyk <aidan@highrise.ca>)
Re: Block-level CRC checks  (Simon Riggs <simon@2ndQuadrant.com>)
Re: Block-level CRC checks  (Decibel! <decibel@decibel.org>)
Список pgsql-hackers
Jonah H. Harris escribió:
> On Thu, Oct 2, 2008 at 1:44 PM, Alvaro Herrera
> <alvherre@commandprompt.com> wrote:
> > How about when a hint bit is set and the page is not already dirty, set
> > the checksum to the "always valid" value?  The problem I have with this
> > idea is that there would be lots of pages excluded from the CRC checks,
> > a non-trivial percentage of the time.
> 
> I don't like that because it trades-off corruption detection (the
> whole point of this feature) for a slight performance improvement.

I agree that giving up corruption detection is not such a hot idea, but
what I'm intending to get back is not performance but correctness (in
this case protection from the torn page problem)

> > Maybe we could mix this with Simon's approach to counting hint bit
> > setting, and calculate a valid CRC on the page every n-th non-logged
> > change.
> 
> I still think we should only calculate checksums on the actual write.

Well, if we could trade off a bit of performance for correctness, I
would give up on that :-)  However, you're right that this tradeoff is
not what we're having here.

> And, this still seems to have an issue with WAL, unless Simon's
> original idea somehow included recording hint bit settings/dirtying
> the page in WAL.

I have to admit I don't remember exactly how it worked :-)  I think the
idea was avoiding setting the page dirty until a certain number of hint
bit setting operations had been done (which I think means it's not
useful for the present purpose).

-- 
Alvaro Herrera                                http://www.CommandPrompt.com/
PostgreSQL Replication, Consulting, Custom Development, 24x7 support


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

Предыдущее
От: Alvaro Herrera
Дата:
Сообщение: Re: Block-level CRC checks
Следующее
От: Ron Mayer
Дата:
Сообщение: Re: Interval output bug in HAVE_INT64_TIMESTAMP