Tools2 min read

PostgreSQL 19: how to plan space reclamation for your orders database

PostgreSQL 19 adds REPACK (CONCURRENTLY). What store owners should ask their database administrator about disk headroom, table eligibility and the final lock.

Prepared by the NADALI editorial team using AI

An opened hard drive showing its platter and mechanism
Antonio Moreno Nadal / Pexels · https://www.pexels.com/license/ · 1440 × 960

By Nadali. Prepared with AI assistance.

PostgreSQL 19 was released on November 19, 2026. Its new REPACK command can return storage occupied by obsolete row versions to the operating system. With CONCURRENTLY, a table remains available for normal reads and writes through most of the work. For a store whose own order system uses PostgreSQL, that is another maintenance option, not a guarantee of uninterrupted service.

Why you still need a maintenance window

The PostgreSQL 19 documentation explains that the command rewrites the table and its indexes into new files. Budget at least as much free space as the table and all its indexes occupy, plus headroom for changes made during the rewrite. At the end, the command takes an exclusive lock to apply the remaining changes and switch the files. The manual also warns about long-running transactions: once the operation finishes, the table can appear empty to a transaction using a snapshot taken before the rewrite started.

What to ask your database administrator

  1. Confirm the cause. Ask how much space the table and its indexes occupy and why that space is reclaimable. If the data you need to retain is growing, a rewrite is not a substitute for a storage plan.
  2. Check the version and the table. For a managed database, find out whether PostgreSQL 19 is available for your instance and who can do the work. Concurrent mode has limits: for example, it cannot process a partitioned table as a whole or a table with neither a primary key nor an index-based replica identity.
  3. Agree on disk headroom, timing and checks. Ask for a dry rehearsal in a test environment, space estimates for the copies and related changes, a quiet period and a stopping criterion. Afterwards, check that an authorised test order can be created and reopened without taking a real payment. That is a suggested check, not a Nadali test result.

Do not move to a new major version just for this command without a separate compatibility and recovery check. The project’s release is not evidence that a specific hosting provider has already upgraded your database.

Related: What to check after PostgreSQL’s November fixes.

Illustrative photo: Antonio Moreno Nadal / Pexels. 

Sources and verification

  1. PostgreSQL Global Development Group — PostgreSQL 19 Released! ↗
    Source checked: 2026-11-20
  2. PostgreSQL 19 documentation — REPACK ↗
    Source checked: 2026-11-20