"MauMau" <maumau307@gmail.com> writes:
> From: "Tom Lane" <tgl@sss.pgh.pa.us>
>> When it breaks, we're not going to be concerned.
> I may not understand your nuance. Which of the following do you mean?
> * PL/Java's design is dangerous in terms of the mixture of single- and
> multi-threading, and we cannot be 100% sure whether there's really no
> problem.
That, more or less. There is exactly zero provision in the Postgres
code for multiple threads to exist inside a backend process. It's
possible that PL/Java manages to completely insulate the Java world
from the C world, so that the C code never sees more than one thread.
But any leakage at all in that abstraction is probably going to cause
bugs; and as I said, we (PG hackers) are not going to consider such
bugs to be our problem.
On platforms where the standard libc supports threading (which is most,
these days), I'd be particularly worried about leakage along the path
java -> libc -> postgres. If libc becomes aware that there are multiple
threads executing inside the process, it's likely to change behaviors.
regards, tom lane