#5202 closed defect (fixed)
It seems I can downgrade with ANY
Reported by: | robe | Owned by: | robe |
---|---|---|---|
Priority: | blocker | Milestone: | PostGIS 3.2.3 |
Component: | build | Version: | 3.2.x |
Keywords: | Cc: |
Description
I thought we had protection for this, but maybe the protection is only in the
ALTER EXTENSION .. UPDATE;
machinery.
To test, I installed postgis 3.3.0dev.
CREATE EXTENSION postgis;
Then followed by installing postgis 3.2.2.
Then run:
SELECT postgis_extensions_upgrade();
Downgraded me to 3.2.2.
You can do the same by messing with the control files
Change History (16)
comment:1 by , 2 years ago
Owner: | changed from | to
---|
comment:2 by , 2 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
comment:3 by , 2 years ago
Milestone: | PostGIS 3.3.0 → PostGIS 3.2.3 |
---|---|
Resolution: | fixed |
Status: | closed → reopened |
Version: | master → 3.2.x |
The protection should actually be in the upgrade script itself (postgis_upgrade.sql). If you can downgrade by loading postgis_upgrade.sql then this bug is not fixed yet.
The bug still exists, and is in the older postgis version. Didn't check how old but I was able to install 3.3.0dev and downgrade to 3.2.3dev
comment:4 by , 2 years ago
Ok I went looking the code and it does indeed NOT attempt to protect against downgrade, but ONLY against "upgrades" between different _major_ versions. Being 3.3 and 3.2 both in the same "major" version the upgrade script does not complain.
comment:14 by , 2 years ago
Regina this is now fixed properly, but we still don't have any CI test to check that downgrades are not possible. I may add the test to utils/check_all_upgrades.sh
or create another script utils/check_all_downgrades.sh
. Maybe we should have another ticket for this
comment:15 by , 2 years ago
For the record: the backport to 2.5 broke something, see #5203 (ci is green in later branches)
In 2f08c4f/git: