DatabasesIntermediate

PostgreSQL 19: What's New and What to Adopt First

DeveloperHat Team
15 min read

TL;DR

PostgreSQL 19 (19 Nov 2026) adds REPACK, pg_plan_advice, WAIT FOR LSN and faster foreign keys. What to adopt first, what breaks, and when to wait.

PostgreSQL 19.0 was released on 19 November 2026 by the PostgreSQL Global Development Group — ten days ago as this article is written. If last year's PostgreSQL 18 release changed how the server reads from disk, 19 changes how you look after the database once it is running: reclaiming space without downtime, pinning a query plan that went bad, and reading your own writes from a standby. The official announcement leads with maintenance and control, and that is the honest theme of this release.

The short version up front: adopt REPACK first — it is the single most useful thing in 19 for anyone running a database that grows and shrinks. Reach for pg_plan_advice second, if you have ever watched a plan flip after an ANALYZE and tank a query. Use WAIT FOR LSN third, if your application reads from standbys. Everything else in the release is genuinely useful and none of it is a reason to rush. If you are still on PostgreSQL 14, stop reading release notes and upgrade — 14 goes end of life with this release cycle, and the current minor releases are 18.7, 17.12, 16.16, 15.20 and 14.25. Versions and dates in this article are as checked on 29 November 2026 against the official release notes.

PostgreSQL 19: five controls, one theme — stop babysitting the database 19.0 shipped 19 November 2026. REPACK leads; plan advice, WAIT FOR LSN and easier replication follow. REPACK reclaim space live pg_plan_advice pin a good plan WAIT FOR LSN read your writes Logical replication no restart needed Autovacuum parallel + scored REPACK (CONCURRENTLY) no read/write blocking effective_wal_level auto-raises to logical 19 builds on 18's async I/O — and now scales the I/O workers automatically instead of a fixed count.

Why 19 is a control release, not a speed release

PostgreSQL's yearly cadence means most releases are judged on their feature list, and 19 has a long one. But the right test for this release is different: does it change a chore you actually do? For most production databases the answer is yes, because the chores are always the same — space that never comes back after deletes, a plan that was fast on Tuesday and slow on Wednesday, a replica that lags just enough to show a user their own edit missing, and a replication setup that needs a restart to enable.

That is what 19 attacks. There is no new storage engine and no new index type headlining the release. Instead, maintenance you used to schedule for a quiet window can now run during business hours, a plan regression can be fixed without touching application code, and logical replication can be switched on without bouncing the server. The release builds directly on 18's work: asynchronous I/O now scales its worker processes automatically, with the fixed io_workers server variable removed and replaced by four new variables that grow and shrink the pool as demand changes.

There is one genuine speed claim in the release, and it deserves the usual caution. The announcement says foreign-key checks got faster, with bulk inserts reported nearly 2x faster in testing. That is a vendor-measured figure on one workload shape, not a promise for yours — but the mechanism is real (less work per referenced-row check), and write-heavy ingestion pipelines are the ones most likely to feel it. Everything else in this article takes each piece in turn: what it does, who it helps, and what it costs.

Adopt first: REPACK and the maintenance upgrades

REPACK is the headline, and it earns the spot. Until now, a table bloated by updates and deletes left you with two bad options: VACUUM FULL, which rewrites the table while holding an exclusive lock, or CLUSTER, which rebuilds the table in index order and locks it too. Both work, both need a maintenance window, and both are the reason bloated tables stay bloated for months. REPACK is a new command that reclaims disk space and reorganizes table contents, and it can reorder data to match an index — the job CLUSTER used to do — while the table stays usable.

The form you will actually run is REPACK (CONCURRENTLY):

-- Reclaim space and reorder by the index, without blocking readers or writers.
-- Only the final swap is briefly exclusive.
REPACK (CONCURRENTLY) orders;

The concurrently form does the rebuild in the background and swaps the new table in at the end, so reads and writes keep flowing except for that final swap. REPACK supersedes VACUUM FULL and CLUSTER, which remain available for compatibility — use REPACK for the same jobs from now on, and reach for the old commands only if a script or a runbook still calls them. The honest limit: the concurrent form still needs roughly a table's worth of free disk to build the replacement, and the final swap, while short, is still a lock — schedule it away from your sharpest traffic peak, not in the middle of it.

