@@ -409,7 +409,7 @@ rumMergeItemPointers(RumState * rumstate, AttrNumber attno, RumKey * dst,
409409
410410/*
411411 * 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
413413 */
414414static bool
415415dataIsMoveRight (RumBtree btree , Page page )
@@ -909,7 +909,9 @@ dataPlaceToPage(RumBtree btree, Page page, OffsetNumber off)
909909 if (stopAppend )
910910 /* there is no free space on page */
911911 break ;
912- else if (RumPageRightMost (page ))
912+ else if (RumPageRightMost (page ) ||
913+ /* Insert item in the end of the page */
914+ off > maxoff )
913915 /* force insertion of new item */
914916 cmp = 1 ;
915917 else if ((cmp = compareRumKey (btree -> rumstate , btree -> entryAttnum ,
@@ -1211,7 +1213,7 @@ dataSplitPageInternal(RumBtree btree, Buffer lbuf, Buffer rbuf,
12111213 OffsetNumber separator ;
12121214 RumKey * bound ;
12131215 Page newlPage = PageGetTempPageCopy (BufferGetPage (lbuf ));
1214- RumKey oldbound = * RumDataPageGetRightBound (newlPage );
1216+ RumKey oldbound = * RumDataPageGetRightBound (newlPage );
12151217 int sizeofitem = sizeof (PostingItem );
12161218 OffsetNumber maxoff = RumPageGetOpaque (newlPage )-> maxoff ;
12171219 Size pageSize = PageGetPageSize (newlPage );
0 commit comments