Live data from Hacker News

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

github.com

691–700 of 756 posts

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

#691
post #104
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…

Vibe code was never meant to be reviewed. These rewrites are just test-driven development taken to the absolute extreme. Created under the hope that the existing tests are exhaustive and cover every relevant use case, such that if they all pass, the rewrite must be at least as good as the original. So just go with the vibes and burn tokens until they pass, and your job is done. In practice, this is never true for any…

> Vibe code was never meant to be reviewed.

It was also never meant to hit production.

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

#692
post #158

Earlier quoted context omitted.

The challenge is that more and more people are producing project like this - 1,000s of commits and > 200k lines of code - and saying it was carefully created using agent based workflows and not vibe coded.

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

spec-driven development is pretty good at this

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

#693
post #558

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.

I don't know if converting the code could be an issue with copyright, but might be contrived as plagiarism

oh no.. will they get grounded?

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

#694

Earlier quoted context omitted.

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

If a dependency gets compromised, that’s a problem. If you have thousands, you increase the odds vs if you have one.

You can also depend on a lot of libraries that have potentially high quality rather then writing a lot yourself. The defense against compromised dependency can't be 'Ill write everything myself and do it with the same quality as the ecosystem'.

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

#695
post #262

Earlier quoted context omitted.

A thread per connection is a almost always the correct decision for performance, but by choosing a process per connection, postgres is able to let you load whatever sketchy extensions you want. Worst case you crash the process, not the database. It would be nice if you could strike a balance so a segfaul in the extension only crashes a small percentage of connections, not the whole thing.

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

Especially since all those sketchy extensions can be rewritten in rust over a weekend and have their bugs fixed as well.

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

#696

Earlier quoted context omitted.

In the age of vibe-generated code, I promise you're gonna want the safety.

What about just not installing sketchy extensions?

I know right? Postgres is not firefox, we don't operate with 25 extensions on all the time. At most we have 1 and normally we have 0.

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

#697

Earlier quoted context omitted.

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

“Does the job” means all of those things. Figure out what’s important, find a way to measure it (could be also be qualitative.) How does the AI generated code do? If you simply say its no good because of the way it was created, it’s not a rational decision process.

That's a straw man. My argument isn't about 'the way it was created'; it's about the point I clarified in my previous comment. If you want to discuss that, great, but calling my take irrational based on an argument I didn't make doesn't make sense (when your position is “YOLO to AI”). To reiterate — Trust is the core of my argument, and there’s no trust without human ownership and proof of work/understanding yet (possibly ever).

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

#698
post #374

Earlier quoted context omitted.

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

What about extensions that are not sketchy? Lots of good ones out there.

People are assuming the extensions can't also be rewritten to be good.

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

#699

Earlier quoted context omitted.

It wasn’t written by a mechanical process, though. It was ported (translated) from an existing creative work into a new language. Surely you wouldn’t say a Spanish translation of a Harry Potter work is in the public domain while the original work is under copyright?

I would agree with you but for the author’s attempt to publish it under a new license. I think they can either claim it’s a new work (in which case it’s public domain) or claim it’s a derivative work (in which case I don’t think they can change the license). I imagine a court would call it a derivative work if tested.

Things get released as GPL or AGPL that were originally BSD or MIT license all the time. The terms of the copyleft license include all the terms of the attribution licenses. Whether this is a valid thing legally I’m not sure but it doesn’t seem anyone’s challenged it. BSD code is often found in closed-source proprietary products as long as the required attributions are met and the original contributors are understood not to be held to any responsibility or warranty.

The licenses tend to say unmodified or modified copies can be redistributed in source or binary form “provided that the following conditions are met”. Relicensing the code in a way that guarantees those conditions are met has been the accepted thing to do in the community for years - whether that’s GPL/LGPL/AGPL or a proprietary license.

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

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

Like most modern languages, Rust has its own build system and package manager, Cargo. Everything you're referring to relates to that, and has nothing to do with LLM coding.

Edit: saw the clarification in another comment. But, in that case the essential point seems to be "I'm not familiar with something, therefore it's suspect."

Post reply on HN