PostgreSQL 19 Released: Online Table Rebuilds, Steadier Query Plans and Read-Your-Writes Support
The PostgreSQL Global Development Group has released PostgreSQL 19, the latest version of the open source database. The 19 November 2026 release adds the REPACK command for rebuilding tables without blocking work, the pg_plan_advice extension for steadier query plans, parallel autovacuum, logical replication of sequence values and read-your-writes consistency on standbys, plus faster foreign key checks and several developer-friendly SQL improvements.
PostgreSQL 19 Released: Online Table Rebuilds, Steadier Query Plans and Read-Your-Writes Support
The PostgreSQL Global Development Group has released PostgreSQL 19, the latest version of the world's most advanced open source database. Announced on 19 November 2026, the release is aimed squarely at the day-to-day problems of teams running PostgreSQL at scale: bloated tables, query plans that change for the worse, maintenance work that is hard to run safely in production, and replicas that lag behind the primary.
There is no single headline feature that redefines what PostgreSQL is. Instead, version 19 is a practical release, giving database teams more control over workloads that are already mission-critical, without asking them to change how their applications work. "For over 30 years, the global open source community has built PostgreSQL into a database that organizations trust with their most critical data," said Jonathan Katz, a member of the PostgreSQL core team. "PostgreSQL 19 continues that commitment to reliability, giving users new ways to manage their workloads without disruption and to build applications that span multiple systems."
REPACK rebuilds tables without taking them offline
The most useful change for many operators is the new REPACK command. Tables that receive many updates and deletes build up unused space, known as bloat, which can slow queries noticeably. Until now, the tools for dealing with it were VACUUM FULL and CLUSTER, both of which blocked access to the table until the cleanup finished.
REPACK reclaims that space and can reorder a table's data to match an index. With REPACK (CONCURRENTLY), it does so without blocking reads or writes during most of the operation, bringing into the core a job that previously needed downtime or an external extension. REPACK replaces VACUUM FULL and CLUSTER, though both older commands remain available for compatibility.
Steadier query plans with pg_plan_advice
PostgreSQL's query planner usually picks an efficient plan for each query, but the plan can change as data changes, and sometimes the new plan is slower. PostgreSQL 19 adds the pg_plan_advice extension, which lets operators stabilise plan choices and experiment with different plans using a plan advice mini-language.
Its companion, pg_stash_advice, stores advice and applies it automatically to queries based on their query identifier, so a team can fix a slow plan without changing its application code. For teams that have lived with a query that occasionally picks a bad plan, this is the first time the fix has shipped inside PostgreSQL itself.
Autovacuum and monitoring get sharper
Autovacuum, the background process that keeps tables healthy, also gets a serious upgrade. It can now vacuum indexes using parallel workers, controlled by the new autovacuum_max_parallel_workers setting, and it uses a new scoring system to decide which tables to process first. Queries that read a table can now automatically mark pages as all-visible in the visibility map during execution, reducing the work future vacuums need to do.
Monitoring improves alongside it. New views expose what the server is doing in more detail: pg_stat_lock reports per-lock-type statistics, pg_stat_recovery shows recovery status, and pg_stat_autovacuum_scores shows how autovacuum prioritises tables. The new IO option for EXPLAIN ANALYZE reports asynchronous I/O activity, and PostgreSQL 19 now reports how much WAL is written for full-page images in pg_stat_wal, EXPLAIN (ANALYZE, WAL), and vacuum and analyse log events. Long lock waits are now logged by default.
Replication and read-your-writes consistency
Setting up logical replication gets simpler. PostgreSQL 19 automatically raises the effective WAL level to logical when the first logical replication slot is created, so enabling it no longer requires a server restart. Sequence values can now be replicated too, published with FOR ALL SEQUENCES in CREATE PUBLICATION, and CREATE PUBLICATION gains an EXCEPT clause for excluding tables from a FOR ALL TABLES publication.
For applications that send reads to standbys, the new WAIT FOR LSN command adds read-your-writes consistency. A session on a standby can wait until the standby has replayed the write-ahead log up to a specific log sequence number before running a query, so the application reads back data it has just written on the primary instead of a stale copy.
Developer features and faster queries
Developers get several smaller improvements that remove friction. INSERT ... ON CONFLICT DO SELECT lets the RETURNING clause return existing rows that conflict with an insert, simplifying the common get-or-create pattern and saving a network round trip. COPY can now output data as JSON, including as a single JSON array, and the SQL/JSON path language adds string methods such as lower(), upper(), replace(), split_part() and btrim(). Window functions including lead(), lag(), first_value(), last_value() and nth_value() can now skip NULL values with IGNORE NULLS, and random() can generate random dates and timestamps within a range.
Many workloads also get faster without any application changes. Foreign key checks are quicker, making bulk inserts nearly twice as fast in the project's testing, and the planner gains optimisations such as converting NOT IN clauses to more efficient anti-joins when NULL values are not present, and performing eager aggregation before joins. The asynchronous I/O subsystem added in PostgreSQL 18 is extended too: when io_method is set to worker, PostgreSQL now automatically adjusts the number of I/O workers between the new io_min_workers and io_max_workers settings, replacing the old io_workers setting.
What changes when you upgrade
A few defaults change, and teams planning an upgrade should read the release notes before moving. Just-in-time compilation is now disabled by default, because the cost estimates used to decide when to use it proved unreliable; teams running many large analytical queries may want to enable it. RADIUS authentication support is removed, md5 password authentication now triggers a warning after a successful login and is deprecated, and the default TOAST compression method becomes lz4 when PostgreSQL is built with LZ4 support.
PostgreSQL 19 also adds server-side support for Server Name Indication, letting a single server present a different TLS certificate based on the hostname a client connects to, with hostnames mapped to certificates in the new pg_hosts.conf file. A new password_expiration_warning_threshold setting warns users when their password is about to expire.
The release also closes the book on PostgreSQL 14, which reaches the end of its supported life alongside this release, so teams still on version 14 should plan their upgrade path, through pg_upgrade or a dump and restore. PostgreSQL 19 is available to download now from the project's official downloads page, with installers for Windows, Linux and macOS, and the full release notes are published on postgresql.org.
Sources
What's Your Reaction?
Like
0
Dislike
0
Love
0
Funny
0
Angry
0
Sad
0
Wow
0