[PATCH] Add support for SAOP in the optimizer for partial index paths
| От | Jim Vanns |
|---|---|
| Тема | [PATCH] Add support for SAOP in the optimizer for partial index paths |
| Дата | |
| Msg-id | CA+PSi_-rsp8hvP-wUJrLirKE1nw+7Q0kqqkvU_EyNOD3ZuZ3CQ@mail.gmail.com обсуждение исходный текст |
| Список | pgsql-hackers |
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
Вложения
В списке pgsql-hackers по дате отправления: