Skip to content

Commit c76ed81

Browse files
committed
Remove some dead code, per Heikki.
1 parent 037f841 commit c76ed81

File tree

1 file changed

+12
-17
lines changed

1 file changed

+12
-17
lines changed

src/backend/access/nbtree/nbtinsert.c

Lines changed: 12 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*
1010
* IDENTIFICATION
11-
* $PostgreSQL: pgsql/src/backend/access/nbtree/nbtinsert.c,v 1.148 2007/01/27 20:53:30 tgl Exp $
11+
* $PostgreSQL: pgsql/src/backend/access/nbtree/nbtinsert.c,v 1.149 2007/02/06 14:55:11 tgl Exp $
1212
*
1313
*-------------------------------------------------------------------------
1414
*/
@@ -855,22 +855,17 @@ _bt_split(Relation rel, Buffer buf, OffsetNumber firstright,
855855
/* cope with possibility that newitem goes at the end */
856856
if (i <= newitemoff)
857857
{
858-
if (newitemonleft)
859-
{
860-
_bt_pgaddtup(rel, leftpage, newitemsz, newitem, leftoff,
861-
"left sibling");
862-
itup_off = leftoff;
863-
itup_blkno = BufferGetBlockNumber(buf);
864-
leftoff = OffsetNumberNext(leftoff);
865-
}
866-
else
867-
{
868-
_bt_pgaddtup(rel, rightpage, newitemsz, newitem, rightoff,
869-
"right sibling");
870-
itup_off = rightoff;
871-
itup_blkno = BufferGetBlockNumber(rbuf);
872-
rightoff = OffsetNumberNext(rightoff);
873-
}
858+
/*
859+
* Can't have newitemonleft here; that would imply we were told to put
860+
* *everything* on the left page, which cannot fit (if it could, we'd
861+
* not be splitting the page).
862+
*/
863+
Assert(!newitemonleft);
864+
_bt_pgaddtup(rel, rightpage, newitemsz, newitem, rightoff,
865+
"right sibling");
866+
itup_off = rightoff;
867+
itup_blkno = BufferGetBlockNumber(rbuf);
868+
rightoff = OffsetNumberNext(rightoff);
874869
}
875870

876871
/*

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy