Re: BUG #18526: 'UPDATE' inconsistency using index scan with 'NOT EXIST' after upgrading to PostgreSQL 16

From: Feliphe Pozzer <feliphepozzer(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-bugs(at)lists(dot)postgresql(dot)org, Richard Guo <guofenglinux(at)gmail(dot)com>
Subject: Re: BUG #18526: 'UPDATE' inconsistency using index scan with 'NOT EXIST' after upgrading to PostgreSQL 16
Date: 2024-06-28 20:32:38
Message-ID: CAEXQvp3i3tzdm+wUACiB5u+KOyzuUmU1=1wqc_D-6hSSMnqHgQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Hello Tom, I applied the patch you suggested, and it appears that the issue
has been resolved.

Em sex., 28 de jun. de 2024 às 16:45, Feliphe Pozzer <
feliphepozzer(at)gmail(dot)com> escreveu:

> I am currently in the process of familiarizing myself with the steps
> required to compile and run the PostgreSQL code. As this will take some
> time, I wanted to let you know that I will begin testing the patch as soon
> as I am ready. Thank you for your understanding and patience.
>
> Em sex., 28 de jun. de 2024 às 16:13, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
> escreveu:
>
>> PG Bug reporting form <noreply(at)postgresql(dot)org> writes:
>> > Expected Result: All records that meet the criteria should be updated
>> > regardless of using index scan or seq scan.
>> > Actual Result: When PostgreSQL 16 uses index scan, it fails to find and
>> > update all records. By changing random_page_cost to a value that forces
>> the
>> > use of seq scan, all records are updated correctly.
>>
>> I see that the problematic plan involves a Merge Right Anti Join step,
>> which makes me guess that this is the same bug recently reported in
>>
>>
>> https://www.postgresql.org/message-id/flat/18522-c7a8956126afdfd0%40postgresql.org
>>
>> Are you in a position to try the patch posted in that thread?
>>
>> regards, tom lane
>>
>

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2024-06-28 20:38:23 Re: BUG #18526: 'UPDATE' inconsistency using index scan with 'NOT EXIST' after upgrading to PostgreSQL 16
Previous Message Feliphe Pozzer 2024-06-28 19:45:15 Re: BUG #18526: 'UPDATE' inconsistency using index scan with 'NOT EXIST' after upgrading to PostgreSQL 16