fix(pg_upgrade): guard wrappers server-options patch on supabase_vault (PSQL-1387)#2273
Open
samrose wants to merge 2 commits into
Open
fix(pg_upgrade): guard wrappers server-options patch on supabase_vault (PSQL-1387)#2273samrose wants to merge 2 commits into
samrose wants to merge 2 commits into
Conversation
hitmands
approved these changes
Jul 15, 2026
samrose
force-pushed
the
sam/psql-1387-wrappers-vault-guard
branch
from
July 15, 2026 12:59
71520d9 to
bdb0c3a
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.
execute_wrappers_patch loops foreign servers and references vault.secrets,
but was only gated on the wrappers extension. A project with wrappers + a
foreign server but no supabase_vault hits
relation "vault.secrets" does not exist. run_sql ispsql -cwith no ON_ERROR_STOP, but a single -c stillreturns exit 1 on a SQL error, and this step is unguarded (no
|| true)under
set -e+trap cleanup ERR— so it aborts complete.sh at step 3.1and forces a rollback.
Add a supabase_vault precondition to the IF gate, mirroring the sibling
REENCRYPT_VAULT_SECRETS_QUERY block. When vault is absent the block now
no-ops instead of failing the upgrade.