8000 Remove some dead code, per Heikki. · postgrespro/postgres_cluster@c76ed81 · GitHub
[go: up one dir, main page]

Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

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)
0