PostgreSQL 19's headline features are the new REPACK command (including a non-blocking REPACK (CONCURRENTLY)), pg_plan_advice for pinning planner decisions, WAIT FOR LSN for read-your-writes on replicas, parallel and score-based autovacuum, logical replication of sequences, and TLS SNI via a new pg_hosts.conf. As of November 16, 2026, PostgreSQL 19 is at Release Candidate 2 (released November 12), and the project has announced a planned general availability date of November 19, 2026, unless a blocking issue forces another RC.

This guide covers what actually made it into the release (several features shown in early beta coverage did not), with working SQL for each, and the incompatibilities you need to check before running pg_upgrade.

Release Status and Timeline

PostgreSQL 19 is arriving later than the usual September/October slot. The Beta 1 announcement itself said the final release would come "around September/October 2026." Instead:

Milestone Date Source
Beta 1 mid-2026 Beta 1 announcement
RC 1 October 15, 2026 RC 1 announcement
RC 2 November 12, 2026 (alongside 18.7, 17.12, 16.16, 15.20, 14.25) postgresql.org news
Planned GA November 19, 2026 RC 1 announcement

The RC 1 announcement explains the second RC: the November 12 update release contained "a large number of fixes," and the release team chose to fold them into 19 before GA. If you are reading this after November 19, check postgresql.org for the final release and the official release notes, which this article is based on.

Beta features that are not in the release notes

Early PostgreSQL 19 coverage, including the Beta 1 announcement, listed several features that do not appear in the current release notes (the version dated "AS OF 2026-10-09"): GROUP BY ALL, SQL/PGQ property graph queries, UPDATE/DELETE ... FOR PORTION OF, ALTER TABLE ... MERGE/SPLIT PARTITIONS, enabling data checksums online, and new functions that return DDL for roles, tablespaces and databases. Features are sometimes reverted during beta when problems surface. Do not plan an upgrade around any of them unless they appear in the final release notes.

Maintenance: REPACK Replaces VACUUM FULL and CLUSTER

The release notes describe VACUUM FULL and CLUSTER as two commands that "did similar things, but with confusing names," and unify them as REPACK. The old commands still work for compatibility.

-- Rewrite a table to reclaim space (like VACUUM FULL)
REPACK employees;

-- Rewrite in index order (like CLUSTER)
REPACK employees USING INDEX employees_ind;

-- Rebuild then analyze specific columns, with progress messages
REPACK (ANALYZE, VERBOSE) cases (district, case_nr);

REPACK (CONCURRENTLY)

The genuinely new capability is rebuilding a bloated table without blocking reads and writes, which until now required the third-party pg_repack extension or downtime.

REPACK (CONCURRENTLY) employees;

-- Concurrent, following the previously configured clustering index
REPACK (CONCURRENTLY) employees USING INDEX;

How it works, per the documentation: the bulk of the work runs under a SHARE UPDATE EXCLUSIVE lock, concurrent changes are captured through logical decoding and applied, and an ACCESS EXCLUSIVE lock is taken only for the final swap. That design brings restrictions. CONCURRENTLY cannot be used when:

  • the table has no primary key or index-based replica identity;
  • the table is partitioned, UNLOGGED, a system catalog or TOAST table, or not a heap table;
  • you are inside a transaction block;
  • max_repack_replication_slots does not allow another replication slot.

Two operational warnings from the docs are worth repeating. First, REPACK (CONCURRENTLY) is not MVCC-safe: transactions using a snapshot taken before the repack started will see the table as empty after it commits. Long-running reporting queries that straddle a repack can return wrong results. Second, change capture needs memory per concurrently updated or deleted row that is not bounded by maintenance_work_mem, and the command fails beyond roughly 104 million concurrently changed rows. Schedule it in quieter windows and watch the new pg_stat_progress_repack view.

Query Planning: pg_plan_advice

pg_plan_advice is a contrib module by Robert Haas that lets you constrain the planner's choice of join order, join method and scan method, without the enable_* sledgehammers. It is loaded as a library rather than via CREATE EXTENSION:

-- One session (or add to shared_preload_libraries / session_preload_libraries)
LOAD 'pg_plan_advice';

-- Ask the planner what advice would reproduce the plan it picked
EXPLAIN (COSTS OFF, PLAN_ADVICE)
SELECT * FROM join_fact f JOIN join_dim d ON f.dim_id = d.id;

The output ends with a "Generated Plan Advice" block, for example JOIN_ORDER(f d), HASH_JOIN(d), SEQ_SCAN(f d) and NO_GATHER(f d). You copy the parts you want to enforce into the pg_plan_advice.advice setting:

