From: Heikki Linnakangas <heikki.linnakangas@iki.fi>
To: pgsql-committers@postgresql.org
Subject: pgsql: Add support for index-only scans in GiST.
Date: Thu, 26 Mar 2015 17:12:56 +0000
Message-ID: <E1YbBKy-0000at-AF@gemulon.postgresql.org> (raw)
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-committers>
Add support for index-only scans in GiST.
This adds a new GiST opclass method, 'fetch', which is used to reconstruct
the original Datum from the value stored in the index. Also, the 'canreturn'
index AM interface function gains a new 'attno' argument. That makes it
possible to use index-only scans on a multi-column index where some of the
opclasses support index-only scans but some do not.
This patch adds support in the box and point opclasses. Other opclasses
can added later as follow-on patches (btree_gist would be particularly
interesting).
Anastasia Lubennikova, with additional fixes and modifications by me.
Branch
------
master
Details
-------
http://git.postgresql.org/pg/commitdiff/d04c8ed9044eccebce043143a930617e3998c005
Modified Files
--------------
doc/src/sgml/catalogs.sgml | 4 +-
doc/src/sgml/gist.sgml | 73 +++++++++++++-
doc/src/sgml/indexam.sgml | 15 +--
src/backend/access/gist/gist.c | 8 ++
src/backend/access/gist/gistget.c | 66 ++++++++++++-
src/backend/access/gist/gistproc.c | 37 +++++++
src/backend/access/gist/gistscan.c | 18 ++++
src/backend/access/gist/gistutil.c | 64 +++++++++++-
src/backend/access/index/indexam.c | 12 ++-
src/backend/access/spgist/spgscan.c | 1 +
src/backend/optimizer/path/indxpath.c | 22 +++--
src/backend/optimizer/util/plancat.c | 3 +-
src/include/access/genam.h | 2 +-
src/include/access/gist.h | 3 +-
src/include/access/gist_private.h | 9 +-
src/include/catalog/catversion.h | 2 +-
src/include/catalog/pg_am.h | 2 +-
src/include/catalog/pg_amproc.h | 2 +
src/include/catalog/pg_proc.h | 10 +-
src/include/nodes/relation.h | 3 +-
src/include/utils/geo_decls.h | 3 +
src/test/regress/expected/create_index.out | 70 ++++++-------
src/test/regress/expected/gist.out | 146 ++++++++++++++++++++++++++++
src/test/regress/sql/gist.sql | 73 ++++++++++++++
24 files changed, 575 insertions(+), 73 deletions(-)
--
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-committers@postgresql.org
Cc: heikki.linnakangas@iki.fi
Subject: Re: pgsql: Add support for index-only scans in GiST.
In-Reply-To: <E1YbBKy-0000at-AF@gemulon.postgresql.org>
References: <E1YbBKy-0000at-AF@gemulon.postgresql.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox