Explore the role of PostgreSQL in GitLab ecosystem
summary
Reverse engineering of GitLab 16.6 shows PostgreSQL as the primary store for core data (users, projects, CI) with a two‑database split (main + CI), one primary and read replicas managed with Consul, Patroni and PgBouncer. Analysis uses DataGrip, an EXPLAIN visualizer, AppMap and synthetic data generation. Schema has 689 tables in public schema and 2,790 indexes; projects table has 83 columns and 59 indexes. GitLab implements mirror tables, triggers and background jobs for cross‑database consistency, mandates EXPLAIN before/after migrations, and limits 100 queries per request.
AI-written summary · about
chapters (15)
- 0:00Introduction to talk
- 2:32What is GitLab
- 4:39GitLab deployment models
- 8:21PostgreSQL in GitLab
- 10:50Database schema milestones
- 14:55Database schemas overview
- 16:46Database anti-patterns
- 19:15Normalization challenges
- 20:19GitLab database workflows
- 23:56Query monitoring tools
- 24:41Extensions and indexes
- 26:51Query caching strategies
- 28:21ORM and query optimization
- 31:37Research outcomes
- 33:24Q&A session
related talks
46mBig databases, many servers, data center or cloud - it's all here!
49mHow we execute PG major upgrades at GitLab, with zero downtime.
40mDB for next project? Why, Postgres, of course
38mWhat we built with Open Source
51mHow Postgres is Different (read BETTER than) your database
49mSELECT 'amazing features' FROM "postgresql"
13mBuilding reliable infrastructure with Postgres
46mPostgreSQL 16 and beyond