REPACK is the visible piece; autovacuum is the quiet one that may matter more over a year. Autovacuum can now vacuum a table's indexes in parallel, controlled by the new autovacuum_max_parallel_workers setting, so a wide table with many indexes no longer waits on one index at a time. And autovacuum now prioritizes through a scoring system, exposed in the new pg_stat_autovacuum_scores view — you can finally see why one table gets vacuumed before another instead of guessing. If you have ever tuned autovacuum by feel, that view is worth a look on its own.

The third maintenance win is smaller but free: LZ4 is now the default TOAST compression, replacing pglz. LZ4 has been available since PostgreSQL 14, and it compresses large values faster and usually smaller. New and rewritten rows get the benefit automatically; existing data only changes when it is rewritten, so do not expect a storage drop the day you upgrade — expect it gradually, as rows churn. Who benefits most from this whole section: tables with heavy update and delete churn, queue tables, soft-delete tables, and anything you have been meaning to VACUUM FULL for six months.

Adopt second: plan stability with pg_plan_advice

Every senior engineer has the same scar: a query that ran fine for months, then a statistics update flipped its plan and response times went off a cliff at 2pm on a Tuesday. Until 19, the fixes were blunt — rewrite the query, add an index, set enable_seqscan = off for a session and hope nobody copies it, or pin the plan in the application. The new pg_plan_advice extension gives you a supported middle ground: it lets you control and stabilize query planner decisions and experiment with plans, and its companion pg_stash_advice applies advice automatically based on query ID.

The workflow that matters is the incident one. A plan goes bad, you identify the query by its ID, you author advice that steers the planner back to the good plan, and the stash applies it automatically — a slow plan can be fixed without changing the application and without a deploy. That last part is the real win: the fix lands at the database layer, in minutes, while the application change goes through its normal review cycle.

The honest limits matter here, because plan pinning is a tool that punishes overuse. Advice is steering, not a guarantee — the planner still plans, and advice that was right for one data distribution can go stale as the data changes. The anti-pattern to avoid is pinning every query you care about: pin only regressions you have measured, review pinned advice when data grows or distributions shift, and treat each piece of advice as a ticket with an owner and an expiry, not as a permanent fixture. Used that way, for parameter-sensitive queries and workloads where a bad plan is a pager event, this is the second most valuable thing in the release. If you have never had a plan flip hurt you, skip the extension entirely — it is a tool for a specific pain, not a default to enable everywhere.

Adopt third: WAIT FOR LSN, replication without restarts, and the smaller wins

If your application reads from standbys, you know the failure mode: a user saves a change, the next page loads from a replica that has not replayed the write yet, and the user sees their own edit missing. The usual fixes are routing tricks — pin the user to the primary for a few seconds, or accept the staleness. PostgreSQL 19 adds a cleaner answer with the new WAIT command: after a write, wait until the standby has replayed to that LSN before reading.

-- Write on the primary, note the LSN, then wait for the standby to catch up.
SELECT pg_current_wal_lsn();  -- returns e.g. 0/16B2C480
WAIT FOR LSN '0/16B2C480';
-- Reads after this point see the write, even from the standby.

That is read-your-writes consistency expressed as one statement, and it is aimed squarely at applications that already split reads and writes across primary and replicas. It costs a wait — the statement blocks until the standby catches up, or until a timeout you set — so use it on the read that follows a write, not on every query. A standby that falls far behind will make those waits long, which is the correct signal: the wait is telling you about replication lag you already had.

Logical replication gets two ergonomic wins in the same area. First, it can now be enabled without a server restart when wal_level is replica: the effective WAL level auto-raises to logical when the first logical replication slot is created, and the new effective_wal_level setting shows the level actually in use. Second, publications can now replicate sequence values with FOR ALL SEQUENCES, so a sequence on the subscriber keeps pace instead of drifting behind the publisher. Both remove a restart or a manual workaround from a setup that used to need both, and both matter most if you are setting up logical replication for a migration — which is the usual path to a zero-downtime upgrade.

