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

From: Jim Vanns <james(dot)vanns(at)gmail(dot)com>
To: pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: [PATCH] Add support for SAOP in the optimizer for partial index paths
Date: 2026-01-02 14:14:03
Message-ID: CA+PSi_9K+b47impB5BYv_ZWCmZ0KCL+uG12nAMgVi4w2r4vvzg@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Just another gentle nudge in the home somebody might bite. I rebased
it into master again this morning and that all worked fine, so I don't
think there is any clashing code, yet. I'm happy to address feedback
etc. where guided.

Cheers

Jim

On Fri, 5 Dec 2025 at 14:59, Jim Vanns <james(dot)vanns(at)gmail(dot)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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Andres Freund 2026-01-02 14:25:15 Re: [PATCH] aio: Refactor to deduplicate shared and local completion callbacks
Previous Message Henson Choi 2026-01-02 13:23:39 Re: SQL Property Graph Queries (SQL/PGQ)