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

From Andrey Lepikhov
Subject Re: Clause accidentally pushed down ( Possible bug in Making Vars outer-join aware)
Date
Msg-id a83e8e21-ee4a-8b33-7ea5-8d0f754c8567@postgrespro.ru
Whole thread Raw
In response to Re: Clause accidentally pushed down ( Possible bug in Making Vars outer-join aware)  (Richard Guo <guofenglinux@gmail.com>)
Responses Re: Clause accidentally pushed down ( Possible bug in Making Vars outer-join aware)
List pgsql-bugs
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




pgsql-bugs by date:

Previous
From: Kyotaro Horiguchi
Date:
Subject: Re: BUG #17903: There is a bug in the KeepLogSeg()
Next
From: Daniel Gustafsson
Date:
Subject: Re: pg_basebackup: errors on macOS on directories with ".DS_Store" files