Description of problem: When upgrading fedora 19 to 20, postgres + postgis, upgrade fails. pg_dump: [archiver (db)] query failed: ERROR: could not access file "$libdir/postgis-2.0": No such file or directory It seems the upgrade script needs an earlier version of postgis installed in parallell, but the upgrade removes this. Version-Release number of selected component (if applicable): How reproducible: Steps to Reproduce: 1. 2. 3. Actual results: Expected results: Additional info:
This is what I already fixed in the community RPMS :( I will try to apply the same patch to Fedora RPMS.
Do you have a pointer to the patch?
Created attachment 980790 [details] adding function necessary for upgrade
Created attachment 980791 [details] adding -devel subpackage to postgresql (headers and so) necessary to compile postgis against previous version
This message is a reminder that Fedora 20 is nearing its end of life. Approximately 4 (four) weeks from now Fedora will stop maintaining and issuing updates for Fedora 20. It is Fedora's policy to close all bug reports from releases that are no longer maintained. At that time this bug will be closed as EOL if it remains open with a Fedora 'version' of '20'. Package Maintainer: If you wish for this bug to remain open because you plan to fix it in a currently maintained version, simply change the 'version' to a later Fedora version. Thank you for reporting this issue and we are sorry that we were not able to fix it before Fedora 20 is end of life. If you would still like to see this bug fixed and are able to reproduce it against a later version of Fedora, you are encouraged change the 'version' to a later Fedora version prior this bug is closed as described in the policy above. Although we aim to fix as many bugs as possible during every release's lifetime, sometimes those efforts are overtaken by events. Often a more recent Fedora release includes newer upstream software that fixes bugs or makes them obsolete.
I think this is working for most of cases. However, the simultaneous upgrade of postgis and postgresql will fail. I.e. the .so from postgis-upgrade package must be build against postgresql-upgrade-devel package which doesn't currently exists in fedora. It seems to be reasonable to track this issue in future. Especially, when the patch is attached. The workaround is to use right version of postgis.so from community repos.
I just ran into this issue upgrading from Fedora 25 to 26. The postgresql service does not start anymore after the update: When looking at the status of the failed service it suggests: > postgresql-setup --upgrade The pg_upgrade tool fails and directs me to the upgrade log. And that directs to the more detailed log that contains: > pg_dump: [archiver (db)] query failed: ERROR: could not access file "$libdir/postgis-2.2": No such file or directory In Fedora 26 the version of postgis is 2.3.2.
*** Bug 1342285 has been marked as a duplicate of this bug. ***
I also hit this upgrading 25->26
For the record, was able to upgrade as follows. I (possibly unnecessarily) installed 9.5 from upstream source into /opt, installed postgis 2.2 and 2.3 into that postgres installation, started postgres with my existing databases using that installation, upgraded postgis in all my databases to 2.3, then manually ran the distro packaged pg_update, which succeeded, and after which the system postgres was able to start. There may be an easier way to do it. See: https://www.postgresql.org/docs/9.6/static/pgupgrade.html http://postgis.net/install/ and some additional information at: http://blog.cleverelephant.ca/2016/08/postgis-upgrade.html
Same for me, hopefully PostgreSQL is a professional database ... Old pg 9.5 is in /usr/lib64/pgsql/postgresql-9.5 But Fedora don't ship pg_config nor includes, nice to compile extensions !!! My old test dababase used a folk of Postgis 2.1 and 2.2 I tried to compile / hack Postgis 2.1, but I failed to match pg version hack because json-c and postgres are not compatible with 2.1 Lucky, I backuped my old system, so I get back postgis-2.1.so and installed it to /usr/lib64/pgsql/postgresql-9.5/lib. I had also to install an older proj4 library. Then I tried to upgrade, but it never ended for some reasons ??? So I started pg 9.5 using su postgres /usr/lib64/pgsql/postgresql-9.5/bin/postgres -D /var/lib/pgsql-backup/data -p 5432 -h '*' & And dumped my databases using pg_dump -p 5432 -h 127.0.0.1 XXXX Finally, I Lost 3 hours ! My advice, dump your database before to upgrade.
reported https://bugzilla.redhat.com/show_bug.cgi?id=1499535 and https://bugzilla.redhat.com/show_bug.cgi?id=1499532
same problem upgrading from 25 to 26
This RFE is unlikely to happen for F25 -> F26 transition, but since there's new PostgreSQL major version in F28, we should be OK to have upgrade-path for PostGIS + PostgreSQL in F27 -> F28 time. In private branch is PoC: https://src.fedoraproject.org/rpms/postgis/commits/private-praiskup-postgis-upgrade Any test/comment is welcome.
In the meantime (F25 -> F26) please go the 'hard upgrade' way: https://postgis.net/docs/postgis_installation.html#hard_upgrade
Complement for #14, testing build is here: https://copr.fedorainfracloud.org/coprs/praiskup/postgresql-10/
I updated the private branch once more (per Honza's/Petr's) comment, so that now the %postgresql_upgrade_prefix is defined in postgresql-upgrade-devel, and we don't have to hardcode the path into <plugin>-upgrade package. I rebuilt the server/plugin in the testing copr, and then I tried to: 1. export small part of openstreetmaps map into map.osm 2. import that into testing database v9.6 by osm2pgsql (thanks to pkubat for the howto) 3. install 'postgis-upgrade' (transitively installs postgresql-upgrade) 4. hit 'postgresql-setup --upgrade' + start the new service 5. remove 'postresql-upgrade' (removes also postgis-upgrade, those packages are not needed anymore) 6. manually run 'alter extension postgis update;' And the upgrade scenario went smoothly from PostgreSQL 9.6 to PostgreSQL 10, while upgrading from PostGIS 2.3 to PostGIS 2.4 at the same time.
And it is now built in Rawhide: https://koji.fedoraproject.org/koji/buildinfo?buildID=986189 Built from: https://src.fedoraproject.org/rpms/postgis/blob/bc43e98a0b64dc48163e908a050f9e0cc0857f5c/f/postgis.spec There are non-trivial changes, so any review/test/bugreport is really welcome, rather sooner than later.
If I install F27Beta then DNF system upgrade to rawhide, would that be a valid test?
(In reply to Dave Allan from comment #19) > If I install F27Beta then DNF system upgrade to rawhide, would that be a > valid test? Yes, F27 has PostgreSQL 9.6 + PostGIS 2.3.3, while F28 (Rawhide) has PostgreSQL 10 + PostGIS 2.4.0. Don't forget to install 'postgis-upgrade' package.
I'm getting a failure attempting to install postgis-upgrade. Steps I took: 1) install F27Beta and confirm a working postgis instance 2) dnf system-upgrade to rawhide 3) dnf install postgresql-upgrade (forgetting to install postgis-upgrade) 4) dnf install postgis-upgrade Error: Problem: conflicting requests - nothing provides liblwgeom-2.3.so.0()(64bit) needed by postgis-upgrade-2.4.1-1.fc28.x86_64
Thank you for the test, Dave. It should be now fixed by: https://src.fedoraproject.org/rpms/postgis/c/47ea3f594d822c41d7e129c8a4b310d33157b5e6?branch=master
Ok, I'm able to install postgis, postgis-utils and postgis-upgrade from that link. postgresql-setup --upgrade then succeeds and I'm able to start postgres and upgrade postgis. The only remaining question I have is that I get this error when attempting to update the address standardizer: gistest=# alter extension address_standardizer update; ERROR: extension "address_standardizer" has no update path from version "2.3.3" to version "2.4.1" Dropping the extension and recreating it installs 2.4.1. I don't normally use the address standardizer, so I don't know if this is correct behavior.
Hm, the address_standardizer--2.3.3--2.4.1.sql is missing: # rpm -ql postgis | grep 2.3.3 | grep sql$ /usr/share/pgsql/extension/postgis--2.3.3--2.4.1.sql /usr/share/pgsql/extension/postgis_tiger_geocoder--2.3.3--2.4.1.sql /usr/share/pgsql/extension/postgis_topology--2.3.3--2.4.1.sql I'm not sure whether this doesn't deserve separate issue (maybe even upstream). All the plugins' Makefiles (except for address_standardizer's one) do: for OLD_VERSION in $(UPGRADEABLE_VERSIONS); ... Workaround could be: ln /usr/share/pgsql/extension/address_standardizer--1.0--2.4.1.sql \ /usr/share/pgsql/extension/address_standardizer--2.3.3--2.4.1.sql
Yeah, question for upstream if anything. Anyway, the upgrade path now works for me, so thanks for the fix.