SET pg_plan_advice.advice = 'JOIN_ORDER(f d) HASH_JOIN(d) SEQ_SCAN(f d)';

EXPLAIN (COSTS OFF)
SELECT * FROM join_fact f JOIN join_dim d ON f.dim_id = d.id;
-- "Supplied Plan Advice" shows each item as matched / not matched / conflicting / failed

The scan tags include SEQ_SCAN, INDEX_SCAN(target index_name), INDEX_ONLY_SCAN, BITMAP_HEAP_SCAN and DO_NOT_SCAN; join methods include HASH_JOIN, MERGE_JOIN_PLAIN, NESTED_LOOP_PLAIN and NESTED_LOOP_MEMOIZE. A companion extension, pg_stash_advice, applies advice automatically per query ID, which is how you would pin the plan of one problematic production query without touching application code.

The documentation is explicit that advice constrains the planner rather than replacing it: it cannot force a plan the planner never considered, contradictory advice can produce plans with Disabled: true nodes that are worse than no advice, and pinned plans can age badly as data distribution changes. Treat it as an incident-response and plan-stability tool, and always read the per-item feedback.

Replication: Read-Your-Writes with WAIT FOR LSN

A classic replica problem: a user saves a form (write goes to the primary), the next page load reads from a replica that has not replayed that change yet, and the user sees stale data. PostgreSQL 19 adds the WAIT command to solve this in the database instead of with application-side sleeps.

On the primary, capture the LSN right after the write:

UPDATE movie SET genre = 'Dramatic' WHERE genre = 'Drama';
SELECT pg_current_wal_insert_lsn();   -- e.g. 0/0306EE20

Store that LSN in the user's session or pass it to your connection pooler. Before reading on the replica:

WAIT FOR LSN '0/0306EE20' WITH (TIMEOUT '200ms', NO_THROW);
-- returns 'success', 'timeout' or 'not in recovery'

SELECT * FROM movie WHERE genre = 'Drama';

Details that matter in practice:

  • The default MODE is standby_replay (wait until the WAL is applied). standby_write and standby_flush wait for less; primary_flush runs on the primary.
  • Without NO_THROW, a timeout raises an error. With it, the status is returned as a string, so your app can fall back to reading from the primary on timeout.
  • WAIT must be a top-level command, not inside a function, procedure or DO block, and not while the transaction holds a snapshot. Issue it before anything else in the transaction.
  • The docs use pg_current_wal_insert_lsn() on the primary because synchronous_commit may be off.

Logical Replication Improvements

Sequence values finally replicate

Logical replication has never carried sequence values, which made logical-replication-based major upgrades awkward: you had to manually advance every sequence on the new cluster before cutover. PostgreSQL 19 adds sequences to publications:

-- On the publisher
CREATE PUBLICATION upgrade_pub FOR ALL TABLES, ALL SEQUENCES;

-- On the subscriber, just before cutover
ALTER SUBSCRIPTION upgrade_sub REFRESH SEQUENCES;

REFRESH SEQUENCES re-synchronizes the data of all currently subscribed sequences; run REFRESH PUBLICATION first if the set of sequences changed. The ALTER SUBSCRIPTION docs note that sequence replication requires the publisher to run PostgreSQL 19 or later, so this helps upgrades from 19 onward, not your upgrade to 19 from an older version.

Publish everything except a few tables

CREATE PUBLICATION all_tables_except
  FOR ALL TABLES EXCEPT (TABLE users, departments);

This is handy for replicating a whole database to an analytics replica while excluding large audit or PII tables.

Logical replication without a restart

When wal_level is replica, PostgreSQL 19 can now enable logical replication automatically when it is needed, so you no longer have to restart a busy primary to switch to wal_level = logical before creating your first logical slot. A new read-only effective_wal_level parameter reports the level actually in effect:

SHOW effective_wal_level;

Other replication additions include retain_dead_tuples for conflict detection on subscribers and CREATE SUBSCRIPTION ... SERVER, which reuses postgres_fdw foreign server connection parameters so credentials live in one place.

Vacuum and Performance

Parallel autovacuum and autovacuum scoring

Manual VACUUM could already process indexes in parallel; now autovacuum can too. The cap is the new autovacuum_max_parallel_workers server setting, with a per-table autovacuum_parallel_workers storage parameter:

ALTER TABLE events SET (autovacuum_parallel_workers = 4);

Autovacuum also gets a scoring system that decides which tables to process first, tuned through autovacuum_vacuum_score_weight, autovacuum_vacuum_insert_score_weight, autovacuum_analyze_score_weight, autovacuum_freeze_score_weight and autovacuum_multixact_freeze_score_weight. The new pg_stat_autovacuum_scores view shows per-table details, which finally makes "why hasn't autovacuum touched this table?" an answerable question.

