BuildRiot
Sign in

BackendSource: PostgreSQL

PostgreSQL releases version 19 with concurrent table rebuilding and planner advice

PostgreSQL 19 adds native concurrent table rebuilding and tools to influence query plans. Reads and writes can continue during the main rebuild, but the final swap still requires an exclusive lock.

PostgreSQL logo
Cover: BuildRiot

The PostgreSQL Global Development Group released PostgreSQL 19 on November 19, 2026, adding concurrent table rebuilding and tools for influencing query plans. The project highlights table maintenance and plan stability in its announcement. Sources: PostgreSQL

The repack command reclaims storage and reorganizes tables, optionally in index order. The vacuum full and cluster commands remain available for compatibility. Concurrent mode permits reads and writes during the main rewrite, but the final file swap requires an exclusive lock. The lock's duration depends on accumulated changes, so concurrent repacking does not guarantee uninterrupted access. Sources: PostgreSQL

The pg_plan_advice module can constrain join order, join methods, scan methods and parallelism within the existing planner's valid choices. Its companion, pg_stash_advice, stores and automatically applies advice by query identifier. The project says this can address slow plans without changing application SQL. Percona reports that neither module is enabled by default. PostgreSQL's documentation warns that advice can hurt performance as data distributions change. Sources: Percona Community, PostgreSQL

According to Percona's Zsolt Parragi, native concurrent repacking uses logical decoding, while the existing pg_repack extension uses triggers. Parragi also reports that the native command lacks some extension capabilities, including tablespace moves and index-only rebuilding. Sources: Percona Community

Concurrent mode requires a primary key or index-based replica identity and cannot be used on a partitioned table. It also requires available repack replication-slot capacity. Free disk space must cover at least the table and its indexes. Additional space may be needed for sorting and concurrent changes. After repacking commits, transactions using snapshots taken before repacking began can see the table as empty. Sources: PostgreSQL

Why it matters

PostgreSQL 19 gives developers native tools to reclaim table storage and influence query plans. Repacking still requires a final exclusive lock, and planner advice can hurt performance as data changes.

Attribution

Sources

  1. 1PostgreSQLRelease 19
  2. 2Percona CommunityWhat's left in Postgres 19Source published (UTC)
  3. 3PostgreSQLRepack
  4. 4PostgreSQLpg_plan_advice — help the planner get the right plan
  5. 5PostgreSQLPostgreSQL 19 releasedSource published (UTC)

Read the original source for full details and context.

Report a problem

Links, dates or what you expected. Do not include passwords or private data.

More on Backend

All Backend stories

Review · Backend

Review: PostgreSQL 19, a relational database with new maintenance controls

PostgreSQL 19 adds concurrent table repacking that permits access during most of the work. The PostgreSQL Global Development Group released this version of its open-source relational database on November 19, 2026. According to the project, pg_plan_advice influences planner choices, while pg_stash_advice stores and applies guidance by query identifier. The release also adds logical replication of sequence values, get-or-create operations and JSON export.

PostgreSQL

Review · Frontend

Review: MoonBit 1.0 release candidate, a language for WebAssembly and native apps

MoonBit released its 1.0 release candidate on November 26, 2026, freezing compiler changes to bug fixes until 1.0. Its primary targets are native code and WebAssembly, with JavaScript support for browsers and interfaces. The team targets February 18, 2027, for the full release with a stable core library. The async and archive packages may still receive minor API refinements. The moon fix command can apply compiler-suggested fixes.

MoonBit

PostgreSQL releases version 19 with concurrent table rebuilding and planner advice · BuildRiot