Live data from Hacker News

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

github.com

541–550 of 756 posts

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

#541

Earlier quoted context omitted.

The only good thing to come out of AI.

How is this good? Copyleft licenses are also being ignored.

Patents and copyright stifles innovation. Knowledge should be communal and free.

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

#542

Earlier quoted context omitted.

How is this good? Copyleft licenses are also being ignored.

Patents and copyright stifles innovation. Knowledge should be communal and free.

> Knowledge should be communal and free

I agree, which is why I license my work under copyleft licenses such as AGPLv3 so that anyone has to make their modifications public too.

I think LLMs (especially closed-source models) will make this worse.

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

#543
> rewrite of already popular technology in a different language > look at commit history > "Claude xxx committed yyy ago"

I'm sorry, but what is this need to just vibe code a port of an existing technology to a different language/framework/etc.? If it's just a personal challenge then sure I guess, but this surely can't be used as a real product?

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

#544
post #154

Earlier quoted context omitted.

Yes, that was the point. It made unsafe behaviour visible in a way that could be addressed. I hadn't heard any reports of it being dysfunctional.

I have read up on it again, and while it was entirely dysfunctional at the very early stages, it quickly came up to par or beyond, with the LLM especially helped by the huge test suite written in Typescript, different from both Zig and Rust. However, Jarred still describes a lot of unsafe, and usage of Miri in continuous integration. Funnily enough, RAII is cited as a major benefit of rewriting from Zig to Rust, whil…

The LLMs may have seen larger codebases in Rust, helping them to cope better.

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

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

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

#546
Is the 300x performance boost attributable to the threading model vs process model?

Was the code for the threading model written by hand or was it translated from the WIP threading model the human PG team is busy with as part of the 2028 roadmap?

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

#547

Earlier quoted context omitted.

It's not enough to do a rewrite. Someone has to maintain it. Such a huge codebase with literally zero experts is unmaintainable. There is no one who knows how the internals work. Sure you could keep vibe coding it but I wouldn't bet my data on that. A database needs to be rock solid.

This seems to be the issue with using LLMs for any code generation. Even with my own code bases that I've written entirely by hand over years, if I use AI to implement anything, I don't go through the mental model of architecting it, so I don't know how it works. I can only imagine this to be far, far worse for large code bases maintained by a team of people who are all using AI.

That depends on the language you are using. Some language communities had already rejected "architecture astronauts" before LLMs were born, so the training data was highly consistent, which has lead to LLMs being highly consistent in their output. You know how it works because the LLM spits out the same as what you would have written yourself. It's almost eerie that they can do that.

Unfortunately that doesn't apply to all languages. LLMs are especially bad at producing code for the languages that were historically known as beginner-friendly as the training data was full of code by beginners doing what beginners do. All bets are off if you get stuck there. (Although maybe you could use an LLM to translate your code to a language that LLMs are good at!)

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

#548
post #322

Earlier quoted context omitted.

In this case it's justified because Rust allows safe implementation of threaded code. Current Postgres is per-process. Switching to threading yields performance improvements.

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

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

#549

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…

Awesome work. I'd love to see you add something like kusto query language or pql. The autocomple on kusto, (which can be embedded into web apps) is really amazing.

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

#550

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…

> build a better version of Postgres Faster is quantifiable. How do you measure better ?

[flagged]
Post reply on HN