Parallel Processing in PostgreSQL
summary
Explains PostgreSQL’s parallel architecture (gather plus workers), the optimizer costs that choose parallel vs serial (notably parallel_tuple_cost and parallel_setup_cost), and tuning knobs like max_parallel_workers_per_gather, max_parallel_workers, min_parallel_table_scan_size 8MB and min_parallel_index_scan_size 512KB. Shows explain vs workers planned vs workers launched (planned can be 2 but launched 0 if workers are busy), gives a concrete index build: 17 → 9 minutes with 4 workers, warns JDBC nonzero fetch count blocks parallelism, and covers parallel index build and vacuum behavior.
AI-written summary · about
chapters (15)
- 0:00Parallel query in PostgreSQL
- 1:06Serial execution in PostgreSQL
- 1:48Parallel query architecture
- 3:14Key parameters for parallel performance
- 5:40Cost estimation for parallel queries
- 8:08Calculating query costs
- 10:36Parallel safety in functions
- 12:00Parallel index creation
- 14:27Practical parallel query use
- 16:33Tuning parallel parameters
- 17:40Client-side limitations
- 18:21Monitoring parallel performance
- 19:23Version limitations and improvements
- 20:45When to use parallel query
- 21:26Conclusion
related talks
38mParallelism in PostgreSQL 15
18mPostgreSQL: Tuning parameters or Tuning Queries? with Henrietta Dombrovskaya
04mPostgres Tuning is saved by Sovenath Shaw
46mInvestigating Multithreaded PostgreSQL
34mPostgres 10, Performance, and You
50mParallel Recovery in PostgreSQL
52mBoosting Typical Query Patterns: PostgreSQL 18's Performance Enhancements
26mBeyond Joins and Indexes
