]> granicus.if.org Git - postgresql/commit
Change the way the offset of downlink is stored in GISTInsertStack.
authorHeikki Linnakangas <heikki.linnakangas@iki.fi>
Fri, 15 Jul 2011 09:11:17 +0000 (12:11 +0300)
committerHeikki Linnakangas <heikki.linnakangas@iki.fi>
Fri, 15 Jul 2011 09:18:30 +0000 (12:18 +0300)
commit8d260911e8de9c3e55bfcc4b4b9f0b5848a5c9f7
treeda5f81c94435c9d45874d58c49a555affd9d8380
parentbc175eb8051510a3edd2a561fcfac476e511177c
Change the way the offset of downlink is stored in GISTInsertStack.
GISTInsertStack.childoffnum used to mean "offset of the downlink in this
node, pointing to the child node in the stack". It's now replaced with
downlinkoffnum, which means "offset of the downlink in the parent of this
node". gistFindPath() already used childoffnum with this new meaning, and
had an extra step at the end to pull all the childoffnum values down one
node in the stack, to adjust the stack for the meaning that childoffnum had
elsewhere. That's no longer required.

The reason to do this now is this new representation is more convenient for
the GiST fast build patch that Alexander Korotkov is working on.

While we're at it, replace the linked list used in gistFindPath with a
standard List, and make gistFindPath() static.

Alexander Korotkov, with some changes by me.
src/backend/access/gist/gist.c
src/include/access/gist_private.h