DatabasesIntermediate

PostgreSQL 18: What's New and Who Should Upgrade

DeveloperHat Team
15 min read

TL;DR

PostgreSQL 18 (25 Sep 2025) brings async I/O, virtual generated columns and uuidv7(). What matters, what it costs, and whether to upgrade now or wait for 19.

PostgreSQL ships a major version about once a year, and most of them are a steady accumulation of planner tweaks and new SQL syntax. Version 18 is different: it changes how the server reads from disk for the first time in the project's history. PostgreSQL 18.0 was released on 25 September 2025, the current minor is 18.7, and the release is supported until 14 November 2030. PostgreSQL 19.0 landed on 19 November 2026 — four days ago — which is exactly why this article is about 18: it is the boring, supported, well-tested choice today, and 19 needs time to bake. Versions and dates are as checked on 23 November 2026 against the official release notes and the versioning page.

The short version up front: if you run PostgreSQL 14 or older, upgrade — 14 reached end of life on 12 November 2026. If you run 15–17 with a read-heavy workload on cloud or network-attached storage, 18's asynchronous I/O is worth the upgrade on its own. If you are already on 18, stay on the current minor. And if you are wondering whether to skip 18 for 19, don't — upgrade to 18 now and evaluate 19 next year.

PostgreSQL 18: five changes, one theme — stop waiting on disk 18.0 shipped 25 September 2025. The headline is async I/O; the rest removes upgrade friction. Async I/O up to 3x reads Virtual columns computed on read uuidv7() time-ordered IDs Skip scan multicolumn indexes pg_upgrade stats survive io_method = worker 3 I/O workers by default io_uring on Linux needs --with-liburing Writes stay synchronous in 18 — async I/O covers reads: sequential scans, bitmap heap scans, VACUUM.

Why 18 is a bigger deal than most yearly releases

PostgreSQL's yearly cadence means each release is usually judged on its feature list. 18 deserves a different test: does it change a bottleneck you actually hit? For most production databases the answer is yes, because the bottleneck is almost always disk reads. Until 18, a backend that needed a block from storage issued the read and waited — one request at a time, while the CPU sat idle and the query clock ran. The operating system's read-ahead papered over some of it, but the database itself had no way to say "I will need these fifty blocks, fetch them all."

That is the change. Everything else in the release — virtual columns, uuidv7, skip scans, gentler upgrades — is genuinely useful, but it is the I/O subsystem that makes 18 a release worth planning an upgrade around rather than drifting into. The rest of this article takes each piece in turn: what it does, who it helps, and what it costs.

Asynchronous I/O — the headline

The new asynchronous I/O (AIO) subsystem lets PostgreSQL issue multiple read requests concurrently instead of waiting for each one to finish in sequence. The release announcement reports up to 3× performance improvements when reading from storage — a vendor-measured figure on read-heavy scans, not a promise for your workload, but the direction and the mechanism are real. In 18, AIO covers sequential scans, bitmap heap scans, and maintenance operations like VACUUM. Writes stay synchronous; this release is about reads only.

Three settings control it, and the defaults are already the right starting point for most servers:

SettingDefaultWhat it does
io_methodworkerHow reads are dispatched: worker, io_uring, or sync
io_workers3Number of background I/O worker processes (for worker)
io_combine_limit128 kBHow much adjacent I/O gets merged into one request

The worker method is the default and the safe choice: three long-lived I/O worker processes, created at server start and shared across all connections, fetch blocks into shared buffers while the backend keeps working. io_uring is Linux-only, talks directly to the kernel through a shared ring buffer, and is usually the fastest option — but your PostgreSQL build must be compiled with --with-liburing, and it carries security trade-offs that have made some distributions cautious about it. sync reproduces PostgreSQL 17 behaviour and exists as the escape hatch. io_method can only be set at server start, so switching methods means a restart; io_workers can be tuned live.

