Amcheck: do rightlink verification with lock coupling

Поиск
Список
Период
Сортировка
От Andrey Borodin
Тема Amcheck: do rightlink verification with lock coupling
Дата
Msg-id 0EB0CFA8-CBD8-4296-8049-A2C0F28FAE8C@yandex-team.ru
обсуждение исходный текст
Ответы Re: Amcheck: do rightlink verification with lock coupling  (Alvaro Herrera <alvherre@2ndquadrant.com>)
Список pgsql-hackers
Hi!

This is a thread to discuss amcheck feature started in other thread[0].

Currently amcheck is scanning every B-tree level. If verification is done with ShareLock - amcheck will test that each
pageleftlink is pointing to page with rightlink backwards. 
This is important invariant, in our experience it proved to be good at detecting various corruptions.
But this invariant can be detected only if both pages are not modified (e.g. split concurrently).

PFA patch, that in case of suspicion locks two pages and retests that invariant. This allows detection of several
corruptionson standby. 

This patch violates one of amcheck design principles: current code does not ever take more than one page lock. I do not
know:should we hold this rule or should we use more deep check? 

Thanks!

Best regards, Andrey Borodin.

[0] https://www.postgresql.org/message-id/flat/DA9B33AC-53CB-4643-96D4-7A0BBC037FA1@yandex-team.ru

Вложения

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

Предыдущее
От: Robert Haas
Дата:
Сообщение: Re: tableam vs. TOAST
Следующее
От: Jeevan Chalke
Дата:
Сообщение: Re: block-level incremental backup