Re: Inconsistent nullingrels due to oversight in deconstruct_distribute_oj_quals

2023-02-10 Thread Tom Lane
Richard Guo writes: > However, for 'above_sjinfo' case, we should not use > othersj->syn_righthand, because othersj->syn_righthand contains relids > in sjinfo's righthand which should not be nulled by othersj after the > commutation. It seems what we should use here is sjinfo->syn_lefthand. I h

Re: Inconsistent nullingrels due to oversight in deconstruct_distribute_oj_quals

2023-02-10 Thread Richard Guo
On Fri, Feb 10, 2023 at 11:08 AM Richard Guo wrote: > On Thu, Feb 9, 2023 at 11:55 PM Tom Lane wrote: > >> Richard Guo writes: >> > This query would trigger the Assert() in search_indexed_tlist_for_var. >> > So I wonder that we should use othersj->syn_righthand here. >> >> There are two such ca

Re: Inconsistent nullingrels due to oversight in deconstruct_distribute_oj_quals

2023-02-09 Thread Richard Guo
On Thu, Feb 9, 2023 at 11:55 PM Tom Lane wrote: > Richard Guo writes: > > This query would trigger the Assert() in search_indexed_tlist_for_var. > > So I wonder that we should use othersj->syn_righthand here. > > There are two such calls in deconstruct_distribute_oj_quals ... > don't they both n

Re: Inconsistent nullingrels due to oversight in deconstruct_distribute_oj_quals

2023-02-09 Thread Tom Lane
I wrote: > Richard Guo writes: >> It seems to me there is oversight here. Actually in next level up this >> othersj would null all the relids in its syn_righthand, not only the >> relids in its min_righthand. > Good point. I think this code originated before it was clear to me > that nullingrel

Re: Inconsistent nullingrels due to oversight in deconstruct_distribute_oj_quals

2023-02-09 Thread Tom Lane
Richard Guo writes: > It seems to me there is oversight here. Actually in next level up this > othersj would null all the relids in its syn_righthand, not only the > relids in its min_righthand. Good point. I think this code originated before it was clear to me that nullingrels would need to fo