diff --git a/doc/settings/database.md b/doc/settings/database.md index 8d000568a9e7245bd32e9a85f237ab3355e879f9_ZG9jL3NldHRpbmdzL2RhdGFiYXNlLm1k..a06500a0611e560f37db711c05753adc09424b3f_ZG9jL3NldHRpbmdzL2RhdGFiYXNlLm1k 100644 --- a/doc/settings/database.md +++ b/doc/settings/database.md @@ -800,5 +800,5 @@ [default version in the compatibility table](https://docs.gitlab.com/ee/administration/package_information/postgresql_versions.html) determines which client binaries (such as the PostgreSQL backup/restore binaries) are active. -The following example demonstrates upgrading from a database host running PostgreSQL 12 to another database host running PostgreSQL 13 and incurs downtime: +The following example demonstrates upgrading from a database host running PostgreSQL 13 to another database host running PostgreSQL 14 and incurs downtime: @@ -804,8 +804,8 @@ -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. Spin up a new PostgreSQL 14 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 @@ -806,10 +806,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'] = 13 + postgresql['version'] = 14 ``` 1. Reconfigure GitLab: @@ -835,6 +835,6 @@ sudo gitlab-backup create SKIP=repositories,uploads,builds,artifacts,lfs,pages,registry ``` -1. Shutdown the PostgreSQL 12 database host. +1. Shutdown the PostgreSQL 13 database host. 1. Edit `/etc/gitlab/gitlab.rb` and update the `gitlab_rails['db_host']` setting @@ -839,6 +839,6 @@ 1. Edit `/etc/gitlab/gitlab.rb` and update the `gitlab_rails['db_host']` setting - to point to the PostgreSQL database 13 host. + to point to the PostgreSQL database 14 host. 1. Reconfigure GitLab: @@ -910,12 +910,8 @@ ### Pin the packaged PostgreSQL version (fresh installs only) -NOTE: -GitLab 14.1 and onward shipped with both Postgres 12 and Postgres 13. -GitLab 14.0 only ships with PostgreSQL 12. GitLab 13.3 and onward shipped both Postgres 11 and Postgres 12. -GitLab 13.0 through 13.2 only shipped with PostgreSQL 11. - -The Linux package installation initializes PostgreSQL with the [default version](https://docs.gitlab.com/ee/administration/package_information/postgresql_versions.html). +The Linux package ships with [different PostgreSQL versions](https://docs.gitlab.com/ee/administration/package_information/postgresql_versions.html) +and initializes the default version if not specified otherwise. To initialize PostgreSQL with a non-default version, you can set `postgresql['version']` to the major version one of the [packaged PostgreSQL versions](https://docs.gitlab.com/ee/administration/package_information/postgresql_versions.html) prior to the initial reconfigure. diff --git a/docker/assets/wrapper b/docker/assets/wrapper index 8d000568a9e7245bd32e9a85f237ab3355e879f9_ZG9ja2VyL2Fzc2V0cy93cmFwcGVy..a06500a0611e560f37db711c05753adc09424b3f_ZG9ja2VyL2Fzc2V0cy93cmFwcGVy 100755 --- a/docker/assets/wrapper +++ b/docker/assets/wrapper @@ -152,7 +152,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-config-template/gitlab.rb.template b/files/gitlab-config-template/gitlab.rb.template index 8d000568a9e7245bd32e9a85f237ab3355e879f9_ZmlsZXMvZ2l0bGFiLWNvbmZpZy10ZW1wbGF0ZS9naXRsYWIucmIudGVtcGxhdGU=..a06500a0611e560f37db711c05753adc09424b3f_ZmlsZXMvZ2l0bGFiLWNvbmZpZy10ZW1wbGF0ZS9naXRsYWIucmIudGVtcGxhdGU= 100644 --- a/files/gitlab-config-template/gitlab.rb.template +++ b/files/gitlab-config-template/gitlab.rb.template @@ -1521,7 +1521,7 @@ ### Version settings # Set this if you have disabled the bundled PostgreSQL but still want to use the backup rake tasks -# postgresql['version'] = 10 +# postgresql['version'] = 14 ##! Automatically restart PostgreSQL service when version changes. diff --git a/files/gitlab-ctl-commands/upgrade.rb b/files/gitlab-ctl-commands/upgrade.rb index 8d000568a9e7245bd32e9a85f237ab3355e879f9_ZmlsZXMvZ2l0bGFiLWN0bC1jb21tYW5kcy91cGdyYWRlLnJi..a06500a0611e560f37db711c05753adc09424b3f_ZmlsZXMvZ2l0bGFiLWN0bC1jb21tYW5kcy91cGdyYWRlLnJi 100644 --- a/files/gitlab-ctl-commands/upgrade.rb +++ b/files/gitlab-ctl-commands/upgrade.rb @@ -334,7 +334,7 @@ end def geo_detected? - (GitlabCtl::Util.roles(base_path) & %w[geo-primary geo-secondary]).any? || service_enabled?('geo-postgresql') + (GitlabCtl::Util.roles(base_path) & %w[geo_primary geo_secondary]).any? || service_enabled?('geo-postgresql') end def patroni_detected? @@ -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?