From: Tom Lane <tgl@sss.pgh.pa.us>
To: Heikki Linnakangas <heikki.linnakangas@iki.fi>
Cc: pgsql-hackers@postgresql.org
Subject: Re: [COMMITTERS] pgsql: Allow GiST distance function to return merely a lower-bound.
Date: Sat, 23 May 2015 15:35:21 -0400
Message-ID: <31465.1432409721@sss.pgh.pa.us> (raw)
In-Reply-To: <E1YtDlp-0002at-3o@gemulon.postgresql.org>
References: <E1YtDlp-0002at-3o@gemulon.postgresql.org>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-hackers>
Heikki Linnakangas <heikki.linnakangas@iki.fi> writes:
> Allow GiST distance function to return merely a lower-bound.
I wondered how come this patch did not touch nodeIndexonlyscan.c.
After some investigation, it seems the only reason that this patch even
appears to work is that none of the built-in or contrib opclasses support
both lossy ordering operators and GIST fetch functions. Otherwise we
would do an index-only scan and the executor would simply ignore the
recheck flag.
I doubt we can ship this in this state; even if the core code doesn't
exercise the problematic combination, surely third-party opclasses
will want to?
I thought about hacking the planner to not select index-only scans,
but there's no way for it to know whether the opclass might return
recheck = true at runtime. I think the only real fix is to actually
propagate all the changes in nodeIndexscan.c into nodeIndexonlyscan.c.
Testing it would be problematic without a suitable opclass, though :-(
A short-term hack might be to throw a "not implemented" error in
nodeIndexonlyscan.c if it sees the distance-recheck flag set.
regards, tom lane
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers
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 using the --to and --cc options:
reply via email
To: pgsql-committers@postgresql.org
Cc: tgl@sss.pgh.pa.us, heikki.linnakangas@iki.fi, pgsql-hackers@postgresql.org
Subject: Re: [COMMITTERS] pgsql: Allow GiST distance function to return merely a lower-bound.
In-Reply-To: <31465.1432409721@sss.pgh.pa.us>
* 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