-- Confirm what your server is actually running.
SHOW io_method;        -- worker (the 18 default)
SHOW io_workers;       -- 3
SHOW effective_io_concurrency;  -- 16 in 18, up from 1 in 17

Two things to get right before you expect a speedup. First, the win is latency hiding, not throughput magic: it shows up most on storage with high latency — cloud volumes, network-attached disks, anything where a single read takes long enough to matter. On a local NVMe drive with sub-millisecond reads, the same queries may barely move. Second, AIO only helps operations that know their future block numbers in advance — scans and VACUUM. Point lookups through an index were never waiting on sequential reads, and they still aren't. Our storage and database guide covers how the storage layer underneath shapes all of this.

How a read travels in PostgreSQL 18 — the new async I/O stack SQL + planner — decides the scan, knows the blocks it will need AIO dispatcher — issues many reads at once instead of one at a time io_method — worker (default, 3 workers) · io_uring (Linux) · sync (17 behaviour) Kernel + storage — reads land in shared buffers while the backend works Observability — pg_stat_io read_bytes / write_bytes per backend The win is latency hiding, not throughput magic — it shows up most on slow, network-attached storage.

Virtual generated columns — now the default

Generated columns are not new, but 18 changes their default in a way that will surprise ORMs and migration scripts. A generated column computes its value from other columns; until 17, that value was stored on disk (STORED). In 18, generated columns are virtual by default: the value is computed when the column is read, not when the row is written.

-- In 18 this is virtual by default: no storage, computed on read.
CREATE TABLE orders (
  id          bigint GENERATED ALWAYS AS IDENTITY PRIMARY KEY,
  unit_price  numeric(10,2) NOT NULL,
  quantity    int NOT NULL,
  line_total  numeric(10,2) GENERATED ALWAYS AS (unit_price * quantity)
);
-- The old behaviour is still available when you need it:
--   line_total numeric(10,2) GENERATED ALWAYS AS (unit_price * quantity) STORED

The trade is straightforward. Virtual columns cost nothing in storage and nothing on write, and they are always consistent with their inputs because they are recomputed. The cost is paid on read, and it is paid on every read — so a virtual column over an expensive expression in a hot query is a regression, not a saving. The second catch is indexing: a virtual column cannot be indexed, so if you filter or join on the computed value, declare it STORED. The third catch is tooling: some frameworks and migration tools assume generated columns are stored, and a virtual column showing up where a stored one was expected has already bitten early adopters — check your ORM's support before relying on the new default.

uuidv7() — time-ordered IDs that index well

Random UUIDs make poor primary keys: every insert lands at a random spot in the B-tree, which means random page writes, poor cache behaviour, and an index that fragments as it grows. The standard answer has been to use a serial or identity column, or to generate a time-ordered UUID in application code — which works until two services generate IDs differently.

PostgreSQL 18 adds uuidv7(), a built-in function generating timestamp-ordered UUIDs per RFC 9562, alongside a uuidv4() function for the random case:

CREATE TABLE events (
  id         uuid PRIMARY KEY DEFAULT uuidv7(),
  created_at timestamptz NOT NULL DEFAULT now(),
  payload    jsonb NOT NULL
);
-- New rows sort roughly in creation order, so the B-tree stays
-- append-friendly and recent rows stay hot in cache.
SELECT uuidv7();

Who this is for: any team using UUID primary keys across services, or generating IDs in more than one place. If your keys are single-database serials and nothing is broken, uuidv7 is not a reason to migrate — it is a reason to pick better defaults on the next table. One honest limit: uuidv7 still carries the full 128-bit width and its random tail, so it is not a replacement for a compact integer key on the hottest, narrowest tables.

The planner got smarter

Three planner changes are worth knowing, because they change which queries benefit from indexes you already have:

Skip scans on multicolumn B-tree indexes. Previously, a multicolumn index on (country, city) was useless for a query filtering only on city — without an equality condition on the leading column, the planner could not use it. In 18 the planner can repeatedly search for each distinct value of the leading column, so the index is usable after all. If you have multicolumn indexes whose leading column is rarely filtered, re-check the plans you had written off.

