From: Alexander Korotkov <akorotkov@postgresql.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Support for INCLUDE attributes in GiST indexes
Date: Sun, 10 Mar 2019 08:38:03 +0000
Message-ID: <E1h2ty7-0005Us-Ez@gemulon.postgresql.org> (raw)
Support for INCLUDE attributes in GiST indexes
Similarly to B-tree, GiST index access method gets support of INCLUDE
attributes. These attributes aren't used for tree navigation and aren't
present in non-leaf pages. But they are present in leaf pages and can be
fetched during index-only scan.
The point of having INCLUDE attributes in GiST indexes is slightly different
from the point of having them in B-tree. The main point of INCLUDE attributes
in B-tree is to define UNIQUE constraint over part of attributes enabled for
index-only scan. In GiST the main point of INCLUDE attributes is to use
index-only scan for attributes, whose data types don't have GiST opclasses.
Discussion: https://postgr.es/m/73A1A452-AD5F-40D4-BD61-978622FF75C1%40yandex-team.ru
Author: Andrey Borodin, with small changes by me
Reviewed-by: Andreas Karlsson
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/f2e403803fe6deb8cff59ea09dff42c6163b2110
Modified Files
--------------
doc/src/sgml/indices.sgml | 6 +-
doc/src/sgml/ref/create_index.sgml | 8 +-
doc/src/sgml/textsearch.sgml | 6 +
src/backend/access/gist/gist.c | 41 ++++-
src/backend/access/gist/gistget.c | 8 +-
src/backend/access/gist/gistscan.c | 13 +-
src/backend/access/gist/gistsplit.c | 14 +-
src/backend/access/gist/gistutil.c | 53 +++++--
src/include/access/gist_private.h | 4 +-
src/test/regress/expected/amutils.out | 4 +-
src/test/regress/expected/index_including.out | 8 +-
src/test/regress/expected/index_including_gist.out | 166 +++++++++++++++++++++
src/test/regress/parallel_schedule | 2 +-
src/test/regress/serial_schedule | 1 +
src/test/regress/sql/index_including.sql | 6 +-
src/test/regress/sql/index_including_gist.sql | 90 +++++++++++
16 files changed, 382 insertions(+), 48 deletions(-)
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: akorotkov@postgresql.org
Subject: Re: pgsql: Support for INCLUDE attributes in GiST indexes
In-Reply-To: <E1h2ty7-0005Us-Ez@gemulon.postgresql.org>
References: <E1h2ty7-0005Us-Ez@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