Skip to content

PG19: re-implement columnar get_relation_info_hook suppression #8614

Closed

Description

Part of the PG19 support umbrella: #8597.

Surfaced by review of #8602. Distinct from PR3 (#8611, parallel-scan
callbacks + CREATE INDEX serialization) — this issue is specifically
about the planner-side relation-info suppression that PG19 removed.

Background

PG19 removed the get_relation_info_hook planner hook upstream. Citus'
columnar Table Access Method used it (ColumnarGetRelationInfoHook) to
suppress, for columnar relations:

  • parallel query — forcing rel->rel_parallel_workers = 0 so the
    planner does not consider parallel paths over columnar storage, and
  • index-only scans — disabling IOS where columnar cannot serve them.

For the Phase-1 build foundation the hook registration is simply omitted
on PG19, leaving a TODO(PG19 Phase 2) in
src/backend/columnar/columnar_customscan.c:

#if PG_VERSION_NUM < PG_VERSION_19
	PreviousGetRelationInfoHook = get_relation_info_hook;
	get_relation_info_hook = ColumnarGetRelationInfoHook;
#else
	/*
	 * TODO(PG19 Phase 2): get_relation_info_hook was removed upstream.
	 * Re-implement parallel-query/index-only-scan suppression for
	 * columnar relations through set_rel_pathlist_hook or another
	 * mechanism. For Phase 1 (build only) the hook is omitted.
	 */
#endif

With the hook omitted, on PG19 the planner may consider parallel and
index-only-scan paths for columnar relations that columnar cannot
execute, which can lead to wrong plans or runtime errors.

Scope

  • Re-implement the parallel-query and index-only-scan suppression for
    columnar relations on PG19 without get_relation_info_hook (candidate:
    move it into the still-present set_rel_pathlist_hook /
    ColumnarSetRelPathlistHook, or prune the offending paths there).
  • Confirm interaction with PR3 (PG19: columnar CREATE INDEX fails (parallel-scan callbacks + serialization) #8611): the parallel-scan TableAM
    callbacks make a serial fallback safe, but the planner should still
    avoid choosing parallel/IOS columnar paths.
  • Remove the TODO(PG19 Phase 2) comment once implemented.

Validation

Cross-version gate (required before commit): build under -Werror and
run the relevant regress schedule on PG17.10, PG18.4, and PG19beta1 —
all three green, PG17/PG18 regression-neutral.

  • PG19: columnar relations are not given parallel or index-only-scan
    paths; columnar regress schedule passes.
  • PG17/18: regression neutral (the hook split is version-guarded).

Plan detail: pg19-pr-plan/12-columnar-get-relation-info-hook.md (PR12).

Activity

  1. ihalatci commented on Jun 13, 2026

    @ihalatci
    ContributorAuthor

    CI improvement — PR #8619

    PR #8619 re-implements the columnar get_relation_info_hook suppression of
    parallel / index-only scans for PG19. Measured against the PG19 baseline from
    #8616 (on top of #8618):

    • check-columnar / PG19: 7 → 6 failing tests — fixes columnar_fallback_scan.

    check-style is green. The remaining 6 check-columnar failures (columnar_alter,
    columnar_chunk_filtering, columnar_indexes, columnar_insert, columnar_partitioning,
    columnar_paths) are out of scope for this PR. PG16/PG17 unaffected (PG19-guarded).

  2. ihalatci commented on Jul 16, 2026

    @ihalatci
    ContributorAuthor

    Closed manually after #8619 merged into the non-default pg19-support branch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions