Bug 2254839
| Summary: | postgresql-setup --upgrade fails and postgis-upgrade is unavailable | ||
|---|---|---|---|
| Product: | [Fedora] Fedora | Reporter: | Georg Sauthoff <fedora> |
| Component: | postgis | Assignee: | Sandro Mani <manisandro> |
| Status: | CLOSED ERRATA | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
| Severity: | medium | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | 39 | CC: | admiller, devrim, hhorak, manisandro, pkubat, praiskup |
| Target Milestone: | --- | Keywords: | Reopened |
| Target Release: | --- | ||
| Hardware: | Unspecified | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Fixed In Version: | postgis-3.3.4-2.fc38 postgis-3.3.4-2.fc39 | Doc Type: | If docs needed, set a value |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2023-12-28 00:53:13 UTC | Type: | --- |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
|
Description
Georg Sauthoff
2023-12-16 17:56:05 UTC
You will need to update first to F38 and then to F39, or at least manually go through the F38 postgis package (which contains an -upgrade subpackage) [1]. F38 to F39 (and currently F39 to F40) does not provide any -upgrade package, since the postgis major version did not change between these releases. [1] https://koji.fedoraproject.org/koji/buildinfo?buildID=2207242 Sandro wrote: > You will need to update first to F38 and then to F39, or at least manually go through the F38 postgis package (which contains an -upgrade subpackage) I'm sorry, this is still a bug because it violates the general Fedora upgrade promise: > Upgrades to the very next release (e.g. 38 to 39) as well as upgrades skipping one release (e.g. 37 to 39) are both supported. https://docs.fedoraproject.org/en-US/quick-docs/upgrading-fedora-offline/#sect-how-many-releases-can-i-upgrade-across-at-once --- Anyhow, I worked around this issue and successfully migrated my postgis enabled database by installing the Fedora 37 postgres/postgis versions from the upstream repository and manually invoking pg_upgrade like this: cd /var/lib/pgsql tar cfvz /root/pg-14-data.tar.gz data mv data data.old cd /usr/bin/postgresql-setup --initdb dnf install https://download.postgresql.org/pub/repos/yum/reporpms/F-39-x86_64/pgdg-fedora-repo-latest.noarch.rpm dnf install postgresql14-server dnf install postgis32_14 sudo -u postgres pg_upgrade --old-datadir /var/lib/pgsql/data.old --new-datadir /var/lib/pgsql/data --old-bindir /usr/pgsql-14/bin --new-bindir /usr/bin systemctl start postgresql.service sudo -u postgres psql -f /var/lib/pgsql/update_extensions.sql sudo -u postgres reindexdb mydb sudo -u postgres /usr/bin/vacuumdb --all --analyze-in-stages rm -rf /var/lib/pgsql/data.old dnf remove postgresql14-server postgis32_14 dnf remove pgdg-fedora-repo-'*' Problem here is that postgis-2.x does not build against postgres >= 15, so I'm afraid I wouldn't know how to offer a f37 -> f39 upgrade path short of patching postgis2 with PG15 support downstream which is non-trivial. Hm, why postgis-2.x? AFAICS, Fedora 37 provided postgis version 3.2, didn't it? https://src.fedoraproject.org/rpms/postgis/blob/f37/f/postgis.spec#_8 And 3.2 seems to build against postgres 15, cf. e.g.: postgis32_15-3.2.5-2PGDG.f39.x86_64.rpm 20-Oct-2023 06:36 4063501 postgis32_15-3.2.6-1PGDG.f39.x86_64.rpm 21-Nov-2023 16:31 4067387 https://download.postgresql.org/pub/repos/yum/15/fedora/fedora-39-x86_64/ Sorry, I missed a point here, U was considering only the postgis-2.x -> 3.x upgrade, but indeed the issue here is upgrading postgis 3.x DBs between postgres versions. I've modified the postgis package to provide upgrade packages from the previous postgres version to the current one. FEDORA-2023-9386ccb4bc has been submitted as an update to Fedora 38. https://bodhi.fedoraproject.org/updates/FEDORA-2023-9386ccb4bc FEDORA-2023-9386ccb4bc has been pushed to the Fedora 38 testing repository. Soon you'll be able to install the update with the following command: `sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2023-9386ccb4bc` You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2023-9386ccb4bc See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates. FEDORA-2023-7891a7002d has been pushed to the Fedora 39 testing repository. Soon you'll be able to install the update with the following command: `sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2023-7891a7002d` You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2023-7891a7002d See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates. FEDORA-2023-9386ccb4bc has been pushed to the Fedora 38 stable repository. If problem still persists, please make note of it in this bug report. FEDORA-2023-7891a7002d has been pushed to the Fedora 39 stable repository. If problem still persists, please make note of it in this bug report. |