Skip to content

Update main PostgreSQL versions and test dependencies - #8973

Open
ibrahim halatci (ihalatci) wants to merge 25 commits into
mainfrom
ihalatci-citus-main-pg-update
Open

ibrahim halatci (ihalatci) wants to merge 25 commits into
mainfrom
ihalatci-citus-main-pg-update

Conversation

@ihalatci

@ihalatci ibrahim halatci (ihalatci) commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

Agent assessment

Self-reported assessment, not an independent review.

Assessed revision: 239096b25bfa1f4685caf749488cc9e65157d30e

Dimension Assessment Rationale
Change confidence 7/10 ↑ Final delta is one image-suffix line; exact stable publication and all 13 manifests verified.
↑ Five stable runtime build logs confirm the exact fork and Tornado 6.6.1 installation; packaging and quality passed.
↑ One authorized failed-only rerun passed on unchanged head; all current PR checks success/skipped.
↓ Initial PG19 isolation 360-second cancellation remains unexplained; no post-publication container execution; known q13/q70 correction remains outside this PR.
Diagnosis confidence 9/10 ↑ Saved compatibility fixtures reproduced failures before normalization corrections.
↑ Query-local bitmap collision independently reproduced on PG17/18/19 and corrected by the separate #8842 patch.
↓ No retained discriminating pre-fix FULL-regression reproduction; initial isolation timeout is not diagnosed.
Evidence fit 9/10 ↑ Original saved workloads and raw aggregate checks directly cover the reported wrong results.
↓ Current-head deterministic fixture matrix has not been rerun; random CI does not clear q13/q70.

DESCRIPTION: Updates PostgreSQL versions and regression-test dependencies.

Current head 239096b25bfa1f4685caf749488cc9e65157d30e: stable-image consumer CI passed on attempt 2; planner correctness hold remains. The approved final delta changes only -dev-5f24c0d to verified -v68a2654. Build & Test attempt 2 passed after exactly one authorized failed-jobs-only rerun on this unchanged head. Current PR checks are 161 success/two skipped, with no failed or pending checks. Packaging and code quality passed on this head. Attempt 1's PG19 isolation cancellation after 360 seconds remains preserved and unexplained; retry success does not establish harmlessness. No Citus merge or tags are included.

Updates main's supported PostgreSQL pins to 17.12, 18.7, and 19.0 GA, retaining PostgreSQL 18.7 for SQL snapshots. Build/test and cassert version/upgrade matrices agree; the bounded ARM64 matrix remains PG17/18.

Current paired dependencies

  • Image PR citusdata/the-process#267 is merged at 68a2654184b1eb8a8ebe4b4b231108676e31de42. Exact stable suffix -v68a2654 is consumed on this head. Exact-merge stable publication passed all 12 stable build jobs plus the matrix; dev jobs skipped. All 13 required manifests and registry digests were independently checked.
  • All five stable runtime-image build logs confirm resolved fork 5cd63296e7dab274e275553df76e9699ea220032 and installed Tornado 6.6.1. This is build-installation provenance, not post-publication container execution; no fresh stable-container runtime test was performed.
  • Image requirements derive from dependency-only Citus source 23c7ed5e06c084cc6cc1cd03f03e5ac579ec4c44: three base exporters use pipenv requirements; stylechecker uses pipenv requirements --dev-only.
  • citusdata/mitmproxy#6 is merged. Its exact head 5cd63296e7dab274e275553df76e9699ea220032 is pinned, with Tornado 6.6.1. Regression Pipfile/lock are the source of truth and are mirrored into the devcontainer.
  • Unrelated lock entries, versions, groups and markers were preserved. Standard Pipenv resolution generated target hashes. Historical Python 3.12.16 pipenv verify, pipenv sync --dev, pip check, installed Git provenance, certificate generation and actual mitmdump listener startup passed.

