Re: Is SPI safe to use in multi-threaded PL/Java?
От | Tom Lane |
---|---|
Тема | Re: Is SPI safe to use in multi-threaded PL/Java? |
Дата | |
Msg-id | 11347.1394545919@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | Re: Is SPI safe to use in multi-threaded PL/Java? ("MauMau" <maumau307@gmail.com>) |
Ответы |
Re: Is SPI safe to use in multi-threaded PL/Java?
|
Список | pgsql-hackers |
"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
В списке pgsql-hackers по дате отправления: