Re: POC, WIP: OR-clause support for indexes

From: "a(dot)rybakina" <a(dot)rybakina(at)postgrespro(dot)ru>
To: pgsql-hackers(at)postgresql(dot)org, Alexander Korotkov <aekorotkov(at)gmail(dot)com>, Peter Geoghegan <pg(at)bowt(dot)ie>
Cc: Robert Haas <robertmhaas(at)gmail(dot)com>, "Finnerty, Jim" <jfinnert(at)amazon(dot)com>, Marcos Pegoraro <marcos(at)f10(dot)com(dot)br>, Andrey Lepikhov <a(dot)lepikhov(at)postgrespro(dot)ru>, teodor(at)sigaev(dot)ru, Ranier Vilela <ranier(dot)vf(at)gmail(dot)com>, Tomas Vondra <tomas(dot)vondra(at)enterprisedb(dot)com>, Peter Eisentraut <peter(at)eisentraut(dot)org>
Subject: Re: POC, WIP: OR-clause support for indexes
Date: 2023-11-13 19:48:23
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

Hi, all!

These days I was porting a patch for converting or expressions to ANY to
the choose_bitmap_and function. Unfortunately, it is not possible to
transfer the conversion there, since expressions are processed one by
one, as far as I saw. Therefore, I tried to make the conversion earlier
in the generate_bitmap_or_paths function, there is just a loop bypass.
The patch turns out to be quite complicated, in my opinion, and to be
honest, it does not work fully yet. Also, due to the fact that the index
for the ScalarOpExpr expression is created earlier (approximately 344
lines in the src/backend/optimizer/path/indxpath.c file), we had to call
the generate_bitmap_or_paths function earlier. I haven't seen yet what
problems this could potentially lead to. Patch in the attached diff file.

In the last letter, I had an incorrect numbering for the original patch,
corrected, respectively, it is unclear whether the tests in CI were
normal. Corrected it.

Attachment Content-Type Size
v9-Replace-OR-clause-to-ANY-expressions.patch text/x-patch 35.1 KB
or_patch_bitmapindex_create.diff text/x-patch 15.0 KB

In response to


Browse pgsql-hackers by date

  From Date Subject
Next Message David Christensen 2023-11-13 20:03:36 Re: [PATCHES] Post-special page storage TDE support
Previous Message Bruce Momjian 2023-11-13 19:45:12 Re: Version 14/15 documentation Section "Alter Default Privileges"