Skip to content

PG19: build foundation (source-level compat, scaffold ruleutils_19.c, CI image bump)#8601

Open
ihalatci wants to merge 5 commits into
pg19-supportfrom
pg19-build-foundation
Open

PG19: build foundation (source-level compat, scaffold ruleutils_19.c, CI image bump)#8601
ihalatci wants to merge 5 commits into
pg19-supportfrom
pg19-build-foundation

Conversation

@ihalatci
Copy link
Copy Markdown
Contributor

DESCRIPTION: Add PG19 build support; extension compiles and loads.

First PR of the PG19 enablement series tracked in #8597. Achieves
source-level compatibility with PG19 (pg19devel) and a clean
CREATE EXTENSION citus while keeping PG17 and PG18 builds green.
Regression-test correctness and PG19 feature integration land in
follow-up PRs against the pg19-support development branch.

Commits

  1. ci — bump image_suffix to -dev-e11d99c (PG19-capable test
    images) and PG minors to 16.14/17.10/18.4; add pg19_version and
    wire 19devel into the build matrix only.
  2. source-level compatibility + shmem sizing — accept PG19 in
    configure / pg_version_constants.h; centralised compat shims in
    pg_version_compat.h; distributed/columnar header adaptations for
    renamed/retyped PG19 APIs; 128 KB shmem slack on PG19 for the new
    ShmemInitHash up-front allocation, plus the maintenanced.c
    double-count fix that change exposes.
  3. -Werror source fixes — warning fixes across 56 files (old-style
    prototypes, strict forward declarations, implicit-fallthrough, new
    switch arms, API renames). No compiler-flag demotion — the build
    keeps the same warning/error flags as PG17/PG18.
  4. ruleutils_19.c scaffold — clone of ruleutils_18.c retargeted at
    the PG19 version guard so the binary links (per the PG17 compatibility: ruleutils #7725 / Pg18 ruleutils adaptation #8010
    precedent; the real upstream-derived port lands in a follow-up PR).
    Excluded from citus-style via .gitattributes — it is an
    upstream-derived clone exceeding the CI uncrustify 10,000-line limit.
  5. test — add PG19 to the oldest-supported Citus version matrix.

Scope / non-goals

  • Build path only. PG19 is intentionally NOT added to test-citus,
    test-citus-failure, test-citus-cdc, or the upgrade jobs: the
    regression suite needs the upstream-derived ruleutils_19.c from the
    follow-up PR, and no released Citus supports PG19 yet. Running the
    suite on this PR alone produces silent PG18-on-PG19 deparse
    corruption.
  • multi_explain.c is touched only for the Instrumentation /
    NodeInstrumentation rename; a separate TupleDescFinalize runtime
    fix lands in a later PR.

Validation

  • PG19devel / PG17.10 / PG18.4: build exits 0 (validated in CI images).
  • CREATE EXTENSION citus succeeds on PG19.
  • No regression-suite changes here.

Refs: #8597

ihalatci added 3 commits May 29, 2026 13:25
Bump image_suffix to -dev-e11d99c (PG19-capable test images) and PG
minors to 16.14/17.10/18.4. Add pg19_version and wire 19devel into the
build matrix. PG19 is intentionally not added to the regression,
failure, cdc, or upgrade jobs yet (those need the upstream-derived
ruleutils_19.c that lands in a follow-up).
Accept PG19 in configure/pg_version_constants.h and add centralised
source-compat shims in pg_version_compat.h. Adapt distributed/columnar
headers for renamed/retyped PG19 APIs. Add 128 KB shmem slack on PG19
to absorb ShmemInitHash up-front allocation, and drop a pre-existing
hash double-count in maintenanced.c exposed by that change.
Source-level fixes across the distributed and columnar code to build
clean under PG19's stricter warnings (old-style prototypes, strict
forward declarations, implicit-fallthrough annotations, new switch
arms, API renames). The build keeps the same warning/error flags as
PG17/PG18 -- warnings are fixed at the source, not silenced.
@codecov
Copy link
Copy Markdown

codecov Bot commented May 29, 2026

Codecov Report

❌ Patch coverage is 84.25926% with 17 lines in your changes missing coverage. Please review.
✅ Project coverage is 88.76%. Comparing base (dee8ec1) to head (ab238fc).

Additional details and impacted files
@@              Coverage Diff              @@
##           pg19-support    #8601   +/-   ##
=============================================
  Coverage         88.76%   88.76%           
=============================================
  Files               288      288           
  Lines             64302    64315   +13     
  Branches           8091     8091           
=============================================
+ Hits              57075    57091   +16     
- Misses             4888     4891    +3     
+ Partials           2339     2333    -6     
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@ihalatci ihalatci force-pushed the pg19-build-foundation branch from 751c742 to c1df190 Compare May 29, 2026 15:18
@ihalatci ihalatci linked an issue May 29, 2026 that may be closed by this pull request
@ihalatci ihalatci added this to the 15.0 milestone May 29, 2026
ihalatci added 2 commits May 29, 2026 15:34
Scaffold cloned from ruleutils_18.c retargeted at the PG19 version guard,
plus the minimal source changes required for it to compile under PG19's
-Werror (the real upstream-derived deparse port lands in a follow-up PR,
per the #7725/#8010 precedent):

- get_name_for_var_field(): handle the new PG19 RTE_GRAPH_TABLE rtekind
  in the switch (grouped with the subquery cases, as upstream does).
- isSimpleNode(): replace the comment-style /* FALLTHROUGH */ with
  pg_fallthrough; (PG19 builds with -Wimplicit-fallthrough=5, which no
  longer accepts comment markers).
- generate_function_name(): pass the new &fgc_flags argument to
  func_get_detail(), which gained a parameter in PG19.

Exclude the file from citus-style in .gitattributes: it is an
upstream-derived clone exceeding the CI uncrustify 10,000-line limit.
@ihalatci ihalatci force-pushed the pg19-build-foundation branch from c1df190 to ab238fc Compare May 29, 2026 15:40
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.

Citus does not build on PostgreSQL 19

1 participant