pgsql: Restructure SPGiST opclass interface API to support whole-index

Поиск
Список
Период
Сортировка
От Tom Lane
Тема pgsql: Restructure SPGiST opclass interface API to support whole-index
Дата
Msg-id E1S6VqV-0002eI-IY@gemulon.postgresql.org
обсуждение исходный текст
Список pgsql-committers
Restructure SPGiST opclass interface API to support whole-index scans.

The original API definition was incapable of supporting whole-index scans
because there was no way to invoke leaf-value reconstruction without
checking any qual conditions.  Also, it was inefficient for
multiple-qual-condition scans because value reconstruction got done over
again for each qual condition, and because other internal work in the
consistent functions likewise had to be done for each qual.  To fix these
issues, pass the whole scankey array to the opclass consistent functions,
instead of only letting them see one item at a time.  (Essentially, the
loop over scankey entries is now inside the consistent functions not
outside them.  This makes the consistent functions a bit more complicated,
but not unreasonably so.)

In itself this commit does nothing except save a few cycles in
multiple-qual-condition index scans, since we can't support whole-index
scans on SPGiST indexes until nulls are included in the index.  However,
I consider this a must-fix for 9.2 because once we release it will get
very much harder to change the opclass API definition.

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/03e56f798e365763486b03a2630fbc3190ccd29a

Modified Files
--------------
doc/src/sgml/spgist.sgml                    |   38 +++-
src/backend/access/spgist/spgkdtreeproc.c   |  188 ++++++---------
src/backend/access/spgist/spgquadtreeproc.c |  240 +++++++++----------
src/backend/access/spgist/spgscan.c         |  345 +++++++++++++--------------
src/backend/access/spgist/spgtextproc.c     |  218 +++++++++--------
src/include/access/spgist.h                 |    8 +-
src/include/access/spgist_private.h         |    6 +-
7 files changed, 517 insertions(+), 526 deletions(-)


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

Предыдущее
От: Peter Eisentraut
Дата:
Сообщение: pgsql: Add support for renaming constraints
Следующее
От: Peter Eisentraut
Дата:
Сообщение: pgsql: ecpg: Fix off-by-one error in memory copying