Hello, Andrey!

> Interesting bug. It's amazing how long it stand, giving that it would be
triggered by almost any check after updating a table.

Probably because in real cases, bt_index_check is used much more frequently
than bt_index_parent_check.

> From my POV correct fix direction is to use approach similar to index
building.
> E.i. remove "if (!state->readonly)" check. Are there any known downsides
of this?

Yes, it also looks correct to me. I have attached the patch with such
changes.

Also, I have registered a commit fest entry for the issue:
https://commitfest.postgresql.org/51/5438/

Attachment: v3-0001-amcheck-Fix-bt_index_parent_check-behavior-with-C.patch
Description: Binary data

Reply via email to