Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit945ec4c

Browse files
committed
amcheck: Fixes for right page check during unique constraint check
* Don't forget to pfree() the right page when it's to be ignored. * Report error on unexpected non-leaf right page even if this page is not to be ignored. This restores the logic which was unintendedly changed in97e5b00.Reported-by: Pavel Borisov
1 parent4cf9aab commit945ec4c

File tree

1 file changed

+12
-10
lines changed

1 file changed

+12
-10
lines changed

‎contrib/amcheck/verify_nbtree.c

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1901,17 +1901,19 @@ bt_target_page_check(BtreeCheckState *state)
19011901

19021902
if (P_IGNORE(topaque))
19031903
{
1904-
if (unlikely(!P_ISLEAF(topaque)))
1905-
ereport(ERROR,
1906-
(errcode(ERRCODE_INDEX_CORRUPTED),
1907-
errmsg("right block of leaf block is non-leaf for index \"%s\"",
1908-
RelationGetRelationName(state->rel)),
1909-
errdetail_internal("Block=%u page lsn=%X/%X.",
1910-
state->targetblock,
1911-
LSN_FORMAT_ARGS(state->targetlsn))));
1912-
else
1913-
break;
1904+
pfree(rightpage);
1905+
break;
19141906
}
1907+
1908+
if (unlikely(!P_ISLEAF(topaque)))
1909+
ereport(ERROR,
1910+
(errcode(ERRCODE_INDEX_CORRUPTED),
1911+
errmsg("right block of leaf block is non-leaf for index \"%s\"",
1912+
RelationGetRelationName(state->rel)),
1913+
errdetail_internal("Block=%u page lsn=%X/%X.",
1914+
state->targetblock,
1915+
LSN_FORMAT_ARGS(state->targetlsn))));
1916+
19151917
itemid=PageGetItemIdCareful(state,rightblock_number,
19161918
rightpage,
19171919
rightfirstoffset);

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp