Live data from Hacker News

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

github.com

281–290 of 756 posts

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

#281
I love llm coding. I don't know what I am looking at here

https://github.com/malisper/pgrust/blob/main/Cargo.lock

What is happening.

No PRs? No Make files? I understand running tests and debugging is the workflow, but where do you log things? How do you orchestrate builds? Etc.

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

#282
post #121

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

For instance, the TypeScript rewrite in Go was done mostly by humans and took a year before it was released. That is how you rewrite software that people can trust.

AI is a great use for this kind of boring, rote translation where precision is important. Humans are quite bad at it and tend to make mistakes. In either case the focus should be on improving testing, not trying to manually verify if the translation was correct by eye.

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

#283

This is impressive - but is a license change, from the PostgresQL license [0] to AGPL [1]. I like the AGPL and think it's the best truly free open source license, but I worry if this is compatible. Ie, if this is rewritten from the original source, should the original apply? (Yes.) There has been a trend to rewrite open source software with a more restrictive license (like coretools in Rust). This looks considerably…

The PostgreSQL License is a variant of the BSD license and is therefore compatible with the (A)GPL.

Comprehend it this way: You create a blank (A)GPL project and incorporate the upstream BSD codebase into it. While those original upstream files remain under their original permissive license, the project as a whole is governed by the (A)GPL (plus the attribution requirements of the upstream license, which the GPL permits). From there, you can add your own code under the AGPL and distribute the combined work under the AGPL.

If someone takes your code and uses only your portion, they can use it under the AGPL alone. However, if they also include the upstream source code, then the attribution requirements of the upstream license must still be met.

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

#284

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?

This seems to be a multi-phased project. First phase (completed) was the re-write in Rust. There doesn't seem to be a performance gain and no significant one should be expected. In a 2nd phase a new architecture is implemented which malisper claims to perform much better. I wished the two phases would have been tackled in reverse order.

> I wished the two phases would have been tackled in reverse order.

Well, tackling them in reverse order would require the humans behind this to develop an actual understanding of the existing code and architecture before starting the project, instead of just asking claude to do it. So, here we are.

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

#286
post #121

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

For instance, the TypeScript rewrite in Go was done mostly by humans and took a year before it was released. That is how you rewrite software that people can trust.

What about human written software makes it more reliable than LLM written software?

is it the craftsmanship, or the deliberate decision making of industry veterans?

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

#287
post #78

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 mu…

> ps. How do you easily get to the first commit in a repo on GitHub? Browsing commit history feels rather tedious

I usually check the history of a file not easily changed like .gitignore.

The first commit seems to be this one

https://github.com/malisper/pgrust/commit/22113dc36b02973060...

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

#288
post #281

I love llm coding. I don't know what I am looking at here https://github.com/malisper/pgrust/blob/main/Cargo.lock What is happening. No PRs? No Make files? I understand running tests and debugging is the workflow, but where do you log things? How do you orchestrate builds? Etc.

`Cargo.lock` is a lockfile machine generated by Cargo. It's similar to package-lock.json. In any case, its machine generated the old fashioned way.

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

#289

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

People feel threatened by LLMs doing things well that they feel should require their skills and talent. That's understandable but it's still a bit of a negative emotion that probably isn't very productive. Or very rational. This thread is full of people trying to argue that this can't be any good, shouldn't be any good, and is clearly going to end in tears. And obviously this thing passing tens of thousands of carefu…

Irrational fear… that's why we all collectively ditched gcc and moved to that llm rewrite made in rust right?

The only one using feelings rather than reason here is you.

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

#290

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

They would need to be rewritten as there is no formal extension API. Extensions can call into almost any part of PostgreSQL.
Post reply on HN