Database Partitioning
### Overview PostgreSQL has supported basic table partitioning since version [8.1](https://www.postgresql.org/docs/8.1/ddl-partitioning.html). This required developers to develop and maintain code to define rules or triggers to route data to the appropriate partition. In PostgreSQL 10 Declarative partitioning was introduced. The declarative syntax removes the need for the manual steps in previous versions. PostgreSQL 11 brings more improvements to partitioning, including default partitions, automatic index creation, foreign key support, unique indexes and (reported) faster queries. ### Plan In parallel to the installation of PG11 in production we will continue to: * Identify use cases for partitioning * Select a limited number of candidates for implementation (e.g. audit_events table) * Test, measure, modify * Document process for partitioning, and potentially create tooling to enable teams to implement their own partitioning ##### Require PostgreSQL 11/12 * https://gitlab.com/groups/gitlab-org/-/epics/2184 Database Sharding Epic https://gitlab.com/groups/gitlab-org/-/epics/1854
epic