12 ms·
I love the partitioning improvements in PostgreSQL 12 https://www.2ndquadrant.com/en/blog/partitioning-enhancements-in-postgresql-12/ https://www.2ndquadrant.co
by sytse 7y ago
I love the partitioning improvements in PostgreSQL 12 https://www.2ndquadrant.com/en/blog/partitioning-enhancements-in-postgresql-12/ https://www.2ndquadrant.com/en/blog/partitioning-enhancement... We are planning to use them for GitLab.com, particularly for the events table.
More information is at https://www.percona.com/blog/2019/05/24/an-overview-of-sharding-in-postgresql-and-how-it-relates-to-mongodbs/ https://www.percona.com/blog/2019/05/24/an-overview-of-shard... (including a comparison to MongoDB) and https://momjian.us/main/writings/pgsql/sharding.pdf https://momjian.us/main/writings/pgsql/sharding.pdf
- foou 7y agokeep an eye on the query planner. Last time I checked, the autovacuum doesn't run analyze on the parent table and it causes some issues.
- sytse 7y agoThanks for the tip.
- craigg 7y agoWe've been considering which minimum version requirement of PostgreSQL at GitLab here: https://gitlab.com/gitlab-org/gitlab/issues/31454 https://gitlab.com/gitlab-org/gitlab/issues/31454. We will add PostgreSQL 12 for consideration as well. The partitioning improvements will help with our events tables (https://gitlab.com/gitlab-org/gitlab/issues/24538 https://gitlab.com/gitlab-org/gitlab/issues/24538) as Sid notes above. Also the notable improvements in query performance, especially over large data sets will help with the other large tables we need to address. Most notably: merge_request_diff_commits https://gitlab.com/gitlab-org/gitlab/issues/31454 https://gitlab.com/gitlab-org/gitlab/issues/31454 and ci_builds https://gitlab.com/gitlab-org/gitlab/issues/30441 https://gitlab.com/gitlab-org/gitlab/issues/30441