Skip to content

Conversation

@avamingli
Copy link
Contributor

The force_parallel_mode GUC is meant to facilitate testing of parallel query plans, but it currently allows non-parallel plans to win even when force_parallel_mode is enabled.
This behavior makes it difficult to debug parallel plans as intended.

Correct the behavior for testing purposes.

Authored-by: Zhang Mingli [email protected]

Fixes #ISSUE_Number

What does this PR do?

Type of Change

  • Bug fix (non-breaking change)
  • New feature (non-breaking change)
  • Breaking change (fix or feature with breaking changes)
  • Documentation update

Breaking Changes

Test Plan

  • Unit tests added/updated
  • Integration tests added/updated
  • Passed make installcheck
  • Passed make -C src/test installcheck-cbdb-parallel

Impact

Performance:

User-facing changes:

Dependencies:

Checklist

Additional Context

CI Skip Instructions


The force_parallel_mode GUC is meant to facilitate testing of parallel
query plans, but it currently allows non-parallel plans to win even when
force_parallel_mode is enabled.
This behavior makes it difficult to debug parallel plans as intended.

Correct the behavior for testing purposes.

Authored-by: Zhang Mingli [email protected]
Path *cheapest_partial_path;
cheapest_partial_path = linitial(final_rel->partial_pathlist);
if (force_parallel_mode == FORCE_PARALLEL_ON)
final_rel->pathlist = NIL;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if partial_pathlist == NIL,should not final_rel->pathlist = NIL; ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pathlist can not be empty- this will trigger a 'could not derive a plan for query' failure.

@avamingli
Copy link
Contributor Author

This PR opened a whole can of worms. Just skimming through, there are a bunch of wrong results.
Looks like it uncovered some hidden issues that’ll need to be checked one by one later.

@avamingli avamingli marked this pull request as draft August 7, 2025 03:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants