From: Tom Lane <tgl@sss.pgh.pa.us>
To: pgsql-committers@postgresql.org
Subject: pgsql: Support index-only scans in contrib/cube and contrib/seg GiST in
Date: Tue, 21 Nov 2017 01:25:33 +0000
Message-ID: <E1eGxJd-00013D-6P@gemulon.postgresql.org> (raw)
Support index-only scans in contrib/cube and contrib/seg GiST indexes.
To do this, we only have to remove the compress and decompress support
functions, which have never done anything more than detoasting.
In the wake of commit d3a4f89d8, this results in automatically enabling
index-only scans, since the core code will now know that the stored
representation is the same as the original data (up to detoasting).
The only exciting part of this is that ALTER OPERATOR FAMILY lacks
a way to drop a support function that was declared as being part of
an opclass rather than being loose in the family. For the moment,
we'll hack our way to a solution with a manual update of the pg_depend
entry type, which is what distinguishes the two cases. Perhaps
someday it'll be worth providing a cleaner way to do that, but for
now it seems like a very niche problem.
Note that the underlying C functions remain, to support use of the shared
libraries with older versions of the modules' SQL declarations. Someday
we may be able to remove them, but not soon.
Andrey Borodin, reviewed by me
Discussion: https://postgr.es/m/D0F53A05-4F4A-4DEC-8339-3C069FA0EE11@yandex-team.ru
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/de1d042f5979bc1388e9a6d52a4d445342b04932
Modified Files
--------------
contrib/cube/Makefile | 2 +-
contrib/cube/cube--1.3--1.4.sql | 45 ++++++++++++++++++++++++++++++++++++++++
contrib/cube/cube.control | 2 +-
contrib/cube/expected/cube.out | 22 ++++++++++++++++++++
contrib/cube/expected/cube_2.out | 22 ++++++++++++++++++++
contrib/cube/sql/cube.sql | 7 +++++++
contrib/seg/Makefile | 2 +-
contrib/seg/expected/seg.out | 28 +++++++++++++++++++++++++
contrib/seg/expected/seg_1.out | 28 +++++++++++++++++++++++++
contrib/seg/seg--1.2--1.3.sql | 45 ++++++++++++++++++++++++++++++++++++++++
contrib/seg/seg.control | 2 +-
contrib/seg/sql/seg.sql | 9 ++++++++
12 files changed, 210 insertions(+), 4 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: tgl@sss.pgh.pa.us
Subject: Re: pgsql: Support index-only scans in contrib/cube and contrib/seg GiST in
In-Reply-To: <E1eGxJd-00013D-6P@gemulon.postgresql.org>
References: <E1eGxJd-00013D-6P@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