Live data from Hacker News

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

github.com

401–410 of 756 posts

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

#401

Earlier quoted context omitted.

Code is code. It either does the job or doesn't. If there is nothing that could convince you that AI generated code is trustworthy (for whatever definition of trust) then this is an article of faith, not a rational position.

> Code is code. It either does the job or doesn't. Surely that is not the only dimension that matters when evaluating software. Maintainability and readability, for example, are crucial for any long-lived project.

Devils advocate: Are they? Why? If LLM's are capable of taking absolute crap and iterating on it to achieve a purpose, then does readability really matter?

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

#402

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…

I am super curious how you went about the port using LLMs. At $WORK we are looking to port code, preferably with LLMs, and it seems daunting, even with a test suite. Do you have an approach that works well for you?

Bun has an interesting blog post about how it was ported. It did cost a lot, much more than hiring people would cost outside USA.

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

#404

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…

It doesn't sound like you were trying to launch a product, but doing an experiment and someone threw you under the HN-spotlight-bus :) Is this a "see what I can achieve with LLM coding" or is this "build this and see how much of the coding can be accepted from LLMs"?

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

#405

Earlier quoted context omitted.

Or, you know, you can use Postgres. It's right there for you.

why? if a rewrite is better/faster/secure, why not? (I'm not saying PGrust is better, I didnt even install it, my perspective is in general)

Of course, if the rewrite is all of those things, then it seems like a good option. The whole point is how do we know if it actually is better.

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

#406

Don’t understand these rewrites. - typically they are behind a single person. That’s usually bad because of spf - typically they are achieved in a very short amount of time, so the author hasn’t acquired any discipline in creating the project. That means it’s unlikely the author is going to stick to the project in the mid and long term - anyone that wants to contribute to the project needs to pay. Needs to pay tokens…

Everything has to start somewhere

How is that going for Claude's C compiler [0], or Cursor's web browser? [1]

[0] https://github.com/anthropics/claudes-c-compiler

[1] https://github.com/wilsonzlin/fastrender

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

#407

Don’t understand these rewrites. - typically they are behind a single person. That’s usually bad because of spf - typically they are achieved in a very short amount of time, so the author hasn’t acquired any discipline in creating the project. That means it’s unlikely the author is going to stick to the project in the mid and long term - anyone that wants to contribute to the project needs to pay. Needs to pay tokens…

> it’s increasingly difficult to maintain these projects without AI

It's pretty much impossible in a project of this size. IIRC Postgres has over 1M loc.

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

#408
post #282
post #121

Earlier quoted context omitted.

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.

If precision is important then non deterministic AI is simply not a good tool.

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

#409

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.

> I start to see a lot of these re-writes that depend on tests to state that its working. There's another way to validate the rewrite though. Just run both pgrust and postgres and compare the output. Know of an edge case? Run it too. Doesn't know? Use a fuzzer or some automated tool to find interesting inputs. Found an inconsistency? The input/output pair becomes a test case now Not sure if there's tooling for that t…

> Just run both pgrust and postgres and compare the output.

The space of inputs and outputs is infinite. You can't prove programs are the same by "just" testing a bunch inputs.

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

#410
post #372

Earlier quoted context omitted.

A mixture of threads and processes that can be used to match processors, disk I/O, and network interfaces. A very long time ago, there was once a feature called "Data Blades" which tanked a commercial database vendor. A badly behaving blade could bring down the entire database. Most anyone who has been working on databases for a few decades remembers this and makes a point of either not introducing these sorts of fea…

> A very long time ago, there was once a feature called "Data Blades" which tanked a commercial database vendor. I have no idea what this is and a web search turned up Harbor Freight woodworking tools.

My first web search (data blades) turned up harbor freight woodworking tools.

Then I made a second web search: data blades database.

That turned up some ibm database software module technology which I assume is what's being discussed.

Post reply on HN