Re: Enabling Checksums

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Enabling Checksums
Дата
Msg-id 904.1352843291@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Enabling Checksums  (Robert Haas <robertmhaas@gmail.com>)
Ответы Re: Enabling Checksums  (Robert Haas <robertmhaas@gmail.com>)
Список pgsql-hackers
Robert Haas <robertmhaas@gmail.com> writes:
> Hmm... what if we took this a step further and actually stored the
> checksums in a separate relation fork?  That would make it pretty
> simple to support enabling/disabling checksums for particular
> relations.  It would also allow us to have a wider checksum, like 32
> or 64 bits rather than 16.  I'm not scoffing at a 16-bit checksum,
> because even that's enough to catch a very high percentage of errors,
> but it wouldn't be terrible to be able to support a wider one, either.

What happens when you get an I/O failure on the checksum fork?  Assuming
you're using 8K pages there, that would mean you can no longer verify
the integrity of between one and four thousand pages of data.

Not to mention the race condition problems associated with trying to be
sure the checksum updates hit the disk at the same time as the data-page
updates.

I think you really have to store the checksums *with* the data they're
supposedly protecting.
        regards, tom lane



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

Предыдущее
От: Robert Haas
Дата:
Сообщение: Re: [PATCH] Patch to compute Max LSN of Data Pages
Следующее
От: Alvaro Herrera
Дата:
Сообщение: Re: foreign key locks