Skip to content

fix(pg_upgrade): guard wrappers server-options patch on supabase_vault (PSQL-1387)#2273

Open
samrose wants to merge 2 commits into
developfrom
sam/psql-1387-wrappers-vault-guard
Open

fix(pg_upgrade): guard wrappers server-options patch on supabase_vault (PSQL-1387)#2273
samrose wants to merge 2 commits into
developfrom
sam/psql-1387-wrappers-vault-guard

Conversation

@samrose

@samrose samrose commented Jul 14, 2026

Copy link
Copy Markdown
Collaborator

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 is psql -c with no ON_ERROR_STOP, but a single -c still
returns 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.1
and 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.

@samrose
samrose requested review from a team as code owners July 14, 2026 19:45
@samrose
samrose force-pushed the sam/psql-1387-wrappers-vault-guard branch from 71520d9 to bdb0c3a Compare July 15, 2026 12:59
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.

2 participants