Re: Let an ordering index scan hand its ORDER BY value to the target list

From: Greg Burd <greg(at)burd(dot)me>
To: Oleg Bartunov <obartunov(at)postgrespro(dot)ru>
Cc: Matthias van de Meent <boekewurm+postgres(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, Heikki Linnakangas <hlinnaka(at)iki(dot)fi>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Chris Cleveland <ccleveland(at)dieselpoint(dot)com>
Subject: Re: Let an ordering index scan hand its ORDER BY value to the target list
Date: 2026-11-06 18:36:04
Message-ID: au4d8NM7cLUMjMd5@werk
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hello,

v13 attached, rebased on master (f8cabd1f175). It has two small
cleanups and no change in behavior:

* plannodes.h: the comment on IndexScan.indexorderbyexact now says
that setrefs.c replaces only float8 and float4 ORDER BY
expressions. (0002)

* createplan.c: create_append_child_plan() ends with
change_plan_targetlist() instead of repeating its logic. (0007)

The other six patches are the same as in v12. Each patch builds
without warnings and passes the regress, isolation and btree_gist
suites on its own. The series passes the full test suite with TAP
tests, the PG_TEST_EXTRA suites, and the running-server pass.

The commitfest started on the 1st, and the entry still has no
reviewer. Matthias, Oleg: if either of you has time, 0001 and 0002
are where to start. 0001 is a geometry fix that stands on its own:
the point-to-box distance is now exact, so GiST and SP-GiST kNN scans
return rows in the operator's order. 0002 adds the interface Oleg
tested. The rest builds on those two.

best.

-greg

Attachment Content-Type Size
v13-0006-Let-an-index-only-scan-win-on-the-index-expressi.patch text/x-patch 14.7 KB
v13-0005-Don-t-charge-an-index-only-scan-for-index-expres.patch text/x-patch 8.6 KB
v13-0008-Carry-index-computed-values-through-outer-joins-.patch text/x-patch 55.3 KB
v13-0001-Compute-the-distance-between-a-point-and-a-box-e.patch text/x-patch 22.5 KB
v13-0002-Let-an-ordering-index-scan-hand-its-ORDER-BY-val.patch text/x-patch 61.8 KB
v13-0004-Let-an-ordering-index-scan-below-a-join-emit-its.patch text/x-patch 20.1 KB
v13-0003-Don-t-charge-an-ordering-index-scan-for-ORDER-BY.patch text/x-patch 24.1 KB
v13-0007-Carry-index-computed-values-up-through-joins-and.patch text/x-patch 89.6 KB

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Greg Burd 2026-11-06 18:42:44 Re: Tepid: selective index updates for heap relations
Previous Message Greg Burd 2026-11-06 18:31:57 Re: ZSTD TOAST compression, and an extensible compression method encoding