Re: Improve search for missing parent downlinks in amcheck

Поиск
Список
Период
Сортировка
От Peter Geoghegan
Тема Re: Improve search for missing parent downlinks in amcheck
Дата
Msg-id CAH2-Wz=DPEfP0re3AUBMKrxRjpj0uESM--65VwZcDKhtJBTxVA@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Improve search for missing parent downlinks in amcheck  (Alexander Korotkov <a.korotkov@postgrespro.ru>)
Список pgsql-hackers
On Sat, Apr 27, 2019 at 4:57 PM Alexander Korotkov
<a.korotkov@postgrespro.ru> wrote:
> "rootdescend" is cool type of check.  Thank you for noticing, I wasn't aware of it.
> But can it detect the missing downlink in following situation?
>
>         A
>      /     \
>   B <-> C <-> D
>
> Here A has downlinks to B and D, which downlink to C is missing,
> while B, C and D are correctly connected with leftlinks and rightlinks.
> I can see "rootdescend" calls _bt_search(), which would just step
> right from C to D as if it was concurrent split.

There is a comment about this scenario above bt_rootdescend() in amcheck.

You're right -- this is a kind of corruption that even the new
rootdescend verification option would miss. We can imagine a version
of rootdescend verification that tells the core code to only move
right when there was an *interrupted* page split (i.e.
P_INCOMPLETE_SPLIT() flag bit is set), but that isn't what happens
right now.

That said, the lossy downlink check that you want to improve on
*should* already catch this situation. Of course it might not because
it is lossy (uses a Bloom filter), but I think that that's very
unlikely. That's why I would like to understand the problem that you
found with the check.

-- 
Peter Geoghegan



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

Предыдущее
От: Alexander Korotkov
Дата:
Сообщение: Re: Improve search for missing parent downlinks in amcheck
Следующее
От: Alexander Korotkov
Дата:
Сообщение: Re: Improve search for missing parent downlinks in amcheck