Community Packages

Please read this before reporting a bug:

Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!

FS#64606 - Postgis broken with new postgresql 12.1 package

Attached to Project: Community Packages
Opened by Johannes Schriewer (dunkelstern) - Friday, 22 November 2019, 07:53 GMT
Last edited by Jaroslav Lichtblau (Dragonlord) - Thursday, 28 November 2019, 17:33 GMT
Task Type Bug Report
Category Packages
Status Closed
Assigned To Jaroslav Lichtblau (Dragonlord)
Architecture All
Severity High
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 8
Private No


If you try to migrate from a postgres 11.x instance to the new postgres 12.1, Postgres will complain that the installed PostGIS library is incompatible:

When running `pg_upgrade`:

could not load library "$libdir/postgis-2.5": ERROR: could not load library "/usr/lib/postgresql/": /usr/
lib/postgresql/ undefined symbol: AllocSetContextCreateExtended

could not load library "$libdir/rtpostgis-2.5": ERROR: incompatible library "/usr/lib/postgresql/": ver
sion mismatch
DETAIL: Server is version 12, library is version 11.

I think it just needs a rebuild against postgres 12.
This task depends upon

Closed by  Jaroslav Lichtblau (Dragonlord)
Thursday, 28 November 2019, 17:33 GMT
Reason for closing:  Implemented
Additional comments about closing:  postgis 3.0.0-1
Comment by Laurențiu Nicola (lnicola) - Friday, 22 November 2019, 11:39 GMT
A rebuild fixes it, but I haven't been able to migrate my old data using pg_upgrade because it uses a wrong path to load the extension:

pg_dump: error: query failed: ERROR: could not access file "$libdir/postgis-2.5": No such file or directory

Note the literal $libdir.

[pid 35726] stat("$libdir/postgis-2.5", 0x7ffdd59ef690) = -1 ENOENT (No such file or directory)

I didn't try using a manual backup and restore.
Comment by Roel (roelpaddestoel) - Saturday, 23 November 2019, 20:48 GMT
I managed to install postgis 3.0 on postgresql 12 by compiling version 2.5.3 as well and putting the files, and in /usr/lib/postgresql.
Then run:
alter extension postgis update;
as described on
Comment by Dian M Fay (dmfay) - Sunday, 24 November 2019, 04:48 GMT
I got caught by this after the new icu release forced me to upgrade from Postgres 11, and was able to install PostGIS 3.0.0 by tweaking the PKGBUILD (pkgver, pkgrel, sha256sums). I didn't try pg_upgrade, but there haven't been any surprises.
Comment by florian (elseif) - Wednesday, 27 November 2019, 11:58 GMT
hm I just installed postgis from the AUR, can somebody examplain to me, how I can rebuild it against postgres 12? (just reinstalling does not fix the issue)
currently I am stuck
Comment by Laurențiu Nicola (lnicola) - Wednesday, 27 November 2019, 12:01 GMT
@elseif See Something like:

$ sudo pacman -S asp
$ asp export postgis
$ cd postgis
$ makepkg -s
$ sudo pacman -U postgis-2.5.3-2-x86_64.pkg.tar
Comment by Jaroslav Lichtblau (Dragonlord) - Wednesday, 27 November 2019, 21:50 GMT
Rebuilt postgis 3.0.0-1 is in community-testing now.
Comment by florian (elseif) - Thursday, 28 November 2019, 07:00 GMT
@Dragonlord: thanks!
Comment by Jaroslav Lichtblau (Dragonlord) - Thursday, 28 November 2019, 17:16 GMT
So I guess it works as it should now? Moving it to [community] then.