pgsql: Change the way parent pages are tracked during buffered GiST bui

Поиск
Список
Период
Сортировка
От Heikki Linnakangas
Тема pgsql: Change the way parent pages are tracked during buffered GiST bui
Дата
Msg-id E1SZer5-0004IM-0S@gemulon.postgresql.org
обсуждение исходный текст
Список pgsql-committers
Change the way parent pages are tracked during buffered GiST build.

We used to mimic the way a stack is constructed when descending the tree
during normal GiST inserts, but that was quite complicated during a buffered
build. It was also wrong: in GiST, the left-to-right relationships on
different levels might not match each other, so that when you know the
parent of a child page, you won't necessarily find the parent of the page to
the 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 a
GiST 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 performance
than the old method, as we never need to move right to re-find the parent
page, which could take a significant amount of time for buffers that were
created much earlier in the index build.

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/d1996ed5e8bfaf1314e7817015668029c07d3b9b

Modified Files
--------------
src/backend/access/gist/gistbuild.c        |  500 +++++++++++++++++-----------
src/backend/access/gist/gistbuildbuffers.c |   69 +----
src/include/access/gist_private.h          |   34 +--
3 files changed, 317 insertions(+), 286 deletions(-)


В списке pgsql-committers по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: pgsql: Rewrite --section option to decouple it from --schema-only/--dat
Следующее
От: Heikki Linnakangas
Дата:
Сообщение: pgsql: Delete the temporary file used in buffered GiST build, after the