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