Postgres rewritten in Rust by AI. It passes 46,066 tests.

2 months ago

Someone rewrote PostgreSQL from the source into Rust, and it now matches Postgres on every one of forty-six thousand regression queries.

Ask

Ask about this presentation

Answers are generated from this presentation.

Chapters

  1. 0:00Slide 1
  2. 0:09A from-source rewrite that boots real Postgres data
  3. 0:21It matches Postgres on all 46,066 regression queries
  4. 0:33Built by AI agents, crate by crate
  5. 0:49Passing tests isn't the same as reliability
  6. 0:59You can run it today, in the browser or Docker
  7. 1:1046,066 tests say the behavior matches
Show transcript

Slide 1

Postgres rewritten in Rust by AI. It passes 46,066 tests.
AI-assisted, from the source, targeting Postgres 18.3
Rust rewrite PostgreSQL github.com/malisper

Someone rewrote PostgreSQL from the source into Rust, and it now matches Postgres on every one of forty-six thousand regression queries.

A from-source rewrite that boots real Postgres data

The pgrust GitHub README hero: the badges Postgres 18.3, regression queries 46k+, and AGPL-3.0, plus the disk-compatible line
Reads Postgres's own data files, no dump-and-reload

It's a rewrite of Postgres eighteen point three into Rust. And it's disk compatible. It reads Postgres's real data files, so it can boot up on an existing eighteen point three database, no dump and reload.

It matches Postgres on all 46,066 regression queries

46,066 / 46,066
regression queries · 100%
Every query in Postgres's default regression suite

Forty-six thousand and sixty-six regression queries. It matches Postgres on all of them. A hundred percent of the default suite. That means the query output matches, one for one.

Built by AI agents, crate by crate

A translator turns Postgres's C source into a Rust workspace of 1,464 crates
7,102
commits on main
27 days · about 263 per day · Jun 12 → Jul 9, 2026
1,464-crate workspace

Here's how. A tool mechanically translates the Postgres source into Rust, which splits it into more than a thousand crates. Then AI agents rewrote them one at a time, with Postgres's own tests as the judge. Over seven thousand commits, in under a month.

Passing tests isn't the same as reliability

"the things that make software like Postgres and SQLite reliable are not mostly the test, but the real world production scars."
— a common objection

Not everyone is sold. One engineer made the case against. Reliability, they argue, comes from years of running in production, from real-world scars, not from passing a test suite.

You can run it today, in the browser or Docker

The live in-browser WASM psql session running a query and rendering a real result table, with the 46,066/46,066 regression banner in frame
PostgreSQL License → AGPL-3.0
The author says it is not production-ready yet

You can try it right now, in the browser, or pull the Docker image. It's AGPL licensed, a change from Postgres's permissive license, and the author is clear it's not production-ready yet.

46,066 tests say the behavior matches

46,066 / 46,066 · 100%
github.com/malisper/pgrust pgrust.com

Forty-six thousand tests say the behavior matches. Whether an AI-built database earns the scars of a real one is the next question.