Re: [PATCH v2] Fix SP-GiST index-only scans that return only INCLUDE columns

From: Peter Geoghegan <pg(at)bowt(dot)ie>
To: Bilal Kahraman <kahramannbilal(at)gmail(dot)com>
Cc: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, Rui Zhao <zhaorui126(at)gmail(dot)com>
Subject: Re: [PATCH v2] Fix SP-GiST index-only scans that return only INCLUDE columns
Date: 2026-11-19 21:10:48
Message-ID: CAH2-WzkxFtien_rdDh-OJ1CDQEy76VdgtL3UNjma3aW+xHrtCA@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, Nov 11, 2026 at 6:17 AM Bilal Kahraman <kahramannbilal(at)gmail(dot)com> wrote:
> An SP-GiST index whose opclass cannot reconstruct the key value
> (canReturnData = false) can still have INCLUDE columns, which are always
> returnable. The planner can therefore choose an index-only scan for a
> query that needs only INCLUDE columns. The scan nevertheless asks
> leaf_consistent to return the key and stores whatever comes back as the
> key column of the reconstructed tuple.

Pushed a slightly tweaked version of your patch just now.

Thanks

--
Peter Geoghegan

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Nathan Bossart 2026-11-19 21:23:32 pg_restore fails on extracted tar archives with large objects
Previous Message Hannu Krosing 2026-11-19 20:26:52 Re: ZSTD TOAST compression, and an extensible compression method encoding