mirror of
https://github.com/postgres/postgres.git
synced 2025-06-13 07:41:39 +03:00
Fix a couple of bugs in recent parallelism-related commits.
Commit816e336f12
added the wrong error check to async.c; sending restrictions is restricted to the leader, not altogether unsafe. Commit3bd909b220
added ExecShutdownNode to traverse the planstate tree and call shutdown functions, but made a Gather node, the only node that actually has such a function, abort the tree traversal, which is wrong.
This commit is contained in:
@ -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);
|
||||
|
Reference in New Issue
Block a user