Skip to content

Comment on RustgreSQL

Comments

I am not sure what to make of this: the author is a cto of a 100~ person company, but he is thinking that a project like pg can be realistically rewritten in rust. I just don't get it. Even if you could somehow make the 'complicated' and 'scary' parts of the code base magically transform into rust (much less handle performance and other issues due to memory management being different between c and rust), how would you maintain that project? Ai driven code translation from c to rust is a singularity too soon.

This reminds me of an episode that happened roughly ten years ago. I am a cosmologist and I have worked to the ESA Planck mission [1], a spacecraft launched in 2009 to study the Cosmic Microwave Background. Planck was the successor of another spacecraft, WMAP [2], which was launched by NASA in 2001.

One of the bosses working for one of our industrial partners was completely clueless about the details of the mission and the context. One day, he entered the office of one of his employees:

- Hi Bob [fake name], do you know anything about this Planck stuff?

- Sure, I'm working full time on Planck.

- Good! And do you know what WMAP is?

- Of course I do!

- Great! Now listen, if WMAP run on Windows, you should definitely install it on my computer, so I can play with it.

[1] http://www.esa.int/Our_Activities/Space_Science/Planck

[2] https://map.gsfc.nasa.gov/

This is worrisome for the company, to have someone as clueless about technical work scope and estimate to be in charge of the technical department. Or is that more of a political post?

clueless about technical work scope

Do you mean that it would be impossible for a team of experts in C and rust to rewrite pg in 5 years? That is essentially what he is proposing. (Which probably isn't a great idea, but I think the work scope estimate is in the right ball park.)

The way he proposes it, and the reasoning behind it all scream "clueless".

Reminds me of first year CS students who after learning that assembly is lower level and can be faster than C, wanted OSes and applications to be written in assembly for speed.

He clarified in a later email [0]:

    I'm just asking possibly stupid questions and having possibly
    stupid theories, trying to understand why such a project would
    be possible or not.
[0]: https://www.postgresql.org/message-id/CAASwCXfn1TJwru0ZHGMth...

Translation: "I'm wasting everybody's time."

What's the argument against possible Rust porting of Postgres?

Because of the interop ease, it's not hard to imagine a multi-year peicemeal rewrite. Postgres' code has some pretty good idioms that could be nicely encoded in Rust, and a good separation of concerns

The biggest argument against it is falling into the "pure technical" trap.

Postgres has a great focus on solving real problems for real people. Losing that focus would be a disaster.

What's the argument against possible Rust porting of Postgres?

That's putting the cart before the horse. The right question is:

a) What's the argument in favor of porting Postgres to Rust?

and

b) What's the opportunity cost?

very odd

company in reference https://en.wikipedia.org/wiki/Trustly

He also has a blog dedicated to Postgres: https://joelonsql.com/

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.