Re: BUG #17975: Nested Loop Index Scan returning wrong result

From: David Rowley <dgrowleyml(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Andres Freund <andres(at)anarazel(dot)de>, tel(at)jklm(dot)no, pgsql-bugs(at)lists(dot)postgresql(dot)org, Peter Geoghegan <pg(at)bowt(dot)ie>
Subject: Re: BUG #17975: Nested Loop Index Scan returning wrong result
Date: 2023-06-20 23:01:39
Message-ID: CAApHDvo4s_1TzzYzd5VKgfrnPpOm18HBT544L=xTv0jcVrqFXg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Thu, 15 Jun 2023 at 16:33, David Rowley <dgrowleyml(at)gmail(dot)com> wrote:
> OK, I've attached a patch for just not using partial indexes as
> uniqueness proofs.

I still have concerns about not doing anything for partial unique
indexes that are predOK as far as the baserestrictinfos are concerned.
I did push the patch to disable the unique join optimisation for all
partial unique indexes for now as we do need to at least fix the bug.

I've attached another patch which adds predOKBase and uses just
baserestrictinfo quals to set that field. If we were to backpatch
something like this, we'd need to figure out how to represent this new
field in IndexOptInfo. Changing the predOK bool to a uint8 and having
3 values might be an ok method.

David

Attachment Content-Type Size
predOKBase.patch text/plain 7.7 KB

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Thomas Munro 2023-06-20 23:20:28 Re: BUG #17949: Adding an index introduces serialisation anomalies.
Previous Message Thomas Munro 2023-06-20 22:54:15 Re: BUG #17949: Adding an index introduces serialisation anomalies.