Bug 240645 - databases/postgresql* : upgrading postgres fails when database(s) uses postgis extension
Summary: databases/postgresql* : upgrading postgres fails when database(s) uses postgi...
Status: In Progress
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: pgsql
Depends on:
Reported: 2019-09-17 14:07 UTC by smars
Modified: 2020-02-15 12:09 UTC (History)
2 users (show)

See Also:


Note You need to log in before you can comment on or make changes to this bug.
Description smars 2019-09-17 14:07:22 UTC
The line (20190829) in /usr/ports/UPDATING instructing how to convert database to the newest version fails when databases to convert use the postgis extension:

--> /usr/ports/UPDATING
su -l postgres -c "pg_upgrade -b /tmp/pg-upgrade/usr/local/bin/ -d /usr/local/pgsql/data/ -B /us      r/local/bin/ -D /var/db/postgres/data11/ -U pgsql "

It is a version incompatibility problem of databases/postgis* (new version is 2.5, previous version 2.4):

-> /var/log/messages:
"could not access file "$libdir/postgis-2.4": No such file or directory"

I tried:
1. to create a simlink (no effect)
2. to install the previous version of postgis in /tmp/pg-upgrade (to do something similar as what is proposed in UPDATING)
-> /var/log/messages:
ERROR:  incompatible library "/tmp/pg-upgrade/usr/local/lib/postgresql/postgis-2.4.so": version mismatch
Sep 17 21:39:40 <local0.warn> * postgres[5237]: [3-2] DETAIL:  Server is version 9.5, library is version 9.4.

Comment 1 Palle Girgensohn freebsd_committer 2020-02-15 12:09:16 UTC

Sorry for this late answer. From your error message, it seems to me that you simply installed the wrong version of the library?