Repository navigation
Show the shipped plan fragment of ReadFromParallelReplicas only with EXPLAIN distributed = 1 - #130779
devcrafter wants to merge 5 commits into
Conversation
…cas` in EXPLAIN The step description was a multi-line dump of the fragment that broke the plan tree; it now lists only the replicas. Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
Workflow [PR], commit [6f3c00d] Summary: ✅
AI ReviewSummaryReviewed #130779 at Description consumers traced: text and JSON Final VerdictStatus: ✅ Approve |
A plain `EXPLAIN` now names only the replicas in the `ReadFromParallelReplicas` description. Tests which check the fragment use `distributed = 1`; the references changed for the subtree go back to master. Co-Authored-By: Claude Opus 5.5 <[email protected]>
ReadFromParallelReplicas in EXPLAINReadFromParallelReplicas only with EXPLAIN distributed = 1
Build profile diff (arm_release)Comparing ✅ No significant changes. Binary sizes
The official master build is compiled with Compile time of recompiled translation units7 translation units recompiled, 14 s compile time in total, 7 of them have a recent master baseline. |
groeneai
left a comment
There was a problem hiding this comment.
I reviewed this against master and it looks good to me. The query text sent to the replicas still comes from dumpQueryPlanShape, and ReadFromParallelReplicasStep::describeDistributedPlan already prints the fragment with the user's EXPLAIN options. 05138 also gets stronger: Element filter is now checked in the fragment itself instead of being inferred from a missing Filter (WHERE).
One consequence the PR text does not mention. On master, EXPLAIN json = 1 carries the fragment in the Description of ReadFromParallelReplicas (cut at query_plan_max_step_description_length, 500 bytes by default). With this PR the fragment does not reach JSON at all, because EXPLAIN json = 1, distributed = 1 throws Option 'distributed' is not supported with option 'json'. (NOT_IMPLEMENTED) (checked on a master build). Given the truncation this is probably fine, but the changelog entry could say that JSON no longer shows the fragment.
Related: #130355
With plan-based parallel replicas (
parallel_replicas_plan_based),ReadFromParallelReplicasput a multi-line dump of the shipped plan fragment, with headers, into its step description. That broke the tree of everyEXPLAIN, and withdistributed = 1the fragment was printed a second time.Now the description lists only the replicas, and the fragment is printed only with
EXPLAIN distributed = 1, under the step. A plainEXPLAINshows the plan that runs on the initiator; the fragment is shown as shipped, before the replicas optimize it, so for example a projection a replica picks is not visible in it. The query text sent to the replicas is unchanged.Tests which check the fragment use
EXPLAIN distributed = 1now:05138,05214,05215,05238,05239,05240,05293,05546,05569,05812.05055matched the old description text.Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):
With plan-based parallel replicas,
EXPLAINno longer prints the plan fragment sent to the replicas in the description ofReadFromParallelReplicas;EXPLAIN distributed = 1shows it as a subtree.🤖 Generated with Claude Code
Workflow [PR]
Sync PR [sync-upstream/pr/130779]