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

From: Greg Burd <greg(at)burd(dot)me>
To: pgsql-hackers(at)lists(dot)postgresql(dot)org
Cc: Oleg Bartunov <obartunov(at)postgrespro(dot)ru>
Subject: Re: Let an ordering index scan hand its ORDER BY value to the target list
Date: 2026-11-22 16:35:34
Message-ID: 179528714447.853725.9850945689955892450@burd.me
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hello,

v16 attached, rebased onto 207b5293b8d. The rebase crossed 72b480e55d7
(Fix FULL JOIN constant propagation with non-strict operands), which
added a declaration next to one of mine in clauses.h; the two are
unrelated and the join tests pass.

One change since v15:

0008: translate the Append children's extra values once per child
instead of once per child per ordering. On a wide partition hierarchy
with several child orderings the old code repeated the same per-child
translation for each ordering; now add_extras_append_ path() does it
once up front. No behavior change.

The bugs v15 fixed still stand: 0001 computes the point-to-box
distance without the NaN it produced for an infinite coordinate, and
0004 no longer hands a parallel-restricted ORDER BY value to a
worker.

I think 0001 through 0004 are ready.

best.

-greg

Attachment Content-Type Size
v16-0001-Compute-the-distance-between-a-point-and-a-box-e.patch text/x-patch 26.0 KB
v16-0002-Let-an-ordering-index-scan-hand-its-ORDER-BY-val.patch text/x-patch 69.3 KB
v16-0006-Let-an-index-only-scan-win-on-the-index-expressi.patch text/x-patch 14.7 KB
v16-0008-Carry-index-computed-values-through-outer-joins-.patch text/x-patch 55.8 KB
v16-0005-Don-t-charge-an-index-only-scan-for-index-expres.patch text/x-patch 8.6 KB
v16-0003-Don-t-charge-an-ordering-index-scan-for-ORDER-BY.patch text/x-patch 24.1 KB
v16-0004-Let-an-ordering-index-scan-below-a-join-emit-its.patch text/x-patch 20.7 KB
v16-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-22 16:52:48 Re: ZSTD TOAST compression, and an extensible compression method encoding
Previous Message Raja Sai pranav 2026-11-22 16:17:23 Re: Offline data checksum changes can cause incorrect checksum state on standbys