Improve search for missing parent downlinks in amcheck
Alexander Korotkov <a.korotkov@postgrespro.ru>
From: Alexander Korotkov <a.korotkov@postgrespro.ru>
To: pgsql-hackers <pgsql-hackers@postgresql.org>, Peter Geoghegan <pg@bowt.ie>
Date: 2019-04-16T02:30:05Z
Lists: pgsql-hackers
Attachments
- amcheck-btree-improve-missing-parent-downlinks-check.patch (application/x-patch) patch
Hi! Currently we amcheck supports lossy checking for missing parent downlinks. It collects bitmap of downlink hashes and use it to check subsequent tree level. We've experienced some large corrupted indexes which pass this check due to its looseness. However, it seems to me we can implement this check in non-lossy manner without making it significantly slower. We anyway traverse downlinks from parent to children in order to verify that hikeys are corresponding to downlink keys. We can also traverse from one downlink to subsequent using rightlinks. So, if there are some intermediate pages between them, they are candidates to have missing parent downlinks. The patch is attached. With this patch amcheck could successfully detect corruption for our customer, which unpatched amcheck couldn't find. Opinions? ------ Alexander Korotkov Postgres Professional: http://www.postgrespro.com The Russian Postgres Company
Commits
-
Improve checking of child pages in contrib/amcheck.
- d114cc538715 13.0 landed
-
Don't rely on estimates for amcheck Bloom filters.
- 894af78f185a 13.0 landed
- 980224b4a230 12.0 landed
- 577c8802d350 11.5 landed