Re: [PATCH] Add support for SAOP in the optimizer for partial index paths

Jim Vanns <james.vanns@gmail.com>

From: Jim Vanns <james.vanns@gmail.com>
To: pgsql-hackers@lists.postgresql.org
Date: 2025-12-15T10:22:49Z
Lists: pgsql-hackers

Commits

Same data as JSON: GET /api/v1/messages/:b64id/commits the thread's linked commits as JSON, with link sources. API reference →
  1. Fix setting next multixid's offset at offset wraparound

Hello again,

Hope you don't mind me bumping this a little, but I wondered if I
should have requested a shepherd/mentor in getting this patch through
the review process? Or await a commitfest?

Cheers,

Jim

On Fri, 5 Dec 2025 at 14:59, Jim Vanns <james.vanns@gmail.com> wrote:
>
> Hi Postgres hackers,
>
> This is my first patch to the project and I've been sitting on it for 6 months!
>
> This patch was produced via:
>
> git diff -p -U 4d936c3fff1ac8dead2cc240ba3da2ed6337257c
>
> The branch point was 4d936c3fff1ac8dead2cc240ba3da2ed6337257c (master as of 05/12/2025 1445 GMT)
>
> The patch, though a single diff, was generated from 7 logically distinct commits (feature, tests, expected output etc.).
>
> I hope I've read the submission guides sufficiently. The code change was based heavily on the existing code in indxpath.c.
>
> Here's a summary of the feature:
>
>     Prior to this patch, only BitmapOr paths were considered for partial
>     indexes. With this patch, we now support ScalarArrayOpExpr clauses
>     too (i.e. ANY() and IN()).
>
>     I found no entry for this feature in the TODO list here;
>     - https://wiki.postgresql.org/wiki/Todo
>
>     However, it has previously been reported/raised here;
>     - https://www.postgresql.org/message-id/flat/c128bd06-a246-4129-914c-3dee7b13417a%40vondra.me#5b3f3b7e90d6de8c39a095afaea6b460
>
>     The new function, generate_bitmap_saop_paths, was largely based on the
>     existing generate_bitmap_or_paths() function while also glancing at
>     other array handling code such as that found in backend/utils/adt/xml.c
>     plus some additional false-starts in backend/optimizer/util/predtest.c
>
>     The C code was formatted via;
>     src/tools/pgindent/pgindent --indent=src/tools/pg_bsd_indent/pg_bsd_indent
>
> Cheers,
>
> Jim Vanns