diff options
author | Tomas Vondra | 2025-06-17 12:55:27 +0000 |
---|---|---|
committer | Tomas Vondra | 2025-06-17 12:55:29 +0000 |
commit | 0b54b392334b255abeac7c2718de7071600444ad (patch) | |
tree | b9186d640a193a1fb6e22ff962a4a3bb9b763448 /doc/man/begin.l | |
parent | 8dd41c0bff5b6944fb536cf8f2627d5f542581cd (diff) |
amcheck: Fix checks of entry order for GIN indexes
This tightens a couple checks in checking GIN indexes, which might have
resulted in incorrect results (false positives/negatives).
* The code skipped ordering checks if the entries were for different
attributes (for multi-column GIN indexes), possibly missing some cases
of data corruption. But the attribute number is part of the ordering,
so we can check that.
* The root page was skipped when checking entry order, but that is
unnecessary. The root page is subject to the same ordering rules, we
can process it just like any other page.
* The high key on the right-most page was not checked, but that is
needed only for inner pages (we don't store the high key for those).
For leaf pages we can check the high key just fine.
* Correct the detection of split pages. If the page gets split, the
cached parent key is greater than the current child key (not less, as
the code incorrectly expected).
Issues reported by Arseniy Mukhin, along with a proposed patch. Review
by Andrey M. Borodin, cleanup and improvements by me.
Author: Arseniy Mukhin <arseniy.mukhin.dev@gmail.com>
Reviewed-by: Andrey M. Borodin <x4mmm@yandex-team.ru>
Discussion: https://postgr.es/m/CAE7r3MJ611B9TE=YqBBncewp7-k64VWs+sjk7XF6fJUX77uFBA@mail.gmail.com
Diffstat (limited to 'doc/man/begin.l')
0 files changed, 0 insertions, 0 deletions