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

GiST: Bug In gistdoinsert() ?

From: Itai Zukerman <zukerman(at)math-hat(dot)com>
To: pgsql-hackers(at)postgresql(dot)org
Subject: GiST: Bug In gistdoinsert() ?
Date: 2003-03-01 15:11:35
Message-ID: (view raw, whole thread or download thread mbox)
Lists: 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++)

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  <>

pgsql-hackers by date

Next:From: Stephan SzaboDate: 2003-03-01 16:06:07
Subject: Re: Foreign key quandries
Previous:From: Rod TaylorDate: 2003-03-01 14:39:20
Subject: Re: Foreign key quandries

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