PostgreSQL 19 Is Here — Online Table Repacking, Stable Query Plans, and What It Means for Developers Behind the Sites

PostgreSQL 19 shipped on November 19, 2026, with REPACK (CONCURRENTLY), pg_plan_advice for stable query plans, and read-your-writes consistency on standbys. Here is what actually changed, what did not make the cut, and the upgrade checklist I am running before I touch a production database.

PostgreSQL 19 Is Here — Online Table Repacking, Stable Query Plans, and What It Means for Developers Behind the Sites
PostgreSQL 19 Is Here — Online Table Repacking, Stable Query Plans, and What It Means for Developers Behind the Sites — Technical Architecture & Overview

Table of Contents

WordPress itself does not run on PostgreSQL. Your WordPress site runs on MySQL or MariaDB, and that is not changing. So when PostgreSQL 19 shipped on November 19, 2026, my first thought was not about my WordPress installs — it was about everything around them.

The analytics service behind my dashboards, the headless storefront, the little SaaS tool I run for a client — those run on Postgres. PostgreSQL 19 makes the boring, operational parts of running a database noticeably less painful, and it arrives in the 30th year of the PostgreSQL open source project.

What PostgreSQL 19 actually is

The PostgreSQL Global Development Group announced PostgreSQL 19 on November 19, 2026. It is a major release, which in Postgres terms means a version you upgrade to deliberately, with pg_upgrade or a dump-and-restore — not something your package manager slips in overnight. EnterpriseDB announced general availability the same day.

The release notes frame the version around one idea: mission-critical Postgres usage keeps growing, and the database needs to be easier to administer at scale. The headline features are all operational: a new REPACK command that reclaims wasted space without taking tables offline, a plan-advice framework that stops the query planner from surprising you after an upgrade, and autovacuum that can finally keep up with busy systems. The developer features are real too — a one-round-trip get-or-create, JSON output from COPY, IGNORE NULLS in window functions — but this is, at heart, an operator's release.

The release is also honest about what it took away: two features from the betas — DDL extraction functions and online checksum toggling — were pulled before the final release. They did not ship, and the release notes say so plainly. I would rather upgrade to a release that cut something than one that shipped something half-finished.

REPACK (CONCURRENTLY): the headline feature

If you have run Postgres in production, you know table bloat: rows get updated and deleted, dead space accumulates, and your table grows fatter than the data inside it. The traditional fixes were VACUUM FULL and CLUSTER, and both had the same problem: they locked the table while they worked. On a busy table, that meant choosing between taking the table offline or letting the bloat slow everything down.

PostgreSQL 19 introduces REPACK, which reclaims that space and can reorder a table's data to match an index. The important form is REPACK (CONCURRENTLY), which rebuilds without blocking reads or writes for most of the work, taking an ACCESS EXCLUSIVE lock only for the final swap — so the job that used to need a maintenance window can now run while your application keeps serving traffic.

REPACK replaces VACUUM FULL and CLUSTER for this job, though both remain available for compatibility. I have done the late-night maintenance window version of this job, watching the clock while a table rebuild held a lock, and the concurrent form is the single feature in this release I would upgrade for on its own.

pg_plan_advice: stop the planner from surprising you

The second headline will save someone a very bad morning. PostgreSQL 19 adds pg_plan_advice, an extension that lets you describe, reproduce, and constrain specific planner decisions, and a companion extension, pg_stash_advice, that stores that advice and applies it automatically based on the query identifier.

Here is the problem it solves. Postgres picks a query plan based on statistics, and after an upgrade or a big data change it can pick a different plan for a query that used to be fast. Nothing in your code changed — but suddenly the report that took two seconds takes two minutes, and you find out from a customer, not from a dashboard.

pg_plan_advice generates a plan-advice string that captures the relevant plan choice — join order, scan method, and the rest — and exposes a hook for other modules to inject advice at planning time. pg_stash_advice stores advice by stash name and query ID in shared memory, so a critical query can keep a proven plan through upgrades and data growth, with no application code changes. As the release notes put it, you can fix a slow plan without changing your app.

Be careful with this one, because plan pinning is a power tool and power tools cut both ways. Advice that is right today can be wrong after your data doubles, and a pinned bad plan is worse than an unpinned one. But for the handful of queries your business actually depends on, having the ability to say "keep using the plan that works" is genuinely new in core Postgres.

The developer features are small and genuinely useful

INSERT ... ON CONFLICT DO SELECT is my favourite of these. The get-or-create pattern — insert a row if it does not exist, otherwise return the existing one — used to take two round trips or a workaround. Now it happens in one statement, in one round trip, removing both the extra trip and the race between the check and the insert.

COPY can now output JSON, which makes bulk data export into pipelines and APIs simpler. Window functions gain IGNORE NULLS, so a query like "give me the last non-null value in this column" stops needing a workaround. The planner can now convert NOT IN clauses to more efficient ANTI JOINs when NULLs are absent, and logical replication can be enabled without a server restart when wal_level is set to replica.

None of these is a reason to upgrade on its own. Together, they are the kind of release where every developer on the team finds one thing that makes their week slightly better.

Autovacuum finally keeps up — and tells you what it is doing

Autovacuum is the part of Postgres that everyone depends on and nobody thinks about until it falls behind. On a busy system, the tables that need vacuuming most change fastest, and older autovacuum did not always keep up.

