Most Postgres upgrade decisions stall on one question: will the new version be faster for our workload, or just newer? Release notes list what changed. They don't say which change will show up in your query times.
PostgreSQL 18 came out on 25 September 2025 and now runs on every major cloud. PostgreSQL 19 shipped its first release candidate on 15 October 2026, with general availability planned for 19 November 2026. And on Amazon RDS, PostgreSQL 14 leaves standard support on 28 February 2027.
This guide sorts the 17, 18 and 19 changes by what they do to a running database, links every claim to the release notes or a published benchmark, and covers how to test the upgrade before production.
Jump to: What changed · Async I/O benchmarks · Cloud dates · 18 or 19?
Want someone to test and run the upgrade? Book a 30-minute discovery call →
What changed in PostgreSQL 16, 17, 18 and 19
Each release targeted a different bottleneck, so the right target depends on what's slowing your database down. From the release notes for 17, 18 and 19:
| Version | Released | Main performance changes | Matters most if |
|---|---|---|---|
| PostgreSQL 16 | 14 September 2023 | pg_stat_io view for I/O visibility, parallel apply of large logical replication transactions | You need I/O monitoring on an older fleet |
| PostgreSQL 17 | 26 September 2024 | New memory structure for VACUUM (less memory, faster vacuuming), streaming I/O for sequential reads, better write throughput under high concurrency, faster B-tree searches for lists of values (IN) | Vacuum memory or IN-list lookups are a problem |
| PostgreSQL 18 | 25 September 2025 | Asynchronous I/O, skip scan on multicolumn B-tree indexes, OR conditions turned into index-friendly arrays, self-join removal, faster hash joins and GROUP BY, optimizer statistics kept through pg_upgrade | You're read-heavy on large tables, or you've avoided upgrades because plans regress afterwards |
| PostgreSQL 19 | GA planned 19 November 2026 | REPACK (CONCURRENTLY), parallel autovacuum of indexes, autovacuum prioritisation, automatic scaling of I/O workers, faster foreign-key checks, pg_plan_advice | Bloat and vacuum on large, busy tables are your main pain |
Related: PostgreSQL performance tuning, PostgreSQL vs MySQL in 2026
Asynchronous I/O: what io_method does, and what benchmarks found
PostgreSQL 18's largest change is an asynchronous I/O subsystem. Backends can queue several read requests instead of waiting on each one. In 18 it covers sequential scans, bitmap heap scans and vacuum. Plain index scans don't use it yet. The project's release announcement reports gains of "up to 3x in certain scenarios" when reading from storage.
It's controlled by io_method (docs), which can only be set at server start:
- worker (the default) hands I/O to background worker processes. io_workers sets how many, and the default is 3.
- io_uring uses the Linux io_uring interface. It needs a PostgreSQL build with liburing support.
- sync keeps the old synchronous behaviour, which is useful as a baseline.
PostgreSQL 18 also raises the defaults for effective_io_concurrency and maintenance_io_concurrency to 16, and adds the pg_aios view, which shows I/O requests in flight. PostgreSQL 19 adds automatic scaling of I/O workers (io_min_workers and io_max_workers) and an IO option for EXPLAIN ANALYZE.
What independent benchmarks found
- pganalyze (write-up, tested during the beta) measured 2–3x faster reads with worker or io_uring compared with sync, on a cold-cache sequential scan.
- PlanetScale (96-run benchmark) ran a read-only sysbench workload on 300 GB of data with 64 GB of RAM. On network-attached storage (gp3 and io2), PostgreSQL 18 in sync or worker mode did noticeably better than both PostgreSQL 17 and PostgreSQL 18 with io_uring. io_uring only came out slightly ahead on the local NVMe instance, in the most CPU-bound runs.
- Index scans don't use asynchronous I/O yet in 18, as PlanetScale notes (citing Tomas Vondra), so short indexed lookups don't get these gains.
One monitoring catch from pganalyze: because backends no longer wait directly on each read, EXPLAIN ANALYZE can under-report the I/O a query did. Watch pg_aios and pg_stat_io as well as plans.
The takeaway: the gains are real for large scans and vacuum, and small for short indexed lookups. Leave io_method on worker unless a benchmark on your own storage says otherwise. On a managed service, the options are whatever your provider exposes in its parameter group.
-- Check the current setting
SHOW io_method;
SHOW io_workers;
SHOW effective_io_concurrency;
-- See asynchronous I/O requests in flight (PostgreSQL 18)
SELECT * FROM pg_aios;Related: PostgreSQL performance tuning
Query performance: skip scan, OR lists and smarter joins
These changes need no configuration. They show up as different plans, and only for queries with the right shape (release notes):
- Skip scan. A multicolumn B-tree index can now be used when the query has no condition on the first column, as long as it has useful conditions on later columns. It pays off most when the skipped first column has few distinct values. Some indexes you added only to cover that case may now be redundant.
- OR conditions to arrays. WHERE a = 1 OR a = 2 OR a = 3 can now use an index the way a = ANY(...) does.
- Self-join removal. The planner drops some unnecessary joins of a table to itself, which ORMs often generate.
- Faster hash joins and GROUP BY, with lower memory use.
- More join options: Right Semi Join plans, merge joins that use incremental sorts, and partitionwise joins in more cases.
- Many partitions or relations: planning queries that touch many partitions is more efficient, and so is the locking for queries that touch many relations.
There is no single "PostgreSQL 18 is X% faster" number that holds across workloads. Measure your own top queries before and after, as shown in the testing section below.
-- Skip scan: an index on (tenant_id, created_at) can now serve a query
-- that filters only on created_at
CREATE INDEX idx_orders_tenant_created ON orders (tenant_id, created_at);
EXPLAIN ANALYZE
SELECT count(*) FROM orders
WHERE created_at >= now() - interval '1 day';
-- PostgreSQL 18 includes BUFFERS output in EXPLAIN ANALYZE by defaultUpgrades no longer start with an empty planner
Before PostgreSQL 18, pg_upgrade threw away optimizer statistics, so queries could run on bad plans until ANALYZE finished on every table. PostgreSQL 18's pg_upgrade keeps them. Extended statistics (from CREATE STATISTICS) aren't kept, so run vacuumdb with the new --missing-stats-only option afterwards. You can opt out with --no-statistics.
Two more upgrade changes from the pg_upgrade docs and release notes:
- --swap mode moves the old data directories into the new cluster instead of copying, cloning or linking files. It can be faster than the other modes, especially with many relations. The old cluster is destructively modified once file transfer starts, so you can't restart it. Restoring from backup becomes the only way back. The docs recommend --sync-method=fsync with --swap.
- Data checksums are on by default for new clusters created with initdb. pg_upgrade needs matching checksum settings, so if your old cluster has checksums off, create the new one with --no-data-checksums.
-- On the old cluster: are checksums on?
SHOW data_checksums;
# If off, initialise the new cluster to match
initdb -D /var/lib/postgresql/18/main --no-data-checksums
# After pg_upgrade: fill in only the statistics that weren't carried over
vacuumdb --all --analyze-in-stages --missing-stats-onlyPlanning a Major Version Upgrade?
Start with a 30-minute discovery call. If it's a fit, the diagnostic tests your top queries on the target version before anything changes in production.
Book a Discovery CallVacuum: what 17 changed, what 18 adds, what 19 brings
PostgreSQL 17 brought the big vacuum change: a new memory structure that cuts memory use and can speed up vacuuming (17 release notes). PostgreSQL 18 adds control and visibility:
- Eager freezing. Normal vacuums can now freeze some all-visible pages, which reduces the cost of later aggressive, full-table freezing. vacuum_max_eager_freeze_failure_rate controls how hard it tries.
- autovacuum_vacuum_max_threshold sets a fixed dead-tuple count that triggers autovacuum, so very large tables don't wait for a percentage threshold.
- autovacuum_worker_slots lets you change autovacuum_max_workers without a restart, up to that limit.
- vacuum_truncate controls whether VACUUM truncates empty pages at the end of a table.
- Timing columns: pg_stat_all_tables now reports total_vacuum_time, total_autovacuum_time, total_analyze_time and total_autoanalyze_time.
- Cost-delay reporting: pg_stat_progress_vacuum gains delay_time when track_cost_delay_timing is on.
- Partitioned tables: VACUUM ONLY and ANALYZE ONLY process a partitioned parent without its children.
PostgreSQL 19 goes further (19 release notes). Autovacuum can vacuum a table's indexes in parallel (autovacuum_max_parallel_workers, plus the per-table autovacuum_parallel_workers), and a new scoring system decides which tables to vacuum first. REPACK replaces VACUUM FULL and CLUSTER, and REPACK (CONCURRENTLY) rebuilds a table without blocking reads and writes, which used to need the pg_repack extension.
-- Vacuum progress (column names as of PostgreSQL 17 and 18)
SELECT p.pid,
p.relid::regclass AS table_name,
p.phase,
p.heap_blks_total,
p.heap_blks_scanned,
p.heap_blks_vacuumed,
p.index_vacuum_count,
p.num_dead_item_ids,
p.indexes_total,
p.indexes_processed,
p.delay_time -- new in 18, needs track_cost_delay_timing = on
FROM pg_stat_progress_vacuum p;
-- Tables with the most dead tuples, and time spent vacuuming them (18)
SELECT schemaname,
relname,
n_live_tup,
n_dead_tup,
round(100.0 * n_dead_tup / nullif(n_live_tup + n_dead_tup, 0), 2) AS dead_pct,
last_autovacuum,
total_vacuum_time,
total_autovacuum_time
FROM pg_stat_user_tables
WHERE n_dead_tup > 10000
ORDER BY n_dead_tup DESC;
-- Vacuum a busy table more often
ALTER TABLE high_write_table SET (
autovacuum_vacuum_scale_factor = 0.01,
autovacuum_vacuum_cost_limit = 400
);Related: the Database FinOps guide, ongoing PostgreSQL support
Monitoring: I/O in bytes, WAL rows and EXPLAIN buffers by default
- pg_stat_io in bytes. New read_bytes, write_bytes and extend_bytes columns replace op_bytes (statistics docs).
- WAL in pg_stat_io. WAL I/O now appears as its own rows. track_wal_io_timing now controls WAL timing there, and the old timing columns in pg_stat_wal are gone.
- Per-backend statistics. pg_stat_get_backend_io() and pg_stat_get_backend_wal() show I/O and WAL for a single connection.
- EXPLAIN ANALYZE shows buffers by default, so you no longer need to add BUFFERS.
-- Where I/O is going, in bytes (PostgreSQL 18)
SELECT backend_type,
object, -- relation, temp relation or wal
context,
reads,
read_bytes,
writes,
write_bytes,
extends,
hits,
evictions
FROM pg_stat_io
WHERE reads > 0 OR writes > 0
ORDER BY coalesce(read_bytes, 0) + coalesce(write_bytes, 0) DESC
LIMIT 20;Logical replication changes that matter for migrations
Streaming of large in-progress transactions has existed since PostgreSQL 14, and parallel apply since 16. What PostgreSQL 18 changes:
- streaming = parallel is now the default for CREATE SUBSCRIPTION (it was off).
- Generated column values can be replicated, controlled by publish_generated_columns or a column list.
- Conflicts are logged while applying changes, and counted in new pg_stat_subscription_stats columns.
- ALTER SUBSCRIPTION can change two-phase commit behaviour on an existing subscription.
- max_active_replication_origins is now separate from max_replication_slots.
PostgreSQL 19 closes a long-standing gap: sequence values replicate. Before 19, a logical-replication upgrade had to copy sequence values by hand at cutover, or new rows on the target could clash with existing IDs. 19 can also turn on logical replication without a restart when wal_level is replica, and adds a WAIT command for read-your-writes on standbys.
-- On the old (source) cluster
CREATE PUBLICATION upgrade_pub FOR ALL TABLES;
-- On the new cluster, after loading the schema with pg_dump --schema-only
CREATE SUBSCRIPTION upgrade_sub
CONNECTION 'host=old-db dbname=app user=replicator'
PUBLICATION upgrade_pub; -- streaming defaults to parallel in 18
-- Watch progress on the new cluster
SELECT subname, received_lsn, latest_end_lsn, last_msg_receipt_time
FROM pg_stat_subscription;
-- Before cutover on versions before 19: copy sequence values across,
-- e.g. SELECT setval('orders_id_seq', <value read from the source>);Related: zero-downtime upgrade planning
pgvector on PostgreSQL 18
pgvector is a separate extension. It doesn't ship with PostgreSQL, so a PostgreSQL upgrade doesn't change pgvector itself. You need a pgvector build for 18, so check that your provider offers it on 18 before you upgrade. Two pgvector changes matter more than the PostgreSQL version:
- Iterative index scans (pgvector 0.8.0 and later) fix the filtered-search problem where an HNSW search returns too few rows after a WHERE filter. Turn them on with hnsw.iterative_scan (0.8.0 announcement).
- Security fix in 0.8.2 for a buffer overflow in parallel HNSW index builds, CVE-2026-3172, which could leak data from other relations or crash the server (0.8.2 announcement). The latest release is 0.8.7, so if you're on an older 0.8.x, upgrade.
-- Which pgvector version is installed?
SELECT extversion FROM pg_extension WHERE extname = 'vector';
-- Filtered similarity search with iterative scans (pgvector 0.8.0+)
SET hnsw.iterative_scan = strict_order;
SELECT id, title
FROM documents
WHERE tenant_id = $1
ORDER BY embedding <=> $2
LIMIT 10;Related: pgvector vs Pinecone
Other PostgreSQL 18 changes to check before you upgrade
- Generated columns are virtual by default. They're computed on read. Add STORED to keep the old behaviour.
- uuidv7() generates time-ordered UUIDs, which insert into B-tree indexes more efficiently than random ones.
- RETURNING OLD and NEW. INSERT, UPDATE, DELETE and MERGE can return old and new values in one statement.
- Temporal constraints. WITHOUT OVERLAPS on PRIMARY KEY and UNIQUE, and PERIOD on foreign keys.
- Parallel GIN index builds for full-text search and JSONB indexes.
- OAuth authentication in pg_hba.conf, compiled in with --with-libcurl.
- MD5 passwords are deprecated and now produce warnings. PostgreSQL 19 also warns after a successful MD5 login, so plan the move to SCRAM.
- VACUUM and ANALYZE now process inheritance children of a parent table by default.
- Unlogged partitioned tables are no longer allowed.
- NOT NULL constraints are stored in pg_constraint and can be named.
When managed clouds got PostgreSQL 18
If you're on a managed service, your upgrade date depends on your provider, not on the community release.
| Service | PostgreSQL 18 generally available | Gap after community release |
|---|---|---|
| Amazon RDS for PostgreSQL | 14 November 2025 (release calendar) | About 7 weeks |
| Google Cloud SQL for PostgreSQL | 20 November 2025 (release notes) | About 8 weeks |
| Azure Database for PostgreSQL, flexible server | Announced 1 December 2025 (Microsoft) | About 2 months |
| Amazon Aurora PostgreSQL | 11 June 2026, starting at 18.3 (AWS) | About 8.5 months |
| Azure Database for PostgreSQL, elastic clusters | September 2026 (Azure Updates) | About a year |
On RDS, PostgreSQL 18 has standard support until 28 February 2031. Expect PostgreSQL 19 to follow a similar pattern: weeks on RDS, Cloud SQL and Azure flexible server, and possibly months on Aurora.
Not Sure Which Version to Target?
Tell us what you're running and where. We'll tell you which version and upgrade path fit, and what the cutover takes.
Book a Discovery CallPostgreSQL 18 now, or wait for 19?
PostgreSQL 19's first release candidate came out on 15 October 2026 (announcement). A second candidate is planned for 12 November and general availability for 19 November 2026 (open items). Some features were pulled before release. SQL/PGQ property graph queries were reverted on 7 September 2026 (commit), so don't plan around features you saw in a beta.
| Your situation | Recommendation |
|---|---|
| On PostgreSQL 14 or older | Upgrade to 18 now. On RDS, 14 leaves standard support on 28 February 2027, and 11 to 13 are already paying Extended Support. |
| On 15, 16 or 17, read-heavy or with large scans | Upgrade to 18. Async I/O and kept statistics help right away. |
| Bloat and vacuum on large tables are the main pain | Test 19 in staging after GA, and upgrade once your provider supports it and the first minor release is out. |
| On a managed service | Your options are what the provider has released. Check its version list before setting a date. |
How to test an upgrade before production
- Copy production. Restore a recent snapshot to a test server on the target version, or run pg_upgrade on a copy.
- Run pg_upgrade --check with the mode you plan to use (--link, --clone, --copy-file-range or --swap) so the mode-specific checks run too.
- Check extensions. Every extension needs a build for the target version, pgvector included.
- Run your test suite and your top queries with EXPLAIN ANALYZE, and compare the plans with production.
- Benchmark your real workload with pgbench and a script of your own queries, on both versions, on the same hardware.
- After the upgrade, run vacuumdb --missing-stats-only and watch for plan changes for a few days.
# Dry run on a copy of the data (no changes are made)
pg_upgrade \
-b /usr/lib/postgresql/17/bin \
-B /usr/lib/postgresql/18/bin \
-d /var/lib/postgresql/17/main \
-D /var/lib/postgresql/18/main \
--link --check
-- Extensions that must exist for the target version
SELECT name, installed_version, default_version
FROM pg_available_extensions
WHERE installed_version IS NOT NULL;
# Same workload on both versions
pgbench -h pg17-test -d app -c 20 -j 8 -T 300 -f workload.sql
pgbench -h pg18-test -d app -c 20 -j 8 -T 300 -f workload.sqlRelated: PostgreSQL upgrade planning
Getting the upgrade done
The version number is the easy decision. The work is testing your own queries on the new version, checking every extension, choosing an upgrade mode you can roll back from, and timing it around your provider's calendar.
DharmOps starts with a 30-minute discovery call. If it's a fit, a scoped diagnostic compares your top queries on your current version and the target, and gives you an upgrade plan with dates. Then we run the upgrade as part of database engineering and stay on for support.
Book a Discovery CallFrequently Asked Questions
Is PostgreSQL 18 faster than PostgreSQL 17?
For some workloads, clearly. Asynchronous I/O speeds up sequential scans, bitmap heap scans and vacuum, with gains of up to 3x in some scenarios per the project. Skip scan, OR-to-array conversion and faster hash joins help specific query shapes. Short indexed lookups see little change. Benchmark your own workload rather than relying on one number.
Should I use io_uring or worker for io_method?
Start with worker, the default. io_uring needs a build with liburing and only runs on Linux. PlanetScale's benchmark found worker and sync beat io_uring on network-attached storage, and io_uring only came out slightly ahead on local NVMe. Test both on your own storage before switching.
When is PostgreSQL 19 released?
General availability is planned for 19 November 2026. Release candidate 1 came out on 15 October 2026, and a second release candidate is planned for 12 November. Managed cloud services usually follow weeks or months later.
What's new in PostgreSQL 19?
REPACK, which replaces VACUUM FULL and CLUSTER, with a CONCURRENTLY option that doesn't block reads and writes. Also parallel autovacuum of indexes, autovacuum prioritisation, pg_plan_advice for steering the planner, logical replication of sequences, ON CONFLICT DO SELECT, IGNORE NULLS for window functions, and JSON output for COPY TO. SQL/PGQ graph queries were removed before release.
Does pg_upgrade keep statistics in PostgreSQL 18?
Yes. Upgrading to 18 with pg_upgrade keeps optimizer statistics, so queries don't run on bad plans while ANALYZE catches up. Extended statistics aren't kept, so run vacuumdb --missing-stats-only after the upgrade.
What breaks when upgrading to PostgreSQL 18?
The most common surprises: new clusters have data checksums on by default and pg_upgrade needs matching settings, generated columns are virtual by default, VACUUM and ANALYZE now process inheritance children, unlogged partitioned tables are disallowed, and MD5 passwords produce deprecation warnings. Run pg_upgrade --check first.
When did AWS, Google Cloud and Azure support PostgreSQL 18?
Amazon RDS on 14 November 2025, Google Cloud SQL on 20 November 2025, Azure flexible server announced on 1 December 2025, Amazon Aurora on 11 June 2026 starting at 18.3, and Azure elastic clusters in September 2026.
How long is PostgreSQL 18 supported?
The community supports each major version for five years, so PostgreSQL 18 is supported until November 2030. On Amazon RDS, standard support runs until 28 February 2031.
Sources
- PostgreSQL: Release 18 notes
- PostgreSQL: PostgreSQL 18 Released! (announcement)
- PostgreSQL: Release 17 notes
- PostgreSQL: Release 19 notes (as of RC 1)
- PostgreSQL: PostgreSQL 19 RC 1 Released!
- PostgreSQL wiki: PostgreSQL 19 Open Items (release schedule)
- pgsql-committers: Revert SQL Property Graph Queries (SQL/PGQ)
- PostgreSQL 18 docs: Resource consumption (io_method)
- PostgreSQL 18 docs: Progress reporting (pg_stat_progress_vacuum)
- PostgreSQL 18 docs: The cumulative statistics system
- PostgreSQL 18 docs: pg_upgrade
- PlanetScale: Benchmarking Postgres 17 vs 18
- pganalyze: Postgres 18 asynchronous I/O
- AWS: Release calendars for Amazon RDS for PostgreSQL
- AWS: Amazon Aurora now supports PostgreSQL major version 18
- Google Cloud: Cloud SQL for PostgreSQL release notes
- Microsoft: PostgreSQL 18 now GA on Azure Postgres flexible server
- Azure Updates: PG18 support for elastic clusters
- PostgreSQL: pgvector 0.8.0 Released!
- PostgreSQL: pgvector 0.8.2 Released
How we checked this: features and dates come from the PostgreSQL 17, 18 and 19 release notes, the PostgreSQL 18 documentation and the cloud providers' own release pages, read on 11 November 2026. Benchmark findings are summarised from the linked write-ups. PostgreSQL 19 details reflect the release notes as of release candidate 1 and may change at general availability.
Get a Straight Answer on Your Setup
Tell us what you're running into. We read every message personally and reply within 24 hours with times for a 30-minute discovery call.



