@@ -409,7 +409,7 @@ rumMergeItemPointers(RumState * rumstate, AttrNumber attno, RumKey * dst,
409
409
410
410
/*
411
411
* Checks, should we move to right link...
412
- * Compares inserting itemp pointer with right bound of current page
412
+ * Compares inserting item pointer with right bound of current page
413
413
*/
414
414
static bool
415
415
dataIsMoveRight (RumBtree btree , Page page )
@@ -909,7 +909,9 @@ dataPlaceToPage(RumBtree btree, Page page, OffsetNumber off)
909
909
if (stopAppend )
910
910
/* there is no free space on page */
911
911
break ;
912
- else if (RumPageRightMost (page ))
912
+ else if (RumPageRightMost (page ) ||
913
+ /* Insert item in the end of the page */
914
+ off > maxoff )
913
915
/* force insertion of new item */
914
916
cmp = 1 ;
915
917
else if ((cmp = compareRumKey (btree -> rumstate , btree -> entryAttnum ,
@@ -1211,7 +1213,7 @@ dataSplitPageInternal(RumBtree btree, Buffer lbuf, Buffer rbuf,
1211
1213
OffsetNumber separator ;
1212
1214
RumKey * bound ;
1213
1215
Page newlPage = PageGetTempPageCopy (BufferGetPage (lbuf ));
1214
- RumKey oldbound = * RumDataPageGetRightBound (newlPage );
1216
+ RumKey oldbound = * RumDataPageGetRightBound (newlPage );
1215
1217
int sizeofitem = sizeof (PostingItem );
1216
1218
OffsetNumber maxoff = RumPageGetOpaque (newlPage )-> maxoff ;
1217
1219
Size pageSize = PageGetPageSize (newlPage );
0 commit comments