forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commitd1996ed
committed
Change the way parent pages are tracked during buffered GiST build.
We used to mimic the way a stack is constructed when descending the treeduring normal GiST inserts, but that was quite complicated during a bufferedbuild. It was also wrong: in GiST, the left-to-right relationships ondifferent levels might not match each other, so that when you know theparent of a child page, you won't necessarily find the parent of the page tothe right of the child page by following the rightlinks at the parent level.This sometimes led to "could not re-find parent" errors while building aGiST index.We now use a simple hash table to track the parent of every internal page.Whenever a page is split, and downlinks are moved from one page to another,we update the hash table accordingly. This is also better for performancethan the old method, as we never need to move right to re-find the parentpage, which could take a significant amount of time for buffers that werecreated much earlier in the index build.1 parentbe02b16 commitd1996ed
File tree
3 files changed
+317
-286
lines changed- src
- backend/access/gist
- include/access
3 files changed
+317
-286
lines changed0 commit comments
Comments
(0)