14 ms·
Postgres rewritten in Rust, now passing 100% of the Postgres regression tests
- PeterStuer 3mo agoLet's hope it did not special case (overfit) for the specific tests. One of the failiure modes that in my experience takes the most effort to mitigate for.
- juliangmp 3mo agoI feel like we need to heavily differentiate between a rewrite and an AI rewrite.
- mrklol 3mo agoI agree but I think from Bun we learned that a project with really good tests and enough tokens can be converted from one language to another quite good!
- colordrops 3mo agoIs there any measurable difference in quality between the two, or are you just going on "vibes"? Is there a correlation between the quality of the manually written code and AI generated code driven by the same dev? Such crude takes only cause unnecessary friction. If you have a black box that spits out code, and you are unable to distinguish the quality between a top tier dev and an AI inside the black box, then the distinction is unnecessary. Most of the code on the internet is already a black box to you. What percentage of code running on your machines have you vetted by who wrote it and code quality? AI coding isn't going anywhere and will likely end up generating most code going forward so instead of rejecting it outright or arbitrarily categorizing it we need to focus on solid quantitative and qualitative measures of code and functionality regardless of who wrote it.
- queoahfh 3mo agoDidn't the initial rewrite of Bun into Rust have an ocean of "unsafe" in it, and wasn't it entirely dysfunctional?
- Leynos 3mo agoYes, 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.
- iigijshaba 3mo agoI 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, while C++ already has RAII. I wonder if C++ and Rust are more suited to larger programs than Zig, unless the architecture in Zig is handled carefully.
- andy_ppp 3mo agoThe LLMs may have seen larger codebases in Rust, helping them to cope better.
- kzrdude 3mo agoThere's still no release of rust-bun so then it might just not exist (until it proves itself).
- pohl 3mo agoYesterday we learned that it’s been shipping with Claude Code since mid June, so it has a lot of active users already. Also, the unsafe footprint seems reasonable — the bulk of it in FFI wrappers.
- dwedge 3mo ago> Is there a correlation between the quality of the manually written code and AI generated code driven by the same dev? If the dev doesn't vet the code, it doesn't matter how good quality a dev they would be if they wrote the code - they didn't. Sure, the dev would probably drive the initial architecture discussion better and some people are using AI in small batches with tests and vetting everything, but some previously great devs are throwing in PRs that touch hundreds of files at once with one commit. A lot of people I previously considered great developers have become people I would not recommend for a job in the past 2-3 years. > If you have a black box that spits out code, and you are unable to distinguish the quality between a top tier dev and an AI inside the black box, then the distinction is unnecessary. Sure, but this is just begging the question. If nobody could tell, the term 'slop' wouldn't have become so popular.
- colordrops 3mo agoYou must be replying to a different comment. Seems completely unrelated to what I wrote. I never claimed that there wasn't AI slop. My point is that there are different levels of code coming out of AI, both due to the quality of the model and harness, and the quality of the engineer that is driving it. Thus you can't just bucket all AI developed code the same. 100% there is slop created by humans and really solid code bases generated by AI driven by a meticulous developer. You are making the exact error I was addressing, which is bucketing all AI code as the same.
- dwedge 3mo agoI quote-replied to your comment, so I doubt it was unrelated. > I never claimed that there wasn't AI slop No, but you implied that a top tier dev doesn't produce slop when using AI. > If you have a black box that spits out code, and you are unable to distinguish the quality between a top tier dev and an AI inside the black box My point was that "if" is doing a lot of heavy lifting here and you're coming very close to begging the question. > bucketing all AI code as the same. Most people are not "top tier devs" and over time this will probably become more true. Even if I accepted your premise that "top tier devs" only generate solid code bases with AI, the ease of entry and the ease of spitting out thousands of lines of code means the ratio of bad AI to good AI will not go in a good direction unless it becomes too expensive for non "top tier devs" to use. Given this, I think it's fair to assume AI code is low quality until proven otherwise.
- lenkite 3mo ago> Is there a correlation between the quality of the manually written code and AI generated code driven by the same dev? Aren't you making a strawman argument ? AFAIK this project is not made by an official PostgreSQL core developer, so the entire premise of your argument is invalid.
- colordrops 3mo agoI phrased that improperly which made you and probably others misunderstand. What I meant is, is the quality of AI generated code correlated with the developer? The answer is yes, a bad dev will absolutely produce worse code using AI than a good developer - the point being that there isn't just one level of quality of code coming out of AI, even with the same model and harness.
- mebcitto 3mo agoNot sure it’s so simple. I think close to 100% of new ambitious projects are going to leverage AI at least to some degree. I know a couple that have strict no-AI policies (e.g. Zig), but it’s a tiny minority i think. So how much AI usage does it make it an “AI rewrite”?
- Dormeno 3mo agoWhen the majority of the code is written by AI, it is more than 50%.
- guenthert 3mo agoDunno. I got rather the impression that it's ambitious single-developer projects with no intention of maintenance which leverage those 'AI' code generators the most. Who wants to contribute to an unmaintainable code base?
- lowsong 3mo ago> I think close to 100% of new ambitious projects are going to leverage AI at least to some degree. Once the free money dries up that number will rapidly tend towards 0%. > So how much AI usage does it make it an “AI rewrite”? Any amount.
- baq 3mo agoIt’s just a build step now.
- satvikpendem 3mo agoIt is more and more the future. No human would want to rewrite one technology to another because it is too marginal a gain. AI on the other hand does not give a shit.
- Zecc 3mo agoYou underestimate what people are willing to do just for fun.
- dawnerd 3mo agoYeah like what do they think the people porting doom to everything possible are thinking?
- queenkjuul 3mo ago> No human would want to rewrite one technology to another Except for when they do, like the new TypeScript...
- satvikpendem 3mo agoThat was before good end to end models though, they started it in 2024 where it was in 2025 that models were capable of long term continuous work.
- bozdemir 3mo agoI'd %100 prefer an opus 4.8 rewrite over %99 of the time. Unless Fabrice Bellard is rewriting the stuff I need, I'd prefer AI over a human coder.
- raincole 3mo agoOr, you know, you can use Postgres. It's right there for you.
- bozdemir 3mo agowhy? 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)
- OtomotO 3mo agoAI is an average coder. It was trained on all code the code that could be found. Not just code written by genius programmers like Carmack and Bellard. Given that it's average, I'd prefer a human coder above average :)
- piker 3mo agoWhich you will necessarily have if they’ve completed a Rust rewrite.
- bigupthewhole 3mo agoYou haven't been using AI extensively I presume... I've been programming a long time and considered myself among the top in my domain and AI agents using like GPT 5.5 etc. are much better than me.
- jatins 3mo agorewrites feel like an area where LLMs are better suited than humans imo It’s mostly grunt work and LLMs are well suited for translation tasks (iirc transformers arch was originally invented for translation)
- silon42 3mo agoIt's not that... It's a rewrite by project maintainers vs a fork.
- maxloh 3mo agoFor 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.
- rjh29 3mo agoAI 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.
- IsTom 3mo agoWith programs large enough tests aren't going to ever be enough. Formal verification might work, but then who checks the specification for bugs?
- copperx 3mo agoIn the case of rewrites, the specification is the original behavior, no? bugs and all.
- cyphar 3mo agoI really wonder where all of these people who believe that tests perfectly encapsulate the behaviour of software come from. Maybe it's because LLMs happen to work better when you give them acceptance criteria and people struggle to distinguish between "better" and "good"?
- egorfine 3mo agoWe already have a well established term for AI rewrites.
- byzantinegene 3mo agoA human rewrite without maintenance is just a hobby project. An AI rewrite is just wasting tokens for god knows what?
- langs 3mo agonope. any rewrite will be an AI rewrite soon.
- gingersnap 3mo agoI 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.
- hk__2 3mo agoThe test suite is the result of these years of years of running in production. Every time you fix a bug, you add a non-regression test to ensure you don’t break it again.
- kstrauser 3mo agoIn a project like PostgreSQL, those scars are reflected in unit tests demonstrating that they’re fixed. It’d be hard to pass its test suite and not be as robust as the original.
- dwedge 3mo agoSure but these scars/tests are from the original implementation. Just because it doesn't have issues there doesn't mean it didn't bring its own set of issues
- kelnos 3mo agoPassing a regression test suite only proves that those particular regressions aren't present. It proves nothing about robustness beyond that.
- ShinTakuya 3mo agoThis is all well and good in theory, but the number of times I've seen tests that don't actually test what they say they're testing is hard to count. Yes even when you encourage the developers to ensure the test fails first and do TDD. Tests help you ship with confidence but there's usually at least a few that are just passing by pure luck. So no, I wouldn't judge a rewrite as being equal just because it passes the tests. That said, I don't think that means you shouldn't do it. You just have to be pragmatic about it.
- tormeh 3mo agoWoah! AGPL? That's interesting. I think Postgres has shown an open source SQL server didn't need a copy-left license to develop sustainably, so I'm not entirely aure about that, but I do like the license in general.
- Ameo 3mo agoWhen the software consists entirely of ~$1000 worth of Claude credits and ~40 hours of developer time prompting and curating it, literally what does it matter what license the resulting 100k LoC artifact is provided under? Copyleft and the whole software licensing ecosystem only matter when producing that software actually requires serious human effort and dedication.
- ncruces 3mo agoAlso can the code even be copyrighted? For my machine translation of SQLite to Go I added this to the README as to licencing: Most of the code here is machine translated using wasm2go. As such, the original authors retain copyright and the original licenses remain in effect. Everything else is licensed under MIT-0. The translator (wasm2go) has a licence chosen by, and a copyright notice from, me. Makes no sense for the translated code.
- wasting_time 3mo agoI do the same for translated code. It's not creative work which is a prerequisite for being copyrightable. And avoid relying on direct LLM output for actual work to make sure I don't accidentally include some regurgitated snippet from an incompatible license. It helps that LLMs struggle to write good, idiomatic code in my language of choice.
- marcus_holmes 3mo ago> Copyleft and the whole software licensing ecosystem are only applicable when producing software that actually required human effort. Fixed that for you. Code generated by an LLM is not copyrightable (because copyright only protects human effort), so the codebase is automatically public domain and cannot be licensed at all. They could theoretically copyright the prompts that they used, but as that's not part of the output, and the output doesn't deterministically arise from those prompts, they'd struggle to use that to back a copyright claim.
- satvikpendem 3mo agoWe had one for SQLite (which is SQL-ite btw, not SQ-Lite which doesn't make any sense) via Turso, no wonder we see the same for Postgres. Personally I do want to see libraries be in as much memory safe languages as possible.
- dxdm 3mo agoHow do you know it's not SQL-lite with the single L serving a double role? Common pronunciations allow you to stay perfectly ambiguous about where the L goes, which aligns quite well with the name as spelled. If you do it right, nobody can tell if you're saying sequel-ite or sequel-lite or seque-lite on the one hand, or S-Q-L-ite or S-Q-L-lite or S-Q-lite on the other. AFAIK there is no official word on how the name is intended to be read or said.
- richie_adler 3mo agoRichard Hipp says he doesn't care how anybody pronunces it. That said, he pronounces it "S-Q-L-ite".
- satvikpendem 3mo agoBecause the creator himself said it's an -ite suffix similar to minerals like bauxite, not -lite.
- dxdm 3mo agoInteresting, thanks for mentioning that. I've always wondered about the origins of the name, never found anything, but now with your mention of "mineral" I was able to find this: > (Hipp) How do I pronounce the name of the product? I say S-Q-L-ite, like a mineral. > But I also hear a lot people say, "Sequel lite and SQL lite." You know, I don't care. Whatever comes off of your tongue easily is fine with me. > (Q) But the official correct way is S-Q-L-ite? > (Hipp) Yes, like a mineral. https://www.listennotes.com/podcasts/the-changelog/why-sqlite-succeeded-as-a-jd19NIvmFUS https://www.listennotes.com/podcasts/the-changelog/why-sqlit... So, he means SQL-ite, but doesn't want to proscribe this as the only way people should say it. I like all of that. Maybe we should follow his example.
- mebcitto 3mo agoDoes it support the extension ecosystem? Or would extensions need to be rewritten as well?
- ZiiS 3mo agoThey would need rewriting (a few are included)
- malisper 3mo agoIt is theoretically possible to have a Rust port of Postgres support extensions. If you make all the relevant functions and structures ABI compatible with Postgres, extensions should work. The issue is the moment you're dealing with C pointers and C strings, pretty much all the code you have to write is unsafe.
- mebcitto 3mo agoPerhaps pure pgrx extensions would make sense as a first target?
- jeltz 3mo agoThey would need to be rewritten as there is no formal extension API. Extensions can call into almost any part of PostgreSQL.
- minraws 3mo ago[dead]
- theplumber 3mo agoI think we will actually see some successful projects coming out of this. There are definitely people who want x old project in this new/better programming language and who are willing to put effort into maintaining it not just doing one off port.
- ZiiS 3mo agoWhat would be interesting is if they found a memory unsafe bug. Postgres is a perfect case study of 30 years of C with a bit of CPP; if rewriting in a safer language didn't find anything...
- whatever1 3mo agoYou are exactly right. There is no freaking way there was no unsafe behavior in a code case of the size of Postgres. In fact from a porting effort this is the first blog post I would expect. Not that the hey we successfully did it.
- derdi 3mo agoI would expect Postgres to be heavily tested with things like Valgrind and various sanitizers. I'd be surprised if there were low-hanging fruit. But also, if there is code that does something fishy with pointers, wouldn't the AI likely paper over it by adding an unsafe block in the Rust version, preserving the same fishiness? It's hard to know how hard it would try to prove that the original is broken.
- pknerd 3mo ago> What would be interesting is if they found a memory unsafe bug They will ask relevant Claude skill.md
- groundzeros2015 3mo agoC programmer have learned how to deal with memory problems and have whole suites of tools for finding them. Is it cheaper to find them at compile time rather than runtime? Yes. But it’s not an unsolved problem. Memory bugs are a known unknown.
- addedGone 3mo agoexcept that lately we've had a ton of CVE related to memory, so in practice it's not exactly right.
- deleted 3mo ago
- ronfriedhaber 3mo agoThe great Jarred Sumner pulled it off with bun, whether it can be pulled of with Postgres is an open question.. DST systems such as Antithesis can definitely help.
- empiricus 3mo agoNow which one is safer? A new Postgres written in Rust, or the original real world tested Postgres?
- raverbashing 3mo agoAlso, are they calling it Postgrust?
- reddit_clone 3mo agoThat made me laugh. This thread is enumerating all the same talking points of both sides.
- flanked-evergl 3mo agoWhat is the future of this? Code is not the same as a viable open-source project with a community, contributors, advocates, users and funding, even if it's perfect code. Even though I'm sure it won't be easy to convince the Postgres project to switch to Rust, I do think that trying would be time better spent.
- ottavio 3mo agoWhy 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.
- alex_duf 3mo agoI think this shouldn't be taken too seriously, from what I understand it's an exploration of what's possible with today's LLMs. You're right to talk about the trend though, because what it shows is how the cost of re-writing well covered project has completely crashed, so that in itself is a learning.
- oblio 3mo agoThe cost of surface level rewrites has crashed. Which will probably cover 80% of cases. Caveat emptor on which side your project falls.
- ottavio 3mo agoI have no issues recognizing that I had memory-related problems in production (I program embedded systems in C). But most of my issues were related to concurrency and data sanification, especially when the other end of communication fails with unexpected behavior. These bugs are nastier than memory. So, I have pointers, and I am not afraid to use them.
- dixtel 3mo ago> software talibans I will note that, very funny
- ottavio 3mo agoWell, this approach is more similar to imposing a dogma thank engineering. Is managing memory safely important? YES Is managing memory safely the solution to most of the problems? Absolutely not. Advocating the language ignoring everything else (having as first and only argument that the code was rewritten in rust fully qualify for this case) is dogma and not engineering.
- voidUpdate 3mo agoI wonder how long this will be maintained for...
- musicmatze 3mo agoAs long as tokens are cheap
- pknerd 3mo agoI 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?
- musicmatze 3mo agoI think a business case for a "look I let an LLM rewrite a large codebase" does not exist.
- silon42 3mo agoYou are now at 0.1%... now submit upstream in sensible chunks (function or maybe file/module), waiting for people to review (a few per week, maybe) and approve/merge.
- fragmede 3mo agoBecause Rust is what's cool these days. Don't you wanna be cool? Also Rust has memory safety things that C++ doesn't have, so there's a class of bugs that can't happen in the Rust version. That doesn't mean the Rust version is 100% bug free, but just that it's not vulnerable to that class of bugs. So it's a good thing for security reasons if you're running a database server somewhere that attackers could get at it. There might be performance benefits down the road if they choose to focus on that.
- josefrichter 3mo agoWhy so much negativity? I find these projects interesting for learning purposes and exploring new ways. What’s wrong with that?
- bakugo 3mo agoI don't really understand how "written by AI" and "for learning purposes" can ever be compatible. What exactly does one learn from typing "Rewrite this in Rust, make no mistakes" into a terminal?
- manquer 3mo agoHow much token this would burn is of interest I suppose
- piker 3mo agoBecause it’s uncomfortable to see decades of work copied so trivially.
- nasretdinov 3mo agoI can trivially copy any code even without an LLM though with a simple tool called rsync!
- antihero 3mo agoBut 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 tangible benefits, and for far less human time and effort that it would have otherwise taken...surely something that should be celebrated as absolutely incredible?
- jackphilson 3mo ago
- queoahfh 3mo agoWhat a peculiar kind of rewrite. Rust: https://github.com/malisper/pgrust/blob/3646a73515a5e4ac7d0b7df88c61b180e1cabdb2/crates/backend/catalog/pg_inherits/src/lib.rs#L450 https://github.com/malisper/pgrust/blob/3646a73515a5e4ac7d0b... Original: https://github.com/postgres/postgres/blob/df293aed46e3133df3b5b337f095e3ebed69fd79/src/backend/catalog/pg_inherits.c#L355 https://github.com/postgres/postgres/blob/df293aed46e3133df3... Usage: https://github.com/malisper/pgrust/blob/3646a73515a5e4ac7d0b7df88c61b180e1cabdb2/crates/backend/catalog/pg_inherits/src/lib.rs#L221 https://github.com/malisper/pgrust/blob/3646a73515a5e4ac7d0b... The return type in the rewrite is both some sort of Error tagged union that supports the Try machinery in Rust; but, it also contains a boolean that apparently must be checked; or something. It seems labyrinthical and possibly broken and terrible.
- pdevr 3mo agoIt is a feature in Rust, not a bug :-) (I know you didn't say it is a bug.) The error-tagged union is PgResult<bool> - which means it contains bool as the result if things go well. (The other part in the union is of course the error.) In the original function also, it is returning a boolean: "bool has_subclass". So anyway you have to check for the boolean as part of the logic. That is what it is doing.
- queoahfh 3mo agoYes, but the original boolean seems to have been used for error handling, and the tagged union is also used for error handling. Why have both simultaneously in the same function instead of just one of the two? Edit: Looking at the code again, perhaps I was mistaken, since the boolean might not have been for error handling, just the result of the function, and C's limitations regarding error handling led it to using something like elog(), apparently a macro defined in https://github.com/postgres/postgres/blob/master/src/include/utils/elog.h https://github.com/postgres/postgres/blob/master/src/include... .
- khuey 3mo agoI make no claim as to whether the change makes sense given that I didn't look at the callers of this function, but Result<bool> is an entirely reasonable pattern in Rust. If you want the callers to be able to distinguish between "has the subclass", "doesn't have the subclass", and "something went wrong" this is idiomatic Rust.
- znpy 3mo agoIs this another llm-driven rewrite? I wonder how many "unsafe" blocks are in there...
- queoahfh 3mo agoFrom what I skimmed manually, not that many, but the code itself seems labyrinthical. Like, why have both Rust Try-supporting Error-like tagged union, but also booleans, for error handling, in the same function? https://github.com/malisper/pgrust/blob/3646a73515a5e4ac7d0b7df88c61b180e1cabdb2/crates/backend/catalog/pg_inherits/src/lib.rs#L450 https://github.com/malisper/pgrust/blob/3646a73515a5e4ac7d0b... https://github.com/malisper/pgrust/blob/3646a73515a5e4ac7d0b7df88c61b180e1cabdb2/crates/backend/catalog/pg_inherits/src/lib.rs#L221 https://github.com/malisper/pgrust/blob/3646a73515a5e4ac7d0b...
- malisper 3mo agoI'm not sure what you mean? The rust code you're showing mimics the Postgres code: https://github.com/postgres/postgres/blob/2e6578292a9184dcaae6c5abc235a26db9cb2973/src/backend/catalog/pg_inherits.c#L356 https://github.com/postgres/postgres/blob/2e6578292a9184dcaa... The boolean being returned is the return value of the function. It's not used to return an error.
- iigijshaba 3mo agoSorry, I wrongly assumed in the C code when I skimmed it that the boolean was for error handling, not the result value. The elog() macro is used for error handling.
- iigijshaba 3mo agoNow that I have taken a closer look, the code looks significantly better than it seemed at first glance, though there are still peculiarities, and some drawbacks. An unfortunate aspect is that the code has become a bit more bloated in some regards due to usage of Result, instead of an implicit elog() macro and similar. Passing Result around, in some ways as an alternative to an unwinding exception, is cleaner in some ways, but it also bloats the code somewhat. The rewrite also could have simpler code in some cases, like https://github.com/malisper/pgrust/blob/3646a73515a5e4ac7d0b7df88c61b180e1cabdb2/crates/backend/catalog/pg_inherits/src/lib.rs#L457 https://github.com/malisper/pgrust/blob/3646a73515a5e4ac7d0b... could perhaps just be match syscache_seams::search_pg_class_full_form::call(ctx.mcx(), relationId)? { Some(form) => Ok(form.relhassubclass), None => { Err(ereport(ERROR) .errmsg(format!("cache lookup failed for relation {relationId}")) .into_error()) } } but that is a smaller thing. I see a lot of MemoryContext. I am not sure how much that bloats the code (though the C code is bloated due to C's issues and problems, like re-using collections and such). Does it incur an overhead?
- grugdev42 3mo agoNeat as a pet project, but anyone thinking of using this is production is insane. Rewriten in Rust is becoming a meme now.
- isatty 3mo agoBeen a meme for a while now. I avoid that noise on principle.
- eu-tech-tak 3mo agoHow is the performance compared to regular PostgreSQL? I know it says it is not performance optimized yet, but if this succeeds, will it only bring more "memory safety" or is there a serious performance gain as well?
- orphea 3mo agowill it only bring more "memory safety" or is there a serious performance gain as well? The project will die in a couple of days or weeks. You're making a mistake if you're seriously consider using this in any capacity.
- rhogan 3mo agoI also suspect this will die very shortly, which is a real shame, not because it will be beneficial but because of the time and tokens needlessly spent on something that will be thrown out.
- emilsedgh 3mo agoMaybe it will, but having a performance comparison will be very interesting nontheless.
- vips7L 3mo agoAs is every slop generated project. It’s the Toy Story meme irl. https://knowyourmeme.com/memes/i-dont-want-to-play-with-you-anymore https://knowyourmeme.com/memes/i-dont-want-to-play-with-you-...
- eu-tech-tak 3mo agoI am not considering it at all. I am simply curious if switching to Rust has any significant performance benefits or not.
- malisper 3mo agoThe version in the GitHub repo is ~8x slower than Postgres. I have a new unpublished version that is 50% faster than Postgres on transactional workloads and ~300x faster on analytical workloads.
- dirkc 3mo agoHow 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 much anyway. ps. How do you easily get to the first commit in a repo on GitHub? Browsing commit history feels rather tedious [1] - https://github.com/malisper/pgrust/commits/main/?since=2026-06-12&until=2026-06-13 https://github.com/malisper/pgrust/commits/main/?since=2026-...
- bakugo 3mo agoVibe 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 codebase above a certain level of complexity, especially not one as mature and widely used as Postgres. But reality doesn't seem to be an obstacle for vibe coders.
- coldtea 3mo agoAnd run them in test setups to try to find bugs. If you find some, fix them.
- wartywhoa23 3mo ago> reality doesn't seem to be an obstacle for vibe Went straight into my vault of brilliant quotes!
- dirkc 3mo agoThe 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.
- cyberjar 3mo agoI'm starting to get a bit of fatigue for these projects that boil down to just "I asked Claude to re-write this code into a new language that's in vogue right now!" I really don't understand why this is needed outside of an opportunity to show how impressive LLMs can be when working within large codebases, but even then people in the comments are finding bizarre implementation choices that a human developer wouldn't make. I'll stick with Postgres and its - gasp - C implementation for now, thanks.
- verytrivial 3mo ago[dead]
- rjh29 3mo agoIn this case it's justified because Rust allows safe implementation of threaded code. Current Postgres is per-process. Switching to threading yields performance improvements.
- solid_fuel 3mo ago> 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.
- rjh29 3mo agoThere are hundreds of comment chains about this already, go troll somewhere else.
- solid_fuel 3mo agoIf you’re going to make a confident blanket claim, be ready to back it up - and asking for clarification is not trolling, by the way. You should be ready to engage in technical conversations if you want to make technical claims.
- scotty79 3mo agoRewrites in Rust are kinda impressive. This language with its move semantics and close ownership tracking is very different from every other language. To create a rewrite in it, you have to rearchitect the code. There is not as much freedom there when it comes to where to keep what and where you can pass what as it is in other languages.
- deleted 3mo ago[deleted]
- evil-olive 3mo ago> The goal is to make Postgres easier to change from the inside uh-huh, sure. you want to show off "look what the LLM can do / look what I burned a bunch of tokens on"? you want to brag about how your LLM-generated slop is somehow more maintainable than the original because blah blah blah Rust? here [0] is the version history of Postgres. pick a version from the past. let's say 14.x because it's the most current that's still under active support. have your LLM implement version parity with 14.x. show off how it passes all the tests blah blah blah. then have it upgrade your codebase to parity with 15.x, implementing whatever new features and bugfixes that includes. and have it generate an automated test that demonstrates upgrading an actual database from LLM-14.x to LLM-15.x and verifying there's no data loss or corruption. maybe even multiple such tests, if you're feeling fancy. then lather, rinse and repeat with 16, 17, and 18. and show off the diffs of each version. does the LLM rewrite a huge pile of already-working code in the process of each version upgrade? does it introduce new latent bugs in the process - the kind of things the existing test suite didn't think to explicitly test for? "I took a static snapshot of code and converted it to another static snapshot of code" is meaningless. all you're doing is bragging about having more money than good sense. the stability and trustworthiness of software like Postgres does not come from a one-time snapshot showing tests passing. it comes from the engineering process that produces the software and its test suite. oh, and for shits and giggles, because this same test was so illuminating with the Bun "rewrite" into Rust, here is the file with the most unsafe blocks in the codebase: > rg -c unsafe crates/backend/parser/gram_core/src/convert_ddl.rs 128 > wc -l crates/backend/parser/gram_core/src/convert_ddl.rs 2055 crates/backend/parser/gram_core/src/convert_ddl.rs why does a single 2000-line file have over 100 unsafe blocks? why is the parser unsafe at all?!? 0: https://en.wikipedia.org/wiki/PostgreSQL#Release_history https://en.wikipedia.org/wiki/PostgreSQL#Release_history
- tgv 3mo agoIt's not just unsafe, it's this: let r = unsafe { &*p }; It looks as if it's building structs out of information in (mutable pointers) to other structs without an Rc in sight. Which makes sense for a C parser: you've got a table with data, so you just link to it. It's fast, and when you know you're not going to touch it, it's safe. But this doesn't make the Rust code any better than the C code.
- sneak 3mo agoNow do Freetype and libtiff/libpng/etc. I have privately wondered for years, pre-AI, why Apple hadn’t paid some engineers to go off and write some comprehensive test suites and then port these to Swift. It would shut down entire swaths of memory safety bugs they have been coping with for literally decades. SO MANY of the zeroclick iOS exploits can be traced to a few fragile and vulnerable foss libraries, xkcd 2347 style.
- melodyogonna 3mo agoRust and its ecosystem needs to become more original. There are so many new problems that needs software solutions. Existing solutions that already work don't have to be rewritten in Rust.
- pessimizer 3mo agoA lot of it is actually GPL-washing and rust is the excuse. I'm on the rewrite it in rust bandwagon, but I secretly want to rewrite things in rust so they can be refactored and made easier to maintain and add features. So "rewrite it in rust" is just like "rewriting it in anything that I'm currently enamored with," and doing it with an LLM (defactoring?) would miss the point for me. rust being safe(r) just makes the rewrite less risky.
- pezezin 3mo agoA lot of the software being rewritten in Rust is not GPL to begin with, like PostgreSQL here which has its own BSD/MIT-like license: https://www.postgresql.org/about/licence/ https://www.postgresql.org/about/licence/
- voihannena 3mo ago> <something> rewrite to rust using AI sound like meme now. https://news.ycombinator.com/item?id=48474313 https://news.ycombinator.com/item?id=48474313
- Xmd5a 3mo agoRust is a stripper
- booksock 3mo agorelated? https://www.youtube.com/watch?v=e35AQK014tI https://www.youtube.com/watch?v=e35AQK014tI
- grougnax 3mo ago[dead]
- jstrong 3mo agobut did they change the process-per-connection model? if not, wtf??
- rjh29 3mo agoYes, see top comment.
- rubnogueira 3mo agoI think the cool thing about these projects is that even if test parity reaches 100%, some bugs are going to surface on the new project that don't exist on the original project. This is usually a good example of a test case that the upstream project is not covering and can be contributed back. Parity should be bidirectional, so definitely it is possible for both parties to benefit from it.
- malisper 3mo agoHey 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 incorporates a lot of techniques. Currently the new version: - Passes 100% of Postgres regression suite - Implements a thread per connection model instead of the process per connection model Postgres does - Is 50% faster than Postgres on transaction workloads - Is ~300x faster than Postgres on analytical workloads. Right now it's 2x slower than Clickhouse on clickbench and I think it's possible to get faster than Clickhouse If you have any questions, I'm happy to answer them.
- barrkel 3mo agoIs it being used in production anywhere, even if only a toy app? I know you say it's not production ready and not optimized yet, but in the same breath - in your comment here - you say it's already faster.
- malisper 3mo agoIt's not used in production. I've been using different benchmarks to compare the performance vs other systems. Namely sysbench-tpcc[0] and clickbench[1] [0] https://github.com/Percona-Lab/sysbench-tpcc https://github.com/Percona-Lab/sysbench-tpcc [1] https://github.com/ClickHouse/ClickBench https://github.com/ClickHouse/ClickBench
- jl6 3mo ago"Is 50% faster than Postgres on transaction workloads" - That is a very big claim! 50% faster on everything? Is it a strict improvement across the board or are there tradeoffs that make some workloads slower?
- malisper 3mo agoThe 50% is specifically on percona-tpcc[0]. I got there through a mix of batching (postgres processes a row at a time), prefetching, and several handful of other optimizations. [0] https://github.com/Percona-Lab/sysbench-tpcc
- gnull 3mo agoRegression tests start to play a different role with LLMs. On one hand, they give an LLM a short feedback loop to correct itself, and iterate fast when writing code. A human also uses it as a feedback loop, but we don't iterate as fast and don't handle big walls of conditions, so its effect is not as big. On the other hand, LLM's ability to handle a big wall of if-conditions can backfire if it starts taking shortcuts and taking the tests-as-a-spec too literally, overfitting the solution, overly focusing on the given datapoints (conditions checked by tests) and missing the overall behavior shape that the tests intend to pin down. For humans, this is less of a concern because we are bad at big walls of if-conditions, and we'd rather try to see the original shape that the tests are pinning down than monkey-patch the solution to fit the individual points. It's interesting to see how one balanced these two. In this case particularly. Maybe you could play around with separating the data you give an LLM into "training set" and "validation set", training set can be seen fully, but validation set is hidden and is only queried when the solution is deemed ready. Say, training set = original source code + half of the tests; LLM uses that for quick feedback loop. And validation set = the remaining half of the tests; test code is not shown to the LLM and run only when the LLM says it's done to catch potential overfitting of the resulting solution over training set. To me, the credibility of a solution like that would depend on what methodology the authors used. If they just let the LLM see all tests, I'd be skeptical (albeit unable to point out specific bugs due to the volume of work and LLM's ability to make bad things look trustworthy). The good thing is, real-life use will add new, unseen before datapoints for testing — so validation set will build up with time. Really curious to see how it will work.
- giovannibonetti 3mo agoProperty testing and deterministic simulation seem like good alternatives.
- mstaoru 3mo agoGreat! Now ask it to rewrite it in CSS!
- cyber1 3mo ago2664 "unsafe {", 1835 "unsafe fn". This is completely unsafe. It doesn't look like a rewrite that understands what's actually going on or how the architecture should be redesigned to take advantage of Rust strengths. Instead, it looks like an AI generated transpilation with extensive use of raw pointers.
- malisper 3mo agoNote 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.
- saym 3mo agoJust 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.
- dvhh 3mo agoI don't know if converting the code could be an issue with copyright, but might be contrived as plagiarism
- Stalecelin 3mo agooh no.. will they get grounded?
- 3mo ago
- Decabytes 3mo agoIt’s interesting to see how llms have turned the concept of rewrite it in rust, from an impossibility for some projects (code is too large and complicated, it will take too much time) to a real possibility for even large projects.
- vintagedave 3mo agoThis 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 more ethical by choosing the AGPL - I just wonder, safer with no change at all? [0] https://www.postgresql.org/about/licence/ https://www.postgresql.org/about/licence/ [1] https://github.com/malisper/pgrust?tab=AGPL-3.0-1-ov-file https://github.com/malisper/pgrust?tab=AGPL-3.0-1-ov-file
- otterley 3mo agoIf this software was written by a mechanical process, the license is a nullity. It’s public domain.
- teraflop 3mo agoBeing created by a "mechanical process" from an existing creative work doesn't mean it's not a derivative work. For instance, if I take a copy of $BIG_BUDGET_MOVIE, and resample the video frames from 1080p to 720p through a purely mechanical transformation, that doesn't make the output public domain.
- otterley 3mo agoYou might be right, if it is a derivative work and not a new one. There’s some evidence that the authors consider it a new one because they’re attempting to change its license. The BSD license doesn’t explicitly convey the right to create derivative works but it does convey the right to “modify” the software. (They seem similar but “modify” is a narrower verb.) So is this a modification? A derivative work? A new work entirely? If it shares no code with the work from which it was derived, things are more complex than it may seem (and it no longer fits the “compressed video” analogy very well).
- 3mo ago
- Chyzwar 3mo agoI think the best way to test this would be to put PgBouncer or a similar proxy in front of a busy production database, and mirror queries to both traditional Postgres and the Rust one at the same time. Then you can compare output and performance under real load. After running it for a while, you could diff the tables one to one against the normal Postgres instance.
- lukasco 3mo agoQuite a lot of projects are trying this "rewrite to a new language using LLM", both internally, or externally (like is here). For me, they confirm some (slightly controversial) takes. 1. human code reviews are dead. We don't yet know what's next. Two reasons they are dead: too much code to review, and code reviewing sucks (who wants to spend their days reviewing code?) 2. Not knowing how to review LLM code is a big barrier to adoption, but bigger regression test suites (testability/evals) is almost certainly the direction. 3. There are a lot of projects that haven't moved to more modern infra because it was too hard. Now it's much easier. Sure stuff will go wrong. Sure it all has to be tested. What's new here? 4. Programming languages for LLMs are coming. 5. Projects that don't allow AI coding will be forced to come around or fade. Separately, bit off topic: New projects will often have LLMs built in, so non-determinism will be inherent in the project. No amount of code review will be able to eliminate that.
- vips7L 3mo agoI suspect the future of open source will be to never publish your tests. Or someone will just pump them into an LLM like this.
- manquer 3mo agoSQLite already does this but hasn’t stopped the rust /go clones from popping up . These are toy projects with no serious interest in maintaining the port long term. and even with things like bun where the port is merged it remains to be seen on maintainability over time.
- JodieBenitez 3mo agoI'm glad there's a go clone for SQLite, it' easier to integrate into a Go project, especially when you have to support multiple platforms.
- tcfhgj 3mo ago> These are toy projects with no serious interest in maintaining the port long term. source?
- hkchad 3mo agoX written in Rust seems like the new Hello World for LLM coding agents now.
- dzonga 3mo agocodebase full of code that wouldn't fly in production. I ain't no Rustacean - but 'unsafe' calls all over.
- sdevonoes 3mo agoDon’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 because it’s increasingly difficult to maintain these projects without AI So, who wants to put something like this in production? Doesn’t make much sense
- kirubakaran 3mo agoEverything has to start somewhere
- rvz 3mo agoHow is that going for Claude's C compiler [0], or Cursor's web browser? [1] [0] https://github.com/anthropics/claudes-c-compiler https://github.com/anthropics/claudes-c-compiler [1] https://github.com/wilsonzlin/fastrender https://github.com/wilsonzlin/fastrender
- throwaway27448 3mo agoThis seems to be functional software, though.
- airstrike 3mo agoTerribly, but just because any two people suck at basketball doesn't mean a third person must suck too.
- pojzon 3mo agoTill its used in prod for few years and polished, I wont touch that. Too many things tests wont catch.
- nalekberov 3mo agoI don’t understand these rewrites, honestly, what is the point? Who have had any C++ related issues while working with Postgres?
- diziet 3mo agoI love llm coding. I don't know what I am looking at here https://github.com/malisper/pgrust/blob/main/Cargo.lock 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.
- nemothekid 3mo ago`Cargo.lock` is a lockfile machine generated by Cargo. It's similar to package-lock.json. In any case, its machine generated the old fashioned way.
- diziet 3mo agoI am fully aware what Cargo.lock is. What I am surprised at is how many dependencies there are.
- kaoD 3mo ago> I love llm coding. I don't know what I am looking at here There might be some correlation here.
- diziet 3mo agoI am fully aware what Cargo.lock is. What I am surprised at is how many dependencies there are.
- kaoD 3mo agoSorry, the wording confused me. The project itself seems to be structued around 1.4k micro-crates[0] which I admit is a bit weird. Rust's compilation unit is the crate unlike C's per-file compilation unit, so if this was a 1:1 AI-assisted translation from the original Postgres source this might be an artifact of the translation. [0] https://github.com/malisper/pgrust/blob/main/Cargo.toml https://github.com/malisper/pgrust/blob/main/Cargo.toml
- SirHackalot 3mo agoI don’t trust AI rewrites, definitely not in 2026 — possibly never.
- briandw 3mo agoCode 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.
- SirHackalot 3mo agoDisagree, it’s already a leap of faith to trust even human code (which is why we try to prove code, or at the very minimum create guardrails with tests). Human reasoning itself is under doubt. It’s even more of a leap of faith (>>) to trust code generated by AI reasoning (which I can only currently call “homunculus reasoning,” it’s not inferior but it’s just got the probabilistic aspect of reasoning). People who YOLO their work to Al are practicing a different form of faith. I like knowing what my code does, and making correct predictions about it. A mental model is very important. My position is very rational, yours is faith-based. This is a technology that has many cool uses, but this is not one of those uses (in 2026). Unless the author can convince me they have as good of a mental model of this rewrite as the makers of the original source code. Maybe they do, I’m sure they would run circles around me, but I need the confidence that this isn’t going to wake me up at 3am because of some bug. And the only way I know that about PG is because I trust the creators.
- munchler 3mo ago> 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.
- briandw 3mo ago“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.
- 0xferruccio 3mo agoSuper impressive! Remember talking with Michael about his experience with Citus at Heap and reading his blog posts on Postgres Super cool to see him working on this now, almost 10 years later
- CleitonAugusto 3mo ago[flagged]
- kburman 3mo ago`seams` is the new emdash
- whartung 3mo agoI just want to quibble that the 100% Postgres regression tests do not test the threaded aspect of this project, and that is a pretty fundamental architecture change.
- fukaiall 3mo agoRust feels like the just right language to produce all those slops of AI and the language itself. Great to promote yourself as a productive engineer, but at the end of the day you’re just reinforcing the statement that AI and the language itself are great, not you.
- password4321 3mo agoJepsen or GTFO. These days there's little chance for a new DB to build its community using network effect. If you want this to catch on, switch to manually grinding community building ASAP gold plating the experience for a specific niche (AI can guide your priorities but will hinder your comms). Otherwise, have fun building!
- subarctic 3mo agoI mean if it's actually just another Postgres, you don't have to worry about network effects as much because anyone could use it in place of Postgres. But sure, the more people you know using this, the safer it would feel to use it
- krater23 3mo agoIt's silly, nearby all Rust projects are rewrites of existing projects and now as you don't need to learn Rust to do rewrites, people just let the AI rewrite projects in Rust.
- henry2023 3mo agoIf the underlying code ends up being a completely unreadable blob that no human will ever read why not directly do a port to assembly instead of rust?
- gokulrajaram 3mo ago[flagged]
- bigwhite 3mo agoFirst bun, now it's PG's turn again, although this isn't official. I have a feeling that AI is rewriting everything!
- gchamonlive 3mo agoAnd they'll reproduce virtually the same problems, because code was never a primary issue for output. Products reflect organizational problems, which AI can't solve.
- kopirgan 3mo agoWhere will this leave the c based driver which I believe is the basis for many others?
- krupan 3mo agoI started my programming career by porting code from one model of TI calculator to another. It was code I could not have written from scratch myself at the time. I learned a lot about the two different versions of TI Basic that the calculators used, but I didn't learn how the program really worked. I can't even remember now if it was Tetris or the tank game that I ported. Maybe it was both? That was a boring English class... I totally understand why porting code is fun. It's kind of like when I checked out drawing books from the library as a kid and just traced the pictures because my own attempts at drawing were so bad. It gives you a feeling of accomplishment, even though you didn't actually do anything that difficult. And you do learn some things along the way. Doing the same with an LLM probably gives you that similar feeling of accomplishment, even though you didn't actually do that much (sorry, hate to say it that way). I wonder if you learn even less in the process. Maybe you just learn different things. Now that I think about it, even writing some code from scratch with an LLM is not much different than doing a porting project. Someone else did the hard work of creating the original programs that the LLM was trained on, and now you (the LLM really) are just porting/restating what someone else did. I hadn't thought of that before
- simonw 3mo agoThe WebAssembly demo that runs in your browser is a really neat touch: https://pgrust.com https://pgrust.com
- f311a 3mo agoThe code is so weird, people will have a hard time reading it when they need to check for correctness. There are much better ways to write it in Rust: https://github.com/malisper/pgrust/blob/14ffab7d31a31e5ab667f7a051f693fad9c031ac/crates/common/md5/src/lib.rs#L190 https://github.com/malisper/pgrust/blob/14ffab7d31a31e5ab667...
- wavemode 3mo agoI mean, you've linked to a function performing md5 hashing. That's pretty much exactly what I would expect such code to look like. Case in point: https://github.com/postgres/postgres/blob/master/src/common/md5.c#L235 https://github.com/postgres/postgres/blob/master/src/common/...
- f311a 3mo agoIt's not idiomatic implementation in Rust, just translation from C. A few Rust macros simplify implementation and cut the code in half.
- luciana1u 3mo ago[flagged]
- shevy-java 3mo agoThat's actually interesting - gives C developers motivation to improve postgresql. after all people could say "look, Rust makes this easier".
- happyweasel 3mo agoPorting 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.
- ak39 3mo agoChuckled at the anti-climactic sentence ending! lol
- sgt 3mo agoAn academic exercise for sure. The Postgres team won't use this and take it forward, hence it will go stale and rot within months.
- literalAardvark 3mo agoOr someone who likes it could run codex-get -y upgrade on it once every two weeks and it'll be fine for as long as you can afford the tokens.
- codingjoe 3mo agoGiven that you reuse Postgres' tests and LLM have been clearly trained on Postgres' three decades of contributions, this may constitute a license violation. Unless you include the original license of course. From a human level I also understand how you ended up with a less permissive license.
- dvhh 3mo agoLicense for test might be subject to debate, because afaik the project is merely running them. but yes the test files should be presented under their original licence.
- up2isomorphism 3mo agoIt is very bad metric to measure a rewrite using the original tests. It is like to say you clone a cat by mimic 600 cat images.
- cjd8 3mo ago> 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?
- ak39 3mo agoIs 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?
- rlvk 3mo agoI'd like to know on what machine and on what testbench the supposed 300x boost is achieved so that we can independently verify it. My assembler-written fork of postgres is achieving 600x boost on SELECT 1;
- Havoc 3mo agoDid similar with S3 and that too (eventually) did well against tests (the ceph s3 ones). ...but haven't dared use it for anything meaningful yet. Still feels like there is a real world gap in confidence when it comes to vibecoded rewrites. Been wondering whether the answer is to insert a proxy...something that effectively splits traffic to a known S3 and the rewrite and compares outcomes over time. Do that for a couple different workloads for a month or so and if it's all identical then it's probably fine...
- HackerThemAll 3mo agoIt's so great. One thing that I'd like to be changed in PostgreSQL, which may be done in this rewrite, is resigning from the "one connection = one process" design choice and instead handle the connections using threads/tasks within the main process.
- manupati 3mo agoDatabase & AGPL bad combination
- abbefaria27 3mo agoSetting aside the “why” that everyone is so focused on, I want to know, how? I can’t get Claude to do anything even a fraction of this complexity. How are people setting up their agents, Claude.md, etc to do such big projects? There are a lot of lessons to be learned.
- benjiro29 3mo ago> I can’t get Claude to do anything even a fraction of this complexity. I remember writing a postgresql compatible DB with Opus 4.5, that used S3 as storage and local caching to make it speedy. Ironically, Opus 4.5 is by todays standards is antique. If you have some knowledge about Databases, it goes a long way. But you need to do it step by step. Getting the core to work, getting a Pratt parsing going. The whole pgwire protocol ... the data format ... Step by step ... With todays Models, your can probably get away with using /goal and telling it to make a postgresql compatible database, while having it run a few days. Now, making a fun database test project and having it production ready! Big difference!
- fg137 3mo agoIf you can do a Rust rewrite with AI, I can create one as well. What makes yours better than mine? Your decade long expertise in database or Rust language? Your reputation? Your proven track record to manage large, complex projects? Your time committed to the project? I don't see any of that. I don't know why anyone would choose this over the actively (community) maintained proper Postgres project.
- cmrdporcupine 3mo agoCame here to the same thing. I did something similar (but bolder, it doesn't slavishly copy Postgres and is based on current DB research papers and the like, and other bits I've been exposed to over the years). It has a full TPC-C-esque benchmark suite, replication, embedded v8/JavaScript relations/stored procedures, a giant suite of regression tests, it kicks the crap out of a lot of existing OLTP DB stuff out there. And I personally do have a background in commercial DB development. But I choose not to publish it or promote it for many of the reasons you mention above (and more) ... For one, if "I" can do it, so can a hundred other people. And all the bold claims behind it would need to be backed up and supported and it promoted, etc, which is a whole pile of time that doesn't involve writing code. It's the organization around a project that matters, not the code. It's not the 90s anymore w/ people piling into MySQL because it was the only option. People aren't going to be trusting your software with their data, if they can't trust you. And unless someone is going to dump a pile of money or something on [me|them], I don't have the ability to build that organization ... as I need to feed my family... Nor am I willing to put my personal reputation on the line by putting up a huge quickly written application and then someone finding something in it I can't explain. So like probably 500 other projects I have it sitting in a private repo. It's a very weird time right now. "Technical" excellence isn't the important part. Organizational excellence is. This was always the case but it's more so now. ... In the meantime, if anybody has angel investment to burn, I have something potentially better/more-exciting than this guy's project but... see above...
- wkoszek 3mo agoAuthor of this project is not that different than you. The only difference is that he is willing to take the risk. If you have an invention and sit on it, nothing will happen.
- panny 3mo ago>use Rust plus AI-assisted programming >pgrust is licensed under AGPL-3.0 pgrust isn't licensed at all. AI generated code isn't copyrightable. Thanks for spending the tokens I guess.
- millerm 3mo agoYou got me with the rewrite, you lost me with AI.
- hptnrr 3mo agoThis is a stunt for freshpaint.io that sells AI. No one will use this plagiarized monstrosity.
- wkoszek 3mo agoCongrats for launching this project. I think it's awesome. I did two similar projects, just to learn how to work with LLMs and it felt good--reminded me times debugging code with GDB and going through stuff in semi-manual mode. I'm building data + AI platform. It got complex, and I'm using AI-assisted coding to move fast. One thing that helps me was property based testing. I have a traffic generator that simulates 10 users working on my platform. I run it 24/7 and if it shows that the software survives the test (I called it "fate" after ffmpeg's CI), it's good enough to roll out. If you wrote something like that, core PostgreSQL folks would like it too, unless there's something equivalent like this. It'd be: create random tables, fill with random data, then issue randomly constructed query.
- xyst 3mo agoit's a neat experiment, obviously inspired by the bun guy. but given the author/maintainer is essentially unknown, I highly doubt this will reach it's target audience. But one thing I do agree with is that postgres is long overdue for a re-write into a memory safe language. also any real swe with more than a few years of experience knows "100% of regression suite passing" doesn't mean anything other than a neat checkmark for C-level executives.
- touisteur 3mo agoMight be a very good occasion to actually improve the test suites from our load-bearing software projects. I feel this will be the decade of a cat and mouse game between LLM PRs and finding good (as in convincing whomever is paying you and is waiting for any occasion to fire you for being anti-progress or something). Hopefully we get: actual formal coding rules, spec rules, design rules, contribution rules, documentation and testing rules. High Integrity development processes impose that you write all this before you start and makes sure you follow your own rules. So. I guess... welcome everyone to explicit software and systems development processes.
- gulugawa 3mo agoThis the type of AI generated tool I'm interested in seeing more of. I'm a fan of how the quality is verified using clearly defined quantitative measurements for performance and correctness. I'm still skeptical about LLMs and don't use them, although I can be convinced by more demonstrated examples of success.