Other resolved targets remain pyasn1 0.6.5, filelock 4.2.1, certifi 2026.10.19, Werkzeug 3.1.9, Black 26.10.1, Brotli 1.2.1, msgpack 1.2.3 and urwid 4.0.7. Devcontainer Black requirements include pytokens.

Known q13/q70 wrong results: separate correction pending

The query-local relation-index collision is recorded in #8838, with existing fix #8842. That PR remains open; its publication/update is being handled separately. The validated local correction has not been integrated into this PR. No duplicate issue or new fix PR is needed. Random query-generator success does not clear these known failures.

Exact saved fixture Unfixed control on PG17.12/18.7/19.0 Locally corrected result on all three
q13, artifact 14558684680 count 0 / avg NULL count 6 / avg 0.50000000000000000000
q70, original artifact 14038580795 count 0 / avg NULL count 26 / avg 18.3333333333333333

These historical controls and corrected runs start from normalization base ecec459d9a9f472268255d426c1998fe5d2d95ef, not the current rebased head. Six complete corrected comparisons passed, requiring 250 unique markers on each side and exactly one error-free target with the correct aggregate. Only the two existing unsupported-query error classes were excluded symmetrically; neither target was excluded. All six unfixed controls returned the wrong target.

Local correction 5617d541c1c79b004d932b0249377e44efac2d5f changes only multi_physical_planner.c and existing recurring_join_pushdown SQL/output: resolve preserved-side relids through each restriction's own PlannerInfo rather than a bitmap pooled across query roots. The focused negative control changes 57/54 to 0/0 without the C fix and passes when restored. Existing normalization is preserved.

Compatibility corrections

The branch retains nullable catalog/visibility predicate handling, PG19 base-security-qual handling, transformed-relation evidence before original nullable-RTE conversion, eliminated-join normalization and necessary PostgreSQL expected-output adaptations.

The modifying-CTE/surviving-distributed-relation review finding is addressed by 48be61fc: clear the empty subquery RTE's inheritance flag and normalize after PostgreSQL planning without those exclusions. local_dist_join covers both cases, including DELETE CTE side effects. The review thread was resolved after checking the published implementation and regressions.

Earlier exact q33/q123/q88/q208 fixtures passed twelve complete replay combinations on PG17.12/18.7/19rc2 with unfiltered target checks: 27/78.1481481481481481, 2/NULL, 20/59.5 and 2/1.5 respectively. The q88 coordinator setup and regular-user/MX assertion passed 18 role/node/version contexts. These do not substitute for q13/q70 coverage. No retained pre-ecec459d failing reproduction establishes the separate FULL-normalization change's necessity.

Validation

Current stable-suffix head: 45368049597 attempt 2 passed on unchanged 239096b25 after exactly one authorized failed-jobs-only rerun. Current PR checks show 161 success/two skipped and no failures or pending checks. Packaging and quality passed. No code changes, push, further retries or duplicate dispatch were performed for the rerun.

Preserved first attempt: 45368049597 attempt 1 failed with 134 successful jobs, two failed and two skips. PG19 isolation job 138355986485 failed 1/99 tests: isolation_create_distributed_table_concurrently, canceling s1-create-concurrently-table_1 after 360 seconds and returning ERROR: canceling statement due to user request. The aggregate CI failure was downstream. Its original job log/diff is retained. The cancellation matches a historical GA signature, but neither that similarity nor retry success establishes a harmless or pre-existing cause. git diff --check passed for the one-line suffix-only delta.

Previous dev head aebfd720: 45365350214 completed SUCCESS. Packaging, quality, and devcontainer passed. Those checks are historical, not stable-head evidence.

Historical head e98c4a2b: 45005547966 passed 136 jobs with two benchmark skips, including aggregate CI, style, snapshots, PG17/18/19 builds/regressions/isolation/vanilla, upgrades, arbitrary configurations, failure/enterprise-failure, pytest and query generator. Packaging and quality also passed. These results do not establish current rebased-head success.

