Re: Dead code in _bt_split?

From: Heikki Linnakangas <heikki(at)enterprisedb(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Bruce Momjian <bruce(at)momjian(dot)us>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Dead code in _bt_split?
Date: 2007-02-06 16:06:11
Message-ID: 45C8A773.5070306@enterprisedb.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches

Tom Lane wrote:
> Heikki Linnakangas <heikki(at)enterprisedb(dot)com> writes:
>> Bruce Momjian wrote:
>>> OK, would you please send a patch to remove the unused code. Thanks.
>
>> Ok, here you are.
>
> Applied with an added comment and Assert.
>
> While testing it I realized that there seems to be a nearby bug in
> _bt_findsplitloc: it fails to consider the possibility of moving all the
> extant items to the left side. It will always return a firstright <=
> maxoff. ISTM this would mean that it could choose a bad split if the
> incoming item goes at the end and both it and the last extant item are
> large: in this case they should be split apart, but they won't be.
>
> Heikki, do you feel like looking at that, or shall I?

I'll take a look at it.

--
Heikki Linnakangas
EnterpriseDB http://www.enterprisedb.com

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2007-02-06 16:31:00 Re: Type casting bug in 8.1.[67]?
Previous Message Tom Lane 2007-02-06 15:21:45 Re: Pl/pgsql functions causing crashes in 8.2.2

Browse pgsql-patches by date

  From Date Subject
Next Message Chris Marcellino 2007-02-06 18:27:08 Re: Feature: POSIX Shared memory support
Previous Message Michael Paesold 2007-02-06 15:51:22 Re: Feature: POSIX Shared memory support