@@ -4264,16 +4264,15 @@ postgresGetForeignJoinPaths(PlannerInfo *root,
4264
4264
fpinfo -> attrs_used = NULL ;
4265
4265
4266
4266
/*
4267
- * In case there is a possibility that EvalPlanQual will be executed, we
4268
- * should be able to reconstruct the row, from base relations applying all
4269
- * the conditions. We create a local plan from a suitable local path
4270
- * available in the path list. In case such a path doesn't exist, we can
4271
- * not push the join to the foreign server since we won't be able to
4267
+ * If there is a possibility that EvalPlanQual will be executed, we need
4268
+ * to be able to reconstruct the row using scans of the base relations.
4269
+ * GetExistingLocalJoinPath will find a suitable path for this purpose in
4270
+ * the path list of the joinrel, if one exists. We must be careful to
4271
+ * call it before adding any ForeignPath, since the ForeignPath might
4272
+ * dominate the only suitable local path available. We also do it before
4272
4273
* reconstruct the row for EvalPlanQual(). Find an alternative local path
4273
- * before we add ForeignPath, lest the new path would kick possibly the
4274
- * only local path. Do this before calling foreign_join_ok(), since that
4275
- * function updates fpinfo and marks it as pushable if the join is found
4276
- * to be pushable.
4274
+ * calling foreign_join_ok(), since that function updates fpinfo and marks
4275
+ * it as pushable if the join is found to be pushable.
4277
4276
*/
4278
4277
if (root -> parse -> commandType == CMD_DELETE ||
4279
4278
root -> parse -> commandType == CMD_UPDATE ||
0 commit comments