For the local separate q13/q70 correction, each actual PG17.12/18.7/19.0:

  • CFLAGS=-Werror ./configure --with-security-flags, make -s -j4, make -s install-all: passed.
  • Exact retained 250-query workloads in one backend per fixture, followed by in-place undistribution and identical local queries: six corrected comparisons/raw target checks passed; six unfixed controls failed.
  • make -s -C src/test/regress check-custom-schedule SCHEDULE=minimal_schedule WORKERCOUNT=2 EXTRA_TESTS="recurring_join_pushdown citus_depended_object function_propagation local_dist_join_mixed local_dist_join_load local_dist_join pg18": 13/13 passed each.
  • citus_indent src/backend/distributed/planner/multi_physical_planner.c --check --quiet: passed with tools 0.8.33 / uncrustify 0.82.0.

Older 05c3b54b 44999588017 and RC2 43424196914 greens are historical. GA 36a1c1a5b/-dev-48cf5f5 44575297529 initially timed out in concurrent-distribution isolation; the authorized failed-only second attempt and unchanged local replay passed, without establishing the timeout's root cause.

The approved stable-image suffix promotion is published and consumer CI passed on attempt 2; the separate planner correction remains outstanding. No Citus merge, tags, release-branch suffix changes, or planner-fix publication are included.

@codecov

codecov Bot commented Nov 13, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 98.15951% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 88.82%. Comparing base (3a78aa0) to head (239096b).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #8973      +/-   ##
==========================================
+ Coverage   88.80%   88.82%   +0.02%     
==========================================
  Files         292      292              
  Lines       66280    66438     +158     
  Branches     8377     8403      +26     
==========================================
+ Hits        58859    59016     +157     
- Misses       5000     5002       +2     
+ Partials     2421     2420       -1     
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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.

🟡 Changes recommended

The join walker skips eliminated relations in FULL joins reduced to LEFT joins, leaving the query tree inconsistent with planner restrictions and preserving a planning failure.

1 open issue
What changed in this PR

Updates Citus main’s PostgreSQL test versions and Python dependencies, with planner and catalog-visibility compatibility fixes for the newer PostgreSQL releases. This remains a dev-image validation change; the PR reports an unresolved PG19 isolation timeout in the GA CI run.

Changes:

  • Updates PostgreSQL pins to 17.12, 18.7, and 19.0, retaining PG18 for SQL snapshots.
  • Refreshes regression dependencies and their devcontainer mirrors.
  • Handles eliminated outer-join relations and nullable catalog filtering, with regression and isolation-test updates.
