@@ -482,11 +482,10 @@ entrySplitPage(RumBtree btree, Buffer lbuf, Buffer rbuf,
482
482
* return newly allocated rightmost tuple
483
483
*/
484
484
IndexTuple
485
- rumPageGetLinkItup (Buffer buf )
485
+ rumPageGetLinkItup (Buffer buf , Page page )
486
486
{
487
487
IndexTuple itup ,
488
488
nitup ;
489
- Page page = BufferGetPage (buf );
490
489
491
490
itup = getRightMostTuple (page );
492
491
nitup = RumFormInteriorTuple (itup , page , BufferGetBlockNumber (buf ));
@@ -504,12 +503,12 @@ rumEntryFillRoot(RumBtree btree, Buffer root, Buffer lbuf, Buffer rbuf,
504
503
{
505
504
IndexTuple itup ;
506
505
507
- itup = rumPageGetLinkItup (lbuf );
506
+ itup = rumPageGetLinkItup (lbuf , lpage );
508
507
if (PageAddItem (page , (Item ) itup , IndexTupleSize (itup ), InvalidOffsetNumber , false, false) == InvalidOffsetNumber )
509
508
elog (ERROR , "failed to add item to index root page" );
510
509
pfree (itup );
511
510
512
- itup = rumPageGetLinkItup (rbuf );
511
+ itup = rumPageGetLinkItup (rbuf , rpage );
513
512
if (PageAddItem (page , (Item ) itup , IndexTupleSize (itup ), InvalidOffsetNumber , false, false) == InvalidOffsetNumber )
514
513
elog (ERROR , "failed to add item to index root page" );
515
514
pfree (itup );
0 commit comments