diff --git a/src/backend/executor/execScan.c b/src/backend/executor/execScan.c
index 90726949a87..31ed4783c1d 100644
--- a/src/backend/executor/execScan.c
+++ b/src/backend/executor/execScan.c
@@ -134,7 +134,7 @@ ExecScanReScan(ScanState *node)
 
 			/*
 			 * If an FDW or custom scan provider has replaced the join with a
-			 * scan, there are multiple RTIs; reset the epqScanDone flag for
+			 * scan, there are multiple RTIs; reset the relsubs_done flag for
 			 * all of them.
 			 */
 			if (IsA(node->ps.plan, ForeignScan))
