Re: Bug in amcheck?

Mikhail Nikalayeu <mihailnikalayeu@gmail.com>

From: Mihail Nikalayeu <mihailnikalayeu@gmail.com>
To: Konstantin Knizhnik <knizhnik@garret.ru>, akorotkov@postgresql.org, aekorotkov@gmail.com
Cc: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2025-11-18T22:19:00Z
Lists: pgsql-hackers

Commits

Same data as JSON: GET /api/v1/messages/:b64id/commits the thread's linked commits as JSON, with link sources. API reference →
  1. Fix amcheck's handling of half-dead B-tree pages

  2. Fix amcheck's handling of incomplete root splits in B-tree

  3. Add a test for half-dead pages in B-tree indexes

  4. Add a test for incomplete splits in B-tree indexes

  5. Improve checking of child pages in contrib/amcheck.

Hello!

> Originally I investigated the customer's problem with PG16. And have
> reproduced it for pg16,. I checked that relevant amcheck code was not
> changed since pg16, so I thought that the problem takes place for all
> Postgres versions. But looks like it is not true.

I think it is still broken, but with less probability.
Have you tried injection points on v16? Such a test case will make
things much more clear.

Also, I added Alexander to CC (he is author of bt_child_highkey_check)
- maybe the issue is easily understandable for him.

Best regards,
Mikhail.