build: Allow installing Debian packages for multiple PostgreSQL versions
What kind of change does this PR introduce?
Build (packaging update):
This change suffixes the Debian packages with the major PostgreSQL version so they can be installed side by side with packages for other PostgreSQL versions, and installs the extension files directly in the configured extension / lib directories to avoid file install conflicts when installing the extension for multiple PostgreSQL versions.
What is the current behavior?
When installing for a different PG major version the package manager will say it's already installed, uninstalling and upgrading manually produces files at the same location and does not allow multiple clusters to be run side by side (not what I need, but something to call out)
What is the new behavior?
Debian packages for different PG major versions can be installed side by side
I've run and verified the release workflow in my fork by adding a new debian revision tag: https://github.com/terencehonles/pg_jsonschema/actions/runs/20129919128 (updated for testing the arm64 builds) with #86
@terencehonles did you also confirm by successfully installing the new deb released packages side by side?
@terencehonles could you please also share your use case about needing to install multiple versions side by side?
@terencehonles did you also confirm by successfully installing the new deb released packages side by side?
Yes, I've done that for both pg17 and pg18 (unreleased, but I used the builds from the builds in my fork). We're now happily running on pg18!
@terencehonles could you please also share your use case about needing to install multiple versions side by side?
My use case was in order to install all the dependencies for upgrading between PostgreSQL major versions before performing the upgrade in order to minimize downtime. I was using pg_upgrade with --link so I wouldn't be able to roll back as easily, but had I not used --link having both versions installed would also allow a quicker rollback rather than having to fuss with the package manager in order to uninstall and then reinstall the right versions.
...then there's also the obvious use case for if you need to run multiple PostgreSQL servers because you can't migrate everything at once (for whatever reason), luckily that's not us :wink:
friendly ping @imor
thanks! looking forward to the next release :slightly_smiling_face: