diff options
author | Pavan Deolasee | 2017-06-15 05:26:14 +0000 |
---|---|---|
committer | Pavan Deolasee | 2017-06-15 05:26:14 +0000 |
commit | feaba753951ee1749390242192d53e2e2560e0b0 (patch) | |
tree | 4a488bf999c27ea9eead4a18522d7522d8cbd5c5 | |
parent | 140c2f2cb9a0474f8257fbbf0f306c766090a36e (diff) |
Pass correct information to the executor.
While executing RemoteSubplan we'd accidentally set "execute_once" to true,
even though that wasn't appropriate. Correct that mistake and always use the
information in the Portal to decide whether to execute once or more.
-rw-r--r-- | src/backend/tcop/pquery.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/backend/tcop/pquery.c b/src/backend/tcop/pquery.c index 134dc6dd24..cb97be771f 100644 --- a/src/backend/tcop/pquery.c +++ b/src/backend/tcop/pquery.c @@ -2354,7 +2354,8 @@ AdvanceProducingPortal(Portal portal, bool can_wait) /* Execute query and dispatch tuples via dest receiver */ #define PRODUCE_TUPLES 100 PushActiveSnapshot(queryDesc->snapshot); - ExecutorRun(queryDesc, ForwardScanDirection, PRODUCE_TUPLES, true); + ExecutorRun(queryDesc, ForwardScanDirection, PRODUCE_TUPLES, + portal->run_once); PopActiveSnapshot(); if (queryDesc->estate->es_processed < PRODUCE_TUPLES) |