diff --git a/config/software/postgresql.rb b/config/software/postgresql.rb index 3e2b8f031acacc31efdc99b112b6d8c415b01847_Y29uZmlnL3NvZnR3YXJlL3Bvc3RncmVzcWwucmI=..c06462f9e4f34e5abfb392cd5f03230cbe936156_Y29uZmlnL3NvZnR3YXJlL3Bvc3RncmVzcWwucmI= 100644 --- a/config/software/postgresql.rb +++ b/config/software/postgresql.rb @@ -58,12 +58,6 @@ make "world -j #{workers}", env: env make 'install-world', env: env - - block 'link bin files' do - Dir.glob("#{prefix}/bin/*").each do |bin_file| - link bin_file, "#{install_dir}/embedded/bin/#{File.basename(bin_file)}" - end - end end # exclude headers and static libraries from package diff --git a/config/software/postgresql_new.rb b/config/software/postgresql_new.rb index 3e2b8f031acacc31efdc99b112b6d8c415b01847_Y29uZmlnL3NvZnR3YXJlL3Bvc3RncmVzcWxfbmV3LnJi..c06462f9e4f34e5abfb392cd5f03230cbe936156_Y29uZmlnL3NvZnR3YXJlL3Bvc3RncmVzcWxfbmV3LnJi 100644 --- a/config/software/postgresql_new.rb +++ b/config/software/postgresql_new.rb @@ -61,6 +61,12 @@ make 'install-world', env: env link "#{prefix}/lib/#{libpq}", "#{install_dir}/embedded/lib/#{libpq}" + + block 'link bin files' do + Dir.glob("#{prefix}/bin/*").each do |bin_file| + link bin_file, "#{install_dir}/embedded/bin/#{File.basename(bin_file)}" + end + end end # exclude headers and static libraries from package diff --git a/doc/settings/database.md b/doc/settings/database.md index 3e2b8f031acacc31efdc99b112b6d8c415b01847_ZG9jL3NldHRpbmdzL2RhdGFiYXNlLm1k..c06462f9e4f34e5abfb392cd5f03230cbe936156_ZG9jL3NldHRpbmdzL2RhdGFiYXNlLm1k 100644 --- a/doc/settings/database.md +++ b/doc/settings/database.md @@ -44,7 +44,7 @@ Omnibus automatically enables SSL on the PostgreSQL server, but it will accept both encrypted and unencrypted connections by default. Enforcing SSL requires using the `hostssl` configuration in `pg_hba.conf`. For more details, see the -[`pg_hba.conf` documentation](https://www.postgresql.org/docs/12/auth-pg-hba-conf.html). +[`pg_hba.conf` documentation](https://www.postgresql.org/docs/13/auth-pg-hba-conf.html). SSL support depends on the following files: @@ -489,6 +489,22 @@ sudo touch /etc/gitlab/disable-postgresql-upgrade ``` +#### GitLab 15.0 and later + +As of GitLab 15.0, new installations will default to PostgreSQL 13. + +Existing single database node instances can update manually via: + +```shell +sudo gitlab-ctl pg-upgrade -V 13 +``` + +Until PostgreSQL 12 is removed, administrators may +[pin the PostgreSQL version](#pin-the-packaged-postgresql-version-fresh-installs-only) +if needed for compatibility or test environment reasons. + +[Fault tolerant and Geo installations require additional steps and planning](https://docs.gitlab.com/ee/administration/postgresql/replication_and_failover.html#upgrading-postgresql-major-version-in-a-patroni-cluster). + #### GitLab 14.0 and later PostgreSQL versions 11 is no longer supported and the binaries have been @@ -916,6 +932,7 @@ ### 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. @@ -923,7 +940,7 @@ 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. -For example, in GitLab 13.7 you can use `postgresql['version'] = 11` to use PostgreSQL 11 instead of the default of PostgreSQL 12. +For example, in GitLab 15.0 you can use `postgresql['version'] = 12` to use PostgreSQL 12 instead of the default of PostgreSQL 13. WARNING: Setting `postgresql['version']` while using the Omnibus packaged PostgreSQL after the initial reconfigure will diff --git a/doc/update/gitlab_15_changes.md b/doc/update/gitlab_15_changes.md index 3e2b8f031acacc31efdc99b112b6d8c415b01847_ZG9jL3VwZGF0ZS9naXRsYWJfMTVfY2hhbmdlcy5tZA==..c06462f9e4f34e5abfb392cd5f03230cbe936156_ZG9jL3VwZGF0ZS9naXRsYWJfMTVfY2hhbmdlcy5tZA== 100644 --- a/doc/update/gitlab_15_changes.md +++ b/doc/update/gitlab_15_changes.md @@ -31,3 +31,9 @@ In 14.10, [Gitaly introduced a new directory](gitlab_14_changes.md#gitaly-runtime-directory) that holds all runtime data Gitaly requires to operate correctly. This new directory replaces the old internal socket directory, and consequentially the usage of `gitaly['internal_socket_dir']` was deprecated in favor of `gitaly['runtime_dir']`. The old `gitaly['internal_socket_dir']` configuration was removed in this release. + +### PostgreSQL 13.3 support + +PostgreSQL 13.3 is being shipped as the default version for fresh installs. + +Users can manually upgrade to 13.3 following the [upgrade docs](../settings/database.md#gitlab-150-and-later). diff --git a/docker/assets/wrapper b/docker/assets/wrapper index 3e2b8f031acacc31efdc99b112b6d8c415b01847_ZG9ja2VyL2Fzc2V0cy93cmFwcGVy..c06462f9e4f34e5abfb392cd5f03230cbe936156_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='true' +ATTEMPT_AUTO_PG_UPGRADE='false' # 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/pg-upgrade.rb b/files/gitlab-ctl-commands/pg-upgrade.rb index 3e2b8f031acacc31efdc99b112b6d8c415b01847_ZmlsZXMvZ2l0bGFiLWN0bC1jb21tYW5kcy9wZy11cGdyYWRlLnJi..c06462f9e4f34e5abfb392cd5f03230cbe936156_ZmlsZXMvZ2l0bGFiLWN0bC1jb21tYW5kcy9wZy11cGdyYWRlLnJi 100644 --- a/files/gitlab-ctl-commands/pg-upgrade.rb +++ b/files/gitlab-ctl-commands/pg-upgrade.rb @@ -681,7 +681,7 @@ end def default_version - PGVersion.parse(version_from_manifest('postgresql')) + PGVersion.parse(version_from_manifest('postgresql_new')) || PGVersion.parse(version_from_manifest('postgresql')) end def new_version diff --git a/files/gitlab-ctl-commands/upgrade.rb b/files/gitlab-ctl-commands/upgrade.rb index 3e2b8f031acacc31efdc99b112b6d8c415b01847_ZmlsZXMvZ2l0bGFiLWN0bC1jb21tYW5kcy91cGdyYWRlLnJi..c06462f9e4f34e5abfb392cd5f03230cbe936156_ZmlsZXMvZ2l0bGFiLWN0bC1jb21tYW5kcy91cGdyYWRlLnJi 100644 --- a/files/gitlab-ctl-commands/upgrade.rb +++ b/files/gitlab-ctl-commands/upgrade.rb @@ -354,7 +354,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. - true + false end def recommend_pg_upgrade?