Print a PG 11 deprecation notice for upgrades
Summary
In GitLab %13.6, PostgreSQL 12 will become the default version for upgrades. A user can still opt to stay on PostgreSQL 11 during an upgrade, but if they do, we should warn them that they will need to upgrade PostgreSQL by GitLab 14.0 when PostgreSQL 12 becomes the minimum required version.
Proposal
-
On upgrade, if db upgrade is opt out, and PG_VERSION is less than 12, print a warning. -
During reconfigure, if postgresql['version']
is set and less than 12, print a warning.
The warning should read: "Note that PostgreSQL 12 will become the minimum required PostgreSQL version in GitLab 14.0 (add release date). PostgreSQL 11 will be removed in GitLab 14.0. Please consider upgrading your PostgreSQL version soon."
Requirements
The notice should print in both of the following cases:
- The user runs
sudo apt-get update
but opts out of upgrading PostgreSQL - The user runs
sudo gitlab-ctl pg-upgrade
but specifies a version other than PostgreSQL 12
It should not print if postgresql['disable'] = false
. External databases will be handled in #5500 (closed)
Issue used when removing PG 10: #5095 (closed)
Edited by Larissa Lane