First, autovacuum can now vacuum indexes using parallel workers, controlled by the new autovacuum_max_parallel_workers setting. Second, a new scoring system decides which tables to process first, so the busiest tables get attention sooner. Third, queries that read a table can now mark pages as all-visible in the visibility map during execution, reducing the work future vacuums need to do.

Just as important, autovacuum becomes observable. PostgreSQL 19 adds new monitoring views: pg_stat_lock for per-lock-type statistics, pg_stat_recovery for recovery status, and pg_stat_autovacuum_scores to show how autovacuum prioritizes tables. A new IO option for EXPLAIN ANALYZE reports asynchronous I/O activity, WAL for full-page images is now reported in pg_stat_wal, and long lock waits are logged out of the box.

I have debugged the "why is this query slow today" problem more times than I can count, and half the time the answer turned out to be a vacuum or a lock I could not see.

Replication and read-your-writes

The distributed-data improvements in PostgreSQL 19 are quieter than REPACK, but they matter if you run replicas. Logical replication setup is simpler, and it can now synchronize sequence values from publisher to subscriber, so a sequence on the replica no longer falls behind and collides when the replica is promoted.

The feature I keep coming back to is WAIT. Writing to the primary and immediately reading from an asynchronous replica can return stale data — the replica simply has not replayed your write yet. PostgreSQL 19 adds the WAIT command, so the reader can wait for replay to reach a known WAL position. That is read-your-writes consistency on standbys, and it removes a whole class of "I just saved it, where did it go?" bugs.

What did not ship, and the one change to watch

Two things worth knowing before you upgrade. First, the DDL extraction functions and online checksum toggling from the betas were reverted and did not ship. If you planned around a beta write-up, adjust your plans — the final documentation is the source of truth.

Second, JIT is now disabled by default. Its cost estimates proved unreliable, so queries that used just-in-time compilation will not unless you turn it back on. For most workloads this is a small performance trade, not a problem, but if you run analytical queries that benefited from JIT, test before you upgrade and measure rather than assume.

There are also smaller incompatibilities in the release notes — a new password_expiration_warning_threshold variable, OAuth refinements for different user groups in pg_hba.conf, and the usual behaviour changes that come with a major version. Read the migration section of the release notes before you start, not after something breaks.

The upgrade checklist I am running

I am not upgrading a production database on the strength of a press release, and neither should you. Here is the checklist I am actually running this week, in order.

First, read the full release notes, migration section included, for every database I run. Second, stand up a staging copy of the busiest database on version 19 and run REPACK (CONCURRENTLY) on its fattest table. Third, identify the five most critical queries in each application and test their plans on version 19 before thinking about pg_plan_advice. Fourth, check whether any application relies on JIT, and whether any code references the reverted beta features. Fifth, check extensions and backup tooling against version 19 before the upgrade. And sixth, leave production until staging has run a few days under real load, because the only upgrade test that counts is the one with real traffic.

Conclusion

PostgreSQL 19 is not a flashy release: no new query language, no headline AI feature, no rebrand. What it is, is the release that makes running Postgres at scale less painful: tables you can repack without downtime, plans you can hold steady, autovacuum that keeps up, and replicas you can read your own writes from.

That is the kind of release I like most. It does not ask you to rebuild anything. It asks you to test it, upgrade on your own schedule, and enjoy the maintenance windows you no longer need. Read the release notes, stand up a staging copy, and run REPACK on your fattest table.

Frequently asked questions

When was PostgreSQL 19 released?

PostgreSQL 19 was released on November 19, 2026, by the PostgreSQL Global Development Group. It is a major release, so upgrading is a deliberate step using pg_upgrade or dump-and-restore, not an automatic package update.

What is REPACK (CONCURRENTLY) in PostgreSQL 19?

REPACK is a new command that reclaims wasted space in a table and can reorder its data to match an index. With REPACK (CONCURRENTLY), it does most of that work without blocking reads or writes, taking an ACCESS EXCLUSIVE lock only for the final swap.

What does pg_plan_advice do?

pg_plan_advice is a new extension that lets you describe, reproduce, and constrain specific query planner decisions. Its companion, pg_stash_advice, stores that advice and applies it automatically by query identifier, so a critical query can keep a proven plan through upgrades and data growth without changing your application code.

Does WordPress run on PostgreSQL?

No. WordPress core runs on MySQL or MariaDB, and PostgreSQL 19 does not change that. It matters to WordPress developers because of everything around the site: headless storefronts, SaaS tools, analytics services, queues, and custom applications that many WordPress-adjacent stacks run on Postgres.

What is the WAIT command in PostgreSQL 19?

WAIT gives you read-your-writes consistency on standbys. When you write to the primary and read from an asynchronous replica, the replica may not have replayed your write yet — WAIT lets the reader wait for replay to reach a known WAL position, so the read sees the write.

Should I upgrade to PostgreSQL 19 right away?

Test first. Stand up a staging copy on version 19, run REPACK (CONCURRENTLY) on your fattest table, check the plans of your most critical queries, and confirm your extensions and backup tooling support version 19. Upgrade production only after staging has run under real load.

Looking for more WordPress & Elementor tutorials?

Explore our complete directory of 53+ web performance, theme development, and Elementor architecture guides.

View Topic Sitemap XML Feed