Migrating production infrastructure? Get up to ₹10,000 in migration credits. Apply now
voroaBlog
PostgreSQL

PostgreSQL 19: What's New, What Breaks and When to Upgrade

· · 11 min read

PostgreSQL 19 - what is new, what breaks and when to upgrade

PostgreSQL 19 was released on 19 November 2026, and it is a maintenance-and-operations release more than a new-SQL release.

The headline is REPACK, a built-in way to remove table bloat without locking the table for the whole run. Around it sit a planner-advice module, read-your-writes on replicas, logical replication that no longer needs a restart, and a set of default changes that will show up in your logs and your query plans the day you upgrade.

This guide is for developers and small teams who run PostgreSQL for their own apps. It covers what is genuinely new, the changes that break or surprise people, which features you may have read about but did NOT ship, and a practical upgrade plan. Everything here is checked against the official version 19 release notes.

Advertisement

PostgreSQL 19 at a glance

PostgreSQL 19 is the newest major version of PostgreSQL, released on 19 November 2026. Its main additions are the REPACK command for online bloat cleanup, the pg_plan_advice module for steering the planner, WAIT FOR LSN for read-your-writes on standbys, and INSERT ... ON CONFLICT DO SELECT. JIT is now off by default and RADIUS authentication is removed.

The release came about seven weeks later than the usual late-September slot. During the beta the project pulled a number of features back out rather than ship them with open bugs, and the release candidates took longer. That matters for you in one way: many “version 19 features” articles were written in June against Beta 1 and still list things that are not in the final release. A section below names them.

Under the project’s five-year support policy, a major version gets fixes for five years after release, so version 19 should be supported until about November 2031. The first minor release, 19.1, is due with the next quarterly update on the roadmap, which is listed for 11 February 2027.

The headline feature: REPACK and REPACK CONCURRENTLY

Every busy PostgreSQL table collects bloat. An UPDATE writes a new row version and leaves the old one behind; VACUUM marks that space reusable but does not give it back to the operating system. Until now you had two built-in ways to shrink a table: VACUUM FULL and CLUSTER. Both hold an ACCESS EXCLUSIVE lock for the whole rewrite, so the table cannot be read or written until they finish. That is why most teams installed the pg_repack extension.

Version 19 merges both into one command:

sql
-- rewrite the table, like VACUUM FULL (locks for the whole run)
REPACK orders;

-- rewrite it in the order of an index, like CLUSTER
REPACK orders USING INDEX orders_created_at_idx;

-- rewrite it while reads and writes keep running
REPACK (CONCURRENTLY) orders;

With CONCURRENTLY, the bulk of the work runs under a SHARE UPDATE EXCLUSIVE lock, so normal reads and writes continue. Changes made during the copy are captured through logical decoding - the same idea the pg_squeeze extension used - and the strong ACCESS EXCLUSIVE lock is taken only for the short final swap.

Diagram: REPACK CONCURRENTLY copies the table under a light lock while logical decoding captures new changes, then takes a short exclusive lock only to swap the files

The limits worth knowing before you run it

The official REPACK reference lists real restrictions, and they decide whether it can replace pg_repack for you:

  • The table needs a primary key or an index-based replica identity. CONCURRENTLY is refused without one.
  • It is refused on partitioned tables, unlogged tables, materialized views, system catalogs and inside a transaction block.
  • You need free disk at least equal to the table plus its indexes, because a full copy is written before the swap.
  • It is not MVCC-safe: a transaction holding an old snapshot can see the rebuilt table as empty in some cases.
  • DDL on the table during the run can make it fail, and so can more than about 104 million concurrent updates or deletes.
  • Each concurrent run uses a replication slot from the new max_repack_replication_slots setting.

Progress is visible in the new pg_stat_progress_repack view. A sensible first step is to try it on one bloated table in staging and keep pg_repack installed until you trust it.

Faster writes: foreign-key checks and LISTEN/NOTIFY

