Skip to main content

Command Palette

Search for a command to run...

PostgreSQL 18: The 6 Features Worth Upgrading For

Updated
2 min readView as Markdown

Originally published on DevToolHub.

PostgreSQL 18 ships a new asynchronous I/O subsystem that can cut read latency by up to 3x, plus virtual generated columns as the new default, uuidv7() for sortable primary keys, and skip scan support for multicolumn indexes.

Async I/O

Queue multiple disk reads instead of one at a time — sequential scans, bitmap heap scans, and vacuum all benefit. Check pg_aios to confirm it's active on your workload.

Virtual Generated Columns

total NUMERIC GENERATED ALWAYS AS (price * quantity) VIRTUAL

Computed at read time now, not write time. Use STORED explicitly if you need the old write-time behavior.

uuidv7()

SELECT uuidv7();

Timestamp-ordered, so inserts stay close together in index order instead of fragmenting the B-tree the way uuidv4() does.

Skip Scan

Multicolumn indexes now work even without a leading-column filter. Best when that column has few distinct values.

Safer Upgrades

pg_upgrade preserves planner statistics by default now, cutting out the post-upgrade window of bad query plans. Watch for the default-on data checksums and the VACUUM partition-children default change — both can surprise you mid-migration.

Don't run 18.0 straight from the release notes, though. 18.1 through 18.6 fixed 46 CVEs, including a critical RCE in pg_stat_statements — pull the current minor before you deploy.

Full writeup with OAuth setup and every breaking change: devtoolhub.com/postgresql-18-new-features