Re: Online enabling of checksums

Поиск
Список
Период
Сортировка
От Andrey Borodin
Тема Re: Online enabling of checksums
Дата
Msg-id C5BC4B4B-CF31-4277-8B58-69323A637D85@yandex-team.ru
обсуждение исходный текст
Ответ на Re: Online enabling of checksums  (Robert Haas <robertmhaas@gmail.com>)
Список pgsql-hackers

> 28 февр. 2018 г., в 22:06, Robert Haas <robertmhaas@gmail.com> написал(а):
>
> On Sun, Feb 25, 2018 at 9:54 AM, Magnus Hagander <magnus@hagander.net> wrote:
>> Also if that wasn't clear -- we only do the full page write if there isn't
>> already a checksum on the page and that checksum is correct.
>
> Hmm.
>
> Suppose that on the master there is a checksum on the page and that
> checksum is correct, but on the standby the page contents differ in
> some way that we don't always WAL-log, like as to hint bits, and there
> the checksum is incorrect.  Then you'll enable checksums when the
> standby still has some pages without valid checksums, and disaster
> will ensue.
>
> I think this could be hard to prevent if checksums are turned on and
> off multiple times.

This seems 100% valid concern. If pages can be binary different (on master and standby), we have to log act of
checksumminga page. 
And WAL replay would have to verify that his checksum is OK.
What is unclear to me is what standby should do if he sees incorrect checksum? Change his page? Request page from
master?Shutdown? 

Or should we just WAL-log page whenever it is checksummed by worker? Even if the checksum was correct?

Best regards, Andrey Borodin.

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

Предыдущее
От: "David G. Johnston"
Дата:
Сообщение: Re: CALL optional in PL/pgSQL
Следующее
От: Andres Freund
Дата:
Сообщение: Re: Why chain of snapshots is used in ReorderBufferCommit?