-
-
Notifications
You must be signed in to change notification settings - Fork 29
Description
Feature request
When dbdev install is called for a specific version (or latest), it currently installs every published version of the extension into pg_tle's catalog. This is wasteful when there is no continuous upgrade path across all versions.
Problem
Consider an extension with this version history:
4.0.0,4.1.0,4.2.0(connected via upgrade scripts)5.0.0,5.0.0--5.1.0,5.1.0(connected via upgrade scripts)- No upgrade path from 4.x → 5.x (manual migration required)
When a user requests version 5.1.0, dbdev installs all 4.x versions into pg_tle even though:
- No
ALTER EXTENSION ... UPDATEpath exists from any 4.x version to any 5.x version - Nobody requesting 5.x would fresh-install a 4.x version
- The 4.x install scripts are dead weight in the catalog
This adds unnecessary clutter and could confuse users into thinking an upgrade path exists when it doesn't.
Proposed behavior
When installing a specific version, dbdev should build the version upgrade graph and only install versions in the connected component containing the requested version. For the example above, requesting 5.1.0 would only install:
5.0.0(full install script)5.0.0--5.1.0(upgrade script)5.1.0(full install script)
The 4.x versions would be skipped entirely.
Additional context
This came up with pointsource/supabase_rbac, which has a major version boundary between v4.x and v5.x with no automated upgrade path. The v5 rewrite changed the data model extensively enough that migration is manual (export/reinstall/reimport).