Bruce Momjian wrote:
Heikki Linnakangas wrote:
Bruce Momjian wrote:
Heikki, did this code cleanup get included in your recent btree split
fix?
No.


OK, would you please send a patch to remove the unused code.  Thanks.

Ok, here you are.

--
  Heikki Linnakangas
  EnterpriseDB   http://www.enterprisedb.com
Index: src/backend/access/nbtree/nbtinsert.c
===================================================================
RCS file: /home/hlinnaka/pgcvsrepository/pgsql/src/backend/access/nbtree/nbtinsert.c,v
retrieving revision 1.148
diff -c -r1.148 nbtinsert.c
*** src/backend/access/nbtree/nbtinsert.c	27 Jan 2007 20:53:30 -0000	1.148
--- src/backend/access/nbtree/nbtinsert.c	6 Feb 2007 10:23:26 -0000
***************
*** 855,876 ****
  	/* cope with possibility that newitem goes at the end */
  	if (i <= newitemoff)
  	{
! 		if (newitemonleft)
! 		{
! 			_bt_pgaddtup(rel, leftpage, newitemsz, newitem, leftoff,
! 						 "left sibling");
! 			itup_off = leftoff;
! 			itup_blkno = BufferGetBlockNumber(buf);
! 			leftoff = OffsetNumberNext(leftoff);
! 		}
! 		else
! 		{
! 			_bt_pgaddtup(rel, rightpage, newitemsz, newitem, rightoff,
! 						 "right sibling");
! 			itup_off = rightoff;
! 			itup_blkno = BufferGetBlockNumber(rbuf);
! 			rightoff = OffsetNumberNext(rightoff);
! 		}
  	}
  
  	/*
--- 855,865 ----
  	/* cope with possibility that newitem goes at the end */
  	if (i <= newitemoff)
  	{
! 		_bt_pgaddtup(rel, rightpage, newitemsz, newitem, rightoff,
! 					 "right sibling");
! 		itup_off = rightoff;
! 		itup_blkno = BufferGetBlockNumber(rbuf);
! 		rightoff = OffsetNumberNext(rightoff);
  	}
  
  	/*
---------------------------(end of broadcast)---------------------------
TIP 6: explain analyze is your friend

Reply via email to