forked from greenplum-db/gpdb-archive
-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ADBDEV-5527 Change the portal strategy for modifying CTE case
In vanilla PG and Greenplum queries containing modifying CTE are executed with portal strategy PORTAL_ONE_MOD_WITH, which involves storing the result of the query in portal's tuple store, which the final result is then fetched from. This strategy is fair enough and helps us avoid executing modifying operation several times, for example, when one need to fetch the query result partially. However, in Greenplum case executing this strategy at QE nodes is redundant, because clients communicate with the system throught the QD node. Therefore, this commit proposes another type of strategy for execution at QE nodes. Moreover, when a query contains modifying CTE, EXPLAIN ANALYZE reports most of plan nodes as "never executed", even though the corresponding nodes have been fully executed and have returned the tuples. This problem arise because of PORTAL_ONE_MOD_WITH execution strategy, according to which the extra pq message with tuple description is sent to QD, and the statistics can't be retrieved properly in cdbexplain_recvExecStats function. (cherry picked from commit c9b7b02)
- Loading branch information
1 parent
8492198
commit 5fe368d
Showing
4 changed files
with
209 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters