Skip to content

Phase 4: real pg_upgrade support via a reduced bin/test_existing - #31

Open
jnasbyupgrade wants to merge 1 commit into
phase3.5-ci-hygienefrom
phase4-pg-upgrade
Open

Phase 4: real pg_upgrade support via a reduced bin/test_existing#31
jnasbyupgrade wants to merge 1 commit into
phase3.5-ci-hygienefrom
phase4-pg-upgrade

Conversation

@jnasbyupgrade

Copy link
Copy Markdown
Contributor

Stacked on #30 (phase 3.5: CI hygiene). Adds binary `pg_upgrade` coverage - the one U&U scenario that genuinely can't live inside a single `pg_regress` invocation, since `pg_upgrade` is an external binary process.

What changed

  • New `pg-upgrade-test` CI job: install 0.9.6 on an old PostgreSQL major, plant + prove the dependency guard, binary `pg_upgrade` to a newer major, `ALTER EXTENSION UPDATE` the migrated objects, then run the suite against the real upgraded database in existing mode. Matrix: 10→18 and 12→18 (no bridge-update leg - count_nulls has always been pure SQL functions with no `SELECT *`-over-catalog views, so it has no known pg_upgrade-unsafe old version to bridge past). No stepwise every-major climb either, for the same reason (nothing catalog-touching to break at a specific boundary).
  • `bin/test_existing`: notably smaller than it would have needed to be before phase 3's `test/install` work. Only `prepare-old` (old-cluster setup before the real `pg_upgrade` binary runs) and `run-suite` (assert + re-prove the guard + run the suite via `--use-existing` afterward) are genuinely external-to-`pg_regress` concerns, plus a small `update` subcommand for the post-upgrade `ALTER EXTENSION UPDATE` step. There's no `update-scenario` subcommand at all - that whole scenario is just `make test-update` now (phase 3's `test/install`-driven update mode), since an in-place update has no external step to drive.
  • `run_suite()` gates on plain `make test`, not the old belt-and-suspenders `make test && make verify-results` combo - pgxntool 2.3.0 (Update pgxntool to 2.3.0 #25) already made `make test` itself exit non-zero on regression failures, so the extra call is redundant now.

Not yet crossed with `TEST_SCHEMA` - that's the next phase, once both this job and `extension-update-test` can cross it together.

Verification

Locally against PG17: `prepare-old` → `update` → `run-suite` all pass end to end, without a real `pg_upgrade` (this container's PG12/PG17 clusters are persistent shared dev infra, not disposable, so - same reasoning as the earlier pg-tle-test work - the actual binary `pg_upgrade` leg is left for CI's ephemeral containers to exercise).

Adds the pg-upgrade-test CI job: install 0.9.6 on an old PostgreSQL major,
plant + prove a dependency guard, binary pg_upgrade to a newer major,
ALTER EXTENSION UPDATE the migrated objects, then run the suite against
the real upgraded database in existing mode.

bin/test_existing is much smaller than the equivalent script would have
been pre-test/install: only prepare-old and run-suite are genuinely
external-to-pg_regress concerns (a real pg_upgrade binary run isn't
something pg_regress can invoke itself), plus a small `update` subcommand
for the post-upgrade ALTER EXTENSION UPDATE step. There's no
update-scenario subcommand at all - that entire scenario is just `make
test-update` now (test/install/load.sql's own 'update' mode, added in
phase 3), since an in-place update has no external step to drive.

run_suite() gates on plain `make test`, not the old belt-and-suspenders
`make test && make verify-results` - pgxntool 2.3.0 (this repo's phase 0)
already made `make test` itself exit non-zero on regression failures.

Not yet crossed with TEST_SCHEMA - that's the next phase, once both this
job and extension-update-test can cross it together.

Verified locally against PG17 (prepare-old -> update -> run-suite, without
a real pg_upgrade - this container's clusters are persistent shared
infra, so the actual binary pg_upgrade leg is left for CI's ephemeral
containers, same reasoning as the pg-tle-test work).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Aug 1, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: f9e236a2-553a-42d7-93a8-e7b2689df860

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions

github-actions Bot commented Aug 1, 2026

Copy link
Copy Markdown

Code review

No issues found. Checked for bugs and CLAUDE.md compliance.

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.

1 participant