summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPavan Deolasee2017-06-15 05:26:14 +0000
committerPavan Deolasee2017-06-15 05:26:14 +0000
commitfeaba753951ee1749390242192d53e2e2560e0b0 (patch)
tree4a488bf999c27ea9eead4a18522d7522d8cbd5c5
parent140c2f2cb9a0474f8257fbbf0f306c766090a36e (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.c3
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)