File Description
src/​test/​regress/​sql/​multi_mx_hide_shard_names.sql Tests shard hiding through outer joins.
src/​test/​regress/​sql/​local_dist_join.sql Adds join-normalization and planned-subquery regressions.
src/​test/​regress/​sql/​local_dist_join_mixed.sql Suppresses minor-version-dependent debug output.
src/​test/​regress/​sql/​local_dist_join_load.sql Creates fixtures for join-remapping regressions.
src/​test/​regress/​sql/​function_propagation.sql Adapts the circular-default dependency test.
src/​test/​regress/​sql/​citus_depended_object.sql Tests catalog hiding on nullable join sides.
src/​test/​regress/​sql/​arbitrary_configs_recurring_outer_join.sql Exercises aliases, dropped columns, and reference remapping.
src/​test/​regress/​spec/​isolation_citus_schema_distribute_undistribute.spec Makes schema-rename waiting deterministic.
src/​test/​regress/​Pipfile.lock Locks updated dependencies and hashes.
src/​test/​regress/​Pipfile Updates test dependency constraints and fork pin.
src/​test/​regress/​expected/​multi_mx_hide_shard_names.out Records outer-join shard-hiding results.
src/​test/​regress/​expected/​multi_mx_hide_shard_names_0.out Updates alternate shard-hiding expectations.
src/​test/​regress/​expected/​local_dist_join.out Records new join-regression results.
src/​test/​regress/​expected/​local_dist_join_mixed.out Aligns expectations with suppressed debug output.
src/​test/​regress/​expected/​local_dist_join_load.out Records added fixture setup.
src/​test/​regress/​expected/​isolation_citus_schema_distribute_undistribute.out Records schema-lock waiting and completion.
src/​test/​regress/​expected/​function_propagation.out Updates circular-dependency test expectations.
src/​test/​regress/​expected/​citus_depended_object.out Records nullable catalog-hiding results.
src/​test/​regress/​expected/​arbitrary_configs_recurring_outer_join.out Records reference-remapping regression results.
src/​include/​distributed/​query_utils.h Declares nullable-side detection helper.
src/​include/​distributed/​deparse_shard_query.h Exposes empty-subquery conversion helper.
src/​backend/​distributed/​worker/​worker_shard_visibility.c Filters nullable catalog relations before joining.
src/​backend/​distributed/​utils/​query_utils.c Detects nullable sides of outer joins.
src/​backend/​distributed/​utils/​citus_depended_object.c Uses scan-level filtering for nullable catalog relations.
src/​backend/​distributed/​planner/​distributed_planner.c Reconciles eliminated relations and remaps column references.
src/​backend/​distributed/​planner/​deparse_shard_query.c Shares empty-subquery conversion and clears inheritance state.
.github/​workflows/​nightly_cassert.yml Updates assertion-build and upgrade version matrices.
.github/​workflows/​nightly_arm64.yml Updates ARM64 PostgreSQL minor versions.
.github/​workflows/​build_and_test.yml Updates PostgreSQL, snapshot, and dev-image pins.
.devcontainer/​src/​test/​regress/​Pipfile.lock Mirrors the regression dependency lock.
.devcontainer/​src/​test/​regress/​Pipfile Mirrors regression dependency constraints.
.devcontainer/​requirements.txt Updates Black and adds pytokens.

Review effort: Balanced

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.

🔵 Needs a closer look

Cross-version planner-tree and attribute remapping requires specialist correctness review because the published head retains q13/q70 wrong-result cases, while fixes and deterministic fixture validation exist only locally.

No open issues 🎉

1 resolved since last review

Review effort: Balanced

Use paired the-process dev images from f73fc966f1e85a4b852d93c0702135fddb7c18da, verified by build-test-images run 43397208581. Keep snapshot, upgrade and nightly version matrices consistent.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Pin the corrected the-process images at 7a9bc51ca3605251111be15eb158c73e5af744ad, published by successful build-test-images run 43398988757.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Decorate injected Vars with their outer joins' nulling relids on PostgreSQL 16 and later so join removal does not invalidate catalog filters.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
(cherry picked from commit 7bc5ff1)
Keep recursive planning consistent with PostgreSQL join removal without bypassing managed-local routing. Preserve dropped attribute positions and cover right joins, join aliases and materialized CTEs.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
(cherry picked from commit 75814af)
Adapt imported planner fixes to the list iteration macro used on main.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Resolve the approved security updates against the metadata-only mitmproxy fork, retaining unrelated locked versions and Python categories.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Only annotate outer-join nulling relids when the predicate is attached above joins. PG19 security quals run at the base relation, where those relids are not valid.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Carry outer-join nullability through nested joins before replacing eliminated relation RTEs. Cover the nested distributed LEFT JOIN on the nullable side of a managed-local RIGHT JOIN.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Adapt the output-only intent of dbb3a9d to main, retaining alternatives for earlier supported PostgreSQL minors. Verified function propagation and schema isolation against PG17.12,18.7,19rc2.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Keep the existing distributed debug plan for versions that retain the join. The alternative removes only the three obsolete debug lines; the count remains101. Existing mixed-join tests pass on PG17.12,18.7,19rc2.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Use uncrustify0.82.0 and citus_indent0.8.33 from the paired stylechecker image. The repository reindent recipe changes whitespace only.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Use verified exact the-process74bd9f9e4b446f9291459f49fc353633bbc805cc dev publication, generated from dependency source223abeeb16eea4e881da5e9ba9877caee4f0ec51. Stable suffix promotion remains unapproved.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Do not replace an original nullable relation merely because a planned subquery no longer appears in the transformed query. Preserve conversion of all matching transformed copies and add a deterministic wrong-result regression.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Move only DDL and data into the create schedule, retaining the numerical query assertion for regular-user and MX coverage. Adapt the fixture layout validated in 3e42d97.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
… outputs

