Postgresql fails to start after 15.6.2 -> 15.6.6 or 15.7.5 upgrade

I have a GitLab 15.6.2 (Omnibus, CentOS Stream 8) instance running and I tried to upgrade it to 15.7.5, to benefit from the security fix. Unfortunately, gitlab-ctl reconfigure fails because postgresql fails to restart successfully. See log file attached to ticket Postgresql failing/not restarting after 15.6.2 -> 15.7.5 (or 15.6.6) upgrade (#388835) · Issues · GitLab.org / GitLab · GitLab for details. I also tried to upgrade to 15.6.6 (after restoring the 15.6.2 service) but the problem is exactly the same.

Fortunately, I have been able to rollback to 15.6.2 successfully. I was not able to find any useful information to troubleshoot the problem. Previous upgrades all completed successfully, including background migration, so it doesn’t seem related to the potential database migration issue mentioned for 1.7.0 in Upgrading GitLab | GitLab.

The only configuration change implied by the upgrade (due to the simultaneous OS reinstallation, same version) is that GitLab accounts/groups ID were changed but it seems to be handled gracefully by gitlab-reconfigure and in particular postgresql related directories had the proper owner/group. And an attempt to keep the original uid/gid was not more successful…

Has this problem been experienced by others. Thanks in advance for any help or hint.

Cheers,

Michel

Hi,

Probably doesn’t help much, but my two installs that I have (prod and test) have been upgraded from 15.6.x to latest 15.7.5 without issues. The same for 15.7.5 to 15.8.0 which I did I believe this morning or yesterday evening.

Can you confirm the directory contents of /etc/gitlab to ensure your not stopping postgres upgrades from occurring? Just in case this is keeping you on an older version of postgres. That said, my upgrades were on postgres 13 anyway as I’d manually upgraded them. So you may wish to think about doing on your 15.6.2 install:

gitlab-ctl pg-upgrade

and letting that take it from postgres 12 to postgres 13 and then try going to Gitlab 15.7.5 or 15.8.0. About the only thing I can think of right now.