On Wed, Jun 03, 2026 at 07:16:15PM -0500, Baji Shaik wrote:
> These functions feed into the skip-scan optimization added in
> commit 92fe23d93aa for PG18, but the existing regression coverage
> only exercises a few types (mostly int4 and varchar) on the leading
> column of multi-column indexes.
Thanks a lot for this patch. FWIW, I've noticed the gap a couple of
months ago when adding oid8 but I have not been able to get back to
it, noticing that the gap was wider than only oid8.
> The attached patch adds a small section to btree_index.sql that
> creates a two-column index (a, b) for each missing type, then runs
> forward and backward Index Only Scans with a predicate on the
> non-leading column (b). This forces the planner into a skip scan,
> which in turn calls the per-type skip-support function plus the
> increment/decrement helpers as it generates skip-array elements.
Could you add this patch to the next commit fest please at [1]?
That's to make sure that we don't forget about it when v20 opens for
business. I am sure that nobody would complain it this gets applied
on HEAD today (argument that this is an open item for v19 due to
v19?), but that's a coverage improvement so let's just do that once
REL_19_STABLE is forked.
Perhaps we could do something for the overflow cases in the increment
functions of oid, oid8, char, int8 and int4. int2_increment is
lacking entirely. For the decrement functions, we still lack
something for the overflow of int2, int8, char. You can run a
coverage report to check all that:
https://www.postgresql.org/docs/devel/regress-coverage.html
[1]: https://commitfest.postgresql.org/59/
--
Michael