The release announcement says improved foreign-key checks “in testing made bulk inserts nearly 2x faster”. The mechanism is a fast path: instead of running an internal SQL query for every inserted row, PostgreSQL probes the unique index on the referenced table directly. The original commit measured about 1.8x for one million rows into a table with an integer foreign key, with the parent table already in memory.

Treat that as a best case. A batching layer that was added on top during the beta was removed again before release, and your gain depends on row width, index size and whether the parent table is cached. Measure your own import.

LISTEN/NOTIFY also changes: a NOTIFY now wakes only the sessions listening on that channel, where earlier versions woke most backends. If you use it as a light job queue with many connections, this is the change to test.

Queries and SQL that developers will notice

INSERT … ON CONFLICT DO SELECT

The classic “get or create” pattern needed two statements or a dummy update. Version 19 returns the existing row directly:

sql
INSERT INTO users (email, name)
VALUES ('[email protected]', 'Asha')
ON CONFLICT (email) DO SELECT
RETURNING id, email, name;

RETURNING is required with DO SELECT, and the conflicting row can optionally be locked with FOR UPDATE or FOR SHARE.

Smaller additions

  • IGNORE NULLS for lead, lag, first_value, last_value and nth_value - useful for filling gaps in time-series data.
  • COPY ... TO ... (FORMAT json) exports rows as JSON, one object per line, or as a single JSON array. It is export-only; COPY FROM does not read JSON.
  • The planner can turn some NOT IN (SELECT ...) filters into anti-joins when it can prove neither side yields NULL, and can aggregate before a join (“eager aggregation”).
  • random() now accepts date and timestamp ranges.

pg_plan_advice: hints, carefully

pg_plan_advice is a new contrib module that lets you describe and pin planner decisions, and pg_stash_advice applies stored advice to a query by its query identifier, without changing application code. It is loaded as a shared library rather than with CREATE EXTENSION. Most applications will never need it; it is for the one query whose plan flips at the worst moment.

Replication and read replicas

Read-your-writes on a standby. After a write on the primary, your app can run WAIT FOR LSN on a replica so the next read waits until that write has been replayed there. Capture the LSN after the commit, not before. Set a TIMEOUT, because by default the wait has no limit; then handle the error it raises when the time runs out, or add NO_THROW and check the returned status instead.

Logical replication without a restart. If wal_level is replica, PostgreSQL now raises the effective level to logical on its own when the first logical slot is created. The read-only effective_wal_level setting shows the level actually in use.

Sequences replicate. Publications can include ALL SEQUENCES, which closes a long-standing gap when you use logical replication to move to a new server: sequence values no longer have to be copied by hand at cutover.

EXCEPT for FOR ALL TABLES. A publication can now publish every table except a named few.

Maintenance, monitoring and async I/O

  • Autovacuum can vacuum a table’s indexes with parallel workers (autovacuum_max_parallel_workers) and now scores tables to process the most urgent first. The scores are visible in pg_stat_autovacuum_scores.
  • New views: pg_stat_lock keeps cumulative lock statistics and pg_stat_recovery shows a standby’s recovery state in one row.
  • Async I/O from PostgreSQL 18 now scales its worker pool on its own. The fixed io_workers setting is gone, replaced by io_min_workers, io_max_workers and two timing settings.
  • EXPLAIN (ANALYZE, IO) reports read-ahead and async I/O activity per plan node.
  • Server-side SNI: one server can present a different TLS certificate per hostname, mapped in the new pg_hosts.conf.

What breaks: changes to check before upgrading

These come from the “Migration to Version 19” section of the release notes. The first group affects almost everyone.

Change What you will see What to do
JIT off by default Large analytical queries may get slower Turn jit on for those workloads and compare
max_locks_per_transaction now 128 Lock memory is sized differently If you had set it, double your old value
MD5 password warning A warning after each MD5 login Move roles to SCRAM; md5_password_warnings silences it
standard_conforming_strings forced on Old dumps taken with it off restore wrongly Re-take the dump with the version 19 pg_dump
RADIUS removed The server will not start with radius lines in pg_hba.conf Use SCRAM, or RADIUS through PAM
log_lock_waits on More lines in your logs Expected; it is useful signal

