Automatic Partitioning with PostgreSQL
summary
Covers PostgreSQL partitioning's evolution from inheritance to declarative partitioning (v10) and features that actually speed queries: partition pruning at plan time, partition-wise joins/aggregates, and thousands-of-partitions support (v12). Demonstrates tooling for automated partition creation and retention (pg_pathman, pg_partman) plus a simple prototype (pg_auto_parts) for range auto-creation, and warns about issues: contention from default partitions and trigger-based creation, need for extensions to handle split/merge and purging, and the 63-character name length limit.
AI-written summary · about
chapters (20)
- 0:00Introduction
- 1:48Why partition
- 4:55Legacy partitioning
- 6:20Declarative partitioning
- 8:10Remote partitions
- 9:55Attach/detach partitions
- 11:17Default partitions
- 13:01Cross-partition updates
- 14:27Query optimizations
- 15:50Handling thousands of partitions
- 17:35Constraints and inheritance
- 19:21Logical replication
- 20:43Concurrent detachment
- 22:08Partition indexing
- 23:24Creation strategies
- 25:07Partitioning extensions
- 27:57Automatic retention
- 28:41Initial auto-creation
- 29:27Split and merge partitions
- 30:10Q&A
