Re: Support for Rust - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Support for Rust
Date
Msg-id 1650131.1662996552@sss.pgh.pa.us
Whole thread Raw
In response to Re: Support for Rust  (Lev Kokotov <lev@hyperparam.ai>)
Responses Re: Support for Rust
Re: Support for Rust
Re: Support for Rust
List pgsql-hackers
Lev Kokotov <lev@hyperparam.ai> writes:
>> 3. Do we gain anything besides compiler hints? Postgres development is
>> hard due to interference of complex subsystems. It will be even harder if
>> those systems will be implemented in different languages.

> Rust gives many things we wanted for decades:

> 1. No undefined behavior
> 2. No memory leaks, guaranteed at compile time

Really?  It seems impossible to me that a language that even thinks
it can guarantee that could interoperate with the backend's memory
management.  And that's not something we are interested in replacing.

> I took a small part of Postgres to get started, so just as a PoC; it
> compiles and runs though. Larger parts will take more work (deleting code,
> not just swapping object files), and more fancy things like PG_TRY() and
> friends will have to be rewritten, so not a short and easy migration.

Yeah, that's what I thought.  "Allow some parts to be written in
language X" soon turns into "Rewrite the entire system in language X,
including fundamental rethinking of memory management, error handling,
and some other things".  That's pretty much a non-starter.

            regards, tom lane



pgsql-hackers by date:

Previous
From: Peter Eisentraut
Date:
Subject: Re: Can we avoid chdir'ing in resolve_symlinks() ?
Next
From: Tom Lane
Date:
Subject: Re: Can we avoid chdir'ing in resolve_symlinks() ?