From 508cb1c692f7ddd946420e73b70174e8d64c5d61 Mon Sep 17 00:00:00 2001
From: "Chao Li (Evan)" <lic@highgo.com>
Date: Thu, 5 Nov 2026 13:56:09 +0800
Subject: [PATCH v1] Clarify when ExecAppendAsyncEventWait waits or polls

Document that as_syncdone selects whether to wait for an event or poll
without waiting so synchronous execution can proceed.

Author: Chao Li <lic@highgo.com>
---
 src/backend/executor/nodeAppend.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/backend/executor/nodeAppend.c b/src/backend/executor/nodeAppend.c
index ed66855e2dd..c331ced57a3 100644
--- a/src/backend/executor/nodeAppend.c
+++ b/src/backend/executor/nodeAppend.c
@@ -1012,6 +1012,10 @@ ExecAppendAsyncRequest(AppendState *node, TupleTableSlot **result)
  *		ExecAppendAsyncEventWait
  *
  *		Wait or poll for file descriptor events and fire callbacks.
+ *
+ *		If node->as_syncdone is true, wait until at least one event
+ *		occurs; otherwise, poll without waiting so synchronous
+ *		execution can proceed.
  * ----------------------------------------------------------------
  */
 static void
-- 
2.50.1 (Apple Git-155)

