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

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Teach SP-GiST to do index-only scans.
Date: 2011-12-19 19:58:52
Message-ID: E1RcjMK-0001qt-E3@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Alvaro Herrera 2011-12-19 20:31:42 pgsql: Allow CHECK constraints to be declared ONLY
Previous Message Tom Lane 2011-12-18 20:50:47 pgsql: Replace simple constant pg_am.amcanreturn with an AM support fun