Re: Support for Rust

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Lev Kokotov <lev(at)hyperparam(dot)ai>
Cc: Andrey Borodin <x4mmm(at)yandex-team(dot)ru>, Nathan Bossart <nathandbossart(at)gmail(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Support for Rust
Date: 2022-09-12 15:29:12
Message-ID: 1650131.1662996552@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Lev Kokotov <lev(at)hyperparam(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2022-09-12 15:33:50 Re: Can we avoid chdir'ing in resolve_symlinks() ?
Previous Message Peter Eisentraut 2022-09-12 15:28:34 Re: Can we avoid chdir'ing in resolve_symlinks() ?