The smaller wins that add up

The rest of the release is a list of small, real improvements. The optimizer can now convert NOT IN clauses to more efficient ANTI JOINs when NULLs are not present, which helps a query shape that shows up constantly in application code. INSERT ... ON CONFLICT DO SELECT adds a fourth conflict action, so get-or-create fits in one statement instead of a retry loop. COPY can output JSON with FORMAT JSON, which simplifies exports to downstream systems. There are new jsonpath string methods, and window functions gain IGNORE NULLS, which cleans up a whole class of analytics queries that used to need a subquery to skip empty rows. Monitoring improves too: new pg_stat_lock and pg_stat_recovery views report per-lock-type statistics and recovery status, EXPLAIN ANALYZE gains an IO option reporting async I/O activity, and WAL written for full-page images is now reported in pg_stat_wal, EXPLAIN (ANALYZE, WAL), and vacuum and analyze log events. None of these is a reason to upgrade on its own. Together they are the reason a 19 database feels a year newer to operate.

Architecture Decision: upgrade to 19 now, or wait for 19.1?

How control moves down the stack in PostgreSQL 19 SQL + planner — NOT IN to ANTI JOIN, ON CONFLICT DO SELECT, IGNORE NULLS pg_plan_advice — pin plans, pg_stash_advice applies them by query ID REPACK + autovacuum — reclaim space live, vacuum indexes in parallel Replication — WAIT FOR LSN, sequence values, no-restart logical setup Observability — pg_stat_lock, pg_stat_recovery, EXPLAIN IO option Control moves down the stack: the planner takes advice, maintenance runs live, replication stops needing restarts.

Decision: Upgrade staging to PostgreSQL 19 now; upgrade production after 19.1 unless a 19 feature pays for the risk. PostgreSQL 14 or older goes to 18.7 immediately, not to 19.

Context: 19.0 shipped 19 November 2026, ten days before this article. The release is an operational one — REPACK, plan advice, WAIT FOR LSN, easier logical replication — and its value depends entirely on whether you have the pains it fixes. Meanwhile 18.7 is the boring, supported, well-tested choice, and the minor releases 17.12, 16.16 and 15.20 keep older versions supported.

Options considered: (1) Upgrade production to 19.0 now. (2) Upgrade staging now and production after 19.1. (3) Stay on the current version and skip 19 entirely. (4) If on 14 or older, upgrade to 18.7 now.

Why this one: Option 2 captures the real value — REPACK and plan advice are worth learning on staging — while letting the first minor release absorb the bugs a .0 always ships with. Option 1 pays the .0 risk for features most teams do not need on day one. Option 3 leaves REPACK and the autovacuum improvements on the table for a year. Option 4 is the only correct answer for 14, which is end of life.

What it costs you: Staging time to validate REPACK behaviour, extension compatibility, and the JIT default change against your workload. A second upgrade window later, when production moves to 19.1 or later. If your managed provider has not shipped 19 yet, waiting costs nothing — the decision is made for you.

When to reverse it: If 19.1 ships with a regression that hits your workload, stay on 18.7 — nothing in 19 is load-bearing for a team that does not need its features. If a plan regression or a bloated table is already hurting production, reverse the wait: the feature that fixes a live pain is worth the .0 risk, with a rollback plan in place.

Upgrade checklist: what to check before you upgrade

The breaking and default changes in 19 are manageable, but they are the kind that bite during the upgrade rather than before it, so check them in advance. JIT is now disabled by default — the cost estimates that decide when to use it proved unreliable, so the default changed. If you relied on JIT for analytical queries, test with it explicitly re-enabled before deciding; most OLTP workloads will not notice. The max_locks_per_transaction default rises from 64 to 128, which uses more memory per lock table — mostly harmless, but note it on memory-constrained servers.

