Database
PostgreSQL 19 Ships with Live Table Reorganization and Plan Guidance Tools
The latest PostgreSQL release brings non-blocking table maintenance, smarter query planning, and enhanced replication features designed to cut operational overhead.
InfoQ
PostgreSQL 19 is now available, marking a substantial update centered on reducing upkeep burden and enabling finer control over how the database executes work. The new version spans improvements to maintenance routines, query optimization, replication capabilities, and developer-facing tooling.
Table Maintenance Without Downtime#
The standout feature is a new REPACK operation that defragments tables and can physically reorganize rows to align with an index. Its CONCURRENTLY variant runs these tasks without pausing concurrent reads or writes—a significant advantage over the traditional VACUUM FULL and CLUSTER commands, which must lock the table.
Maintenance enhancements also include parallel processing for index vacuuming and refined autovacuum prioritization. The monitoring layer has been expanded with fresh observability views, while EXPLAIN ANALYZE and related diagnostic logs now surface asynchronous I/O patterns and WAL activity tied to full-page images.
Query Planning and Advice#
Two new extensions—pg_plan_advice and pg_stash_advice—give database operators the ability to steer query plan selection and cache advice tied to query signatures, all without modifying application code. This addresses scenarios where off-the-shelf query plans are suboptimal but code changes are impractical.
The query planner itself has become smarter: it now generates more efficient anti-join patterns for NOT IN conditions and can push aggregation operations ahead of joins to reduce intermediate row counts. Changes to foreign key validation also yielded a roughly twofold acceleration in bulk insert workloads during testing.
Replication and Application Features#
Logical replication now handles sequence values directly, and PostgreSQL will automatically elevate the effective WAL level to logical the moment the first logical replication slot is activated. A new WAIT FOR LSN command lets applications pause until a standby has caught up to a specific WAL position—ensuring read-after-write consistency in read-heavy replicated setups.
For application developers, the release adds INSERT ... ON CONFLICT DO SELECT for atomic get-or-create patterns, JSON export from operations, extended SQL/JSON string functions, and support in window function expressions.

