PG19: propagate EXPLAIN IO to worker nodes - #8807
Draft
ibrahim halatci (ihalatci) wants to merge 1 commit into
Draft
PG19: propagate EXPLAIN IO to worker nodes#8807ibrahim halatci (ihalatci) wants to merge 1 commit into
ibrahim halatci (ihalatci) wants to merge 1 commit into
Conversation
PG19 adds an IO option to EXPLAIN. Citus forwards a fixed set of options to the worker nodes, so IO was silently dropped: EXPLAIN (ANALYZE, IO) on a distributed table succeeded but the worker plans contained no IO information. Because IO requires ANALYZE, the option travels over the saved-plan path (WrapQueryForExplainAnalyze -> worker_save_query_explain_analyze -> ExplainWorkerPlan), not over BuildRemoteExplainQuery. The decisive gap was ExplainWorkerPlan(), which rebuilds instrument_option from scratch and did not set INSTRUMENT_IO, so forwarding the option alone would have had no effect. Forwards es->io through the option struct, the remote EXPLAIN query, the JSONB options blob and back into instrument_option, mirroring the existing PG17 MEMORY/SERIALIZE handling. Fixes #8770 Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 6481a75c-8b50-4476-832e-fbe9e4fb1196
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## ihalatci-pg19-eager-agg-containment #8807 +/- ##
=======================================================================
- Coverage 88.75% 88.74% -0.02%
=======================================================================
Files 289 289
Lines 65075 65081 +6
Branches 8204 8204
=======================================================================
- Hits 57755 57753 -2
- Misses 4959 4962 +3
- Partials 2361 2366 +5 🚀 New features to boost your workflow:
|
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.
Draft fix for #8770.
This propagates PostgreSQL 19 EXPLAIN IO state through Citus worker EXPLAIN generation and normalizes the resulting version-varying output in regression tests.
Stack: depends on #8771 draft branch to avoid pg19.sql/pg19.out conflicts.