feat: add support for in-place major upgrades with Image Volume extensions#10366
Open
NiccoloFei wants to merge 3 commits intomainfrom
Open
feat: add support for in-place major upgrades with Image Volume extensions#10366NiccoloFei wants to merge 3 commits intomainfrom
NiccoloFei wants to merge 3 commits intomainfrom
Conversation
Signed-off-by: Niccolò Fei <niccolo.fei@enterprisedb.com>
Signed-off-by: Niccolò Fei <niccolo.fei@enterprisedb.com>
Signed-off-by: Niccolò Fei <niccolo.fei@enterprisedb.com>
Contributor
|
❗ By default, the pull request is configured to backport to all release branches.
|
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.
This patch, together with https://commitfest.postgresql.org/patch/6562/ which has been committed into PG19, provides support for in-place major upgrades (via pg_upgrade) of Clusters that use Image Volume extensions.
Changes
oldandnewmajor versions inside theupgradejoboldandnewImageVolumes to coexist (since the volume name would collide), I've renamed all new extensions by adding anupgrade-target-prefix (just in theupgradejob)custom.confGUCs ofpgdata-newaccording to the rename of the extensionsEnvVarsto the upgrade job (for botholdandnewextensions)Testing
Start from the following Cluster:
ghcr.io/niccolofei/postgis:3.6-19-trixieis a PostGISstable-3.6extension image built from source on top ofghcr.io/cloudnative-pg/postgresql-trunk:19-202603231300-minimal-trixie.spec.imageCatalogRef.majorto19and applyversionfor each extensions, the old one will be retained and you'll have to either:ALTER EXTENSION <extname> upgradeeach extensionupdate_extensions.sqlproduced bypg_upgrade, which can be found inside thepg_dataNote: because we are testing with development versions built from source, when upgrading extensions you'll most likely receive an error such as
in case there's not yet an upgrade path available from the previous version.
Closes #10049
Assisted-by: Claude