Skip site navigation (1) Skip section navigation (2)

pgsql: Correct an old logic error in btree page splitting: when

From: tgl(at)postgresql(dot)org (Tom Lane)
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Correct an old logic error in btree page splitting: when
Date: 2007-01-27 20:53:41
Message-ID: 20070127205341.967E59FB2D9@postgresql.org (view raw or flat)
Thread:
Lists: pgsql-committers
Log Message:
-----------
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.

Tags:
----
REL8_1_STABLE

Modified Files:
--------------
    pgsql/src/backend/access/nbtree:
        nbtinsert.c (r1.127.2.2 -> r1.127.2.3)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/access/nbtree/nbtinsert.c.diff?r1=1.127.2.2&r2=1.127.2.3)

pgsql-committers by date

Next:From: Tom LaneDate: 2007-01-27 20:53:46
Subject: pgsql: Correct an old logic error in btree page splitting: when
Previous:From: Tom LaneDate: 2007-01-27 20:53:36
Subject: pgsql: Correct an old logic error in btree page splitting: when

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group