diff options
| author | Andrei Martsinchyk | 2015-01-07 19:04:23 +0000 |
|---|---|---|
| committer | Pavan Deolasee | 2015-04-15 05:49:15 +0000 |
| commit | 751bbb9bcc8581291b56e074f5068131be6ad195 (patch) | |
| tree | 41c1f6d9f0d36cbe36258c5aac872987a67d3597 /src | |
| parent | bfe4e76cb8c909b379ebf58c71beef615c2fd360 (diff) | |
Additional fix for the previous commit 3ae4283198f5575840a49ddbf51f2009dd9ea0e4
There was a mishandled case in ExecRemoteSubplan
Diffstat (limited to 'src')
| -rw-r--r-- | src/backend/pgxc/pool/execRemote.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/backend/pgxc/pool/execRemote.c b/src/backend/pgxc/pool/execRemote.c index 5ecdcd6611..604cccc8e3 100644 --- a/src/backend/pgxc/pool/execRemote.c +++ b/src/backend/pgxc/pool/execRemote.c @@ -8701,12 +8701,14 @@ ExecRemoteSubplan(RemoteSubplanState *node) * We allow combiner->conn_count == 0 after node initialization * if we figured out that current node won't receive any result * because of distributionRestrict is set by planner. - * But we should distinguish this case from others where result is - * received not through a connection. These cases are: local execution - * and buffered rows. + * But we should distinguish this case from others, when conn_count is 0. + * That is possible if local execution is chosen or data are buffered + * at the coordinator or data are exhausted and node was reset. + * in last two cases connections are saved to cursor_connections and we + * can check their presence. */ if (!node->local_exec && combiner->conn_count == 0 && - list_length(combiner->rowBuffer) == 0) + combiner->cursor_count == 0) return NULL; primary_mode_phase_two: |
