Re: Clause accidentally pushed down ( Possible bug in Making Vars outer-join aware)

From: Andrey Lepikhov <a(dot)lepikhov(at)postgrespro(dot)ru>
To: Richard Guo <guofenglinux(at)gmail(dot)com>
Cc: PostgreSQL mailing lists <pgsql-bugs(at)lists(dot)postgresql(dot)org>
Subject: Re: Clause accidentally pushed down ( Possible bug in Making Vars outer-join aware)
Date: 2023-02-27 08:39:29
Message-ID: c69bd07e-1175-10da-9ac0-4bfe59235ac2@postgrespro.ru
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On 27/2/2023 13:16, Richard Guo wrote:
>
> On Mon, Feb 27, 2023 at 2:23 PM Andrey Lepikhov
> <a(dot)lepikhov(at)postgrespro(dot)ru <mailto:a(dot)lepikhov(at)postgrespro(dot)ru>> wrote:
>
> Doing a comparison of pg15 and master initsplan.c I found that a clear
> and documented algorithm for delaying the application of a qual is lost
> or replaced with some commute_* fields.
> It is not clear how we guarantee correct application delay of a qual.
> Which part of the code implements it now?
>
> 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.
relnode.c::build_joinrel_tlist() adds relid into varnullingrels only in
the case when the var exists in the target list. So, other joins, which
don't have links to the var, don't get into the bitmapset too.

--
regards,
Andrey Lepikhov
Postgres Professional

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message niraj nandane 2023-02-27 10:32:42 Regarding backpatching to v14
Previous Message Richard Guo 2023-02-27 08:16:33 Re: Clause accidentally pushed down ( Possible bug in Making Vars outer-join aware)