Live data from Hacker News

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

github.com

471–480 of 756 posts

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

#471
post #316
post #250

Earlier quoted context omitted.

Some of this post reminds me of a story I heard long ago from someone who had worked at a HW/SW company. They’d transferred an engineer from the ASIC design team to the OS kernel team, though he’d never been on a software team before. After a while the manager called him in for the following conversation: Manager: You’re doing amazing work — zero bugs in production! I’d like you to mentor the other SWEs on how to get…

Funny story but in my experience hardware engineers produce some of the worst software of the industry. Of course there must be some hardware engineers out there who do hood software but generally what they build are disasters.

I know it’s a typo, but I love the idea of “hood software” lol

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

#472
post #97
post #14

Earlier quoted context omitted.

> not mostly the test, but the real world production scars Most extensive test suites are exactly production scars: every time you have a bug or a regression, you write a test that confirms correct behaviour. SQLite is a good example to bring up because its extensive closed-source tests are what’s often cited as being what keeps people from forking it. (Turso did it, though, but it takes a company to deliver some gua…

very naive. the runtime behavior of a rewrite should be significantly different in all kinds of unpredictable ways nobody see coming or might expect. It is a combination of language semantics, compiler behavior, operating system behavior, file system behavior, driver behavior, ..

yea, I found LLMs poor at reasoning through system-wide behaviors. Good luck to the vibers when they try to rootcause a rare data-corruption problem. They will hand it off to fable which will attempt trial-and-error bug fixes which will eventually muck up the code. What happens then ?

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

#473

Earlier quoted context omitted.

If it's a choice between performance and being able to "safely" run sketchy extensions, I'd rather have performance.

You could fix probably the sketchy extension issue with WASM.

Limit, not fix.

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

#474

Earlier quoted context omitted.

If it's a choice between performance and being able to "safely" run sketchy extensions, I'd rather have performance.

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…

Informix. Michael Stonebraker, to his credit, learned a lot along the way and revised his thinking about database technology and capability after believing that a single engine could be good at everything.

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

#475
post #44

I am not trolling, but I have a simple question: Why? Why do I use this instead of the official build? What is the business case?

(I'm working with malisper on this), we are now focusing on improving many things about postgres! Some we have written about before [0], and we have much more in mind too. Malis wrote another comment about analytical workloads being 300x faster now than postgres for a version we're working on right now Aiming for postgres compatible database with a 2026 architecture [0] https://malisper.me/the-four-horsemen-behind-th…

Wondering if its possible to backport performance improvements into upstream. Should be a big deal.

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

#476
post #451

Earlier quoted context omitted.

In that case they need to document the process and workflow, and demonstrate the care that was taken.

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. Like it, use it, don’t like it, don’t use it.

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

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

#477

Earlier quoted context omitted.

But that's the thing, without the decades of work, it wouldn't BE trivial. Everyone is standing on the shoulders of those which came before. If LLMs allow us to combine the incredible decades of effort and knowledge and experiences that's gone into building something as great as Postgres, and take that and combine the experience and philosophy that has led to the creation of a language that potentially provides tangi…

But who is getting celebrated? The people who spent a lot of time on the original thing, or the AI rewrite that everyone now uses?

I mean, all of it? Maybe someone born post rewrite will think wow AI made a cool thing but nobody is going whoa Postgres is made purely by AI?

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

#478
post #437

Earlier quoted context omitted.

Note that most of the unsafes are confined to the parser which was generated by running c2rust over the Postgres parser. The Postgres parser is itself generated from yacc/bison, so I decided to port it over mechanically rather than idiomatically. If there's particular unsafes that you think are egregious, let me know.

Just wanted to say: I'm thoroughly impressed with how far in the weeds you're replying in this comment section. I'm learning a lot from the threads.

Thank you!

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

#479
post #465

The WebAssembly demo that runs in your browser is a really neat touch: https://pgrust.com

Thank you! I'm a big fan of your writing. I wanted to make sure there was something people could try out so I could show pgrust was real and not vaporware.

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

#480

Earlier quoted context omitted.

How many engineers does it take to fix a bug? Hardware Engineers: "None. We'll fix it in firmware." Firmware Engineers: "None. We'll fix it in software." Software Engineers: "None. We'll document it in the manual." Technical Writers: "None. The user can figure it out." etc.

While I get the joke, as a technical writer, you might be surprised how often I've found myself as a defacto QA engineer: Me: This is what you said it does, and this is what it actually seems to do. Which one is right? Engineer: Shit.

Very carefully - and I mean extremely carefully - word it so that it describes what it does, while implying what it should do without confirming that it actually does that.

Also helps if you fix the bug or change the behavior, the docs are still technically correct. I'm only partially kidding, I swear I've seen this a million times in documentation I read.

Post reply on HN