pg.ddx.io pgsql-bugs@postgresql.org mailing list archive
help / color / mirror / Atom feed From: Andrey Lepikhov <a.lepikhov@postgrespro.ru>
To: Richard Guo <guofenglinux@gmail.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: PostgreSQL mailing lists <pgsql-bugs@lists.postgresql.org>
Subject: Re: Clause accidentally pushed down ( Possible bug in Making Vars outer-join aware)
Date: Thu, 20 Apr 2023 10:06:51 +0500
Message-ID: <a83e8e21-ee4a-8b33-7ea5-8d0f754c8567@postgrespro.ru> (raw )
In-Reply-To: <CAMbWs49CB3txv_s3SwC1L2h1DiUPAn+v0-O4UFfg33b+HXNnTg@mail.gmail.com >
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 >
<402433.1677524538@sss.pgh.pa.us >
<2663884e-769a-b298-55b0-014c5a1ee55c@postgrespro.ru >
<524303.1677538463@sss.pgh.pa.us >
<999171.1677611407@sss.pgh.pa.us >
<CAMbWs4-_KdVEJ62o6KbtA+_KJnQa7WZCc48VsPQ9in6TSN0Kxg@mail.gmail.com >
<CAMbWs48atP+s4LdPF9-d7EV_ttnmTdTJwYdgGQ_dpJ34bL-WCA@mail.gmail.com >
<CAMbWs49CB3txv_s3SwC1L2h1DiUPAn+v0-O4UFfg33b+HXNnTg@mail.gmail.com >
On 4/4/23 08:00, Richard Guo wrote:
> I found a thinko in the v1 patch: we need to consider syn_righthand
> rather than min_righthand of the pushed down outer joins as we want to
> know if the Var or PHV actually comes from within the syntactically
> nullable sides. Attach v2 to fix this.
>
> I have some concerns that the new added foreach loop is too expensive to
> be doing for each Var or PHV. But maybe it's no problem since we only
> loop over pushed down joins here.
I have passed through your patch and the
'postpone-adding-pushed-down-ojrelid-to-relids' patch step-by-step. It
looks logically correct.
Honestly, I don't happy with the top patch, because it looks a bit
peculiar, but the sqlancer long test (which detected the problem before)
didn't show any problems here.
But one thought is bugging me: do we have a guarantee, what with these
Identity 3 transformations and 'delaying up to completely performed'
technique we don't lose some joininfo clauses?
--
Regards
Andrey Lepikhov
Postgres Professional
view thread (46+ messages) latest in thread
Message-ID: <a83e8e21-ee4a-8b33-7ea5-8d0f754c8567@postgrespro.ru>
Permalink: ../a83e8e21-ee4a-8b33-7ea5-8d0f754c8567@postgrespro.ru/
Also on: postgresql.org/message-id/a83e8e21-ee4a-8b33-7ea5-8d0f754c8567@postgrespro.ru
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: a.lepikhov@postgrespro.ru, guofenglinux@gmail.com, tgl@sss.pgh.pa.us, pgsql-bugs@lists.postgresql.org
Subject: Re: Clause accidentally pushed down ( Possible bug in Making Vars outer-join aware)
In-Reply-To: <a83e8e21-ee4a-8b33-7ea5-8d0f754c8567@postgrespro.ru>
* 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