diff options
Diffstat (limited to 'src/backend/executor/nodeAppend.c')
-rw-r--r-- | src/backend/executor/nodeAppend.c | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/src/backend/executor/nodeAppend.c b/src/backend/executor/nodeAppend.c index a4eef19d7f4..6a2daa6e767 100644 --- a/src/backend/executor/nodeAppend.c +++ b/src/backend/executor/nodeAppend.c @@ -1082,16 +1082,18 @@ ExecAppendAsyncEventWait(AppendState *node) { AsyncRequest *areq = (AsyncRequest *) w->user_data; - /* - * Mark it as no longer needing a callback. We must do this - * before dispatching the callback in case the callback resets the - * flag. - */ - Assert(areq->callback_pending); - areq->callback_pending = false; - - /* Do the actual work. */ - ExecAsyncNotify(areq); + if (areq->callback_pending) + { + /* + * Mark it as no longer needing a callback. We must do this + * before dispatching the callback in case the callback resets + * the flag. + */ + areq->callback_pending = false; + + /* Do the actual work. */ + ExecAsyncNotify(areq); + } } } } |