On Fri, Aug 1, 2025 at 11:58 PM Alexandra Wang
<alexandra.wang.oss@gmail.com> wrote:
> While reviewing the code, the following diff concerns me:
> if (joinrel->consider_parallel &&
> - save_jointype != JOIN_UNIQUE_OUTER &&
> - save_jointype != JOIN_FULL &&
> - save_jointype != JOIN_RIGHT &&
> - save_jointype != JOIN_RIGHT_ANTI &&
> + jointype != JOIN_FULL &&
> + jointype != JOIN_RIGHT &&
> + jointype != JOIN_RIGHT_ANTI &&
> outerrel->partial_pathlist != NIL &&
> bms_is_empty(joinrel->lateral_relids))
>
> What has changed that enabled JOIN_UNIQUE_OUTER to handle partial
> paths? Or is it no longer possible for the outer path to be partial?
It's the latter, as indicated by the Assert in create_unique_paths():
+ /*
+ * There shouldn't be any partial paths for the unique relation;
+ * otherwise, we won't be able to properly guarantee uniqueness.
+ */
+ Assert(unique_rel->partial_pathlist == NIL);
Thanks
Richard