Live data from Hacker News

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

github.com

451–460 of 756 posts

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

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

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.

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

#452
post #438
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.

That’s not true for Postgres however: due to its usage of a shared memory pool, whenever a subprocess is terminated unexpectedly, Postgres will kill all other processes and enter recovery mode, replaying the WAL, during which time it will not accept connection requests. It does this because it can’t possibly know whether the dying process did bad things to the shared memory pool.

You are correct! TIL, and thank you. Connection processes get a SIGQUIT, shared buffers cleared, and WAL replayed, but postmaster stays alive. It's effectively an online restart.

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

#453
post #100

How 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?

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

I am not considering it at all. I am simply curious if switching to Rust has any significant performance benefits or not.

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

#454
post #399

Earlier quoted context omitted.

Presumably they'd be fine running in a threaded context.

Extensions like pgvector, TimescaleDB would probably need to be ported tho, not sure how much but there are footguns.

Not needed in many (most?) cases.

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

#455
post #322

I'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…

In this case it's justified because Rust allows safe implementation of threaded code. Current Postgres is per-process. Switching to threading yields performance improvements.

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

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

#456

Earlier quoted context omitted.

That induces disk I/O overhead (even if it somehow doesn't impact IPC performance)

The file doesn’t have to be disk-backed.

Don't you need something mounted for that?

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

#457
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 human developers either, so maybe it’s not equivalent to say that secret prompts mean closed-source.

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

#458

Earlier quoted context omitted.

There's nothing special about threads vs processes in Linux. mmap works the same, the challenge is to map the same file. You can share a path, pass a file descriptor via fork or unix domain socket, among other techniques.

That induces disk I/O overhead (even if it somehow doesn't impact IPC performance)

It doesnt. Processes can share memory

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

#460

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…

Not the same but it is much faster and easier to re-create a 3d model of an existing set of drawings than from scratch. This is because a lot of the decisions have already been made.
Post reply on HN