Support for INCLUDE attributes in GiST indexes
Alexander Korotkov <akorotkov@postgresql.org>
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
Files
| Path | Change | +/− |
|---|---|---|
| doc/src/sgml/indices.sgml | modified | +3 −3 |
| doc/src/sgml/ref/create_index.sgml | modified | +4 −4 |
| doc/src/sgml/textsearch.sgml | modified | +6 −0 |
| src/backend/access/gist/gist.c | modified | +36 −5 |
| src/backend/access/gist/gistget.c | modified | +5 −3 |
| src/backend/access/gist/gistscan.c | modified | +12 −1 |
| src/backend/access/gist/gistsplit.c | modified | +7 −7 |
| src/backend/access/gist/gistutil.c | modified | +40 −13 |
| src/include/access/gist_private.h | modified | +3 −1 |
| src/test/regress/expected/amutils.out | modified | +2 −2 |
| src/test/regress/expected/index_including_gist.out | added | +166 −0 |
| src/test/regress/expected/index_including.out | modified | +3 −5 |
| src/test/regress/parallel_schedule | modified | +1 −1 |
| src/test/regress/serial_schedule | modified | +1 −0 |
| src/test/regress/sql/index_including_gist.sql | added | +90 −0 |
| src/test/regress/sql/index_including.sql | modified | +3 −3 |
Documentation touched
Discussion
- Covering GiST indexes 28 messages · 2018-04-12 → 2019-03-10