Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitbde39ee

Browse files
committed
Fix a couple of bugs in recent parallelism-related commits.
Commit816e336 added the wrong errorcheck to async.c; sending restrictions is restricted to the leader,not altogether unsafe.Commit3bd909b added ExecShutdownNodeto traverse the planstate tree and call shutdown functions, but madea Gather node, the only node that actually has such a function, abortthe tree traversal, which is wrong.
1 parent1a219fa commitbde39ee

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed

‎src/backend/commands/async.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,7 @@
117117
#include<unistd.h>
118118
#include<signal.h>
119119

120+
#include"access/parallel.h"
120121
#include"access/slru.h"
121122
#include"access/transam.h"
122123
#include"access/xact.h"
@@ -544,8 +545,8 @@ Async_Notify(const char *channel, const char *payload)
544545
Notification*n;
545546
MemoryContextoldcontext;
546547

547-
if (IsInParallelMode())
548-
elog(ERROR,"cannot send notificationsduring a paralleloperation");
548+
if (IsParallelWorker())
549+
elog(ERROR,"cannot send notificationsfrom a parallelworker");
549550

550551
if (Trace_notify)
551552
elog(DEBUG1,"Async_Notify(%s)",channel);

‎src/backend/executor/execProcnode.c

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -804,10 +804,7 @@ ExecShutdownNode(PlanState *node)
804804
switch (nodeTag(node))
805805
{
806806
caseT_GatherState:
807-
{
808-
ExecShutdownGather((GatherState*)node);
809-
return true;
810-
}
807+
ExecShutdownGather((GatherState*)node);
811808
break;
812809
default:
813810
break;

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp