Ubuntu 20.04: Upgrading from 11.8.1 to 11.11.8 : preinstall: Your version of PostgreSQL is no longer supported

Hi,

I am trying to follow the upgrade path 11.8.1 → 11.11.8 and I downloaded the 11.11.8 .deb package.
I try installing:
sudo dpkg -i gitlab-ce_11.11.8-ce.0_amd64.deb
and get

(Reading database … 303507 files and directories currently installed.)
Preparing to unpack gitlab-ce_11.11.8-ce.0_amd64.deb …
gitlab preinstall:
gitlab preinstall: Your version of PostgreSQL is no longer supported. Please upgrade your PostgreSQL version.
gitlab preinstall: Check Update GitLab installed with the Omnibus GitLab package | GitLab for details.
gitlab preinstall:
gitlab preinstall: Upgrade failed. Retry the upgrade after upgrading your PostgreSQL version.

My current PostgreSQL version is:
/opt/gitlab/embedded/bin/psql --version
psql (PostgreSQL) 9.6.11

If I understand correctly 9.6.11 should be sufficient for 11.11.8… I am on it for hours. Please help :slight_smile:

Thanks

See here:

so yes the version does match, but it also says you can upgrade to 10.7. So I suggest you do:

gitlab-ctl pg-upgrade

and then try to upgrade to 11.11.8. And of course, make sure you have backups before you attempt any upgrades. To go any higher than 11.x you need to have 10.7 anyway.

Thanks for the quick reply. I tried to update postgreSQL like you suggested before but it keeps insisting that no newer version exists.

sudo gitlab-ctl pg-upgrade
Checking for an omnibus managed postgresql: OK
Checking for a newer version of PostgreSQL to install
No new version of PostgreSQL installed, nothing to upgrade to

Maybe you need to upgrade to an earlier release before 11.11.8. To be honest dificult to say, when the 10.7 became available. I would try going to 11.9.0 first to see if that will let you upgrade, and then for example 11.10.0 after this, until we can finally get to 11.11.0 and then up to 11.11.8.

Strange even if I do:
sudo dpkg -i gitlab-ce_11.8.1-ce.0_amd64.deb
(Reading database … 303507 files and directories currently installed.)
Preparing to unpack gitlab-ce_11.8.1-ce.0_amd64.deb …
gitlab preinstall:
gitlab preinstall: Your version of PostgreSQL is no longer supported. Please upgrade your PostgreSQL version.

That is, installing the version I currently have… doesn’t work

Can it be that the .deb is for bionic and I am on focal ?

Well most likely yes it’s possible, since for focal only 13.x versions of gitlab exist - nothing for focal before this. So I’m wondering why your Ubuntu is on 20.04 when you have an older version of gitlab installed. If you were on bionic and upgraded to focal, then the version of gitlab should have been upgraded first to at least a version high enough to be supported by focal when completing the upgrade from 18.04 to 20.04. From what I see 13.2.0 is the lowest version that supports focal.

I suggest reverting your system to a backup prior to your upgrade to focal, so therefore reverting to bionic and then upgrade gitlab to at least 13.2.0 before then upgrading bionic to focal. Once you are on focal, you can then continue upgrading gitlab from 13.2.0 to the latest.

Failing that, then what you can do is this. Backup /etc/gitlab, /opt/gitlab, /var/opt/gitlab and have these external to the server. Clean install Ubuntu 18.04 bionic, and then install gitlab 11.8.1. Copy back the /etc/gitlab, /opt/gitlab and /var/opt/gitlab directories and then run gitlab-ctl reconfigure to get your system active again on Ubuntu 18.04. Upgrade to at least gitlab 13.2.0 following the upgrade path in the Gitlab docs, and only once you are at this version should you start the upgrade to Ubuntu 20.04 focal. And then upgrade from 13.2.0 to latest 13.x version using the focal packages.

So yeah, I installed 18.04, installed Gitlab 11.8.1, restored my old backup and started the upgrade path. Everything went smoothly, once I was at 13.12, I backed up and switched back to my ubuntu 20.04 and restored the new backup.
Thanks for your help !