Upgrade External postgres 10.7 to 11.7

Hello team,

Currently I am in Gitlab 12.1.17 version with external postgres 10.7. Before upgrading to next major version. I need to upgrade 11.7 external postgres. When I come across official gitlab documentation. I was little confused. Because it provided two ways.

  1. Upgrading external PostgreSQL databases | GitLab
    According to this, they are suggesting to use pg_upgrade using postgres official documentation.

  2. Database settings | GitLab

Here they are suggesting using gitlab db backup and restore.

Could someone please clarify. Which method should I follow.


Hello team, Could someone please lookup this thing and clarify it will really helpful :slightly_smiling_face:


First I want to address your lack of patience. You cannot expect an answer to your post within 1 hour. This is a community forum, and people visit in their own time. If you expect a service level for someone to respond within 1 hour - I suggest you look at taking paid support. Otherwise, please drop the level of expectation and wait for people to reply. It might take a few hours, it might even take a few days. There is zero guarantees for free support whatsoever.

Secondly, the two documentation links mention different methods - one it seems to be a migration by backup from the old server, and restoring to a new one. The other suggests using the official pg_upgrade tools for PostgreSQL. Both are valid.

The one using backup/restore from one server to another makes it easier for your to revert in the case of failure, or perhaps the server is shared by other databases that cannot be upgraded to the newer postgres release. Hence the backup of the Gitlab database, and restore of it to the newly created postgres server.

Choose whichever one suits your requirements. If you want to upgrade the server that has your database because it won’t be problematic for other databases or is only used by your Gitlab install, then use the pg_upgrade method. If you want to backup and restore the database to a totally new installation of postgres, you can use that method instead.

Thank @iwalker for you valuable inputs and sorry we are quite stuck at that moment. It won’t happen again :slightly_smiling_face:

1 Like

No need to apologise :slight_smile: just remember that people from the community volunteer their own time, so aren’t here every hour or minute of the day :slight_smile: I also had a post open once about migrations for 7 days in the end I solved it myself - not sure if it was the ideal solution, but it worked :slight_smile:

As I mentioned, either method will work depending on what you are wanting to achieve.