Re: Online verification of checksums

Поиск
Список
Период
Сортировка
От Michael Paquier
Тема Re: Online verification of checksums
Дата
Msg-id 20190302234830.GA1999@paquier.xyz
обсуждение исходный текст
Ответ на Re: Online verification of checksums  (Andres Freund <andres@anarazel.de>)
Ответы Re: Online verification of checksums
Re: Online verification of checksums
Список pgsql-hackers
On Sat, Mar 02, 2019 at 02:00:31PM -0800, Andres Freund wrote:
> I gotta say, my conclusion from this debate is that it's simply a
> mistake to do this without involvement of the server that can use
> locking to prevent these kind of issues.  It seems pretty absurd to me
> to have hacky workarounds around partial writes of a live server, around
> truncation, etc, even though the server has ways to deal with that.

I agree with Andres on this one.  We are never going to make this
stuff safe if we don't handle page reads with the proper locks because
of torn pages.  What I think we should do is provide a SQL function
which reads a page in shared mode, and then checks its checksum if its
LSN is older than the previous redo point.  This discards cases with
rather hot pages, but if the page is hot enough then the backend
re-reading the page would just do the same by verifying the page
checksum by itself.
--
Michael

Вложения

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: POC: converting Lists into arrays
Следующее
От: James Coleman
Дата:
Сообщение: Re: Proving IS NOT NULL inference for ScalarArrayOpExpr's