Live data from Hacker News

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

github.com

531–540 of 756 posts

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

#531

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…

300x is mostly a marketing term, especially without the test description.

BTW, showing no respect to what it is trying to copy looks uncomfortable.

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

#532
post #339

Earlier quoted context omitted.

With programs large enough tests aren't going to ever be enough. Formal verification might work, but then who checks the specification for bugs?

In the case of rewrites, the specification is the original behavior, no? bugs and all.

Deciding if two programs do the same thing is provably impossible in the strict mathematical sense.

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

#533
post #58

Earlier quoted context omitted.

Because it’s uncomfortable to see decades of work copied so trivially.

Imagine the feelings of a dude who used to code in assembly and then some punk writes in c++ and uses gcc... decades of work wasted.

They typically respect software licenses and thus comply with the original software's wishes.

LLM companies steal the original work and LLM users dont even know where the replicated code was lifted from or how it was licensed.

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

#534

Porting perfectly working C code that has been in production for decades (and has a great track record wrt to security fixes) to rust is more or less an obfuscation challenge.

Chuckled at the anti-climactic sentence ending! lol

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

#535

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…

You seem to have the restrictiveness backwards? The MIT license (uutils coreutils) is less restrictive than the GPL (GNU coreutils), and the AGPL is more restrictive than the PostgreSQL license. And it doesn't violate the PostgreSQL license to license the rewrite more restrictively. That's part of what makes MIT-style licenses less restrictive than the GPL or AGPL: they allow for more-restrictive relicensing.

Perhaps ‘restrictive’ was a poor choice of words. ‘Less free’ in the free-software sense.

I’m still putting together my thoughts on various open source licenses especially as we see automated AI rewriting.

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

#536
post #33

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.

Often the biggest blocker on moving to a new programming language, is the cost of re-writing everything. Cue some story here on a bank or airline somewhere still relying on cobol backend servers. These LLM conversions really seem to make modernization of large parts software layers possible!

At the same time that was ever the only reason for moving to a new programming language: abandoning all the bad ideas and craft that had accumulated in the previous language ecosystem. Needing to rewrite everything meant starting from a clean slate, allowing the new systems to be designed for the new age, making everything in that new language feel sleek and modern and thus appealing. Of course, as time progresses even the new language starts to accumulate bad ideas and cruft, historically necessitating yet another language to offer the clean slate again.

If the code is going to be translated forward instead of abandoned and then rewritten, as is now completely viable via LLM, there is no reason to move to a new language at all.

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

#537
post #451

Earlier quoted context omitted.

Quite amusing we have decades of human written code much of it sub standard and yet no one demanded proof till now of Open Source projects having to ‘demonstrate’ anything. If ya don’t wanna use it, don’t. Simple.

I get what you’re saying and agree with the last sentence. Just wanted to touch on the “why” part. In the world of exclusively human written software the existence of the artefact itself (code, documentation) served as the proof that there’s someone with half a brain behind it. Now that’s not the case anymore. The conclusion stays though - it’s OSS, authors/maintainers have no obligation to anyone to do anything. Lik…

> As for me, I’ve found that the community and activity proxies are still good.

Definitely still something to look into. A project I'm checking in on from time to time is https://github.com/emdash-cms/emdash/.

It will be interesting to see how the project activity is unfolds? Are people using it in production. How many errors do they find. What do those fixes entail. What happens with the docs over time. Etc.

I haven't had a change to look in depth, but based on a quick glance I'd say that the activity on the project seems like the tempo you'd expect of a similar open source project.

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

#538
post #237
post #90

Earlier quoted context omitted.

I've also seen situations where a customer reports a bug, the fix breaks some regression, and the updated behavior to work around the fix breaking the regressions turns into an undocumented feature.

How do you break a regression? A regression is breakage. Are you one of the people who use "regression" to mean "regression test"? Did Codex learn this from you? I hate it.

Yeah, sorry, it was a codebase with _only_ regression tests dating to the 80s, so we called everything a "regression".

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

#539
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…

In general (I’m not saying this is the case with this project) if you don’t have their prompt history and you can’t re-run the LLM “compilation” yourself, is it open source? It feels a bit more like those “source available” projects where you can read the code but don’t have access to the build system. On the other hand, aside from the commit messages, one didn’t ever have access to the underlying thought process of…

What an incredibly bad take. "It's not open source because we have the source but not the thought process of the developer" - well then no project on this earth is truly open source by your definition.

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

#540

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

Agreed, the negativity here is quite wild.

There are new power tools for our craft. People are experimenting and having fun with said power tools, and have interesting results that may be transferrable to $YOUR_PROJECT.

Doing things just because we can is a great reason for hacking around.

Kudos for the author for answering questions and keeping up resilience - HN crowd is not what it used to be (shakes fist at a different cloud).

Post reply on HN