pgsql: Support GiST index support functions that want to cache data acr

Поиск
Список
Период
Сортировка
От Tom Lane
Тема pgsql: Support GiST index support functions that want to cache data acr
Дата
Msg-id E1R9mpL-00062S-NB@gemulon.postgresql.org
обсуждение исходный текст
Список pgsql-committers
Support GiST index support functions that want to cache data across calls.

pg_trgm was already doing this unofficially, but the implementation hadn't
been thought through very well and leaked memory.  Restructure the core
GiST code so that it actually works, and document it.  Ordinarily this
would have required an extra memory context creation/destruction for each
GiST index search, but I was able to avoid that in the normal case of a
non-rescanned search by finessing the handling of the RBTree.  It used to
have its own context always, but now shares a context with the
scan-lifespan data structures, unless there is more than one rescan call.
This should make the added overhead unnoticeable in typical cases.

Branch
------
master

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

Modified Files
--------------
doc/src/sgml/gist.sgml              |   46 ++++++++++-----
src/backend/access/gist/gist.c      |   72 ++++++++++++++++--------
src/backend/access/gist/gistbuild.c |   42 +++++++-------
src/backend/access/gist/gistget.c   |    4 +-
src/backend/access/gist/gistscan.c  |  107 +++++++++++++++++++++++++++++-----
src/include/access/gist_private.h   |   17 ++++-
6 files changed, 206 insertions(+), 82 deletions(-)


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: pgsql: Fix recursion into previously planned sub-query in examine_simpl
Следующее
От: Tom Lane
Дата:
Сообщение: pgsql: Cache the result of makesign() across calls of gtrgm_penalty().