diff options
Diffstat (limited to 'src/backend/commands/async.c')
-rw-r--r-- | src/backend/commands/async.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/backend/commands/async.c b/src/backend/commands/async.c index 3657d693bf8..5059e3de927 100644 --- a/src/backend/commands/async.c +++ b/src/backend/commands/async.c @@ -117,6 +117,7 @@ #include <unistd.h> #include <signal.h> +#include "access/parallel.h" #include "access/slru.h" #include "access/transam.h" #include "access/xact.h" @@ -544,8 +545,8 @@ Async_Notify(const char *channel, const char *payload) Notification *n; MemoryContext oldcontext; - if (IsInParallelMode()) - elog(ERROR, "cannot send notifications during a parallel operation"); + if (IsParallelWorker()) + elog(ERROR, "cannot send notifications from a parallel worker"); if (Trace_notify) elog(DEBUG1, "Async_Notify(%s)", channel); |