pg.ddx.io pgsql-bugs@postgresql.org mailing list archive
help / color / mirror / Atom feed From: Tom Lane <tgl@sss.pgh.pa.us>
To: David Rowley <dgrowleyml@gmail.com>
Cc: Andres Freund <andres@anarazel.de>
Cc: tel@jklm.no, pgsql-bugs@lists.postgresql.org, Peter Geoghegan <pg@bowt.ie>
Subject: Re: BUG #17975: Nested Loop Index Scan returning wrong result
Date: Wed, 14 Jun 2023 20:50:53 -0400
Message-ID: <2031445.1686790253@sss.pgh.pa.us> (raw )
In-Reply-To: <CAApHDvovtq_G-R+++37xHW0LMhmMGkow7cjY6xwxZ8CLUS=HJg@mail.gmail.com >
References: <17975-98a90c156f25c952@postgresql.org >
<20230614203651.hyc4cjdzhgrg3pav@awork3.anarazel.de >
<20230614211231.pudg2y2rz6az2vij@awork3.anarazel.de >
<20230614224928.l255k2okc3ms3iph@awork3.anarazel.de >
<2020235.1686783768@sss.pgh.pa.us >
<20230614235711.x2ffx54zi7mnt6ho@awork3.anarazel.de >
<2026451.1686787166@sss.pgh.pa.us >
<CAApHDvrewBui0hCXSEaR=X4Tpyo3hRZu6kTRuf4r4kGEA3LC9g@mail.gmail.com >
<2029337.1686788900@sss.pgh.pa.us >
<CAApHDvovtq_G-R+++37xHW0LMhmMGkow7cjY6xwxZ8CLUS=HJg@mail.gmail.com >
David Rowley <dgrowleyml@gmail.com> writes:
> On Thu, 15 Jun 2023 at 12:28, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> I concur that we'd better just not use partial indexes in
>> relation_has_unique_index_for.
> I wonder if that's ok for a backpatch. This affects both left join
> removals and unique joins. Seems like suddenly making a left join
> removal not work might cause someone some pain.
I kind of doubt that this will affect any large number of users.
If it did, we'd have had reports sooner.
> Is it worth trying to jam in a new boolean field into IndexOptInfo
> into some spare padding to that we run predicate_implied_by() just
> using baserestrictinfo and use those in
> relation_has_unique_index_for()?
How will that work with the caching in innerrel_is_unique?
I also seriously doubt that we can make such a thing work
without adding parameters to any externally-visible functions.
regards, tom lane
view thread (18+ messages) latest in thread
Message-ID: <2031445.1686790253@sss.pgh.pa.us>
Permalink: ../2031445.1686790253@sss.pgh.pa.us/
Also on: postgresql.org/message-id/2031445.1686790253@sss.pgh.pa.us
copy link · copy postgr.es
reply Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-bugs@postgresql.org
Cc: tgl@sss.pgh.pa.us, dgrowleyml@gmail.com, andres@anarazel.de, pg@bowt.ie
Subject: Re: BUG #17975: Nested Loop Index Scan returning wrong result
In-Reply-To: <2031445.1686790253@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox