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

Commit1e07f5e

Browse files
Remove overzealous _bt_split() assertions.
_bt_split() is passed NULL as its insertion scankey for internal pagesplits. Two recently added Assert() statements failed to consider this,leading to a crash with pg_upgrade'd BREE_VERSION < 4 indexes. Removethe assertions.The assertions in question were added by commit0d861bb, which addednbtree deduplication. It would be possible to fix the assertionsdirectly instead, but they weren't adding much anyway.
1 parent0b48f13 commit1e07f5e

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

‎src/backend/access/nbtree/nbtinsert.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1632,7 +1632,6 @@ _bt_split(Relation rel, BTScanInsert itup_key, Buffer buf, Buffer cbuf,
16321632
*/
16331633
leftoff=P_HIKEY;
16341634

1635-
Assert(BTreeTupleIsPivot(lefthikey)|| !itup_key->heapkeyspace);
16361635
Assert(BTreeTupleGetNAtts(lefthikey,rel)>0);
16371636
Assert(BTreeTupleGetNAtts(lefthikey,rel) <=indnkeyatts);
16381637
if (PageAddItem(leftpage, (Item)lefthikey,itemsz,leftoff,
@@ -1697,7 +1696,6 @@ _bt_split(Relation rel, BTScanInsert itup_key, Buffer buf, Buffer cbuf,
16971696
itemid=PageGetItemId(origpage,P_HIKEY);
16981697
itemsz=ItemIdGetLength(itemid);
16991698
item= (IndexTuple)PageGetItem(origpage,itemid);
1700-
Assert(BTreeTupleIsPivot(item)|| !itup_key->heapkeyspace);
17011699
Assert(BTreeTupleGetNAtts(item,rel)>0);
17021700
Assert(BTreeTupleGetNAtts(item,rel) <=indnkeyatts);
17031701
if (PageAddItem(rightpage, (Item)item,itemsz,rightoff,

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp