You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: doc/settings/database.md
+13-57Lines changed: 13 additions & 57 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -447,6 +447,12 @@ packaged PostgreSQL server to a later version (if one is included in the
447
447
package). This updates PostgreSQL to the [default shipped version](https://docs.gitlab.com/ee/administration/package_information/postgresql_versions.html)
448
448
during package upgrades, unless specifically [opted out](#opt-out-of-automatic-postgresql-upgrades).
449
449
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
+
450
456
WARNING:
451
457
Before upgrading, it's important that you fully read this section before running any commands. For
452
458
single-node installations, this upgrade needs downtime, as the database must be
@@ -479,6 +485,13 @@ the upgrade:
479
485
sudo gitlab-ctl pg-upgrade
480
486
```
481
487
488
+
To upgrade to a specific PostgreSQL version, use the `-V` flag to append the
489
+
version. For example, to upgrade to PostgreSQL14:
490
+
491
+
```shell
492
+
sudo gitlab-ctl pg-upgrade -V 14
493
+
```
494
+
482
495
NOTE:
483
496
`pg-upgrade` can take arguments; for example, you can set the timeout for the
484
497
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:
534
547
sudo touch /etc/gitlab/disable-postgresql-upgrade
535
548
```
536
549
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 PostgreSQL14. If you
541
-
want to upgrade to PostgreSQL14, you must do it manually:
542
-
543
-
```shell
544
-
sudo gitlab-ctl pg-upgrade -V 14
545
-
```
546
-
547
-
PostgreSQL14 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
-
594
550
### Revert packaged PostgreSQL server to the previous version
0 commit comments