Re: BUG #17975: Nested Loop Index Scan returning wrong result - Mailing list pgsql-bugs

From David Rowley
Subject Re: BUG #17975: Nested Loop Index Scan returning wrong result
Date
Msg-id CAApHDvo4s_1TzzYzd5VKgfrnPpOm18HBT544L=xTv0jcVrqFXg@mail.gmail.com
Whole thread Raw
In response to Re: BUG #17975: Nested Loop Index Scan returning wrong result  (David Rowley <dgrowleyml@gmail.com>)
List pgsql-bugs
On Thu, 15 Jun 2023 at 16:33, David Rowley <dgrowleyml@gmail.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

pgsql-bugs by date:

Previous
From: Thomas Munro
Date:
Subject: Re: BUG #17949: Adding an index introduces serialisation anomalies.
Next
From: Thomas Munro
Date:
Subject: Re: BUG #17949: Adding an index introduces serialisation anomalies.