Gitlab-ce 15.05 upgrade

Hi , we wanted to upgrade gitlab ce to 15.05 and documentation says minimum 12.10 postgresql version is required , we currently have pg 12.7 and thought of upgrading pg version before gitlab ce to 15.05 and while doing this it printed below message ,

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 12.7 is already running, nothing to do

Can you run this command please from a console:

ls /var/opt/gitlab/postgresql/

and then please copy and paste the text here (not screenshot) so we can see what files/directories exist.

And also this command:

gitlab-psql --version

and:

cat /var/opt/gitlab/postgresql/VERSION

and also:

ls /etc/gitlab

generally according to docs: Database settings | GitLab to upgrade from 12.x to 13, you need to do:

gitlab-ctl pg-upgrade -V 13

so it may work, if not, we need to see the results from the above commands to what files exists, postgres version running etc.

1 Like

ls /var/opt/gitlab/postgresql/
analyze_new_cluster.sh data data.11 data-19102022 data.9.6 delete_old_cluster.sh

gitlab-psql --version
psql (PostgreSQL) 12.7

cat /var/opt/gitlab/postgresql/VERSION
cat: /var/opt/gitlab/postgresql/VERSION: No such file or directory

ls /etc/gitlab
backups gitlab.rb gitlab.rb.back gitlab.rb.back_aug-19-2020 gitlab.rb.back_mar-15-2019 gitlab-secrets.json skip-auto-reconfigure ssl trusted-certs

@iwalker ,also i came to know if we use omnibus, it will bundle the correct version when you actually upgrade our GitLab version. The notice of minimum pg version is mostly useful for folks using their own Postgres server.

So i have upgraded directly my gitlab-ce test instance from 14.10.5 to 15.0.5 and gradually postgresql also got upgraded to 12.10 version .

These directories:

data.11
data-19102022
data.9.6

you can safely delete, they are not needed (as per the docs I linked. They are leftovers from previous upgrades. You can also delete this file if it exists:

/var/opt/gitlab/postgresql-version.old

Also I’m wondering, why do you have the skip-auto-reconfigure in your /etc/gitlab directory? I would remove this as well, unless you have created it and need it for a reason, since reconfigure will not be ran, and it could also be a potential reason why you have issues.

Maybe the missing VERSION file is because it appeared in later versions.

Since your test instance worked fine from what you said, I’m wondering what is wrong with your production server, whether it is omnibus or source installation. I don’t see how it can have 12.7 when the Gitlab 15.0 releases don’t even have that.

2 Likes

@iwalker -We have omnibus and our gitlab ce test instance was having version 14.10.5 and pg version was 12.7 ,later we upgraded gitlab ce from 14.10.5 to 15.0.5 and in this gitlab upgrade process underlined postgres also got upgraded to 12.10 . Saying that now our prod also stays at 14.10.5 currently and pg version at 12.7 and we are thinking to follow same steps in prod what we followed in test instance.

Sounds like a plan. Good luck!

1 Like