Hi all. I am going to upgrade Gitlab to version 16.x and the new minimum required version of PostgreSQL is 13.
Because I still have PostgreSQL version 12, I must upgrade the database. For the upgrade I can conveniently choose to upgrade to 13, 14 or 15. It is most efficient for me to go to 15 directly, instead of go to 14 and in a year or two upgrade again.
But, is it possible to use PostgreSQL 15 for Gitlab version 16.x?
At present, with the built-in PostgreSQL with Gitlab Omnibus, the latest possible is 13.8. If your PostgreSQL is external than your Gitlab install, then it would be best to run the version that is supported - which would be 13.8.
Unless you have a test server to try it on, I wouldn’t try to use PostgreSQL 14 or 15 until Gitlab officially support it.
It mentions Postgres 14 for Gitlab Charts. You need to read what is under Gitlab Omnibus. It doesn’t support Postgres 14 yet. I just did
gitlab-ctl pg-upgrade on my 16.0.3 install, and it says Postgres 13.11 is the latest.
root@gitlab:~# gitlab-ctl pg-upgrade
Checking for an omnibus managed postgresql: OK
Checking if postgresql['version'] is set: OK
Checking if we already upgraded: OK
The latest version 13.11 is already running, nothing to do
root@gitlab:~# dpkg -l | grep -i gitlab
ii gitlab-ce 16.0.3-ce.0 amd64 GitLab Community Edition (including NGINX, Postgres, Redis)
From Gitlab Support I got this answer (perhaps also helpful for the people here):
Kindly take a look at this blog post which I believe will answer your question.
We specify a minimum version and an optionally supported version, which communicates:
- the version that this specific version of GitLab was built on (the minimum version)
- a second version that this specific version of GitLab was also tested on
While I can’t with certainty say that version 15 won’t work with GitLab 16, it wasn’t designed using version 15, nor was it thoroughly tested for version 15. We therefore recommend not using version 15 just yet.
Hello @iwalker , I am in a similar situation as Anne, I am running Gitlab 15.10.7 with Postgresql version 12 , it was a Omnibus installation. I want to upgrade to Gitlab to version 16.1.4. My plan is to update in two steps:
apt-get install gitlab-ee=15.11.13-ee.0
apt-get install gitlab-ee=16.1.4-ee.0
I am not sure if it will upgrade Postgresql version or do I have to upgrade with " sudo gitlab-ctl pg-upgrade -V 13" command?
Thanks for any help.
If the upgrade process requires that it upgrades, then it will do it itself. If not, then it won’t. That said, if a newer version is available that isn’t upgraded by default - then you can always do it manually. I believe postgres 13 will upgrade itself automatically around version 16.0.0. Otherwise it will remain on Postgres 12 unless you manually upgrade postgres yourself.