Feature Backend Desk
PostgreSQL 19’s REPACK (CONCURRENTLY) drops pg_repack’s safety rails
Built-in repacking saves an extension, but in tests it queued readers behind its swap lock and emptied a table for an older snapshot. pg_repack did neither.

PostgreSQL 19, released on 19 November 2026, lists REPACK (CONCURRENTLY) first among its highlights: a built-in way to rewrite a bloated table without blocking reads and writes, which until now meant installing pgrepack. The documentation covers which tables qualify. It does not set the core command beside the tool it replaces, and the differences are operational. In tests against 19.
0, core REPACK sat in the lock queue for ten seconds behind a long reader, stalling a primary-key lookup for the whole wait; pgrepack, on the same server and table, never held readers for more than a second. A snapshot opened before the core command saw the table as empty afterwards, while pgrepack waited for that snapshot to finish. Moving to core removes an extension from the upgrade path and adds three jobs for whoever schedules the maintenance: bounding the swap-lock wait, keeping older snapshots away…



