On Tue, 7 May 2024 at 16:47, Richard Guo <guofengli...@gmail.com> wrote: > --- a/src/backend/optimizer/plan/initsplan.c > +++ b/src/backend/optimizer/plan/initsplan.c > @@ -1888,7 +1888,7 @@ deconstruct_distribute_oj_quals(PlannerInfo *root, > qualscope = bms_union(sjinfo->syn_lefthand, sjinfo->syn_righthand); > qualscope = bms_add_member(qualscope, sjinfo->ojrelid); > ojscope = bms_union(sjinfo->min_lefthand, sjinfo->min_righthand); > - nonnullable_rels = sjinfo->syn_lefthand; > + nonnullable_rels = bms_copy(sjinfo->syn_lefthand);
I was busy looking at this too and I came to the same conclusion. David