]> granicus.if.org Git - postgresql/commit
Correct an old logic error in btree page splitting: when considering a split
authorTom Lane <tgl@sss.pgh.pa.us>
Sat, 27 Jan 2007 20:53:59 +0000 (20:53 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Sat, 27 Jan 2007 20:53:59 +0000 (20:53 +0000)
commiteea0902ead2300be2e48e841c248dba971913cdd
tree1870a54d7705b2b1846b090964845647992e0358
parentd56c800c40d2ed66ec2e2dc4c244afa08ff0468a
Correct an old logic error in btree page splitting: when considering a split
exactly at the point where we need to insert a new item, the calculation used
the wrong size for the "high key" of the new left page.  This could lead to
choosing an unworkable split, resulting in "PANIC: failed to add item to the
left sibling" (or "right sibling") failure.  Although this bug has been there
a long time, it's very difficult to trigger a failure before 8.2, since there
was generally a lot of free space on both sides of a chosen split.  In 8.2,
where the user-selected fill factor determines how much free space the code
tries to leave, an unworkable split is much more likely.  Report by Joe
Conway, diagnosis and fix by Heikki Linnakangas.
src/backend/access/nbtree/nbtinsert.c