PostgreSQL upgrade to v10 didn't happen during 11.11 to 12.0 upgrade

Hi,

The doc GitLab 12 specific changes | GitLab states “PostgreSQL will automatically be upgraded to 10.x unless specifically opted out during the upgrade. To opt out you must execute the following before performing the upgrade of GitLab.”

I just carried out a single node zero downtime upgrade from v11.11 to v12.0.12 per Update GitLab installed with the Omnibus GitLab package | GitLab but when I run the Gitlab rails console, the PostgreSQL version reads as follows -

[root@mygitlabserver myuser]# gitlab-rails console

GitLab: 12.0.12 (ce125b970e4)
GitLab Shell: 9.3.0
PostgreSQL: 9.6.11

Please can you advise what version PostgreSQL should be at and if mine is down-rev, how this has happened and how I should address this at this point?

I believe I stuck to the upgrade process and I see v12.0.12 RPM installed (CentOS 7) and the GUI/help screen says 12.0.12.

I could provide my upgrade process somewhere if that would help but it contains the official Gitlab process above plus some local steps for backups, etc.

Thanks

Hi,

What happens if you do this:

gitlab-ctl pg-upgrade

what does it do? Will it attempt upgrade to Postgres 10.x?

It wasn’t very well documented, but the configuration for zero downtime upgrades implies not upgrading PostgreSQL, I also hit that, but discovered it before installing 12.0 (but after the documentation said the PostgreSQL upgrade should have happened automatically).

(As I still always use the zero downtime upgrade-procedure - which doesn’t give zero downtime - I’ve recently done the PostgreSQL upgrade that must be done before GitLab 14, as I remembered this discovery.)

As said I discovered in time that this upgrade hadn’t happened automatically and figured out how to do it manually, but that was by running the command @iwalker gave (gitlab-ctl pg-upgrade) and doing that is the best I can think of doing in the situation you’re in now.

1 Like

@iwalker / @grove -

The advice you provided worked and the DB upgraded as you said it would
Thank you for your stellar assistance when I needed it

1 Like