On 9 July 2026, a project called pgrust hit the top of Hacker News. A solo developer, Malcolm Matis, had rewritten PostgreSQL — one of the most battle-tested databases on the planet — entirely in Rust. The kicker: he did it using up to 17 parallel AI coding agents, generating over 450,000 lines of code. And it passes 100% of the Postgres regression test suite.
That is not a typo. One person, a fleet of AI agents, and a few months of work produced a functionally compatible rewrite of a database that has been refined over three decades by hundreds of contributors.
Whether pgrust ever reaches production is almost beside the point. What matters is what it tells us about where software development is heading — and what your team should be thinking about right now.
TL;DR
- pgrust is a complete Rust rewrite of PostgreSQL built by one developer using up to 17 parallel AI coding agents, passing 100% of Postgres regression tests
- The project demonstrates that AI-assisted rewrites of critical infrastructure software are now technically feasible, not just theoretical
- Early benchmarks show 50% faster transaction performance and up to 300× faster analytical queries thanks to Rust’s thread-per-connection model
- The real lesson is not about replacing PostgreSQL — it is about what this methodology means for legacy modernisation, technical debt, and development team strategy
- Businesses considering legacy rewrites should evaluate AI-assisted approaches now, but with clear-eyed assessment of the gap between “passes tests” and “production-ready”
What pgrust Actually Achieved
Let us be precise about what happened, because the details matter more than the headline.
Matis built pgrust targeting compatibility with PostgreSQL 18.3. The project is disk-compatible with Postgres — meaning it can boot from an existing Postgres data directory. It executes over 46,000 regression queries without a single failure. That level of compatibility is genuinely remarkable for a ground-up rewrite.
The architecture makes fundamentally different choices from upstream Postgres. Where PostgreSQL uses a process-per-connection model (a design decision from the 1990s), pgrust uses a thread-per-connection model. This alone accounts for significant performance gains on multi-core hardware. Early benchmarks claim 50% faster transaction throughput and roughly 300× faster analytical workloads, though Matis himself notes these numbers are preliminary and the project is not production-ready.
The development cost? Around £1,300 per month running eight paid Codex accounts, later scaling to 17 concurrent agents. For context, that is less than the monthly cost of a single junior developer in most markets.
The AI Agent Development Methodology
The most instructive part of pgrust is not the output — it is the process.
Matis did not simply prompt an AI and accept whatever came back. He developed a structured methodology:
- Explain first, then build. He would ask the AI to explain how specific Postgres subsystems work — the storage layer, the query executor, concurrency controls — before collaboratively building minimal Rust implementations.
- Runnable at all times. The project maintained a “runnable at all times” discipline, ensuring each change could be tested against the regression suite immediately.
- Graduated autonomy. Early work was hands-on. As patterns emerged, Matis delegated increasingly to agents, eventually managing 17 concurrent coding agents — a workflow he compared to managing code review for a 120-person engineering team.
- Small, test-driven commits. Multi-agent coordination created merge conflicts. The solution was enforcing small, independently testable commits — the same discipline that works for human teams at scale.
This is not “vibe coding”. It is a disciplined engineering methodology that happens to use AI agents as force multipliers. The developer remained the architect, reviewer, and decision-maker throughout.
What This Means for Legacy Modernisation
Every development team maintains systems they would love to rewrite but cannot justify the investment. The economics have always been brutal: a rewrite takes years, costs millions, and carries enormous risk of introducing regressions that the original system had long since resolved.
pgrust shifts that calculus. Not because AI makes rewrites risk-free — it emphatically does not — but because it compresses the timeline and cost to the point where exploration becomes affordable.
Consider what this means in practical terms:
- Proof-of-concept rewrites that once required a team of five for six months might now be achievable by one or two developers in weeks
- Regression test suites become even more valuable, serving as the objective arbiter of rewrite fidelity
- Language migrations (C to Rust, Python to Go, PHP to TypeScript) become viable where they were previously cost-prohibitive
- Technical debt paydown can shift from incremental refactoring to strategic replacement of entire subsystems
But — and this is critical — passing tests is not the same as being production-ready. Tests validate known behaviour. Production exposes unknown behaviour. pgrust passes 100% of regression tests, but it has not survived a year of real-world traffic, edge cases, and failure modes that upstream PostgreSQL has weathered over decades.
The Rust Factor
pgrust joins a clear trend. In the last twelve months we have seen Bun rewrite its core from Zig to Rust using 64 AI agents, the Rust-powered JavaScript toolchain (Biome, oxc, Rspack) reach mainstream adoption, and now a Rust rewrite of one of the world’s most important databases.
Rust is not just a language preference — it is becoming the target language for AI-assisted rewrites. This makes sense: Rust’s strict type system and borrow checker provide guardrails that catch entire categories of bugs at compile time. When AI generates code, those guardrails matter enormously. A generated C programme might compile and pass tests while harbouring undefined behaviour. Generated Rust code that compiles has already passed a much higher bar of correctness.
For development teams evaluating their own modernisation roadmap, this is worth noting. If you are considering a rewrite of performance-critical infrastructure, Rust’s safety guarantees make it a natural pairing with AI-assisted development.
The Gap Between Demo and Production
We need to be honest about what pgrust is not.
It is not a PostgreSQL replacement. Extensions like pgvector and TimescaleDB are not compatible. It has not been tested under sustained concurrent load. It has not weathered the kind of adversarial conditions — network partitions, disk failures, corrupted WAL files — that production databases must survive. The replication, backup, and tooling ecosystem that makes PostgreSQL operationally manageable does not exist for pgrust.
This is not a criticism. It is the natural state of any v0.1 project. But it is a crucial reminder for any team inspired by this achievement: the last 20% of production readiness takes 80% of the effort, and AI agents are not yet equipped to handle the gnarliest operational edge cases.
The lesson is not “AI can replace your database”. The lesson is “AI can get you to a working prototype faster than ever before, and that changes which projects are worth attempting”.
What Your Team Should Do Now
If pgrust has you rethinking your own legacy systems, here is a practical framework:
- Audit your test coverage. AI-assisted rewrites are only as trustworthy as the test suites that validate them. If your legacy system lacks comprehensive tests, invest there first — that investment pays dividends regardless of whether you rewrite.
- Identify rewrite candidates. Look for subsystems that are well-tested, performance-critical, and written in languages that lack modern safety guarantees. These are your best candidates for AI-assisted rewrite exploration.
- Run a time-boxed spike. Give a developer two weeks and an AI coding agent to attempt a rewrite of a contained subsystem. The goal is not production code — it is learning how AI-assisted development works for your specific codebase and constraints.
- Establish review discipline. The pgrust methodology worked because the developer remained the architect. AI agents generate code; humans validate architecture, security, and operational fitness.
- Budget for the last mile. If the spike shows promise, budget for the reality that moving from “passes tests” to “production-ready” requires significant human engineering effort — security hardening, operational tooling, performance testing under realistic load.
The Bigger Picture
We are watching the economics of software development shift in real time. A year ago, the conversation about AI coding agents was theoretical. Today, one person with 17 agents has functionally replicated one of the most complex pieces of infrastructure software ever built.
This does not mean developers are redundant. Matis is clearly a skilled engineer who made thousands of architectural decisions that the agents could not have made alone. What it means is that the leverage available to skilled developers has increased dramatically. Small teams can now attempt projects that previously required large organisations.
At REPTILEHAUS, we have been working with AI-assisted development methodologies across our projects — from legacy modernisation to greenfield SaaS builds. The pattern we see consistently is that AI agents amplify good engineering practices. Strong test suites, clear architecture, and disciplined code review become more valuable, not less, when AI is writing code at scale.
If you are sitting on a legacy system that is holding your business back, or you are curious about how AI-assisted development could accelerate your roadmap, get in touch. We would love to explore what is possible.
📷 Photo by Chris Ried on Unsplash