function_propagation: PostgreSQL 17.12/18.7/19rc2 (CVE-2026-6460) reject
ALTER TABLE table_1_for_circ_dep ADD COLUMN ... because the default of
table_2_for_circ_dep uses table_1_for_circ_dep's row type, so PostgreSQL
errors before Citus detects the cycle. Create the column up front and set
its default with ALTER COLUMN ... SET DEFAULT instead. That creates the
same function/table cycle without changing the row type, so Citus raises
its circular-dependency error on old and new minors alike.

isolation_citus_schema_distribute_undistribute: PostgreSQL 17.12/18.7/
19rc2 (CVE-2026-6467) lock the schema during ALTER SCHEMA ... RENAME, so the
rename waits for s1 on new minors but not on old ones. Make s1 lock the
schema's pg_namespace row before s2 renames it, so the rename waits for
s1 on every minor.

local_dist_join_mixed: new minors remove the nullable "distributed" side of
local LEFT JOIN distributed before Citus wraps "local", which changes the
DEBUG output for that query. Only check its count.

Remove function_propagation_0.out,
isolation_citus_schema_distribute_undistribute_0.out and
local_dist_join_mixed_0.out.
Adding nulling relids to the shard-hiding and Citus-object-hiding filters
moved them above the outer join. As a result, a LEFT JOIN row that matched
only a hidden row was removed instead of being null-extended.

When the meta table is on the nullable side of an outer join, add the
filter to the relation's security quals so it runs while scanning the
relation. Elsewhere keep the old WHERE clause filter.
The query returns true whether or not the planner removes the outer join, and also returns true when the filter is placed above the join, so it does not test what its comment claims.
The normalization of eliminated outer joins unnecessarily excluded queries
with modifying CTEs or citus tables. But as long as the inheritance flag of
the RTE constructed by `ConvertRteToSubqueryWithEmptyResult()` is set to
false, then that normalization can be unconditionally called. Also
refactor the normalization into `PostPGPlanNormalization()`, enabling it
to be called where it's actually needed, instead of bolted onto the top
of every distributed plan creation. This required moving RTE identity
assignment ahead of post-plan normalization, an acceptable tradeoff for
clarity of the code.

Outer join normalization is enhanced to fix dropped-column numbering
and aliases - see `ConvertRemovedOuterJoinRelation()` for the rationale.

Add regress tests for surviving distributed subquery and modifying CTE,
the two cases identifed as broken by the previous approach. Also adds
alias, whole-row and correlated-reference regress coverage. Finally,
suppress minor-version-dependent DEBUG output while retaining result
assertions.
Pair with local the-process commit 48cf5f54798db98f0ecdcb84a21269136c4a1a9c. The -dev-48cf5f5 images must be published before this branch is pushed or its CI is dispatched.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Follow-up to 48be61f, which skipped Var remapping when the converted
table had no dropped columns. System-cols and whole-row vars remained
in an empty subquery RTE, which broke relevant SELECTs that referenced
ctid or a whole-row var - see this commit's test cases for examples.
The fix is straightforward - don't special-case system- or whole-row
vars, always remap to they become typed NULLs.
…joins

