<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/what-repack-concurrently-costs-while-it-runs-ryh8n4ikq" -->

---
title: What REPACK (CONCURRENTLY) costs while it runs | daily.dev
description: PostgreSQL 19 introduces REPACK, unifying VACUUM FULL and CLUSTER, with a REPACK (CONCURRENTLY) mode that rewrites tables online without extensions. Benchmarks...
canonical: https://daily.dev/posts/what-repack-concurrently-costs-while-it-runs-ryh8n4ikq
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: What REPACK (CONCURRENTLY) costs while it runs | daily.dev
og:description: PostgreSQL 19 introduces REPACK, unifying VACUUM FULL and CLUSTER, with a REPACK (CONCURRENTLY) mode that rewrites tables online without extensions. Benchmarks...
og:url: https://daily.dev/posts/what-repack-concurrently-costs-while-it-runs-ryh8n4ikq
og:image: https://api.daily.dev/og/posts/ryH8n4Ikq.png
og:image:alt: What REPACK (CONCURRENTLY) costs while it runs
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# What REPACK (CONCURRENTLY) costs while it runs

**[Planet PostgreSQL](https://daily.dev/sources/planet-postgresql)** · 16 min read · 0 upvotes · 0 comments

## Summary

PostgreSQL 19 introduces REPACK, unifying VACUUM FULL and CLUSTER, with a REPACK (CONCURRENTLY) mode that rewrites tables online without extensions. Benchmarks against pg_repack and pg_squeeze show REPACK (CONCURRENTLY) is fastest and generates the least WAL under write load. Detailed measurements cover its impact on autovacuum (dead tuples pile up cluster-wide via its temporary replication slot), the final ACCESS EXCLUSIVE swap that can stall writers and readers, MVCC-unsafe behavior where old REPEATABLE READ snapshots see an empty table, and a hard ceiling of roughly 105 million rows updated/deleted during a run before it fails outright due to a memory allocation limit. Practical guidance is given for sizing disk, setting lock_timeout, estimating run duration versus write rate, and requirements like replica identity indexes and slot limits.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://postgr.es/p/9wj>

## Questions this post answers

### What is the row-change ceiling for REPACK (CONCURRENTLY) in PostgreSQL 19?

REPACK (CONCURRENTLY) fails if more than roughly 105 million rows (104,857,600) are updated or deleted on the table during the run, because the in-memory structure tracking changes doubles until it exceeds PostgreSQL's maximum single allocation size. It fails at the very end and leaves the original table untouched; the fix is expected in PostgreSQL 20, not 19.

_Anyone sizing a large repack against write-heavy tables can track PostgreSQL version changes like this on daily.dev._

### Does REPACK (CONCURRENTLY) in PostgreSQL 19 block VACUUM on other tables?

Yes. Because REPACK's temporary replication slot is cluster-wide rather than database-scoped, VACUUM is held back on busy tables across every database on the server while a repack runs, not just the table being repacked. In one test it left 186,000 dead rows unremovable on an unrelated table within two minutes, versus 179,000 for pg_repack, which only affects its own database.

_Teams scheduling online repacks can watch for cross-database side effects like this via daily.dev before running one in production._

### How does REPACK (CONCURRENTLY) compare to pg_repack in WAL usage and speed on PostgreSQL 19?

REPACK (CONCURRENTLY) generated 18.8 GB of WAL and finished in 107 seconds on a 60-million-row table, versus pg_repack's 33.5 GB and 162 seconds, because pg_repack logs an INSERT...SELECT row by row while REPACK logs the new file page by page. Under 3,000 updates/s, REPACK still finished faster (130s vs 198s) and generated less WAL (24.5 GB vs 43.4 GB).

_Developers deciding between repack tools for a bloated Postgres table can compare benchmarks like these on daily.dev._

## Similar posts on daily.dev

- [Waiting for PostgreSQL 19 – Introduce the REPACK command – select \* from depesz;](https://daily.dev/posts/waiting-for-postgresql-19-introduce-the-repack-command-select-from-depesz--naffqzlbk) · depesz · 27 upvotes · 0 comments
- [Waiting for PostgreSQL 19 – Add CONCURRENTLY option to REPACK – select \* from depesz;](https://daily.dev/posts/waiting-for-postgresql-19-add-concurrently-option-to-repack-select-from-depesz--6gxsmjeqb) · depesz · 19 upvotes · 0 comments
- [CYBERTEC's contributions to PostgreSQL 19](https://daily.dev/posts/cybertec-s-contributions-to-postgresql-19-ycyzuh9de) · CYBERTEC PostgreSQL · 4 upvotes · 0 comments

---

Tags: [#postgresql](https://daily.dev/tags/postgresql)

[View this post on daily.dev](https://daily.dev/posts/what-repack-concurrently-costs-while-it-runs-ryh8n4ikq)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"What REPACK (CONCURRENTLY) costs while it runs","url":"https://daily.dev/posts/what-repack-concurrently-costs-while-it-runs-ryh8n4ikq","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/what-repack-concurrently-costs-while-it-runs-ryh8n4ikq"},"datePublished":"2026-09-27T23:31:07.989Z","dateModified":"2026-10-02T02:02:36.419Z","description":"PostgreSQL 19 introduces REPACK, unifying VACUUM FULL and CLUSTER, with a REPACK (CONCURRENTLY) mode that rewrites tables online without extensions. Benchmarks...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/a77abc5b56834acba9ab20fffaa9ba52?_a=AQAEuop","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/a77abc5b56834acba9ab20fffaa9ba52?_a=AQAEuop","isAccessibleForFree":true,"articleSection":"Planet PostgreSQL","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"Planet PostgreSQL","logo":"https://media.daily.dev/image/upload/logos/placeholder.jpg","url":"https://daily.dev/sources/planet-postgresql"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/what-repack-concurrently-costs-while-it-runs-ryh8n4ikq","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":0},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"postgresql","timeRequired":"PT16M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Planet PostgreSQL","item":"https://daily.dev/sources/planet-postgresql"},{"@type":"ListItem","position":3,"name":"What REPACK (CONCURRENTLY) costs while it runs"}]}
{"@context":"https://schema.org","@type":"FAQPage","@id":"https://daily.dev/posts/what-repack-concurrently-costs-while-it-runs-ryh8n4ikq#faq","mainEntity":[{"@type":"Question","name":"What is the row-change ceiling for REPACK (CONCURRENTLY) in PostgreSQL 19?","acceptedAnswer":{"@type":"Answer","text":"REPACK (CONCURRENTLY) fails if more than roughly 105 million rows (104,857,600) are updated or deleted on the table during the run, because the in-memory structure tracking changes doubles until it exceeds PostgreSQL's maximum single allocation size. It fails at the very end and leaves the original table untouched; the fix is expected in PostgreSQL 20, not 19. Anyone sizing a large repack against write-heavy tables can track PostgreSQL version changes like this on daily.dev."}},{"@type":"Question","name":"Does REPACK (CONCURRENTLY) in PostgreSQL 19 block VACUUM on other tables?","acceptedAnswer":{"@type":"Answer","text":"Yes. Because REPACK's temporary replication slot is cluster-wide rather than database-scoped, VACUUM is held back on busy tables across every database on the server while a repack runs, not just the table being repacked. In one test it left 186,000 dead rows unremovable on an unrelated table within two minutes, versus 179,000 for pg_repack, which only affects its own database. Teams scheduling online repacks can watch for cross-database side effects like this via daily.dev before running one in production."}},{"@type":"Question","name":"How does REPACK (CONCURRENTLY) compare to pg_repack in WAL usage and speed on PostgreSQL 19?","acceptedAnswer":{"@type":"Answer","text":"REPACK (CONCURRENTLY) generated 18.8 GB of WAL and finished in 107 seconds on a 60-million-row table, versus pg_repack's 33.5 GB and 162 seconds, because pg_repack logs an INSERT...SELECT row by row while REPACK logs the new file page by page. Under 3,000 updates/s, REPACK still finished faster (130s vs 198s) and generated less WAL (24.5 GB vs 43.4 GB). Developers deciding between repack tools for a bloated Postgres table can compare benchmarks like these on daily.dev."}}]}
```

