Skip to content

PG19: propagate EXPLAIN IO to worker nodes - #8807

Draft
ibrahim halatci (ihalatci) wants to merge 1 commit into
ihalatci-pg19-eager-agg-containmentfrom
ihalatci-pg19-explain-io-propagation
Draft

PG19: propagate EXPLAIN IO to worker nodes#8807
ibrahim halatci (ihalatci) wants to merge 1 commit into
ihalatci-pg19-eager-agg-containmentfrom
ihalatci-pg19-explain-io-propagation

Conversation

@ihalatci

Copy link
Copy Markdown
Contributor

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.

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

codecov Bot commented Aug 27, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 88.74%. Comparing base (df26e95) to head (c2e0c3d).

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:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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