Bug 1830169

Summary: pg_upgrade fails could not access file "$libdir/postgis-2.5"
Product: [Fedora] Fedora Reporter: clifford snow <jcs>
Component: postgresqlAssignee: Patrik Novotný <panovotn>
Status: CLOSED CURRENTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 32CC: anon.amish, devrim, hhorak, jmlich83, jstanek, nikolas, panovotn, pkajaba, pkubat, praiskup, tgl
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-06-16 06:39:45 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:
Attachments:
Description Flags
log messages on pg_upgrade none

Description clifford snow 2020-05-01 00:26:31 UTC
User-Agent:       Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/81.0.4044.122 Safari/537.36
Build Identifier: 

This is an upgrade of a Fedora 31 system that is only a few weeks from a fresh install of 31. 

Running the command postgresql-setup --upgrade fails with the following message
command: "/usr/bin/pg_dump" --host /var/lib/pgsql --port 5432 --username postgres --schema-only --quote-all-identifiers --binary-upgra
de --format=custom  --file="pg_upgrade_dump_16401.custom" 'dbname=changesets' >> "pg_upgrade_dump_16401.log" 2>&1
pg_dump: error: query failed: ERROR:  could not access file "$libdir/postgis-2.5": No such file or directory



Reproducible: Always

Steps to Reproduce:
1. upgrade from Fedora 31 to 32 with working Postgresql 11 with PostGIS 2.5
2. run postgresql-setup --upgrade
3.
Actual Results:  
fails everytime.

Expected Results:  
Postgresql is upgraded from 11 to 12

Tried a soft link of postgis-3.so to postgis-2.5.so with the same results

Comment 1 clifford snow 2020-05-01 00:29:32 UTC
Created attachment 1683516 [details]
log messages on pg_upgrade

Comment 2 Patrik Novotný 2020-06-16 06:39:45 UTC
There's been updates to the PostGIS package which should fix this issue. I'm closing this now. Feel free to reopen if still reproducible.

Comment 3 Nikolas Nyby 2020-07-17 15:40:43 UTC
I am also seeing this problem in Fedora 32. I've installed the `postgis-upgrade` package as well. 

postgresql-setup --upgrade fails every time, like this:

```
command: "/usr/bin/pg_dump" --host /var/lib/pgsql --port 5432 --username postgres --schema-only --quote-all-identifiers --binary-upgrade --format=custom  --file="pg_upgrade_dump_482825.custom" 'dbname=blackrock' >> "pg_upgrade_dump_482825.log" 2>&1
pg_dump: error: query failed: ERROR:  could not access file "$libdir/postgis-2.5": No such file or directory
pg_dump: error: query was: SELECT
...
```