Parallel REFRESH MATERIALIZED VIEW and CTAS for AO/AOCS#122
Merged
avamingli merged 1 commit intoapache:mainfrom Oct 11, 2023
Merged
Parallel REFRESH MATERIALIZED VIEW and CTAS for AO/AOCS#122avamingli merged 1 commit intoapache:mainfrom
avamingli merged 1 commit intoapache:mainfrom
Conversation
yjhjstz
reviewed
Aug 7, 2023
8a89a71 to
4ac9775
Compare
yjhjstz
reviewed
Aug 7, 2023
5948a0a to
cc15270
Compare
Contributor
Author
|
close #115 |
Contributor
Author
|
Rebased && fix some regression cases. |
c3c6a11 to
d6eb58d
Compare
yjhjstz
previously approved these changes
Aug 31, 2023
my-ship-it
reviewed
Oct 8, 2023
Make the SELECT part of REFRESH parallel for AO/AOCS storage MATERIALIZED VIEW. Make the SELECT part of CREATE TABLE AS parallel for AO/AOCS storage table. Parallel processes couldn't have writeable operations, assertions like below are added by PG: 'cannot update tuples during a parallel operation'. It's not a problem for PG as workers are launched by Gather node, and the SELECT part of Refresh MV/CTAS could be parallel. However, AO/AOCS will require batches of Row Numbers generated from gp_fastquence which will in-place update catalog. And CBDB will EnterParallelMode() anyway when ExecutePlan in QE if there is parallel across the whole plan. Use EnterParallelMode() only for the slices who have multiple parallel workers, in theory, slices execute the SELECT part of a parallel plan. Authored-by: Zhang Mingli avamingli@gmail.com
d6eb58d to
865fb47
Compare
Contributor
Author
|
Pushed, thanks for review~ |
2 tasks
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Make the SELECT part of REFRESH parallel for AO/AOCS storage MATERIALIZED VIEW.
Make the SELECT part of CREATE TABLE AS parallel for AO/AOCS storage table.
Parallel processes couldn't have writeable operations, assertions like below are added by PG:
'cannot update tuples during a parallel operation'.
It's not a problem for PG as workers are launched by Gather node, and the SELECT part of Refresh MV/CTAS could be parallel.
However, AO/AOCS will require batches of Row Numbers generated from gp_fastquence which will in-place update catalog. And CBDB will EnterParallelMode() anyway when ExecutePlan in QE if there is parallel across the whole plan.
Use EnterParallelMode() only for the slices who have multiple parallel workers, in theory, slices execute the SELECT part of a parallel plan.
Performance
(Only one time test on QingYun Cloud)
DDL:
A Parallel Plan of CTAS for AOCS
Authored-by: Zhang Mingli avamingli@gmail.com
closes: #ISSUE_Number
Change logs
Describe your change clearly, including what problem is being solved or what feature is being added.
If it has some breaking backward or forward compatibility, please clary.
Why are the changes needed?
Describe why the changes are necessary.
Does this PR introduce any user-facing change?
If yes, please clarify the previous behavior and the change this PR proposes.
How was this patch tested?
Please detail how the changes were tested, including manual tests and any relevant unit or integration tests.
Contributor's Checklist
Here are some reminders and checklists before/when submitting your pull request, please check them:
make installcheckmake -C src/test installcheck-cbdb-parallel