mirror of
https://github.com/postgres/postgres.git
synced 2026-04-15 22:10:45 -04:00
Fix amcheck's handling of incomplete root splits in B-tree
When the root page is being split, it's normal that root page according to the metapage is not marked BTP_ROOT. Fix bogus error in amcheck about that case. Reviewed-by: Peter Geoghegan <pg@bowt.ie> Discussion: https://www.postgresql.org/message-id/abd65090-5336-42cc-b768-2bdd66738404@iki.fi Backpatch-through: 14
This commit is contained in:
parent
c090965036
commit
5a2d1df007
1 changed files with 1 additions and 1 deletions
|
|
@ -847,7 +847,7 @@ bt_check_level_from_leftmost(BtreeCheckState *state, BtreeLevel level)
|
|||
errmsg("block %u is not leftmost in index \"%s\"",
|
||||
current, RelationGetRelationName(state->rel))));
|
||||
|
||||
if (level.istruerootlevel && !P_ISROOT(opaque))
|
||||
if (level.istruerootlevel && (!P_ISROOT(opaque) && !P_INCOMPLETE_SPLIT(opaque)))
|
||||
ereport(ERROR,
|
||||
(errcode(ERRCODE_INDEX_CORRUPTED),
|
||||
errmsg("block %u is not true root in index \"%s\"",
|
||||
|
|
|
|||
Loading…
Reference in a new issue