SELECT * FROM pg_stat_autovacuum_scores LIMIT 20;

Note the related incompatibility: parallel vacuum leaders and workers now share the cost-based vacuum delay limit, so a parallel VACUUM with cost-based delay may run slower than in 18.

Asynchronous I/O workers scale automatically

PostgreSQL 18 introduced asynchronous I/O with io_method = worker. In 19 the fixed io_workers setting is removed and replaced by io_min_workers, io_max_workers, io_worker_idle_timeout and io_worker_launch_interval, so the pool scales with demand. EXPLAIN ANALYZE gains an IO option that reports asynchronous I/O activity per query.

Other performance items

The release notes list faster foreign-key constraint checks, query table scans that can mark pages all-visible (previously only VACUUM and COPY ... FREEZE could), parallel TID range scans, and faster COPY FROM for text and CSV input. The Beta 1 announcement cited "up to 2x" better insert performance when foreign-key checks are present; measure on your own workload before relying on that.

Developer-Facing SQL Additions

INSERT ... ON CONFLICT DO SELECT

Get-or-create in one atomic statement, without the "update a column to itself" trick:

INSERT INTO distributors (did, dname) VALUES (11, 'Global Electronics')
  ON CONFLICT (did) DO SELECT
  RETURNING *;

-- Return and lock the existing row
INSERT INTO distributors (did, dname) VALUES (13, 'Advanced Systems')
  ON CONFLICT (did) DO SELECT FOR UPDATE
  RETURNING *;

A conflict target and a RETURNING clause are both required. See the INSERT docs.

IGNORE NULLS in window functions

lead(), lag(), first_value(), last_value() and nth_value() now accept IGNORE NULLS / RESPECT NULLS, which makes forward-filling sparse time series a one-liner:

SELECT ts,
       price,
       last_value(price) IGNORE NULLS OVER (ORDER BY ts) AS price_filled
FROM ticks;

Smaller additions

  • More jsonpath string methods: lower(), upper(), initcap(), replace(), split_part(), ltrim(), rtrim(), btrim().
  • random() gains date, timestamp and timestamptz variants for generating test data.
  • Casts between bytea and uuid, and a 64-bit unsigned oid8 type.
  • COPY FROM can skip multiple header lines and can set invalid input values to NULL.
  • Event triggers in PL/Python.

Security and Observability

TLS SNI with pg_hosts.conf

A single server can now present different certificates depending on the hostname the client requested, which matters for multi-tenant hosts and for migrating a database to a new DNS name without a certificate gap. Enable ssl_sni and add entries to the hosts file (PGDATA/pg_hosts.conf by default, configurable via hosts_file). The documented line format is hostname SSL_certificate SSL_key [SSL_CA_certificate ...]; a comma-separated list of hostnames, * (default) and /no_sni/ (clients that send no SNI) are allowed:

# pg_hosts.conf
db1.example.com,db1-alt.example.com  /etc/ssl/certs/db1.crt  /etc/ssl/private/db1.key
*                                    /etc/ssl/certs/default.crt  /etc/ssl/private/default.key

Per the SSL documentation, a non-empty hosts file takes precedence over the certificate settings in postgresql.conf, and an error in the file at startup prevents the server from starting.

Authentication changes

  • A warning is now sent after successful MD5 password authentication (disable with md5_password_warnings); MD5 was deprecated in 18.
  • New password_expiration_warning_threshold (default seven days) warns users before VALID UNTIL expiry.
  • RADIUS support is removed, because it only worked over UDP, which the release notes call "unfixably insecure."
  • OAuth validators can register custom pg_hba.conf options, and libpq gains oauth_ca_file.

New monitoring views

pg_stat_lock (per-lock-type statistics), pg_stat_recovery, pg_stat_progress_repack, pg_stat_autovacuum_scores, started_by and mode columns in pg_stat_progress_vacuum, and per-process-type log_min_messages levels in type:level format.

Upgrading to PostgreSQL 19

Use pg_upgrade, dump/restore, or logical replication, as with any major version. The PostgreSQL 19 upgrade documentation covers each.

# Check-only pass first: catches blocked opclasses, bad names, etc.
pg_upgrade \
  --old-bindir /usr/lib/postgresql/18/bin \
  --new-bindir /usr/lib/postgresql/19/bin \
  --old-datadir /var/lib/postgresql/18/main \
  --new-datadir /var/lib/postgresql/19/main \
  --check

