Table repacking, done right
summary
Repack concurrently is a new core command aimed for Postgres 19 that creates a parallel copy of the table and copies only live tuples, captures concurrent changes via WAL logical decoding run by a background worker, then applies those changes and swaps storage, avoiding long exclusive downtime. It integrates replication‑slot handling, aims to be deadlock‑safe (lock‑upgrade patch pending), cannot process unlogged tables, and omits PG Squeeze extras like tablespace moves; it’s available in the upcoming beta.
AI-written summary · about
chapters (10)
- 0:00Introduction and speaker intro
- 1:06Problem of table bloat in PostgreSQL
- 3:38Historical vacuum and cluster methods
- 5:29PG Reorg and PG Repack solutions
- 8:50PG Squeeze and scheduling repacking
- 13:53Introducing REPACK command
- 16:22Integrating PG Squeeze into REPACK
- 18:11Advantages of REPACK over PG Squeeze
- 20:40Future work and improvements
- 22:30Q&A session
