Fix crash in explain with append info for ShareInputScan nodes.#1295
Merged
avamingli merged 2 commits intoapache:mainfrom Aug 20, 2025
Merged
Fix crash in explain with append info for ShareInputScan nodes.#1295avamingli merged 2 commits intoapache:mainfrom
avamingli merged 2 commits intoapache:mainfrom
Conversation
578fd99 to
d806cce
Compare
my-ship-it
reviewed
Aug 19, 2025
my-ship-it
approved these changes
Aug 20, 2025
Contributor
|
LGTM |
d806cce to
d73c119
Compare
The issue occurs when ShareInputScan nodes are reused multiple times during explain with append info in deparse_context_for_plan_tree(). Address that by marking only the producer of ShareInputScan with the same share_id to prevent the crash. This ensures proper handling of shared scan nodes during plan tree deparsing. Authored-by: Zhang Mingli avamingli@gmail.com
This adds the complex TPC-DS Query 04 as a test case to verify a bug that caused crashes when gp_cte_sharing=on in the planner. The issue was difficult to reproduce with simpler queries, requiring the full complexity of TPC-DS Query 04 to properly manifest. The crash occurred during planning when CTE sharing was enabled. Adding this test will help prevent regression of this specific planner issue. While not a minimal reproduction case, the full query is necessary to reliably trigger the problematic behavior. Authored-by: Zhang Mingli avamingli@gmail.com
d73c119 to
c9f8188
Compare
gongxun0928
approved these changes
Aug 20, 2025
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.
Fix #1269
The issue occurs when ShareInputScan nodes are reused multiple times during explain with append info in deparse_context_for_plan_tree().
Address that by marking only the producer of ShareInputScan with the same share_id to prevent the crash.
This ensures proper handling of shared scan nodes during plan tree deparsing.
Authored-by: Zhang Mingli avamingli@gmail.com
Fixes #ISSUE_Number
What does this PR do?
Type of Change
Breaking Changes
Test Plan
make installcheckmake -C src/test installcheck-cbdb-parallelImpact
Performance:
User-facing changes:
Dependencies:
Checklist
Additional Context
CI Skip Instructions