Skip to content
RiverCore
Postgres 19 Beta: REPACK Lands in Core, Autovacuum Grows Up
Postgres 19 betaautovacuumREPACKPostgres REPACK CONCURRENTLY core featureparallel autovacuum workers Postgres

Postgres 19 Beta: REPACK Lands in Core, Autovacuum Grows Up

17 Jul 20266 min readAlex Drover

Anyone who's ever scheduled a maintenance window at 3am just to run VACUUM FULL on a bloated orders table knows the actual cost of Postgres operations isn't the license fee, it's the human hours babysitting locks. That's the lens through which Postgres 19 beta should be read. The headline feature isn't the shiny SQL property graph queries, it's the boring plumbing that finally moves into core.

The beta dropped in June, and the release note that matters most for platform teams is a three-word command: REPACK CONCURRENTLY. My take: this release quietly retires a whole class of 2am incidents.

What Happened

Postgres 19 entered beta with a feature list that reads like a wishlist scraped from a decade of production war stories, as Snowflake detailed in a June 18, 2026 deep dive by Craig Kerstiens. The centerpiece for operators is a new REPACK command built directly into core, including REPACK CONCURRENTLY. For years the answer to table bloat without downtime was pg_repack, a third-party extension that filled a gap the ecosystem couldn't ignore. Now the gap is closed.

Partitioning got two long-requested verbs. ALTER TABLE ... MERGE PARTITIONS lets you fuse orders_2026_q1 and orders_2026_q2 into a single orders_2026_h1. ALTER TABLE ... SPLIT PARTITION lets you carve orders_2026_q3 into three monthly children. No dump, no reload, no custom migration script.

Logical replication kept its steady march. Sequence values now synchronize between publishers and subscribers, publications support ALL SEQUENCES, there's proper sequence sync error reporting, and subscription refresh behavior around sequences is tightened. Publications also gained an EXCEPT clause so you can publish everything except a handful of tables. And wal_level = replica can now auto-promote to logical when needed, with a new effective_wal_level parameter reporting what's actually happening under the hood.

Autovacuum received the biggest structural rework in years. Parallel vacuum workers are now available to autovacuum, controlled by autovacuum_max_parallel_workers. A new scoring system decides ordering, tunable per table via autovacuum_vacuum_insert_score_weight and autovacuum_vacuum_score_weight, and visible through a new pg_stat_autovacuum_scores view. Kerstiens described REPACK CONCURRENTLY as "one of those features that production Postgres users care about more than the average release-note reader might expect." Details can still shift before GA.

Technical Anatomy

Start with REPACK. The historical problem is straightforward: VACUUM FULL rewrites a table but takes an ACCESS EXCLUSIVE lock, which means every query, every connection pool, every downstream service stalls. pg_repack worked around this by creating a shadow table, replaying changes via triggers, and swapping at the end under a brief lock. It worked, but it was an extension you had to install, version, and trust across major upgrades. Baking that pattern into core means the swap logic is now maintained by the same people who maintain the storage layer. Fewer surprises when you upgrade from 19 to 20.

Partition merge and split are the operational equivalent. Before, changing a partitioning scheme mid-flight meant a bespoke script: create new partitions, copy rows in batches, detach the old ones, hope nothing writes during the swap. The new syntax collapses that into a single DDL statement. The example from the beta docs is worth internalizing:

ALTER TABLE customer_orders MERGE PARTITIONS (orders_2026_q1, orders_2026_q2) INTO orders_2026_h1;

And the inverse split into orders_2026_07, orders_2026_08, orders_2026_09. Retention windows are no longer a permanent architectural decision.

The autovacuum changes are subtler but arguably more important. Setting autovacuum_max_parallel_workers = 4 lets a single autovacuum run spread across multiple workers on the same table. On a wide table with several indexes, that's the difference between a vacuum that finishes before the next write burst and one that doesn't. The new scoring system, with weights like autovacuum_vacuum_insert_score_weight = 3.0 and autovacuum_vacuum_score_weight = 0.5, lets you tell Postgres "insert-heavy tables matter more to me than update-heavy ones," or the reverse. pg_stat_autovacuum_scores finally exposes the queue Postgres was already computing internally. VACUUM VERBOSE and autovacuum logs now include memory usage and parallelism details. A separate log_autoanalyze_min_duration means you can log slow analyzes without drowning in vacuum spam. See the Postgres docs for the parameter reference as it evolves toward GA.

Who Gets Burned

