# Postgres took 40 years. pgrust passed its tests in 80 days. Which developers could build the next one? Michael Malis rewrote Postgres in Rust with Codex and Claude agents. The real git history, the speed debate, and who builds Rust and Postgres today. ![Postgres took 40 years. pgrust passed its tests in 80 days. Which developers could build the next one?](https://vamotalent.com/blog/pgrust-postgres-in-rust-ai-agents/hero.jpg) By Cam Whiteside, 2026-11-22. Canonical: https://vamotalent.com/blog/pgrust-postgres-in-rust-ai-agents So pgrust showed up on GitHub's trending list, and my first reaction was, wait, somebody rewrote Postgres? Postgres is the database. A lot of the startups I talk to run on it. It has been in development for about 40 years, and hundreds of people work on every release. And one founder, Michael Malis, with a fleet of AI coding agents, got a Rust version passing every one of Postgres's own regression queries in 80 days. In July it hit the front page of Hacker News and went from 122 to 1,499 stars in a day. I build search for developers by what they've actually built on GitHub, so I did what I always do. I read the repo, all of its git history. And then I did some napkin math, because I couldn't help it. That race isn't fair, and I know it. Postgres had to invent every answer. pgrust had the answer key: 46,066 queries with the exact output Postgres gives, and the original C code sitting right there. But the answer key is the whole story. It's why this worked at all, and it tells you which people matter now. ## He ran a petabyte of Postgres before he tried to replace it [Michael Malis](https://github.com/malisper) isn't someone who woke up and decided databases looked fun. At Heap he spent years running a Postgres cluster with over a petabyte of data in it, and he has written dozens of blog posts about how Postgres works inside. Then he ran Freshpaint, which grew to 120 people. His reason for pgrust is very specific. He kept seeing his startup friends hit the same Postgres problems: more than 350 settings where one wrong one can stall vacuum, the cleanup process that reclaims space; needing a separate pooler just to handle lots of connections; no statistics on JSONB columns, so the planner guesses. He thinks Postgres in Rust is easier for AI to change safely than Postgres in C. In his words, "Postgres is one of the greatest databases out there." He just wants to change it from the inside. ## It took four tries and about $100k of AI Here's the part I loved, because he wrote it all down. **Try 1, April: Codex builds Postgres feature by feature.** He gave OpenAI's Codex the Postgres source and had it plan and build each subsystem: the parser that reads your SQL, the planner that decides how to fetch the rows, the executor that fetches them. On April 13 he installed Conductor, a tool that runs many agents side by side, and worked his way up to 17 agents "before maxing out the CPU on my computer." By April 28 he had eight Codex accounts at $200 a month each, because every account kept hitting its rate limit, and 280 pull requests had merged in two weeks. His laptop ran at 80 to 100% CPU all week, and the agents filled 100GB of disk with build files. It got to 96% of the tests in about four weeks, and then it hit a wall. The planner worked, but it was put together differently from Postgres's, in dozens of small ways. He calls it an "organ transplant failure." Fixing it meant rewriting most of the code. **Try 2: translate the C by machine.** His friend Jason Seibel ran c2rust, an open source tool that turns C into Rust, over all of Postgres. Two days later they had 5.3 million lines of Rust that passed the whole regression suite. The catch: it was C wearing a Rust costume. Every value was a raw pointer, and turning one function into normal Rust meant changing hundreds of others. **Try 3: port it crate by crate, about 1,000 of them.** This is where my favorite exchange happens. He asked GPT-5.5 to rewrite Postgres's regular expression code, about 16,000 lines. > **Me:** Here's the entire regex crate. Rewrite it into idiomatic Rust. > > **Model:** (five minutes and 185,000 tokens later) Done. I've rewritten 11 functions. > > **Me:** …11? How many functions are there? > > **Model:** 228. After two days stuck, he tried Claude's dynamic workflows, which run dozens of subagents at once, a bit like map reduce for coding agents. It split the regex crate across four agents plus reviewers and fixers and ported all 228 functions in 30 minutes. Then he scaled it up, sometimes with more than 100 subagents running. And it fell apart anyway, in a new way: about 10,000 places where two crates call each other, which he calls seams, didn't match on types. One part of the code thought a table was a pointer, another thought it was a number. **Try 4: start over, with everything learned.** He gave Claude Fable every earlier version and his tech-debt notes, and made the agents check the seams first. Fable wrote the first 50,000 or so lines, Claude Opus did the rest, and on June 25 pgrust passed 100% of the Postgres regression suite. For comparison, Malis guesses Postgres cost "on the order of hundreds of millions of dollars in R&D." His tally for the version that works is about $100k. ## The headline says Codex. The git history says mostly Claude. Most of the coverage says pgrust was built with 17 Codex agents. That was true in April, for try 1, which he threw away. So I read the public git history, which tags each release with its own set of commits, and counted which AI each commit names as a co-author. The pace is a little silly. The history behind v0.1 has 1,419 commits dated June 13 alone. That's almost one a minute, for 24 hours. And because the commits are his, it all lands on his GitHub calendar, which went from 15 contributions in all of 2025 to 66,019 this year. ## Is pgrust actually faster than Postgres? This is the part people fight about, so here's what's claimed and what's checked. pgrust's site says it runs transactions about 30% faster than Postgres and analytics faster than ClickHouse, a database built just for analytics. The README says some analytical queries run up to 1,600 times faster than Postgres. Those are pgrust's own benchmarks. Ruohang Feng, who goes by Vonng and builds the Postgres distribution Pigsty, checked the repo in July. His verdict on the tests: "The score does not look padded." His verdict on the speed: "this is not evidence that Rust is 300x faster than C." The fast version changed the storage layout, the query engine and the parallelism, so the speedup is the redesign, not the language. He also put it in one line I keep coming back to: "In two months, pgrust demonstrated the value of the system it set out to replace." And Malis says it himself. The version that first passed every test was about 8 times slower than Postgres. So the honest answer: on the workloads pgrust picked, measured by pgrust, the newer versions are faster, and nobody outside has reproduced all of it yet. The Rust didn't make it fast. Having a faithful copy that was easier to change did, and that's exactly the bet Malis made. ## The test suite was the spec, and it caught Postgres too Postgres ships with a regression suite: about 230 SQL files and the exact output Postgres should print for each one. That's the answer key. Vonng compared 18 of pgrust's test files byte for byte against Postgres 18.3's and found them identical. He also listed the limits: the public runner ran the tests one at a time instead of in parallel, fsync was off, which is normal for these tests but means durability isn't checked, and at the time the repo had no CI. Since then pgrust went further and started proving things. It uses Kani, a tool that checks every possible input within set bounds, to show that a Rust function and the original C function give the same answer. I love that. You set out to copy Postgres exactly, and along the way you find four bugs in Postgres. There's a pattern here worth naming. Bun, the JavaScript runtime, did a big rewrite from Zig to Rust the same way, and Malis cites it as his model. When the old system's tests are good, agents can copy it. The hard part is knowing what "the same" means: types, durability, concurrency, the 40 years of edge cases. That takes people. ## Who builds Rust and Postgres today So who are those people? I asked Vamo for everyone who contributed to the main open source projects where Rust and Postgres meet: pgrx, Neon, ParadeDB, pgvectorscale, VectorChord, Supabase Wrappers, pg_graphql, rust-postgres, PgCat, PgDog and pgrust itself. 91.3% of them write Rust. The bigger finding is how spread out they are. Put the database companies together and it's still only about a quarter. Most of these people work at startups, banks, consultancies and app companies, and build Postgres tools on the side or as part of the job. ## Five people who already build the pieces These are a few of the people whose work pgrust had to rebuild from scratch. All of them are in the top 1% of developers on Vamo. [Alex Chi Z](https://github.com/skyzh) builds database systems at Databricks, per his GitHub bio. If you want to learn how a database puts bytes on disk, his [mini-lsm](https://github.com/skyzh/mini-lsm) is where a lot of people start. [Lev Kokotov](https://github.com/levkk) wrote [PgCat](https://github.com/postgresml/pgcat) and then [PgDog](https://github.com/pgdogdev/pgdog), both in Rust. A pooler is the thing Malis's friends kept bolting on, so a busy app doesn't open more connections than Postgres can take. When pgrust hit Hacker News, Vonng credits him with asking the right first question: was fsync on? [Eric Ridge](https://github.com/eeeebbbbrrrr) is part of the team behind [pgrx](https://github.com/pgcentralfoundation/pgrx). If one project made Rust a real option for Postgres, it's this one. [Oliver Rice](https://github.com/olirice) is Head of Engineering at Supabase, per his GitHub bio, and wrote [pg_graphql](https://github.com/supabase/pg_graphql). [Philippe Noël](https://github.com/philippemnoel) is CEO of [ParadeDB](https://github.com/paradedb/paradedb), per his GitHub bio. ParadeDB's bet is that you shouldn't need a second database just for search. ## So I asked Vamo who could build this None of this is in a job title. "Can port a Postgres subsystem to Rust and knows when the copy is wrong" isn't a field on anyone's profile. At Vamo we search people by what they've built, so I asked it the way you would in Claude with Vamo connected: That chat is a mock-up, but the searches behind it are real. If you're building a database company, or you just found out your next hire needs to know Postgres inside and out, the signal is in the code: a pgrx extension, a pooler, a storage engine someone wrote to learn. That's what Vamo reads. The request shapes are in the [API docs](https://vamotalent.com/docs), or you can [book a demo](https://vamotalent.com/book-demo) and I'll show you. ## How we did this We read pgrust's README, its proofs folder and the full public git history on November 22, 2026, plus Michael Malis's posts about it, the release posts and Vonng's review. We counted which AI model each commit names from its author and Co-Authored-By lines. We name people for their public GitHub work, and say where someone works only when their own GitHub bio says it. For the talent map we used Vamo's developer search to find everyone indexed as a contributor to 12 Rust and Postgres repositories, removed bots and organization accounts, and grouped them by current employer, kind of employer, title and country. Percentages are of people with a known employer, role or location, and are rounded down, never up. Each card is that person's Vamo profile with their GitHub contribution calendar for one labelled year. ## What is pgrust? pgrust is a Postgres-compatible database rewritten in Rust by Michael Malis, the former Freshpaint founder, with his friend Jason Seibel. It speaks the Postgres wire protocol and SQL dialect, passes all 46,066 queries in the Postgres 18.3 regression suite, and is aimed at fast analytics on Postgres data. It's AGPL-3.0 licensed and in beta, targeting production readiness in early 2027. ## Was pgrust written by AI? Mostly, with a person steering. Malis started with OpenAI's Codex and up to 17 agents in April 2026, threw that version away, and built the version that passed the tests with Claude's dynamic workflows, first Claude Fable and then Claude Opus. In the public git history, 54.0% of v0.1's commits name Claude Opus as a co-author, and most of v0.2 and v0.3 name Claude Fable. ## Is pgrust faster than Postgres? pgrust's own benchmarks say about 30% faster on transactions and far faster on analytics. Independent reviewers say the speedup comes from a redesigned engine and columnar storage, not from Rust, and the version that first passed every test was about 8 times slower than Postgres, by Malis's own count. Treat the speed numbers as claims until someone outside reproduces them. ## Can you write Postgres in Rust? Yes, in pieces, and people have for years. pgrx lets you write Postgres extensions in Rust, Neon wrote its storage layer in Rust, PgCat and PgDog are Rust poolers, and rust-postgres is the standard Rust driver. pgrust is the first to rewrite the whole server and pass the regression suite. ## How do you hire Rust and Postgres engineers? Look at what people built, not titles. Contributors to pgrx, Neon, ParadeDB, pgvectorscale, Supabase Wrappers, pg_graphql and the Rust poolers are the group. Databricks, the biggest employer, has only 6.0% of them, and 67.4% are the only person from their company in the group, so most are at companies you wouldn't think to search. ## Who builds Postgres extensions in Rust? The pgrx team, including Eric Ridge, plus the teams at ParadeDB (pg_search), Timescale (pgvectorscale), TensorChord (VectorChord) and Supabase (Wrappers and pg_graphql), which all build on pgrx. Many more are individual developers: two in three work somewhere no one else in the group works. ## Sources and credits **pgrust.** [malisper/pgrust](https://github.com/malisper/pgrust) and its [proofs](https://github.com/malisper/pgrust/tree/main/proofs); [pgrust.com](https://pgrust.com); [v0.4 beta release post](https://pgrust.com/blog/pgrust-v0-4-beta/). **Michael Malis.** [pgrust: Rebuilding Postgres in Rust with AI](https://malisper.me/pgrust-rebuilding-postgres-in-rust-with-ai/); [pgrust update: at 67%](https://malisper.me/pgrust-update-at-67-postgres-compatibility-and-accelerating/); [pgrust passes 100% of the Postgres regression tests](https://malisper.me/pgrust-passes-100-of-postgresqls-regression-tests/); [three dead ends before we passed 100%](https://malisper.me/postgres-in-rust-regression-suite/); [300x faster analytics](https://malisper.me/how-we-made-postgres-hundreds-of-times-faster-the-query-engine/). **The review.** Ruohang Feng (Vonng), [Did AI Rewrite PostgreSQL in Rust? Not Quite](https://blog.vonng.com/en/ai/rewrite-pg-in-rust/). **Postgres.** [PostgreSQL 18 release notes](https://www.postgresql.org/docs/18/release-18.html); [A brief history of PostgreSQL](https://www.postgresql.org/docs/current/history.html); [Databricks agrees to acquire Neon](https://www.databricks.com/company/newsroom/press-releases/databricks-agrees-acquire-neon-help-developers-deliver-ai-systems). **The code.** [pgcentralfoundation/pgrx](https://github.com/pgcentralfoundation/pgrx), [pgcentralfoundation/plrust](https://github.com/pgcentralfoundation/plrust), [neondatabase/neon](https://github.com/neondatabase/neon), [paradedb/paradedb](https://github.com/paradedb/paradedb), [timescale/pgvectorscale](https://github.com/timescale/pgvectorscale), [tensorchord/VectorChord](https://github.com/tensorchord/VectorChord), [supabase/wrappers](https://github.com/supabase/wrappers), [supabase/pg_graphql](https://github.com/supabase/pg_graphql), [sfackler/rust-postgres](https://github.com/sfackler/rust-postgres), [postgresml/pgcat](https://github.com/postgresml/pgcat), [pgdogdev/pgdog](https://github.com/pgdogdev/pgdog), [skyzh/mini-lsm](https://github.com/skyzh/mini-lsm), [Mooncake-Labs/pg_mooncake](https://github.com/Mooncake-Labs/pg_mooncake), [model-checking/kani](https://github.com/model-checking/kani). Get a demo: https://vamotalent.com/book-demo