Live data from Hacker News

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

github.com

571–580 of 756 posts

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

#572
post #560
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…

I started by looking at the dependencies. Then I lost count, so I ran wc -l Cargo.lock 1467 Cargo.lock Easily over a thousand dependencies. And "rewritten in Rust" is supposed to be a good thing? I bet this doesn't even compile faster than the original.

Do you pick your databases based on how quickly they compile and how many dependencies they have? I normally chose based on factors like performance and reputation for reliability

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

#573

Hey author here. Wasn't expecting to see this up. To concisely give an overview of the project, I've been experimenting with using LLMs to build a better version of Postgres. Postgres is 30 years old and we've learned a lot about databases since hten. A lot of the techniques that work for doing a rewrite are also useful for doing a rearchitecture. I'm now working on a new, not yet published version of pgrust that inc…

How much of the performance gain is from using Rust, compared to using optimizations that are not done in the original PostgreSQL code (like using threads instead of processes, etc.)?

I am simply curious what the benefits of using Rust are in this instance.

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

#574
post #548

Earlier quoted context omitted.

> Current Postgres is per-process. Switching to threading yields performance improvements. Please describe in detail what you believe this means and the mechanism by which switching from processes to threads improves performance.

There are hundreds of comment chains about this already, go troll somewhere else.

If you’re going to make a confident blanket claim, be ready to back it up - and asking for clarification is not trolling, by the way. You should be ready to engage in technical conversations if you want to make technical claims.

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

#575
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.

I am fully aware what Cargo.lock is. What I am surprised at is how many dependencies there are.

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

#576
post #545
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.

> I love llm coding. I don't know what I am looking at here There might be some correlation here.

I am fully aware what Cargo.lock is. What I am surprised at is how many dependencies there are.

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

#577
It's so great. One thing that I'd like to be changed in PostgreSQL, which may be done in this rewrite, is resigning from the "one connection = one process" design choice and instead handle the connections using threads/tasks within the main process.

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

#578
post #576
post #545

Earlier quoted context omitted.

> I love llm coding. I don't know what I am looking at here There might be some correlation here.

I am fully aware what Cargo.lock is. What I am surprised at is how many dependencies there are.

Sorry, the wording confused me.

The project itself seems to be structued around 1.4k micro-crates[0] which I admit is a bit weird. Rust's compilation unit is the crate unlike C's per-file compilation unit, so if this was a 1:1 AI-assisted translation from the original Postgres source this might be an artifact of the translation.

[0] https://github.com/malisper/pgrust/blob/main/Cargo.toml

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

#579

Earlier quoted context omitted.

Free and communal knowledge means you're easily replaceble by someone else. I wonder what communal answer you have for someone who would say, "moi2388, your work will be now done by moi2389. Thanks and good bye."

The alternative is that you are not easily replaceable, which means that moi2389 is the one who doesn't get to do the work. Which is good for moi2388, perhaps, but what about moi2389? Either way someone is going to be left out in the cold.

moi2389 should research the market and create a new value, not replace someone else by providing the same value.

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

#580
post #570

Earlier quoted context omitted.

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…

I can't see the achievement here.

100% of the tests passing, on track to be faster and more scalable. That's not a trivial achievement.
Post reply on HN