Release-upgrade from bionic -> focal breaks postgres if postgis is in use
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
postgis (Ubuntu) |
New
|
Undecided
|
Unassigned |
Bug Description
When performing a release upgrade from bionic to focal, the package postgresql-
Running pg_upgradecluster to upgrade from pgsql10->12 throws an error that postgis-2.4 is missing:
```
Starting new cluster...
Notice: extra pg_ctl/postgres options given, bypassing systemctl for start operation
Roles, databases, schemas, ACLs...
pg_dump: error: query failed: ERROR: could not access file "$libdir/
pg_dump: error: query was: SELECT
a.attnum,
a.attname,
a.atttypmod,
a.attstattarget,
a.attstorage,
t.typstorage,
a.attnotnull,
a.atthasdef,
a.attisdropped,
a.attlen,
a.attalign,
a.attislocal,
pg_catalog.
'' AS attgenerated,
NULL AS attmissingval,
a.attidentity,
pg_catalog.
') AS attfdwoptions,
CASE WHEN a.attcollation <> t.typcollation THEN a.attcollation ELSE 0 END AS attcollation,
array_to_
FROM pg_catalog.
WHERE a.attrelid = '18012'
ORDER BY a.attnum
pg_dumpall: error: pg_dump failed on database "gis", exiting
Error during cluster dumping, removing new cluster
sudo systemctl stop postgresql@12-main
Warning: systemd was not informed about the removed cluster yet. Operations like "service postgresql start" might fail. To fix, run:
sudo systemctl daemon-reload
sudo systemctl stop postgresql@10-main
Warning: the cluster will not be running as a systemd service. Consider using systemctl:
sudo systemctl start postgresql@10-main
```
pg_dumpall fails similarly.
Reactivating the bionic repositories and installing postgresql-
```
# apt install postgresql-
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
postgresql-
E: Unable to correct problems, you have held broken packages.
```
So the v10 gis database is now apparently both unusable and upgradable.
May be related to https:/ /bugs.launchpad .net/ubuntu/ +source/ update- manager/ +bug/1907652? comments= all