diff --git a/src/backend/executor/nodeWindowAgg.c b/src/backend/executor/nodeWindowAgg.c
index 676fe024965..00000000000 100644
--- a/src/backend/executor/nodeWindowAgg.c
+++ b/src/backend/executor/nodeWindowAgg.c
@@ -2749,11 +2749,23 @@ ExecInitWindowAgg(WindowAgg *node, EState *estate, int eflags)
 		}
 		if (i <= wfuncno && wfunc->ignore_nulls == perfunc[i].ignore_nulls)
 		{
+			/* TODO: remove this log before pushing */
+			elog(INFO, "WindowAgg duplicate cache hit: existing wfuncno %d, ignore_nulls %d",
+				 i, wfunc->ignore_nulls);
+
 			/* Found a match to an existing entry, so just mark it */
 			wfuncstate->wfuncno = i;
 			continue;
 		}
 
+		/* TODO: remove this log before pushing */
+		if (i <= wfuncno)
+			elog(INFO, "WindowAgg duplicate cache miss: matched wfuncno %d, ignore_nulls %d, cached ignore_nulls %d",
+				 i, wfunc->ignore_nulls, perfunc[i].ignore_nulls);
+		else
+			elog(INFO, "WindowAgg duplicate cache miss: no previous match, ignore_nulls %d",
+				 wfunc->ignore_nulls);
+
 		/* Nope, so assign a new PerAgg record */
 		perfuncstate = &perfunc[++wfuncno];
 