Incompatibilities to check before you upgrade

Change Who is affected What to do
inet/cidr indexes using btree_gist opclasses block pg_upgrade Users of btree_gist on network types Rebuild those indexes with the GiST default opclass before upgrading
CR/LF characters in database, role or tablespace names block pg_upgrade Rare, but fatal Rename objects first
standard_conforming_strings is always on Old dumps made with it off Create dumps with PostgreSQL 19's pg_dump
JIT disabled by default Analytical workloads that relied on JIT Set jit = on explicitly and benchmark
max_locks_per_transaction default 64 → 128; lock sizing changed Anyone who tuned it Double your custom value to keep the same capacity
io_workers removed Anyone who set it Use io_min_workers / io_max_workers
default_toast_compression now lz4 New TOAST data written after the upgrade Confirm your server build includes lz4 support
json_array() over zero rows returns [], not NULL Code checking for NULL Update IS NULL checks
READ ONLY status propagates to postgres_fdw Read-only transactions writing via FDW Those writes now fail; fix the transaction mode
Full-text search, pg_trgm and fuzzystrmatch behaviour changes Non-ASCII text search users Reindex affected indexes and recompute stored tsvector columns
RADIUS removed; MULE_INTERNAL encoding removed Legacy setups Switch auth method; dump/restore to another encoding
Renamed wait events and pg_stat_subscription_stats columns Monitoring dashboards Update queries (BUFFERPIN → BUFFER, sync_error_count → sync_table_error_count)

Which upgrade path?

  • pg_upgrade with --link or --clone: minutes of downtime for most databases. Run --check against a copy first.
  • Logical replication: near-zero downtime, but sequences still need manual handling when the publisher runs 18 or older, since sequence replication needs a 19 publisher.
  • Managed services: Neon, Supabase, RDS and others typically add new majors some time after GA; check your provider's announcements. If you are choosing a managed platform anyway, our Neon vs Supabase comparison is a useful starting point.

If you rely on extensions, confirm each one has a 19-compatible build before upgrading. Our roundup of Postgres extensions is a starting point for auditing what you run, and if you are evaluating embedded Postgres for local development, see PGlite vs SQLite WASM.

Frequently Asked Questions

When is PostgreSQL 19 released?

The PostgreSQL project's planned general availability date is November 19, 2026, per the RC 1 announcement, conditional on no blocking issues. RC 2 shipped on November 12, 2026. Check postgresql.org for the final announcement.

What is the difference between REPACK and VACUUM FULL?

REPACK is the new unified command that replaces both VACUUM FULL and CLUSTER, which remain as compatibility aliases. Plain REPACK behaves like VACUUM FULL, REPACK ... USING INDEX behaves like CLUSTER, and the new REPACK (CONCURRENTLY) rebuilds a table while allowing reads and writes, as long as the table has a primary key or index-based replica identity.

Does PostgreSQL 19 replace the pg_repack extension?

For many cases, yes: REPACK (CONCURRENTLY) covers online table rebuilds natively. Check the restrictions (no partitioned or unlogged tables, needs a primary key or replica identity index, not MVCC-safe for snapshots older than the repack) before removing pg_repack from your toolkit.

Is GROUP BY ALL in PostgreSQL 19?

It was announced with Beta 1 but does not appear in the current release notes (dated as of October 9, 2026), nor do SQL/PGQ graph queries or FOR PORTION OF updates and deletes. Treat them as not shipping in 19 unless the final release notes say otherwise.

Can I upgrade directly from PostgreSQL 14 or 15 to 19?

Yes. pg_upgrade and dump/restore support upgrading across multiple major versions in one step. Read the migration sections of the release notes for every version you are skipping, since incompatibilities accumulate.

Should I upgrade to PostgreSQL 19 right away?

Test now, upgrade production after the first minor release or once your extensions and managed provider support it. The incompatibility list (JIT off by default, lock sizing, opclass changes) is short but real, and a pg_upgrade --check run on a staging copy will surface the blocking issues.

Conclusion

PostgreSQL 19 is an operator's release. REPACK (CONCURRENTLY) removes the need for an external tool to fix bloat online, pg_plan_advice gives you a supported way to stop a regressed query plan at 3 a.m., WAIT FOR LSN makes read replicas safe for read-your-writes flows, and sequence replication closes a long-standing gap in logical-replication upgrades for the future. The developer-facing changes are smaller than early beta coverage suggested, because several headline SQL features did not make the release notes. Run pg_upgrade --check against a staging copy, fix the opclass and naming blockers, re-benchmark analytical queries with JIT off, and plan the production move once GA and your extensions are ready.