diff --git a/doc/settings/database.md b/doc/settings/database.md index adb121357b74bbbd79fb5f364b05098e9a27926d_ZG9jL3NldHRpbmdzL2RhdGFiYXNlLm1k..2dd8f2e466f1c679cb3a679b6d2a587fd5d59223_ZG9jL3NldHRpbmdzL2RhdGFiYXNlLm1k 100644 --- a/doc/settings/database.md +++ b/doc/settings/database.md @@ -535,6 +535,19 @@ sudo touch /etc/gitlab/disable-postgresql-upgrade ``` +#### GitLab 15.11 and later + +In GitLab 15.11, PostgreSQL will automatically be upgraded to 13.x except for the following cases: + +The upgrade is skipped in any of the following cases: + +- You are running the database in high availability using Patroni. +- Your database nodes are part of GitLab Geo configuration. +- You have specifically [opted out](#opt-out-of-automatic-postgresql-upgrades). +- You have `postgresql['version'] = 12` in your `gitlab.rb` + +Fault-tolerant and Geo installations support manual upgrades to PostgreSQL 13, see [Packaged PostgreSQL deployed in an HA/Geo Cluster](#packaged-postgresql-deployed-in-an-hageo-cluster). + #### GitLab 15.0 and later As of GitLab 15.0, new installations will default to PostgreSQL 13. @@ -909,5 +922,5 @@ [Amazon recommends this](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_UpgradeDBInstance.PostgreSQL.html) as part of a major version upgrade. -The following example demonstrates upgrading from a database host running PostgreSQL 11 to another database host running PostgreSQL 12 and incurs downtime: +The following example demonstrates upgrading from a database host running PostgreSQL 12 to another database host running PostgreSQL 13 and incurs downtime: @@ -913,8 +926,8 @@ -1. Spin up a new PostgreSQL 12 database server that's set up according to the [database requirements](https://docs.gitlab.com/ee/install/requirements.html#database). +1. Spin up a new PostgreSQL 13 database server that's set up according to the [database requirements](https://docs.gitlab.com/ee/install/requirements.html#database). 1. Ensure that the compatible versions of `pg_dump` and `pg_restore` are being used on the GitLab Rails instance. To amend GitLab configuration, edit `/etc/gitlab/gitlab.rb` and specify the value of `postgresql['version']`: ```ruby @@ -915,10 +928,10 @@ 1. Ensure that the compatible versions of `pg_dump` and `pg_restore` are being used on the GitLab Rails instance. To amend GitLab configuration, edit `/etc/gitlab/gitlab.rb` and specify the value of `postgresql['version']`: ```ruby - postgresql['version'] = 12 + postgresql['version'] = 13 ``` 1. Reconfigure GitLab: @@ -944,6 +957,6 @@ sudo gitlab-backup create SKIP=repositories,uploads,builds,artifacts,lfs,pages,registry ``` -1. Shutdown the PostgreSQL 11 database host. +1. Shutdown the PostgreSQL 12 database host. 1. Edit `/etc/gitlab/gitlab.rb` and update the `gitlab_rails['db_host']` setting @@ -948,6 +961,6 @@ 1. Edit `/etc/gitlab/gitlab.rb` and update the `gitlab_rails['db_host']` setting - to point to the PostgreSQL database 12 host. + to point to the PostgreSQL database 13 host. 1. Reconfigure GitLab: diff --git a/doc/update/gitlab_15_changes.md b/doc/update/gitlab_15_changes.md index adb121357b74bbbd79fb5f364b05098e9a27926d_ZG9jL3VwZGF0ZS9naXRsYWJfMTVfY2hhbmdlcy5tZA==..2dd8f2e466f1c679cb3a679b6d2a587fd5d59223_ZG9jL3VwZGF0ZS9naXRsYWJfMTVfY2hhbmdlcy5tZA== 100644 --- a/doc/update/gitlab_15_changes.md +++ b/doc/update/gitlab_15_changes.md @@ -9,6 +9,19 @@ NOTE: When upgrading to a new major version, remember to first [check for background migrations](https://docs.gitlab.com/ee/update/index.html#checking-for-background-migrations-before-upgrading). +## 15.11 + +### PostgreSQL 13 upgrade + +In GitLab 15.11, PostgreSQL will automatically be upgraded to 13.x except for the following cases: + +- You are running the database in high availability using Patroni. +- Your database nodes are part of GitLab Geo configuration. +- You have specifically [opted out](../settings/database.md#opt-out-of-automatic-postgresql-upgrades). +- You have `postgresql['version'] = 12` in your `gitlab.rb` + +Fault-tolerant and Geo installations support manual upgrades to PostgreSQL 13, see [Packaged PostgreSQL deployed in an HA/Geo Cluster](../settings/database.md#packaged-postgresql-deployed-in-an-hageo-cluster). + ## 15.6 ### PostgreSQL version updates diff --git a/docker/assets/wrapper b/docker/assets/wrapper index adb121357b74bbbd79fb5f364b05098e9a27926d_ZG9ja2VyL2Fzc2V0cy93cmFwcGVy..2dd8f2e466f1c679cb3a679b6d2a587fd5d59223_ZG9ja2VyL2Fzc2V0cy93cmFwcGVy 100755 --- a/docker/assets/wrapper +++ b/docker/assets/wrapper @@ -172,7 +172,7 @@ # This must be false when the opt-in PostgreSQL version is the default for pg-upgrade, # otherwise it must be true. -ATTEMPT_AUTO_PG_UPGRADE='false' +ATTEMPT_AUTO_PG_UPGRADE='true' # Make sure PostgreSQL is at the latest version. # If it fails, print a message with a workaround and exit diff --git a/files/gitlab-ctl-commands/upgrade.rb b/files/gitlab-ctl-commands/upgrade.rb index adb121357b74bbbd79fb5f364b05098e9a27926d_ZmlsZXMvZ2l0bGFiLWN0bC1jb21tYW5kcy91cGdyYWRlLnJi..2dd8f2e466f1c679cb3a679b6d2a587fd5d59223_ZmlsZXMvZ2l0bGFiLWN0bC1jb21tYW5kcy91cGdyYWRlLnJi 100644 --- a/files/gitlab-ctl-commands/upgrade.rb +++ b/files/gitlab-ctl-commands/upgrade.rb @@ -344,7 +344,7 @@ def attempt_auto_pg_upgrade? # This must return false when the opt-in PostgreSQL version is the default for pg-upgrade, # otherwise it must be true. - false + true end def recommend_pg_upgrade?