The Ubuntu 24 installer told me that postgres 16 would replace 14. After the upgrade they both seemed to be available
$ dpkg -l | grep postgresql
ii postgresql 16+257build1.1 all object-relational SQL database (supported version)
rc postgresql-14 14.13-0ubuntu0.22.04.1 amd64 The World's Most Advanced Open Source Relational Database
ii postgresql-16 16.4-0ubuntu0.24.04.2 amd64 The World's Most Advanced Open Sourc
I tried to run a cluster upgrade with pg_upgradecluster
first of all dropping the newly installed 16 (it seemed safe to drop it because it was new) but could not complete the upgrade because of missing binaries.
$ sudo pg_lsclusters
Ver Cluster Port Status Owner Data directory Log file
14 main 5432 down,binaries_missing postgres /var/lib/postgresql/14/main /var/log/postgresql/postgresql-14-main.log
And apt
is not giving me an install option for postgres-14. Starting to panic slightly I checked my backups and found the latest is six months old. Should I just purge v14 and accept data loss, or try to find a way back?
UPDATE Following guidance from RobM below, postgres-14 was re-installed and the data was successfully recovered. Happy ending!