Faster hash joins and parallel GIN index builds. The kind of improvement that shows up as a few percent across a broad workload rather than a headline on any single query — worth having, not worth planning around.

Planner statistics survive pg_upgrade. This is the quiet one with the biggest operational payoff. Until 18, a freshly upgraded cluster had no planner statistics and ran slow plans until ANALYZE finished — the reason upgrades often came with a "warm-up" window of bad performance. In 18, pg_upgrade carries the statistics across, so the upgraded cluster plans well from the first query. Combined with parallel checks (--jobs) and a new --swap mode, the major-version upgrade itself is now the least painful it has ever been.

Security, operations, and the small print

The rest of the release is a set of changes that each remove one small piece of friction:

  • MD5 password authentication is deprecated and will be removed in a future release. If any role still authenticates with MD5, move it to SCRAM now — this is the last release where the migration is optional.
  • OAuth 2.0 support arrives for authentication through extensions, which matters most for teams whose identity story is already OAuth-shaped.
  • Data checksums are now on by default in initdb (with a new --no-data-checksums flag to turn them off). Checksums catch silent storage corruption; the cost is a small amount of CPU on writes. New clusters get the protection for free; existing clusters still need a dump and reload to enable it.
  • Temporal constraints let you declare non-overlapping primary keys, unique constraints, and foreign keys on range types, using WITHOUT OVERLAPS and PERIOD — the database now enforces "no two bookings for the same room overlap" instead of your application code.
  • RETURNING gains OLD and NEW, so an UPDATE ... RETURNING OLD.price, NEW.price gives you the before-and-after in one statement — handy for audit logging without a trigger.
  • Observability improves: pg_stat_io now reports I/O activity in bytes (read_bytes, write_bytes, extend_bytes), and per-backend I/O statistics are available through pg_stat_get_backend_io(). If you run AIO, this is where you check whether it is actually doing anything. Our Kubernetes monitoring guide covers the same observability thinking at the platform layer.
  • The comparison: upgrade now, wait, or jump to 19

    OptionBest forCostWhat it costs you
    Upgrade to 18 nowTeams on 14 or older; read-heavy 15–17 workloads on cloud storageOne pg_upgrade; statistics carry across, so no warm-up windowAIO gains are workload-dependent — measure before promising 3×; extensions must support 18
    Stay on 17, plan 18 laterWrite-heavy OLTP on fast local NVMe; teams mid-freeze or mid-incidentNothing nowYou keep the synchronous I/O ceiling on scans; 17 is supported, so there is no urgency — just a date on the calendar
    Jump straight to 19Nobody in production this monthThe newest features, first19.0 is four days old; let the .1 release and the early bug reports land first
    Stay on 14 or olderNobody — 14 reached end of life on 12 November 2026Nothing now, everything laterNo more security fixes; every month past EOL is unpatched exposure

    The default that follows from the table: upgrade to 18.7 now if you are on 14 or older, or on 15–17 with a read-heavy workload. Stay on 17 if your workload is write-heavy on fast local disks and nothing is broken — and put the 18 upgrade on the calendar anyway, because the support clock is already running. Evaluate 19 in 2027.

    Should you upgrade to PostgreSQL 18 now? Start from your version and your workload — the answer is rarely "upgrade for the features". What are you running? version + workload On 14 or older? EOL — upgrade now On 15–17, read-heavy? 18 pays off On 18 already? stay on 18.7 19.0 landed 19 November 2026 — let it bake. 18.7 is the boring, supported choice today.

    The recommendation

    ApproachBest forCostWhat it costs you
    Upgrade to 18, keep defaultsMost teams — the defaults (worker, 3 workers) are rightOne upgrade windowYou leave io_uring performance on the table on Linux; measure before tuning
    Upgrade to 18, tune io_methodLinux teams on high-latency storage who measured a winA restart to switch methods; a liburing build for io_uringTuning without measuring is how you trade a known-good default for a slower one
    Upgrade and adopt uuidv7 + virtual columnsNew tables and new servicesSchema conventions to updateMigrating existing keys or columns is rarely worth it — adopt on new tables
    Stay putTeams mid-freeze, or on 17 with a write-heavy local-NVMe workloadNothingThe 18 gains wait, and 14-and-older teams are already past end of life

    Architecture Decision

    >

    Decision: Upgrade production PostgreSQL clusters to 18.7 now if they run version 14 or older, or 15–17 with a read-heavy workload on cloud or network-attached storage; keep the AIO defaults (io_method = worker, io_workers = 3); adopt uuidv7() and virtual generated columns for new tables only; evaluate PostgreSQL 19 in 2027.

    >

    Context: A team runs PostgreSQL 16 on a managed cloud instance with network-attached storage. Analytical scans and nightly VACUUM are the slowest operations in the system; the application generates UUID primary keys in three services, each with its own generator. PostgreSQL 14 clusters in the same estate reached end of life on 12 November 2026.

    >

    Options considered: (a) Stay on 16 and tune queries. (b) Upgrade to 18 with defaults. (c) Upgrade to 18 and switch to io_uring. (d) Wait for 19 and jump straight there. (e) Move the read-heavy workload to a specialised analytics engine instead.

    >

    Why this one: Option (a) leaves the actual bottleneck — synchronous reads on high-latency storage — untouched, and tuning cannot fix a missing subsystem. Option (c) is faster on paper but needs a liburing build and a restart to test, so it belongs after measuring the default. Option (d) means running an end-of-life 14 cluster for months while waiting for a .0 release to stabilise. Option (e) is the right answer for a different problem — true OLAP — and our Postgres vs ClickHouse vs DuckDB comparison covers when that trade makes sense. Option (b) fixes the bottleneck with a supported release, keeps the upgrade gentle because statistics survive pg_upgrade, and costs one maintenance window.

    >

    What it costs you: One upgrade window per cluster, plus extension compatibility checks — every extension must support 18 before the upgrade runs. AIO gains are workload-dependent and must be measured on your storage; the "up to 3×" figure is a vendor benchmark on read-heavy scans, not a guarantee. Virtual columns change a default that ORMs may not expect, so new-table conventions need a review.

    >

    When to reverse it: When the workload is write-heavy OLTP on fast local NVMe and the upgrade bought nothing measurable, the upgrade itself is still harmless — 18 is a supported release and the defaults are safe — so "reverse" means staying on 17 longer, not rolling back. When a required extension has no 18 build, wait for the extension, not the database. When the team is mid-incident or mid-freeze, any upgrade waits, whatever the version numbers say.

    When not to use it

    Do not upgrade for the feature list alone. If your workload is write-heavy OLTP on local NVMe, AIO will not move your numbers — the reads were never the bottleneck — and the upgrade is still worth doing eventually for support reasons, but it is not urgent and should not jump the queue ahead of real work. Do not adopt virtual generated columns for a computed value that a hot query filters on, or that needs an index — use STORED there. Do not treat uuidv7 as a migration project for existing tables: changing a primary key type on a live table is a weekend of pain for a benefit you get for free on the next table. And do not jump to 19.0 because it is newer — .0 releases are where the early bugs live, and 18.7 is the version with a year of production history behind it.

    What to do next

    This week: check SELECT version(); on every cluster you own and find the ones on 14 or older — those are past end of life and go first. On a staging copy of your read-heaviest database, upgrade to 18, confirm SHOW io_method; reports worker, and compare the same slow scan before and after with EXPLAIN (ANALYZE, BUFFERS). If the scan improves, schedule the production upgrade in the next maintenance window; if it doesn't, you have learned that your bottleneck is elsewhere, which is also useful. Then, on the next new table, use uuidv7() as the default key and a virtual generated column where a computed value is read more than it is written — and check that your ORM agrees with both choices before they reach production.

    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.