Add support for PostgreSQL 12
### Summary PostgreSQL 12 was released in October 2019. We should add support for PG12 so that users wanting to benefit from the enhancements introduced in PG12 can easily do so, and the database team can build upon the new functionality to improve the performance of GitLab. ### Phased plan * [x] In %"12.9" 12.9, add PG12 to CI testing to test for compatibility. We will not package PG12 in this phase. The main driver for doing this is so that RedHat Collections customers can use an external PG12 database when we remove PG9.6 and PG10 in %"13.0" (RedHat Collections skipped from PG10 to PG12 without adding support for PG11). While we won't officially support PostgreSQL 12 until ~~13.3~~ 13.4, we will at least take steps to validate that it is compatible with GitLab. * [x] In %"12.10", resolve compatibility issues and start including PG12 in upgrade testing. * [x] In 13.x (a version before 13.3), add Patroni. Patroni will be the replication and failover solution for PG12. * [x] In ~~%13.2~~ %"13.3", package PG12 in Omnibus and the Helm chart as an opt-in version for new, single node installs. * [x] In %"13.3" and %"13.4" test PG12 with upgrades, multi node installs, failover with Patroni and repmgr, and Geo and announce general support in %"13.5". - [x] In %"13.7" default to PostgreSQL 12 for new installs of GitLab * [x] In %"13.8" auto upgrade users to PG12 (this was previously scheduled for %"13.6" but has been pushed out by one milestone to allow for additional testing) * [x] In %"14.0" PG 12 becomes the minimum required version ### Requirements * Test using PG12 in fresh installs and upgrades. * Test the following install types: * [x] Single node * [x] Separate database node, omnibus managed * [x] PG HA with 3 or more database nodes and Patroni * [x] GEO with one primary node, one secondary node (postgresql and geo-postgresql on the same secondary node) * [ ] Geo and HA with one primary database node and one secondary database node (postgresql and geo-postgresql on the same secondary node). * [x] Geo and HA with PG HA for the primary database node, one secondary database node (postgresql and geo-postgresql on the same secondary node) * [x] Geo with one primary node, separate secondary nodes for postgresql, and geo-postgresql databases * Test that backup and restore work ### Tasks In summary, key tasks include: * Include PostgreSQL 12 in the omnibus-gitlab package * Verify application works on PostgreSQL 12 * At a minimum, we'll want to run gitlab-qa against an instance using PostgreSQL 12 on each of the install types. * Verify backup and restore works. * Verify upgrade from 11 -> 12 ### Announcements * Ensure we announce progress to GDK channels. GDK doesn't currently handle the upgrade so we should provide plenty of advanced notice about the upgrade timelines.
epic