PostgreSQL can reduce a FULL join to LEFT or RIGHT and then remove the
unused distributed side. Consider both FULL join inputs when looking for
eliminated relations, and add reduced-FULL regression cases.
Preserve unrelated locked versions and groups. Image requirements and the next verified development-image suffix must be paired before final CI.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Pair dependency source 23c7ed5 with published the-process f91158460e69f3904a694dd26bea5f7473240b45 images.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@colm-mchugh
Colm (colm-mchugh) force-pushed the ihalatci-citus-main-pg-update branch from e98c4a2 to aebfd72 Compare November 24, 2026 09:27
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
ibrahim halatci (ihalatci) added a commit that referenced this pull request Nov 26, 2026
<!-- copilot-assessment:v1 -->
### Agent assessment

Self-reported assessment, not an independent review.

Assessed revision: `401201bc117ba653d354c29219105357c94fae1d`

| Dimension | Assessment | Rationale |
|---|---|---|
| Change confidence | 7/10 | ↑ Supported PG15.20/16.16/17.12 builds, 132
view/subquery executions and matching local oracles, 30 final focused
tests and 624 check-multi-1 tests pass.<br>↑ Stable image pins and
release dependencies preserved.<br>↓ Full net PR includes earlier
compatibility, CDC and fixture changes beyond the new backport; fresh
hosted upgrade, N-1, advisory and packaging results remain pending.<br>↓
Independent q13/q70 and historical CI blockers remain outside this
correction. |
| Diagnosis confidence | 9/10 | ↑ Unchanged e444 reproduces view
failures on PG16/17 and nested ctid invalid-attnum on PG15; debugger
confirms positive eliminated identity exists but nullable scope is lost
across the original subquery.<br>↑ Colm's query-local backport removes
these failures without changing live projected or duplicate-preserving
results.<br>↓ FULL parity has no discriminating release13 negative
control; it is retained as the requested upstream correction. |
| Evidence fit | 9/10 | ↑ Exact simple/nested view and inline subquery
reproducers match review concerns and become correct on every supported
major.<br>↑ Added PG15 nested ctid regression fails unchanged and passes
the adaptation.<br>↓ This does not explain or repair the separate
q13/q70 wrong-result fixtures. |
<!-- /copilot-assessment -->

DESCRIPTION: Support PostgreSQL 15.20, 16.16 and 17.12 in Citus 13.2

**HOLD: the approved Colm backports are now published; merge and
publication of the separately validated q13/q70 planner correction
remain blocked. This PR still does not contain that correction.**

## Current paired stable images

Current head: `401201bc117ba653d354c29219105357c94fae1d`. Four validated
commits were fast-forwarded onto
`e444cd1090f4a9a8241cf2c32108df4daa594bca`; no force push, merge, image
change or dependency change. The stable suffix remains **`-v7148bd3`**.
Earlier compatibility, CDC and fixture corrections remain intact.

