Postgresql data not updated after upgrade; 502 Errors

After upgrading a working installation on Ubuntu 14, we are getting 502 errors. Status shows that postgresql is not loading.

In the postgressql logs, we have:

FATAL: database files are incompatible with server
DETAIL: The data directory was initialized by PostgreSQL version 9.2, which is not compatible with this version 9.6.3.

Is there a way to upgrade the data within gitlab? Or do I need to upgrade the data to 9.6.3 separately using postgresql commands?

Thanks.

I resolved this error. The server I had been provided with only had 1Gb RAM, which I had not known. I increased it to 4Gb RAM and Gitlab started working immediately.

@jnahan Are you sure your fix was increasing memory? I’m bit confused… I´m already with 4 GIG RAM but still without working properly after update. What were your steps exactly?