Skip to content

columnar: re-implement parallel/index-only-scan suppression on PG19#8619

Open
ihalatci wants to merge 1 commit into
pg19-columnar-indexfrom
pg19-columnar-relinfo
Open

columnar: re-implement parallel/index-only-scan suppression on PG19#8619
ihalatci wants to merge 1 commit into
pg19-columnar-indexfrom
pg19-columnar-relinfo

Conversation

@ihalatci

Copy link
Copy Markdown
Contributor

Stacked PR (PR3b of the PG19 stack). Base = pg19-columnar-index (#8618)pg19-runtime-fixes (#8617) → pg19-ci-test-matrices (#8616) → pg19-ruleutils-port (#8602) → pg19-support. Review/merge in stack order.

PG19 removed get_relation_info_hook, which is where pre-PG19 builds disable parallel query and index-only scans for columnar relations (columnar scans are always serial and cannot return tuples from an index). The Phase-1 build left a TODO(PG19, #8614) placeholder; this PR re-implements that suppression inside ColumnarSetRelPathlistHook:

  • forbid future parallel workers (rel_parallel_workers = 0, consider_parallel = false) and drop any already-generated partial paths;
  • clear each index's canreturn flags and strip any IndexOnlyScan paths that were already created (set_rel_pathlist_hook runs after path generation).

The pre-PG19 ColumnarGetRelationInfoHook path is unchanged.

Closes #8614
Part of #8597

@codecov

codecov Bot commented Jun 13, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 88.96%. Comparing base (59c5dc3) to head (f25e811).

Additional details and impacted files
@@                 Coverage Diff                  @@
##           pg19-columnar-index    #8619   +/-   ##
====================================================
  Coverage                88.95%   88.96%           
====================================================
  Files                      288      288           
  Lines                    64376    64386   +10     
  Branches                  8093     8094    +1     
====================================================
+ Hits                     57267    57278   +11     
- Misses                    4776     4777    +1     
+ Partials                  2333     2331    -2     
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@ihalatci ihalatci linked an issue Jun 13, 2026 that may be closed by this pull request
@ihalatci ihalatci force-pushed the pg19-columnar-relinfo branch from d0bf1ee to 004a41d Compare June 13, 2026 16:32
@ihalatci ihalatci force-pushed the pg19-columnar-index branch from a31f940 to 83042a9 Compare June 13, 2026 16:32
PG19 removed get_relation_info_hook, which is where pre-PG19 builds disable
parallel query and index-only scans for columnar relations (columnar scans are
always serial and cannot return tuples from an index). Re-implement that
suppression for PG19 inside ColumnarSetRelPathlistHook:

  * forbid future parallel workers (rel_parallel_workers = 0,
    consider_parallel = false) and drop any already-generated partial paths;
  * clear each index's canreturn flags and strip any IndexOnlyScan paths that
    were already created.

The pre-PG19 ColumnarGetRelationInfoHook path is unchanged. Removes the
Phase-1 TODO(PG19, #8614) placeholder in columnar_customscan_init.

DESCRIPTION: Suppress parallel and index-only scans for columnar tables on PG19

Closes #8614
Part of #8597

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Re-implements PG19-specific planner suppression for columnar relations now that upstream removed get_relation_info_hook, ensuring the planner won’t choose unsupported parallel or index-only scan paths for columnar tables.

Changes:

  • Adds PG19-only logic in ColumnarSetRelPathlistHook to disable parallel planning (set rel_parallel_workers = 0, consider_parallel = false, and clear partial_pathlist).
  • Clears per-index canreturn flags and removes already-generated IndexOnlyScan paths for columnar relations on PG19.
  • Replaces the removed PG19 TODO with a comment explaining where the suppression now lives.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

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.

PG19: re-implement columnar get_relation_info_hook suppression

2 participants