Parallelism in PostgreSQL 15
summary
Explains how PostgreSQL 15 runs single-query parallelism using OS processes with a leader and workers, implementing parallel sequential scan and parallel hash/join plans that often scale near-linearly; uses cost_threshold_for_parallelism ~1000 and limits workers via max_parallel_workers_per_gather (default 2). Demonstrates where parallelism helps (CPU-bound aggregates, large table scans) and where it doesn't yet (full outer joins, writes, many FDWs), shows memory/work_mem fragmentation causing excessive partitioning, and outlines fixes and future work that are already partially implemented.
AI-written summary · about
chapters (10)
- 0:00Introducing Thomas
- 1:35Thomas’ talk begins: Parallelism in PostgreSQL
- 4:12History of parallelism in relational databases
- 6:15The free lunch is over
- 7:14Embarassingly parallelizable problems
- 11:12Cost-based optimizer
- 17:55How do we control parallelism?
- 24:37Selected plan types
- 29:16Hash join memory struggles
- 35:13Q&A
related talks
22mParallel Processing in PostgreSQL
50mParallel Recovery in PostgreSQL
56mPerformance Improvements in PostgreSQL9 2
46mInvestigating Multithreaded PostgreSQL
34mPostgres 10, Performance, and You
52mBoosting Typical Query Patterns: PostgreSQL 18's Performance Enhancements
34mPostgreSQL sharding, state of the art
51mScaling Postgres to the next level at OpenAI
