AI & Agent Dev Bug Sandbox logo
AI & Agent Dev Bug Sandbox
Back to Radar

Branch Provisioning Hangs When Source Postgres Patch Version Differs From Latest Target Patch

Branch creation returns 201 and a branch record, but provisioning never completes when the source project runs an older Postgres patch version than the latest used for new branches, leaving the branch indefinitely in CREATING_PROJECT/COMING_UP with no surfaced error.

highConfidence 85%NestJSAffected Vsupabase-Postgres-17.6.1.084Affected Vsupabase-Postgres-17.6.1.105

Origin Analysis

The branch provisioning flow unconditionally allocates compute using the latest Postgres patch version without comparing the source project's Postgres patch version, causing cross-version schema/data cloning to hang silently and never reconcile.
1. Ensure source project is on Postgres 17.6.1.084 while latest is 17.6.1.105. 2. POST /v1/projects/{REF}/branches with branch_name and region. 3. Receive HTTP 201 with branch status CREATING_PROJECT. 4. Poll branch detail; after 20-30+ minutes status remains CREATING_PROJECT/COMING_UP. 5. Observe DB hostname NXDOMAIN and health endpoint returns UNHEALTHY for db, pooler, storage. 6. Delete branch via DELETE /v1/branches/{id} succeeds.

Fixing Code Block

Edge Case Audit

Race condition: source may be upgraded between the check and provisioning; use a distributed lock or re-check after compute allocation. Version comparison must be semantic (e.g., semver), not lexicographic, to avoid false mismatches. Older API clients may not handle 409; ensure the dashboard and CLI surface the error gracefully. Rollback: revert this check to restore previous behavior, but be aware it reintroduces silent infinite hangs.

Ecosystem Topology