Postgres rewritten in Rust, now passing 100% of the Postgres regression tests

SweetSoftPillow 526 points 466 comments July 09, 2026
github.com · View on Hacker News

Discussion Highlights (20 comments)

juliangmp

I feel like we need to heavily differentiate between a rewrite and an AI rewrite.

gingersnap

I start to see a lot of these re-writes that depend on tests to state that its working. But the things that make software like Postgres and SQLite reliable are not mostly the test, but the real world production scars. That's where the reliability comes from, years and years of running in production.

tormeh

Woah! AGPL? That's interesting. I think Postgres has shown an open source SQL server didn't need a copy-left license to develop sustainably, so I'm not entirely aure about that, but I do like the license in general.

satvikpendem

We had one for SQLite (which is SQL-ite btw, not SQ-Lite which doesn't make any sense) via Turso, no wonder we see the same for Postgres. Personally I do want to see libraries be in as much memory safe languages as possible.

mebcitto

Does it support the extension ecosystem? Or would extensions need to be rewritten as well?

theplumber

I think we will actually see some successful projects coming out of this. There are definitely people who want x old project in this new/better programming language and who are willing to put effort into maintaining it not just doing one off port.

ZiiS

What would be interesting is if they found a memory unsafe bug. Postgres is a perfect case study of 30 years of C with a bit of CPP; if rewriting in a safer language didn't find anything...

ronfriedhaber

The great Jarred Sumner pulled it off with bun, whether it can be pulled of with Postgres is an open question.. DST systems such as Antithesis can definitely help.

empiricus

Now which one is safer? A new Postgres written in Rust, or the original real world tested Postgres?

flanked-evergl

What is the future of this? Code is not the same as a viable open-source project with a community, contributors, advocates, users and funding, even if it's perfect code. Even though I'm sure it won't be easy to convince the Postgres project to switch to Rust, I do think that trying would be time better spent.

ottavio

Why should a developer use this for anything beyond a pet project? Just because it is written in Rust? All these "rewritten in rust" projects only reinforce the idea that a significant part of the rust community consists of software talibans and not of engineers who must deliver something that works and is reliable over time.

voidUpdate

I wonder how long this will be maintained for...

pknerd

I am not trolling, but I have a simple question: Why? Why do I use this instead of the official build? What is the business case?

josefrichter

Why so much negativity? I find these projects interesting for learning purposes and exploring new ways. What’s wrong with that?

queoahfh

What a peculiar kind of rewrite. Rust: https://github.com/malisper/pgrust/blob/3646a73515a5e4ac7d0b... Original: https://github.com/postgres/postgres/blob/df293aed46e3133df3... Usage: https://github.com/malisper/pgrust/blob/3646a73515a5e4ac7d0b... The return type in the rewrite is both some sort of Error tagged union that supports the Try machinery in Rust; but, it also contains a boolean that apparently must be checked; or something. It seems labyrinthical and possibly broken and terrible.

znpy

Is this another llm-driven rewrite? I wonder how many "unsafe" blocks are in there...

eu-tech-tak

How is the performance compared to regular PostgreSQL? I know it says it is not performance optimized yet, but if this succeeds, will it only bring more "memory safety" or is there a serious performance gain as well?

dirkc

How would one go about reviewing a piece of code like this? One of the things I'd typically do is peek at the commit history. Seeing what people worked on and how they did it tends to say a lot about a project. But with LLMs generating 7101 commits in less than a month that isn't feasible. Even looking at a single day is way too much [1]. It probably also doesn't make sense since the commits content won't tell you much anyway. ps. How do you easily get to the first commit in a repo on GitHub? Browsing commit history feels rather tedious [1] - https://github.com/malisper/pgrust/commits/main/?since=2026-...

cyberjar

I'm starting to get a bit of fatigue for these projects that boil down to just "I asked Claude to re-write this code into a new language that's in vogue right now!" I really don't understand why this is needed outside of an opportunity to show how impressive LLMs can be when working within large codebases, but even then people in the comments are finding bizarre implementation choices that a human developer wouldn't make. I'll stick with Postgres and its - gasp - C implementation for now, thanks.

scotty79

Rewrites in Rust are kinda impressive. This language with its move semantics and close ownership tracking is very different from every other language. To create a rewrite in it, you have to rearchitect the code. There is not as much freedom there when it comes to where to keep what and where you can pass what as it is in other languages.

Semantic search powered by Rivestack pgvector
14,015 stories · 131,331 chunks indexed