Extension vendors first. pg_repack has been a fixture in managed Postgres offerings and self-hosted stacks alike. Once REPACK is in core and stable, the value proposition of the extension collapses to "we still support Postgres 13." That's a shrinking market. Teams that built internal tooling on top of pg_repack triggers will need to decide whether to migrate to core REPACK or maintain their own fork.

Then come the teams running large partitioned tables without proper tooling. If your workload is iGaming session logs, fintech transaction ledgers, or ad-tech impression tables, you almost certainly have a partitioning scheme that made sense two years ago and doesn't now. Production incidents I've seen around partition retention almost always trace to the same root cause: someone chose monthly partitions when weekly would've been right, and nobody wanted to touch it because the migration was too scary. Postgres 19 removes the excuse. Which means the technical debt is now visible debt.

Logical replication users on the edge of the sequence problem are the third group. If you've been running blue-green cutovers where post-migration you had to manually SELECT setval(...) across a hundred sequences, that ritual is finally scriptable. The uncomfortable read: several disaster-recovery runbooks I've reviewed at fintech shops still assume manual sequence reconciliation. Those runbooks are now wrong, but nobody will update them until an audit forces the issue.

Managed Postgres providers face a subtler pressure. Their differentiation on operational features (custom vacuum tuning, proprietary bloat management) just got compressed. Core Postgres is eating their moat, one release at a time. That's good for customers and awkward for pricing pages.

Playbook for Engineering Teams

First, don't upgrade production to a beta. That's obvious and I'll say it anyway because someone always tries. But do stand up a Postgres 19 beta instance in staging this week and replay a representative workload against it. The point isn't to certify GA readiness, it's to catch behavior changes early, especially around autovacuum scoring.

Second, audit your pg_repack dependencies. List every environment where the extension is installed, every cron job that invokes it, every runbook that references it. Draft the migration to core REPACK CONCURRENTLY now, even if you won't execute it until 2027. The syntax swap is small, the mental-model swap is not.

Third, review your partitioning schemes with fresh eyes. If you've been living with awkward partition sizes because the fix was too invasive, put a ticket in the backlog for a Postgres 19 GA migration. Merge the underused partitions, split the overloaded ones.

Fourth, benchmark autovacuum with parallel workers on your largest tables. Start conservative: autovacuum_max_parallel_workers = 2, watch I/O saturation, tune up from there. Set the score weights based on whether your workload is insert-dominated or update-dominated, and use pg_stat_autovacuum_scores to validate the queue matches your intuition.

Fifth, update your logical replication runbooks to remove manual sequence reconciliation steps once you're on 19. Then test the failure modes: what does sequence sync error reporting actually surface, and does your alerting catch it?

Key Takeaways

  • REPACK CONCURRENTLY in core retires a decade-old extension dependency and removes a common source of 2am maintenance windows.
  • ALTER TABLE ... MERGE PARTITIONS and SPLIT PARTITION make partitioning schemes evolvable without bespoke migration scripts.
  • Parallel autovacuum workers plus the new scoring system (with pg_stat_autovacuum_scores) give operators real levers over bloat management for the first time.
  • Logical replication finally handles sequence sync properly, closing a well-known cutover footgun for migrations and HA setups.
  • Beta means details can shift before GA. Test in staging now, but don't rewrite production runbooks until the release stabilizes.

Frequently Asked Questions

Q: When will Postgres 19 be generally available?

Postgres 19 is currently in beta as of the June 2026 announcement. A GA date hasn't been published in the source material, and details can still change before the final release, so production planning should assume flexibility.

Q: Does Postgres 19's REPACK command fully replace the pg_repack extension?

Functionally, the new core <code>REPACK CONCURRENTLY</code> covers the primary use case that made <code>pg_repack</code> popular: reclaiming table bloat without long exclusive locks. Teams with custom tooling built on the extension's triggers will need to plan a migration, but for standard bloat management the core command is the intended replacement.

Q: How do the new autovacuum score weights actually work?

Postgres 19 introduces per-table storage parameters <code>autovacuum_vacuum_insert_score_weight</code> and <code>autovacuum_vacuum_score_weight</code> that influence the order tables are vacuumed. Higher weights push a table higher in the autovacuum queue, and the resulting scores are visible via the new <code>pg_stat_autovacuum_scores</code> view so you can validate behavior against your workload.

AD
Alex Drover
RiverCore Analyst · Dublin, Ireland
SHARE
// RELATED ARTICLES
HomeSolutionsWorkAboutContact
News06
Dublin, Ireland · EUGMT+1
LinkedIn
🇬🇧EN▾