Conversation
XLogReaderAllocate returns NULL if the xlogreader couldn't be allocated. This NULL checks were forgotten in several places of twophase.c and caused segmentation faults under heavy workloads.
Stolb27
approved these changes
Jul 3, 2020
RekGRpth
pushed a commit
that referenced
this pull request
Dec 3, 2025
…ables (#89) The add_rte_to_flat_rtable function places a RangeTblEntry into the glob->finalrtable table with a zeroed list of functions. The ParallelizeCorrelatedSubPlanMutator function uses ctx->rtable, which is populated by the root->glob->finalrtable function in the ParallelizeCorrelatedSubPlan function. Therefore, in the ParallelizeCorrelatedSubPlanMutator function, the rte->functions list is always empty. Therefore, the old condition for checking whether functions are correlated did not work. Now, in the ParallelizeCorrelatedSubPlanMutator function, functions are available in the fscan->functions list, which is where they are taken for correlation and location checking. Correlated non-any functions are prohibited in subplans. For other combinations, we now add broadcasting and materialization. Another issue arose with correlated subplans with master-only or replicated tables. The existing condition checked the scan locus only, without checking the requested locus. As a result, the table scan was performed on segments, which is unacceptable for the gp_segment_configuration master-only table. Now, if the requested locus for such tables and the scan locus are not equal to the entry, we again add broadcasting and materialization. Co-authored-by: Georgy Shelkovy <g.shelkovy@arenadata.io> Co-authored-by: Maxim Michkov <m.michkov@arenadata.io> Ticket: ADBDEV-6884
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.
XLogReaderAllocatereturnsNULLif thexlogreadercouldn't be allocated. ThisNULLchecks were forgotten in several places oftwophase.cand caused segmentation faults under heavy workloads.This problem affects only
6X_STABLE.Current PR was cherry-picked from https://github.com/greenplum-db/gpdb/pull/10416