Formulae of PostgreSQL extensions #5157
Unanswered
svoop
asked this question in
Writing Formulae/Casks
Replies: 1 comment 6 replies
-
Seeing how, despite repeated attempts, nobody managed to get postgis updates to work. I think deprecation and deleting the formula is more likely. |
Beta Was this translation helpful? Give feedback.
6 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Output of
brew config
Output of
brew doctor
Description of issue
The current situation for PostgreSQL extensions adds a dependency from the unversioned extension formula to the versioned PostgreSQL formula.
A notorious example ist PostGIS which as of today still depends on
postgresql@14
even though the newest version ispostgresql@16
. As PostgreSQL releases one major per year, PostGIS now enforces the use of a PostgreSQL version that's more than 2 years old and will reach EOL in November 2026.The obvious problem with PostgreSQL extensions: The versions of extensions follow their own rules and are not linked to PostgreSQL. Usually, a specific version of the extension can be used with different versions of PostgreSQL, therefore versioning PostgreSQL extension formulae the "normal way" doesn't help.
To work around this, @ozeias has created a
postgis@15
formula which pulls a (custom) version ofpostgresql@15
. (Simple version bumps are sufficient to make his formulae work for@16
as well.)TL;DR I propose using versions in a different manner for PostgreSQL extensions: Formulae which provide PostgreSQL extensions use versioning synced to the corresponding version of PostgreSQL. For example:
postgresql@14
is pulled bypostgis@14
(which is postgis-3.3.6)postgresql@15
is pulled bypostgis@15
(which is postgis-3.3.6)postgresql@16
is pulled bypostgis@16
(which is postgis-3.3.6)postgresql@17
will be pulled bypostgis@17
(which will be at least postgis-3.4.x according to the version matrix)I know, this is kind of a hack, but IMO a reasonable one. It's far more likely for project developers to require a specific version of PostgreSQL and if the project uses an PostgreSQL extension, things get ugly. In the less likely case the extension itself has to be versioned, this version could be postfixed:
postgis@16-3-4
.What do you think, would this be a way forward out of the current deadlock? Or are there better ways to address this with minimal impact on Homebrew?
Related to #3987
Beta Was this translation helpful? Give feedback.
All reactions