amcheck incorrectly reported the following error if there were any
half-dead pages in the index:
ERROR: mismatch between parent key and child high key in index
"amchecktest_id_idx"
It's expected that a half-dead page does not have a downlink in the
parent level, so skip the test.
Reported-by: Konstantin Knizhnik <[email protected]>
Reviewed-by: Peter Geoghegan <[email protected]>
Reviewed-by: Mihail Nikalayeu <[email protected]>
Discussion: https://www.postgresql.org/message-id/
33e39552-6a2a-46f3-8b34-
3f9f8004451f@garret.ru
Backpatch-through: 14
* If we visit page with high key, check that it is equal to the
* target key next to corresponding downlink.
*/
- if (!rightsplit && !P_RIGHTMOST(opaque))
+ if (!rightsplit && !P_RIGHTMOST(opaque) && !P_ISHALFDEAD(opaque))
{
BTPageOpaque topaque;
IndexTuple highkey;