Re: Pl/Java - next step? - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Pl/Java - next step?
Date
Msg-id 12099.1077381110@sss.pgh.pa.us
Whole thread Raw
In response to Pl/Java - next step?  ("Thomas Hallgren" <thhal@mailblocks.com>)
Responses Re: Pl/Java - next step?  (Bruce Momjian <pgman@candle.pha.pa.us>)
List pgsql-hackers
"Thomas Hallgren" <thhal@mailblocks.com> writes:
> ** 4. Make the postmaster spawn threads rather than processes **
> I know this is very controversial and perhaps I should not bring it up at
> all. But then again, why not? Most readers are open-minded right?

It's been considered and rejected before, and pljava isn't going to tilt
the scales.  In fact, the main thing that bothers me about your
description of JNI is "Java uses multithreading wether you like it or
not".  I am very afraid of what impact a JVM will have on the stability
of the surrounding backend.

Other than that fear, though, the JNI approach seems to have pretty
considerable advantages.  You listed startup time as the main
disadvantage, but perhaps that could be worked around.  Suppose the
postmaster started a JVM --- would that state inherit correctly into
subsequently forked backends?

Also, regarding your option #3 (do both), do you really think something
different is going to happen in practice?  The developers of the other
implementation aren't likely to give it up just because yours exists.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: 7.4.1 release status - Turkish Locale
Next
From: Tom Lane
Date:
Subject: Re: Progress Report on Materialized Views