Waiting for PostgreSQL 19 – Add CONCURRENTLY option to REPACK
Read OriginalThis article discusses a new feature in PostgreSQL 19: the CONCURRENTLY option for the REPACK command. This option allows table repacking without acquiring an access-exclusive lock until the final swap, using a replication slot and a background worker for logical decoding to capture concurrent changes. The author tests this feature on a 19 GB table with 200 million rows, deleting 80% of rows and running concurrent inserts. The article also notes limitations like scarce replication slots, single-process restriction, and deadlock risks, which will be addressed in future commits.
Comments
No comments yet
Be the first to share your thoughts!
Browser Extension
Get instant access to AllDevBlogs from your browser
Top of the Week
No top articles yet