One Person Rebuilt Postgres in Rust With AI. 250,000 Lines, Fast.

One Person Rebuilt Postgres in Rust With AI. 250,000 Lines, Fast.

TL;DR

- pgrust is a full PostgreSQL reimplementation in Rust, built solo by a developer using Codex 5.4 AI agents — 250,000 lines of code in a short time. - Passes 100% of Postgres's regression suite across more than 46,000 queries, targeting Postgres 18.3 compatibility. - Author claims significantly faster than Postgres on analytical workloads, and faster on transaction workloads. - Not production-ready. Nobody's asking you to migrate. But the speed of the build is the story.

A solo developer who goes by malisper on GitHub just did something that, tbh, I'm still processing. They rebuilt PostgreSQL from scratch in Rust. Used Codex 5.4 AI coding agents to do it. The whole thing took a short time and produced 250,000 lines of Rust covering every major Postgres subsystem.

Targeting full compatibility with Postgres 18.3.

And here's the part that got me.

The newest version passes 100% of Postgres's own regression suite. More than 46,000 queries, all matching expected output. It runs a thread-per-connection model instead of Postgres's process-per-connection architecture. Speed-wise, the author claims significantly faster than vanilla Postgres on analytical workloads.

You can poke at it right now in your browser at pgrust.com.

Now. If you're running a small shop on Postgres, this isn't a migration notice. Don't go repointing your connection strings.

It's a signal flare. One person, AI agents, a short time, a database. That's the signal.

How Fast Did This Actually Happen?

Real SQL queries were running in a very short time.

Not three days. A very short time from project start.

By end of day one. Tables, indexes, transactions, core Postgres fundamentals. All there. Within a short time, 250,000 lines of Rust covering every major subsystem.

That's not a typo.

The tool was Codex 5.4.

The author calls it a "massive accelerant." But honestly, the blog makes clear this wasn't some autopilot situation. Hours spent telling Codex how to fix its own mess. Retrying with different approaches when things went sideways. The AI didn't build pgrust solo. A human steered it. Hard. Caught the errors, killed dead-end approaches, kept the whole architectural vision in their head the entire time.

That distinction matters if you're sitting there wondering what AI coding tools can actually do for your projects in 2026.

The first blog post reported pgrust passing about one third of Postgres's regression tests. The newer version. Not fully published yet, but referenced on GitHub and Hacker News. Now passes 100%. All expected output matched across more than 46,000 queries.

Targets Postgres 18.3 specifically.

Side note: I run multiple client projects on Postgres.

When I read that one person hit full regression-suite compatibility in a short time, two reactions hit at the same time. Genuine excitement. And a whole parade of "but what about" questions.

Both felt correct.

What Does Compatibility Actually Mean Here?

This isn't some new SQL dialect. It's not a Postgres-flavored API bolted onto another storage engine underneath.

The author describes it as "a rebuild of Postgres in Rust." All major subsystems. And the regression suite is Postgres's own test infrastructure. The same gate every Postgres release must clear. Matching expected output across 46,000+ queries means pgrust produces what Postgres would produce. On the tested paths, at least.

That's a real statement. Postgres's regression suite isn't some toy benchmark. It's the actual correctness gate. If pgrust matches all of it, that's behavioral compatibility at a level well beyond SELECT 1.

But here's the thing, and I want to be careful here.

Passing regression tests proves correctness on tested paths.

It says nothing about production behavior under sustained concurrent load. Doesn't prove anything about edge-case corruption. Replication failures. The thousand operational nightmares that real DBAs earn their salaries surviving. Author: explicit about this. Pgrust is not production-ready.

For small business operators the question was never "can I switch today?" The answer's no. Nobody's asking.

The real question is what this proves about building complex infrastructure when you pair a skilled operator with AI coding agents. That's where this gets interesting.

Why Threads Instead of Processes?

Postgres spawns a separate OS process per connection. It's been doing this forever. Battle-tested. Reliable. But it carries overhead.

That's why tools like PgBouncer exist, to manage the connection cost.

pgrust doesn't do that. Thread-per-connection model instead.

On analytical workloads. And this is the headline number. Significantly faster. They also report pgrust running slower than ClickHouse on ClickBench right now. And they think pgrust can eventually beat ClickHouse. Ambitious? Yeah.

But the direction is there.

Smaller benchmarks tell a similar story.

The threaded execution model delivered faster individual queries on small in-memory datasets against a baseline. The Rust regex engine pgrust uses ran faster than Postgres's built-in regex on simple tests.

These are author-reported numbers. Author-designed benchmarks. Treat them as directional, not gospel. But the direction. That's worth paying attention to.

Postgres has been carrying architectural decisions made decades ago. Some of those decisions now look like constraints. A clean-slate rewrite can sidestep them entirely. Thread-per-connection with modern Rust memory safety isn't radical. It's what a competent systems engineer would design if they started today, minus three decades of backward-compatibility debt.

What This Proves About Solo Builders and AI

I've been watching AI coding agent output closely across my own client work. And here's what I think pgrust actually demonstrates.

Not that databases are easy. They're not.

What it shows is that the constraint on ambitious software has shifted. Used to be "can one person write enough code." Now it's "can one person direct enough AI agents effectively." Separate problem. Other skill set entirely.

The author of pgrust isn't some Rust beginner who wandered into a database project. They're a seasoned Postgres user. They understood what they wanted to build before the first line of Rust got generated. The AI agents compressed the implementation timeline massively. But the architecture, the compatibility targets, the testing strategy. That came from someone who knew the problem space cold.

Maps pretty directly to what I see with small business clients, honestly. The ones getting real value from AI coding tools already understand their domain. They use AI to compress timelines, not to replace expertise they never built. A solo dev who knows Postgres internals can point Codex at subsystems and get working code in hours. A dev who doesn't understand those internals gets AI-generated code that looks impressive. Then fails in weird, subtle ways the moment real load shows up.

So the practical takeaway, if you're a small operator watching this space? Invest in domain depth first.

Layer AI acceleration on top of that. pgrust is what happens when both of those things collide with serious time and focus.

A short time of directed effort.

One person. Something that would've been unthinkable as a solo project 18 months ago.

Go try it at pgrust.com.

Browser-based WASM demo, and yes, there's a Lisp interpreter running inside the database because of course there is.

Source code lives on GitHub under AGPL-3.0.

The author's full blog post has the technical deep dive.

And the Hacker News discussion is worth reading for community pushback on the architecture and performance claims.

Sources

- pgrust.com — browser demo - GitHub - malisper/pgrust — source, AGPL-3.0 - Author's blog post - Hacker News discussion