Every year there’s a new database that will replace Postgres, and every year I end up building on Postgres anyway. What has changed is around it. Postgres itself picked up features I used to need extensions or workarounds for, and nearly every tool between my code editor and the server has been rewritten in Rust.
Here’s what’s worth knowing from both, and how I decide when something new is ready for a client project.
Postgres 18: the features I actually use
Postgres 18 came out in September 2025. Release notes are long; these are the parts that changed code I write.
uuidv7() built in
I’ve used UUIDs as primary keys for years, because they can go in URLs without telling the world you have 212 customers. Random UUIDs (version 4) scatter inserts across the index, which makes big tables slower over time. Version 7 starts with a timestamp, so new rows land at the end of the index like an auto-increment would. Postgres 18 generates them natively:
create table leads (
id uuid primary key default uuidv7(),
email text not null,
source text,
created_at timestamptz not null default now()
);Old and new values in RETURNING
An update can now hand back the row as it was before and after, in one statement. I use it for audit logs and for “price changed from X to Y” notifications, which used to need a separate select or a trigger:
update quotes
set amount = 4800
where id = $1
returning old.amount as before, new.amount as after;Virtual generated columns
Generated columns are now computed when read by default, rather than stored. Good for values derived from other columns, such as a full name or a price with tax, that you want to query by name without paying for the storage.
Asynchronous I/O
Postgres 18 can now ask the operating system for several blocks of data at once instead of one at a time. The release notes report up to three times faster sequential scans and vacuums in their tests. You don’t change any code for this; the setting is io_method, and on Linux it can use io_uring. On managed hosts it’s mostly already decided for you.
Smaller things that add up
- Skip scan. An index on
(tenant_id, created_at)can now help a query that only filters oncreated_at. Fewer indexes to create and maintain. - Temporal keys.
WITHOUT OVERLAPSon a primary or unique key stops two bookings for the same room overlapping in time, enforced by the database rather than application code. - Steadier upgrades.
pg_upgradenow keeps planner statistics, so queries don’t run on guesswork for the first hour after a major upgrade. - OAuth sign-in for database users, and MD5 passwords are deprecated. If old apps still connect with MD5, plan the switch to SCRAM now.
Before you upgrade
Check every extension you use (PostGIS, pgvector, pg_cron and so on) supports 18 on your host. Then upgrade a copy first. On Neon or Supabase that’s a branch or a restored backup; run the test suite and your ten slowest queries against it before touching production.
Why your JavaScript tools are written in Rust now
A few years ago, bundling, linting and compiling CSS were all JavaScript programs. Most of them now have Rust replacements, and many have become the default:
- Turbopack, the Rust bundler behind
next devand, since Next.js 16,next buildby default. SWC, also Rust, replaced Babel in Next.js years before that. - Rolldown and Oxc, the Rust bundler and parser the Vite team is moving Vite onto.
- Tailwind CSS v4, whose engine is partly Rust and leans on Lightning CSS, also Rust.
- Biome for formatting and linting in one fast binary.
- uv, the Python package manager that made installs I used to wait minutes for take seconds.
The reason is speed. These tools parse thousands of files on every save, and Rust compiles to native code that uses every CPU core without the pauses of a garbage collector. On a large Next.js project the difference shows up as a dev server that starts in a couple of seconds and changes that appear before you’ve looked back at the browser.
It isn’t a one-way trend, and that’s useful to know. Microsoft is porting the TypeScript compiler to Go, not Rust, because Go let them keep the existing code’s structure. Prisma went the other direction, replacing its Rust query engine with TypeScript to make its client smaller and faster to start in serverless functions. Teams are choosing whatever fits the job, which is how it should be.
When I write Rust myself
Rarely, and for specific jobs. Almost all of a typical business backend is waiting: on the database, on an API, on the network. Rust doesn’t make waiting faster, and TypeScript on Node is easier to hire for and quicker to change. Where Rust earns its place:
- CPU-heavy work. Resizing images, generating PDFs, parsing large CSV or XML imports, crunching numbers for reports.
- WebAssembly in the browser. Rust compiles to small, fast WebAssembly modules for things like client-side image editing or file processing that would freeze the page in JavaScript.
- Small, long-running services where memory use matters and the code won’t change much once it works.
- Postgres extensions, using the pgrx framework, when a feature belongs inside the database.
Hosting has caught up too. Vercel Functions and Cloudflare Workers both run Rust, so a hot path can be a single Rust function sitting next to the rest of a Next.js app, rather than a separate server to look after.
How I decide whether something new is ready
New backend tools are fun to try and expensive to back out of. Before one goes into a client project I want:
- A boring fallback. If the tool disappears, can I swap it for something standard in a day? A Rust bundler that reads the same config as the old one passes. A niche database with its own query language doesn’t.
- A real release behind it. I adopt Postgres features once they’re in a released major and supported by the client’s host, not in beta.
- Someone else’s production first. Turbopack became my default once it was the default in Next.js, not before.
- A measurable win. Faster builds, fewer lines of code, a cheaper bill. “It’s newer” doesn’t count.
That’s why my stack looks conservative from a distance: Postgres, TypeScript, Next.js. Up close, most of the tooling under it has been replaced in the past two years, one piece at a time, each time because it was measurably better.
Frequently Asked Questions
What is new in PostgreSQL 18?
PostgreSQL 18, released in September 2025, added an asynchronous I/O system that speeds up reads, a built-in uuidv7() function, virtual generated columns, access to old and new row values in RETURNING, skip scans on multicolumn indexes, temporal primary keys and OAuth sign-in. Upgrades also keep planner statistics, so performance is steadier right after the move.
Should I use UUIDv7 or auto-increment IDs in Postgres?
UUIDv7 suits most web apps. The IDs can be generated anywhere without asking the database, they do not reveal how many records you have, and because they start with a timestamp they insert in roughly time order, which keeps indexes compact. Auto-increment integers are smaller and fine for internal tables that never appear in URLs.
Do I need to learn Rust to build web apps?
No. Most developers benefit from Rust through their tools: bundlers, linters, CSS engines and package managers written in Rust run much faster than the JavaScript versions they replaced. Writing Rust yourself pays off for CPU-heavy work such as image processing, parsing large files or WebAssembly modules.
How do I upgrade a production Postgres database safely?
Test the upgrade on a copy first. On managed services such as Neon or Supabase, create a branch or a restored copy, upgrade it, run your test suite and the slowest queries against it, then schedule the real upgrade. Check that every extension you use supports the new version before you start.
Planning a backend, or stuck with an old one?
I build Next.js apps on Postgres and help teams move off ageing stacks without a big-bang rewrite. Tell me what you’re running and what’s hurting.