Test against PostgreSQL v11
We added a MATERIALIZED
view to optimize the metrics query, but this keyword is only available in PostgreSQL v12. This caused an severity 3 incident: gitlab-com/gl-infra/production#5945 (closed)
The Praefect database in Cloud SQL is PG11, as well as our customer's Azure PostgreSQL version.
We should test with PG11 until PG12 is completely uniform.
Then we should consider adding that keyword conditionally: https://gitlab.com/gitlab-org/gitlab/blob/9bb48c9b87e82324ad36fd6854739fade0c6d045/lib/gitlab/database/as_with_materialized.rb#L19-24