Structural comparison in pg-upgrade-test (both twin databases) - #38
Draft
jnasbyupgrade wants to merge 1 commit into
Draft
Structural comparison in pg-upgrade-test (both twin databases)#38jnasbyupgrade wants to merge 1 commit into
jnasbyupgrade wants to merge 1 commit into
Conversation
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
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. Comment |
3 tasks
Code reviewNo issues found. Checked for bugs and CLAUDE.md compliance. |
jnasbyupgrade
marked this pull request as draft
August 4, 2026 21:11
Adapts the intent of #35 (branched before pg-upgrade-test's twin-database redesign, now stale) to the current job shape: prepare-old/update/run-suite already loop bin/test_existing over count_nulls_upgrade_none (schema "") and count_nulls_upgrade_quoted (schema Quoted) sharing one binary pg_upgrade call. Adds an EXISTING_DB argument to bin/compare_fresh_vs_update so it can structurally diff an already-populated database (the real pg_upgraded one) against a fresh install, instead of only ever creating its own scratch "updated" database - then loops that comparison over both databases/schemas after run-suite, same as extension-update-test already does for its own in-place update leg.
jnasbyupgrade
force-pushed
the
phase6b-compare-in-pg-upgrade-test
branch
from
August 4, 2026 23:17
8f0a273 to
e74ffc6
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Supersedes #35, which is now stale: it was branched before pg-upgrade-test's twin-database redesign (the
schemamatrix axis was removed and replaced with a single job that prepares two databases -count_nulls_upgrade_none(schema none) andcount_nulls_upgrade_quoted(schema Quoted) - ahead of one binary pg_upgrade call, then loops bin/test_existing's update/run-suite over both). #35 referencedmatrix.schemaand a singlecount_nulls_upgradedatabase name that no longer exist in that form.This PR adapts #35's actual intent to the new shape:
EXISTING_DBargument back tobin/compare_fresh_vs_update(it doesn't exist onphase6-compare-and-report's current version - both branches independently added this script, and only Run bin/compare_fresh_vs_update against the real pg_upgraded database too #35's version had this parameter). When given, the script diffs that already-populated database against a fresh install instead of creating+updating its own scratch database, and leaves it untouched on exit (only scratch databases it created itself are dropped).pg-upgrade-testthat loops the comparison over both twin databases, each against a fresh install in its own schema:bin/compare_fresh_vs_update "" 0.9.6 count_nulls_upgrade_nonebin/compare_fresh_vs_update Quoted 0.9.6 count_nulls_upgrade_quotedThis catches a divergence class the fixed pgTAP suite doesn't: an object left subtly different (body, comment, ACL) by surviving a real binary catalog migration, as opposed to only an in-place
ALTER EXTENSION UPDATE(whichextension-update-testalready covers with the same tool).Verification
This container's PG12/PG17 clusters are shared persistent dev infra, not disposable, so a real
pg_upgradebetween them wasn't run. Instead, verified the mechanics against plain (non-upgraded) databases with the same names/schemas the CI job produces:bin/test_existing prepare-oldfor bothcount_nulls_upgrade_none(schema "") andcount_nulls_upgrade_quoted(schema Quoted)bin/test_existing update+run-suitefor both - both passbin/compare_fresh_vs_update "" 0.9.6 count_nulls_upgrade_noneand the Quoted equivalent - both report IDENTICAL and exit 0COMMENT ON FUNCTION ...on one of the existing databases, re-ran the comparison - it correctly printed a real diff and exited nonzero, then reverted and confirmed it passes clean againcompare_fresh_vs_update_*databases are dropped)The real binary pg_upgrade leg itself is left for CI's ephemeral containers.