Problems after upgrading Ubuntu 14.04 (after a long time)

I don’t even remeber the version of gitlab-ce that was in use on this machine, but I tried to upgrade ubuntu yesterday.
The database upgrade from postgresql 9.2 to (embedded 9.6) has failed.

So now I have a system that is not able to upgrade anymore, because as far as I can tell postgresql 9.2 is no longer available on the system, so I can’t do it by hand.

I am trying to install postgresql 9.2 from source, because 14.04 itself is on 9.3.

However, I am NOT able to install the required packages to build postgresql, as apt-get tries to rerun the gitlab-ce migration, and that fails…

Anybody any usefull hints on how to get out of this?

This may not help you but what I did was use external Postgresql instead of using the embedded Postgresql and just took the backup, delete Postgresql 9.2, install Postgresql 9.6, and recover from the backup. Didn’t have any problem.