A second group bites fewer people but stops an upgrade cold:

  • pg_upgrade refuses clusters that have btree_gist indexes on inet or cidr columns, and clusters with line breaks in database, role or tablespace names.
  • The MULE_INTERNAL encoding is removed; those databases must be dumped and restored in another encoding.
  • Full-text search, pg_trgm and parts of fuzzystrmatch now follow the database’s locale provider, so the notes recommend reindexing those indexes after the upgrade.
  • json_array() over zero rows now returns an empty array instead of NULL.
  • Default TOAST compression is lz4 when the server is built with LZ4. Existing data is untouched; new values use the new method.

Features you may have read about that did NOT ship

Several features were committed early in the cycle, written up widely during the beta, and then reverted. None of these is in the final version 19 release notes:

  • SQL/PGQ property graph queries - reverted in September; the earliest it can return is the next major version.
  • GROUP BY ALL - reverted in July.
  • Turning data checksums on or off on a running cluster - reverted in September.
  • UPDATE/DELETE … FOR PORTION OF for temporal tables - reverted; only a documentation section about temporal tables remains.
  • ALTER TABLE … MERGE/SPLIT PARTITION - not in the final notes.

If a tutorial shows one of these running on “version 19”, it was written against a beta.

Should you upgrade to PostgreSQL 19 now?

A major upgrade is never a restart: the on-disk format changes, so the data has to move by pg_upgrade, a dump and restore, or logical replication. A calm plan for a small team:

  1. Check your extensions first. PostGIS 3.7 is built for version 19; for other extensions, confirm a build exists for 19 before anything else.
  2. Read the table above against your config - especially custom max_locks_per_transaction, jit, MD5 roles and any radius line.
  3. Restore a copy into a version 19 test server and run your test suite and your three slowest queries with EXPLAIN (ANALYZE).
  4. Plan the reindex for full-text, trigram and fuzzystrmatch indexes.
  5. Pick your timing. For production, waiting for 19.1 in February 2027 is a reasonable default: first minor releases usually carry fixes found by early adopters. PostgreSQL 18 is supported until about November 2030, so there is no rush.

The one exception is a server still on PostgreSQL 14. Version 14 reached end of life with 14.25 in November 2026 and gets no more security fixes, so that upgrade should happen now - to 18 if your platform does not offer 19 yet.

PostgreSQL 19 on Voroa

Voroa’s managed PostgreSQL in India runs on Mumbai servers and today offers PostgreSQL 18 (the default), 17 and 16, as listed on the create-and-connect guide. version 19 is not offered yet, and we do not have a date to share.

Two things are worth knowing if you plan to move later. A PostgreSQL dump only restores into the same or a newer major version, so a dump from 18 can be restored into 19 once you have worked through the checks in the “What breaks” section above - see importing an existing database for how a move works. And check the extensions Voroa supports before you depend on one.

FAQ

When was PostgreSQL 19 released?

On 19 November 2026. It was planned for late September or early October and moved after several features were reverted and the release candidates ran longer.

Is the new release stable enough for production?

It is a final release, not a beta. Many teams still wait for the first minor release, 19.1, scheduled for February 2027, and test their own workload before switching.

Does REPACK replace pg_repack?

For many tables, yes - it is built in and needs no extension. It still requires a primary key or replica identity for CONCURRENTLY and does not work on partitioned tables, so keep pg_repack until you have tested it.

Will my application code need changes?

Usually not. Check for MD5 passwords, a custom max_locks_per_transaction, heavy reliance on JIT, and old dump files taken with standard_conforming_strings off.

Can I upgrade directly from PostgreSQL 14 to 19?

Yes. pg_upgrade and dump-and-restore both go across several major versions at once. Run pg_upgrade --check first, then test the restored copy; the check does not catch every case.

Start with PostgreSQL today

If you are starting a new project, you do not need to wait for 19. Create a Voroa PostgreSQL database on PostgreSQL 18 in Mumbai, connect your app, and add your first login and grants. If you only want to try it out, start with a free PostgreSQL database and compare plans on the pricing page when you need more.

Advertisement