...and I would say the same logic applies to this patch, maybe even
moreso.  Tom has already applied a partial workaround for this
problem, and I'm feeling like it won't be trivial to figure out what

That partial workaround is not work for some corner cases:
http://www.sai.msu.su/~megera/wiki/2009-07-27 (8.4 already has that hask!)

The coding pattern that this patch uses also merits some discussion.
Basically, rbtree.c is a generic implementation of red-black trees -
from a textbook - which ginbulk.c then uses for GIN.  One possible
advantage of this implementation is that it might make it possible for
us to use the rbtree.c logic in other places, if we have other data
structures that need similar treatment.  But I'm not sure if that's
the way we want to go.  The other alternative is to drop the
generalized implementation and incorporate the logic directly into
ginbulk.c.  I really don't know which is better, but I'd like to hear
some other opinions...

knngist uses that implementation of rb-tree. One more candidate is a ts_stat which now uses unbalanced binary tree.

--
Teodor Sigaev                                   E-mail: teo...@sigaev.ru
                                                   WWW: http://www.sigaev.ru/

--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Reply via email to