GiST: Bug In gistdoinsert() ? - Mailing list pgsql-hackers

From Itai Zukerman
Subject GiST: Bug In gistdoinsert() ?
Date
Msg-id 87llzzdsuw.fsf@matt.w80.math-hat.com
Whole thread Raw
List pgsql-hackers
I'm looking over the code in backends/access/gist, and I noticed this
in gist.c, in gistdoinsert():
instup = (IndexTuple *) palloc(sizeof(IndexTuple));instup[0] = (IndexTuple)
palloc(IndexTupleSize(itup));memcpy(instup[0],itup, IndexTupleSize(itup));
 
ret = gistlayerinsert(r, GISTP_ROOT, &instup, &len, res, giststate);if (ret & SPLITED)    gistnewroot(r, instup, len);
for (i = 0; i < len; i++)    pfree(instup[i]);pfree(instup);

I only understand maybe 5% of what's going on here, but won't it be a
problem if len > 1 after the call to gistlayerinsert()?  It looked like
it might be possible that len > 1 if gistSplit() happens.

-- 
Itai Zukerman  <http://www.math-hat.com/~zukerman/>


pgsql-hackers by date:

Previous
From: Rod Taylor
Date:
Subject: Re: Foreign key quandries
Next
From: Stephan Szabo
Date:
Subject: Re: Foreign key quandries