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

Commit9828905

Browse files
committed
Doc: add some commentary about ExecutorRun's NoMovement special case.
Robert Haas expressed concern about whether commit3eea7a0 exposedthe parallel-execution machinery to a case it isn't tested for, namelya second non-parallel execution of a plan after a parallel execution.Investigation shows that that can't happen because of pquery.c'smanipulation of the scan direction, but it sure wasn't obvious tostart with. Add some commentary about that.Discussion:https://postgr.es/m/CA+TgmoagyKQy=HFw+wLo0AKTYWHui+iKswZ8Jnqqd-cFby-WVg@mail.gmail.com
1 parent8b9cbf4 commit9828905

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

‎src/backend/executor/execMain.c‎

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -348,7 +348,16 @@ standard_ExecutorRun(QueryDesc *queryDesc,
348348
dest->rStartup(dest,operation,queryDesc->tupDesc);
349349

350350
/*
351-
* run plan
351+
* Run plan, unless direction is NoMovement.
352+
*
353+
* Note: pquery.c selects NoMovement if a prior call already reached
354+
* end-of-data in the user-specified fetch direction. This is important
355+
* because various parts of the executor can misbehave if called again
356+
* after reporting EOF. For example, heapam.c would actually restart a
357+
* heapscan and return all its data afresh. There is also some doubt
358+
* about whether a parallel plan would operate properly if an additional,
359+
* necessarily non-parallel execution request occurs after completing a
360+
* parallel execution. (That case should work, but it's untested.)
352361
*/
353362
if (!ScanDirectionIsNoMovement(direction))
354363
ExecutePlan(queryDesc,

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp