pgsql: Teach SP-GiST to do index-only scans. - Mailing list pgsql-committers

From Tom Lane
Subject pgsql: Teach SP-GiST to do index-only scans.
Date
Msg-id E1RcjMK-0001qt-E3@gemulon.postgresql.org
Whole thread Raw
List pgsql-committers
Teach SP-GiST to do index-only scans.

Operator classes can specify whether or not they support this; this
preserves the flexibility to use lossy representations within an index.

In passing, move constant data about a given index into the rd_amcache
cache area, instead of doing fresh lookups each time we start an index
operation.  This is mainly to try to make sure that spgcanreturn() has
insignificant cost; I still don't have any proof that it matters for
actual index accesses.  Also, get rid of useless copying of FmgrInfo
pointers; we can perfectly well use the relcache's versions in-place.

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/92203624934095163f8b57b5b3d7bbd2645da2c8

Modified Files
--------------
doc/src/sgml/spgist.sgml                    |   15 +++
src/backend/access/spgist/spgdoinsert.c     |    9 +-
src/backend/access/spgist/spgkdtreeproc.c   |    1 +
src/backend/access/spgist/spgquadtreeproc.c |    4 +
src/backend/access/spgist/spgscan.c         |   97 +++++++++++++---
src/backend/access/spgist/spgtextproc.c     |   13 ++-
src/backend/access/spgist/spgutils.c        |  170 +++++++++++++--------------
src/include/access/spgist.h                 |    4 +
src/include/access/spgist_private.h         |   31 ++++--
src/test/regress/expected/create_index.out  |  118 +++++++++---------
10 files changed, 288 insertions(+), 174 deletions(-)


pgsql-committers by date:

Previous
From: Tom Lane
Date:
Subject: pgsql: Replace simple constant pg_am.amcanreturn with an AM support fun
Next
From: Alvaro Herrera
Date:
Subject: pgsql: Allow CHECK constraints to be declared ONLY