Re: crash on 8.2 and cvshead - failed to add item to the - Mailing list pgsql-hackers

From Tom Lane
Subject Re: crash on 8.2 and cvshead - failed to add item to the
Date
Msg-id 22553.1169931782@sss.pgh.pa.us
Whole thread Raw
In response to Re: crash on 8.2 and cvshead - failed to add item to the  (Heikki Linnakangas <heikki@enterprisedb.com>)
Responses Re: crash on 8.2 and cvshead - failed to add item to the  (Heikki Linnakangas <heikki@enterprisedb.com>)
List pgsql-hackers
Heikki Linnakangas <heikki@enterprisedb.com> writes:
>> Hmm. There seems to be something wrong in the free space calculation in 
>> the algorithm for choosing the right split location. I'll dig deeper, 
>> unless someone beats me to it..

> I think I found it. The page splitting code didn't take into account 
> that when the new item is the first one on the right page, it also 
> becomes the high key of the left page. The fact that this test case 
> triggered it in 32 bit machines and not on 64 bit machines was a 
> coincidence.

> Patch attached.

Patch applied.  I tried Joe's example with the maximum and minimum
possible fillfactors, and saw no failure, which may or may not prove
a lot.  Are you still concerned about the PageGetFreeSpace issue?
        regards, tom lane


pgsql-hackers by date:

Previous
From: Michael Meskes
Date:
Subject: Re: windows/ecpg regression tests failing
Next
From: Tom Lane
Date:
Subject: Re: DROP FUNCTION failure: cache lookup failed for relation X