RADIUS support is removed. If you authenticate against RADIUS, migrate to another method before upgrading — there is no compatibility shim. Full-text search, pg_trgm and fuzzystrmatch indexes may need a reindex after pg_upgrade, so plan that step into the window rather than discovering it afterwards. And two traps that pg_upgrade --check will not catch: the check can pass and the upgrade still fail if a role or database stores standard_conforming_strings = off, or if a custom uuid-to-bytea cast exists — that cast is now built in, so the custom one conflicts. Find and remove both before you start. Finally, run VACUUM ANALYZE after pg_restore, as the release notes recommend — restored statistics are not the same as fresh ones. If you need the upgrade with no downtime, the zero-downtime migration strategies we covered earlier still apply, and 19's no-restart logical replication makes the usual path slightly easier than it was.

PostgreSQL 18 vs 19

DimensionPostgreSQL 18 (current: 18.7)PostgreSQL 19 (19.0, 19 Nov 2026)
Headline changeAsync I/O for readsREPACK, plan advice, WAIT FOR LSN
ReadsAIO subsystem, fixed io_workersAIO workers scale automatically
MaintenanceVACUUM FULL / CLUSTER with locksREPACK, incl. concurrent form; parallel autovacuum of indexes
Planner controlHints and hopepg_plan_advice + pg_stash_advice by query ID
ReplicationLogical replication needs a restart to enableNo restart when wal_level is replica; sequences replicate
SQL additionsVirtual columns, uuidv7()ON CONFLICT DO SELECT, COPY FORMAT JSON, IGNORE NULLS
Defaults that changedio_method = workerJIT off, max_locks_per_transaction 64 to 128, LZ4 TOAST
Support statusSupported until Nov 2030New major, supported; 14 is end of life

None of this changes the analytics-engine question. If your workload is mostly column scans over large tables, the PostgreSQL vs ClickHouse vs DuckDB comparison still applies — 19 is an operational release for transactional workloads, not an analytics one, and the right engine for a scan-heavy workload is still a separate decision from the PostgreSQL version you run.

When not to upgrade yet — and the recommendation

Do not upgrade production to 19.0 yet if none of the headline features maps to a pain you have today. A quiet database on 18.7 gains nothing from a .0 release except risk. Do not upgrade if your managed provider has not shipped 19 — most take weeks to months, and that delay is a feature, not a problem. Do not upgrade until your extensions are 19-compatible: check PostGIS, pgvector, TimescaleDB, Citus, or whatever else you run before you start, because an incompatible extension turns a routine upgrade into a rollback. And if you are on 14, do not jump straight to 19 — go to 18.7 now, the release we recommended last year, and evaluate 19 from a supported position.

The recommendation, then: put 19 on staging this week. Run REPACK against your most bloated table and watch the space come back. If you have a query with a plan-flip history, install pg_plan_advice and try pinning it. If you read from standbys, try WAIT FOR LSN on the read after a write. Measure all three against your real workload, not against the release notes. Then wait for 19.1 for production — unless one of those three is already fixing a live pain, in which case the feature is worth the .0 risk with a rollback plan in place. PostgreSQL 19 is a good release about the unglamorous work of running a database, and the right way to adopt it is the unglamorous way: staged, measured, and one feature at a time.

Should you upgrade to PostgreSQL 19 now? Start from your version and your pain — the features decide, not the release number. What are you running? version + pain points On 14 or older? EOL — upgrade to 18.7 Need REPACK / plan control? evaluate 19 on staging On 18.7 and happy? stay, wait for 19.1 19.0 landed 19 November 2026 — ten days old. Let it bake unless a feature pays for the risk.

Why This Matters

Understanding the business and technical context helps you make informed decisions rather than blindly following patterns.

Trade-offs to Consider

Every architectural decision involves trade-offs. Consider your specific requirements, team expertise, and scale when evaluating options.

When NOT to Use This

Knowing when a solution doesn't apply is as valuable as knowing when it does. Consider alternatives for your specific situation.

Decision Framework

Use this framework to evaluate whether this approach is right for your use case based on your specific constraints and requirements.

Share this articleShare on XShare on LinkedIn

Keep the decision frameworks coming

One practical architecture guide a week — patterns, trade-offs, and when not to use them. No spam, unsubscribe anytime.