Skip to content

Commit fe681c0

Browse files
ereadaxilleas
andcommitted
Merge branch 'axil-migrate-pg-uprgade-notes' into 'master'
Move postgres upgrade notes to version-specific pages See merge request https://gitlab.com/gitlab-org/omnibus-gitlab/-/merge_requests/7186 Merged-by: Evan Read <[email protected]> Approved-by: Evan Read <[email protected]> Approved-by: Russell Dickenson <[email protected]> Co-authored-by: Achilleas Pipinellis <[email protected]>
2 parents cb9ceb7 + 29b9d1f commit fe681c0

File tree

1 file changed

+13
-57
lines changed

1 file changed

+13
-57
lines changed

doc/settings/database.md

Lines changed: 13 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -447,6 +447,12 @@ packaged PostgreSQL server to a later version (if one is included in the
447447
package). This updates PostgreSQL to the [default shipped version](https://docs.gitlab.com/ee/administration/package_information/postgresql_versions.html)
448448
during package upgrades, unless specifically [opted out](#opt-out-of-automatic-postgresql-upgrades).
449449

450+
Before upgrading GitLab to a newer version, refer to the [version-specific changes](https://docs.gitlab.com/ee/update/#version-specific-upgrading-instructions)
451+
of the Linux package to see either:
452+
453+
- When a database version has changed.
454+
- When an upgrade is warranted.
455+
450456
WARNING:
451457
Before upgrading, it's important that you fully read this section before running any commands. For
452458
single-node installations, this upgrade needs downtime, as the database must be
@@ -479,6 +485,13 @@ the upgrade:
479485
sudo gitlab-ctl pg-upgrade
480486
```
481487

488+
To upgrade to a specific PostgreSQL version, use the `-V` flag to append the
489+
version. For example, to upgrade to PostgreSQL 14:
490+
491+
```shell
492+
sudo gitlab-ctl pg-upgrade -V 14
493+
```
494+
482495
NOTE:
483496
`pg-upgrade` can take arguments; for example, you can set the timeout for the
484497
execution of the underlying commands (`--timeout=1d2h3m4s5ms`). Run `gitlab-ctl pg-upgrade -h`
@@ -534,63 +547,6 @@ To opt out of automatic PostgreSQL upgrades during GitLab package upgrades, run:
534547
sudo touch /etc/gitlab/disable-postgresql-upgrade
535548
```
536549
537-
#### GitLab 16.2 and later
538-
539-
As of GitLab 16.2, PostgreSQL 13.11 and 14.8 are both shipped with the Linux package.
540-
During a package upgrade, the database isn't upgraded to PostgreSQL 14. If you
541-
want to upgrade to PostgreSQL 14, you must do it manually:
542-
543-
```shell
544-
sudo gitlab-ctl pg-upgrade -V 14
545-
```
546-
547-
PostgreSQL 14 isn't supported on Geo deployments and is [planned](https://gitlab.com/groups/gitlab-org/-/epics/9065)
548-
for future releases.
549-
550-
#### GitLab 16.0 and later
551-
552-
PostgreSQL version 12 is no longer supported and the binaries have been
553-
removed. To proceed, administrators must:
554-
555-
1. Ensure the installation is using [PostgreSQL 13](#upgrade-packaged-postgresql-server)
556-
557-
#### GitLab 15.11 and later
558-
559-
In GitLab 15.11, PostgreSQL will automatically be upgraded to 13.x except for the following cases:
560-
561-
The upgrade is skipped in any of the following cases:
562-
563-
- You are running the database in high availability using Patroni.
564-
- Your database nodes are part of GitLab Geo configuration.
565-
- You have specifically [opted out](#opt-out-of-automatic-postgresql-upgrades).
566-
- You have `postgresql['version'] = 12` in your `gitlab.rb`
567-
568-
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).
569-
570-
#### GitLab 15.0 and later
571-
572-
As of GitLab 15.0, new installations will default to PostgreSQL 13.
573-
574-
Existing single database node instances can update manually via:
575-
576-
```shell
577-
sudo gitlab-ctl pg-upgrade -V 13
578-
```
579-
580-
Until PostgreSQL 12 is removed, administrators may
581-
[pin the PostgreSQL version](#pin-the-packaged-postgresql-version-fresh-installs-only)
582-
if needed for compatibility or test environment reasons.
583-
584-
[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).
585-
586-
#### GitLab 14.0 and later
587-
588-
PostgreSQL version 11 is no longer supported and the binaries have been
589-
removed. To proceed, administrators must:
590-
591-
1. Ensure the installation is using [PostgreSQL 12](../settings/database.md#upgrade-packaged-postgresql-server)
592-
1. If using repmgr, [convert to using patroni](https://docs.gitlab.com/ee/administration/postgresql/replication_and_failover.html#switching-from-repmgr-to-patroni)
593-
594550
### Revert packaged PostgreSQL server to the previous version
595551
596552
WARNING:

0 commit comments

Comments
 (0)