Re: Let's make PostgreSQL multi-threaded

From: Heikki Linnakangas <hlinnaka(at)iki(dot)fi>
To: chap(at)anastigmatix(dot)net, Konstantin Knizhnik <knizhnik(at)garret(dot)ru>
Cc: pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: Let's make PostgreSQL multi-threaded
Date: 2023-06-06 16:24:11
Message-ID: d8868273-9797-ea1f-4a2d-ddfe1ce43ffc@iki.fi
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 06/06/2023 11:48, chap(at)anastigmatix(dot)net wrote:
> And the devs of Java, in their immeasurable wisdom, have announced
> a "JDK Enhancement Proposal" (that's just what these things are
> called, don't blame Orwell), JEP 411[2][3], in which all of the
> Security Manager features that PL/Java relies on for bounds on
> 'trusted' behavior are deprecated for eventual removal with no
> functional replacement. I'd be even more leery of using one big
> shared JVM for everybody's work after that happens.

Ouch.

> Might the work toward allowing a run-time choice between a
> process or threaded model also make possible some
> intermediate models as well? A backend process for
> connections to a particular database, or with particular
> authentication credentials? Go through the authentication
> handshake and then sendfd the connected socket to the
> appropriate process. (Has every supported platform got
> something like sendfd?)

I'm afraid having multiple processes and JVMs doesn't help that. If you
can escape the one JVM in one backend process, it's game over. Backend
processes are not a security barrier, and you have the same problems
with the current multi-process architecture, too.

https://github.com/greenplum-db/plcontainer is one approach. It launches
a separate process for the PL, separate from the backend process, and
sandboxes that.

--
Heikki Linnakangas
Neon (https://neon.tech)

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Eisentraut 2023-06-06 16:30:38 Re: abi-compliance-checker
Previous Message Jacob Champion 2023-06-06 15:50:36 Re: RFC: logical publication via inheritance root?