From: Tom Lane <tgl@sss.pgh.pa.us>
To: Andrey Lepikhov <a.lepikhov@postgrespro.ru>
Cc: Richard Guo <guofenglinux@gmail.com>
Cc: PostgreSQL mailing lists <pgsql-bugs@lists.postgresql.org>
Subject: Re: Clause accidentally pushed down ( Possible bug in Making Vars outer-join aware)
Date: Mon, 27 Feb 2023 14:02:18 -0500
Message-ID: <402433.1677524538@sss.pgh.pa.us> (raw)
In-Reply-To: <c69bd07e-1175-10da-9ac0-4bfe59235ac2@postgrespro.ru>
References: <0b819232-4b50-f245-1c7d-c8c61bf41827@postgrespro.ru>
<CAMbWs4_HJNuLv9HDReEBDrQrCPV-uqpVOecoJkurprnY+Do9Fg@mail.gmail.com>
<CAMbWs4_8EZU4DetHyZGm1CwCxUhBdWpRnA9dtM-Z82i=bVKA6A@mail.gmail.com>
<CAMbWs4_XcPHqc=A=36cxvJRhkjAgEeJtOFLOnBPEfQYGqnGOCw@mail.gmail.com>
<efb33bee-145d-95a8-1048-2e7b8f282e2c@postgrespro.ru>
<CAMbWs48FHw_tTXSbA-_MPaeu7S7JCt6Xs-gxwkx=pvLiwC6eTg@mail.gmail.com>
<c69bd07e-1175-10da-9ac0-4bfe59235ac2@postgrespro.ru>
Andrey Lepikhov <a.lepikhov@postgrespro.ru> writes:
> On 27/2/2023 13:16, Richard Guo wrote:
>> Do you mean function check_outerjoin_delay()? Yes it has been removed
>> in b448f1c8, since now we consider that outer joins listed in
>> varnullingrels or phnullingrels are used in the clause, so that the
>> clause would not be placed below outer joins that should null some of
>> its vars.
> I see. But these logics looks non-equivalent.
They're not meant to be equivalent. The new code should be more
flexible and more trustworthy --- in particular, there's nothing that
didn't suck about the old outerjoin_delayed mechanism. Before we had
only a very ad-hoc model of where outer-join quals could be evaluated.
I've spent the last sixteen years living in fear that somebody would
find a bug in it that couldn't be fixed without making many plans
disastrously worse. Now we have something that actually faithfully
represents where quals can be evaluated and why.
Admittedly the new stuff is having more teething pains than I'd hoped
for, but we'll work through it. Most of the bugs are stemming from
the fact that we now need a rigorous representation of what is
happening when we commute outer joins per identity 3, and we're
finding out that we are not quite there yet.
regards, tom lane
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, a.lepikhov@postgrespro.ru, guofenglinux@gmail.com, pgsql-bugs@lists.postgresql.org
Subject: Re: Clause accidentally pushed down ( Possible bug in Making Vars outer-join aware)
In-Reply-To: <402433.1677524538@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