Paired with merged
[citusdata/the-process#271](citusdata/the-process#271),
merge `7148bd3cb9f8b40b168b2021a5cb4c1644b05b61`. Exact-merge [stable
publication45002632140](https://github.com/citusdata/the-process/actions/runs/45002632140)
completed successfully, all13jobs. The image owner independently
verified all13 GHCR manifests: extbuilder/exttester/failtester
for15.20/16.16/17.12, citusupgradetester for15.20/16.16,
pgupgradetester15.20-16.16-17.12, and stylechecker0.8.18. The stable
image source tree is identical to the tested development source8b259ad;
no dependency upgrades or support-category expansion were introduced by
promotion.

Automatically triggered exact-head [Build &
Test45658574479](https://github.com/citusdata/citus/actions/runs/45658574479)
and
[packaging45658574600](https://github.com/citusdata/citus/actions/runs/45658574600)
are **in progress**. No fresh-green or release-readiness claim; no
duplicate dispatch. Earlier suffix-only runs45003262705/45003262762 are
historical and are not evidence for this head.

## Colm backports and validation

Backported [#8975](#8975) commits
`3c6b8ac7d254e00828ec56d8d88940cbdf5630f9` (nullable subquery
normalization), `631738fc8843c2451919cef78d930e9f4c8bfeb6` (both FULL
inputs nullable), and `99e613193640e63aa5ddcbb7915a4c68c1b9e155`
(current-only regression isolation), with cherry-pick provenance.
Preserve release13 candidate identities, values_lists tagging and PG15
dead-relation/system-only remapping rather than converting PG15 join
inputs. The PG18-only SJE commit
`0bd8c54bf38b07a2228cb5d7e4a3ab7a602b8e19` is not applicable: supported
PG15/16/17 runtimes and APIs have no self-join elimination setting. No
dead guards or PG18 tests were copied.

New delta: eight files, 204 insertions/43 deletions. It restores the
self-contained current-only fixture, removes the moved assertion from
shared local_dist_join_mixed, and adds one nested-ctid regression with
runner-generated expected output. The remaining full #8975 net fixes
were compared: relevant catalog filtering, normalization ordering,
remapping and fixture cleanup fixes are already present/equivalent;
release14-only features, dependencies and image pins were not copied.

Supported-major results on PG15.20, PG16.16 and PG17.12, in isolated
retained exact-minor development-image environments:

- `./configure PG_CONFIG=/usr/lib/postgresql/<major>/bin/pg_config
CFLAGS='-O0 -g -Werror' && make -s -j4`: **passed on all three**; `make
-s install-all` and distributed/columnar `install-downgrades`:
**passed**.
- `python3 probe.py <major> <results-directory>`: **44/44 query cases
and 44/44 EXPLAINs passed per major**, matching 22 same-backend local
oracle queries; live view projections, barriers, materialization and
duplicate UNION controls retain their results.
- `make -s -C src/test/regress check-custom-schedule
SCHEDULE=colm13_focused_schedule WORKERCOUNT=2`: **10/10 passed per
major**, including the final added nested-ctid case.
- `make -s -C src/test/regress check-multi-1 WORKERCOUNT=2`: **208/208
passed per major** (624 tests). These runs precede the final test-only
commit, which changes only the current-only fixture excluded from
check-multi-1; C source and full-suite inputs are identical.
- Pinned stylechecker0.8.18 Uncrustify C check, expected-output
normalization and `git diff --check`: **passed**.

Unpatched e444 controls reproduce the nullable view failures on PG16/17
and PG15 nested `ctid` invalid-attnum failure. Patched raw count is5 and
the permanent fixture count is101. New fixture negative controls fail as
expected. Unpatched check-multi-1 passed208/208 on PG15/16; PG17
passed207/208 with an independent insert_select_repartition
intermediate-result file deletion after a parallel transaction
error/savepoint rollback. That failure did not occur in the patched run
and is not claimed fixed by this backport. Reduced-FULL cases already
pass release13 controls; no discriminating FULL negative is claimed.
These local results are not fresh stable-image hosted runtime
validation.

## Scope and changes

- Update supported PostgreSQL minors to15.20/16.16/17.12, corresponding
SQL snapshots and upgrade matrix; preserve historical upgrade Citus
versions and release dependencies.
- Required minor compatibility includes the PG15.20
`have_createdb_privilege` guard and release13 adaptations of planner
normalization/catalog identity handling. Existing focused alias,
dropped-column, whole-row, correlated-reference, CTE-side-effect and
outer-join regressions remain.
- Keep the published fixture repairs: actual follower topology/setup and
fresh clusters per repetition, bounded metadata-daemon startup, complete
statistics sort keys, COPY/ownership cleanup, coordinator registration,
remote-only transaction pool cap, denied-output-plugin allowlist setup,
two constraint sort keys, native metadata-sync prerequisites and nested
EXPLAIN-label filtering. Queries, values, security assertions and repeat
counts were not weakened.
- Regression Pipfiles/locks remain identical to release baseline
`37cd2d55548b84cb25950f82a80cd7a7a370ebaf`; canonical/devcontainer
differences remain. No history rewrite, runtime representative-order
change, new dependency repair or merge.

## Separately gated q13/q70 correction

The pre-existing query-local planner bitmap collision is tracked by
[#8838](#8838), with the proven
correction in [#8842](#8842).
These are non-closing references: this release backport does not close
the main issue. No duplicate issue or PR is needed.

The exact three-file #8842 correction is locally applied and validated
but **uncommitted and unpushed**. The newly published four-commit range
excludes it, and its retained patch hash is unchanged. Both complete
original250-query workloads match their same-backend local oracle on
PG15.20/16.16/17.12: q13=6/0.5; q70=26/18.3333333333333333. Each side
has250markers, each target occurs exactly once and is error-free;
targets are not filtered. Only the repository's two unsupported-query
error classes are excluded symmetrically. Focused existing regressions
passed11/11per major (33total), with strict builds, pinned formatting
and expected-output normalization passing. These results validate local
unpublished code, **not this PR's current pushed head**.

Original immutable artifacts remain14558684680(q13) and14038580795(q70);
later same-name artifact14213888555 is a different workload. Unchanged
release13 on actual PG16.15 and PG16.16 also fails both originals;
current pre-repair PG15.20 fails both. Untouched release14/main
reproduce the defect, so it is not claimed release13-only. The untouched
release13 PG15.20 build conflict is separate compatibility evidence, not
a fabricated baseline oracle.

## Historical CI and remaining blockers

Latest development-image head8b35613da had
[PR44794002638](https://github.com/citusdata/citus/actions/runs/44794002638)
**required CI success**,179successful/10failed/2skipped; [full
dispatch44793994712](https://github.com/citusdata/citus/actions/runs/44793994712)
**required CI failure**,177successful/12failed/2skipped. Both had30/32
advisory jobs pass;
[packaging44794002613](https://github.com/citusdata/citus/actions/runs/44794002613)
passed23/23. These remain historical development-image outcomes, not
results for the current head.

The full dispatch's additional required PG15
`background_rebalance_parallel_reference_tables` failure is proven
representative/debug-order nondeterminism:44dependency rows on each
side, identical numeric dependency edges and logical
colocation/reference-dependency multisets,12representative-label
differences. User explicitly keeps
[#8789](#8789) separate. Its
runtime representative-order policy was not ported and expectations were
not masked.

Reference-DDL errors in issue5248/issue8243 and schema-worker
warning-selection differences remain unclassified.
Historical8Lib/Coordinator N-1 failures remain disclosed. The earlier
six-hour node-health advisory hang did not recur in the latest
development runs, but is not claimed resolved. Fresh randomized green
cannot clear the known original q13/q70 fixtures or these independent
blockers.

Detailed retained CI/fixture chronology and causal controls: [ce607
audit](#8977 (comment)),
[a020
audit](#8977 (comment)),
[8b356
audit](#8977 (comment)),
and [separate8789
disposition](#8977 (comment)).

Historical focused commands: `./configure
PG_CONFIG=/usr/lib/postgresql/<major>/bin/pg_config CFLAGS='-O0 -g
-Werror'` and `make -s -j2 && make -s install` passed all3supported
majors for the normalization backport; `make -s -C src/test/regress
check-custom-schedule SCHEDULE=citus13-validation.schedule
WORKERCOUNT=2` passed8/8per major; `make -s -C src/test/regress
check-arbitrary-configs CONFIGS=AllSingleShardTableDefaultConfig
parallel=1 seed=41255` passed all3majors. These are prior
development-source validation, not a fresh stable-image runtime test.
The suffix-only change passed `git diff --check`; fresh hosted results
for401201bc remain pending.

Siblings: #8973(main), #8975(release14), #8974(release12).

---------

Co-authored-by: Ibrahim Halatci <ihalatci@microsoft.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Ibrahim Halatci <ihalatci@gmail.com>
Co-authored-by: Colm McHugh <colm.mchugh@gmail.com>
Co-authored-by: emelsimsek <13130350+emelsimsek@users.noreply.github.com>
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: Muhammad Usama <m.usama@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants