On 19 November 2012 08:02, Thomas Hill <Thomas.K.Hill@t-online.de> wrote:
> was wondering if there is anyone wanted to share some experiences gained and
> some knowledge on pl/Java. Have looked into it for a couple of days now and
> am getting the impression it is not something ready to use in production
> environment. Also have trouble sending to the developer mailing list (the
> last email on the mail archive of that list is almost three weeks old) which
> raises questions on how active this project is.
I'd caution you against using pl/java in production. I came up against
a problem with it that I could not find a satisfactory solution for.
Essentially, each Postgres backend (connection process) must start its
own JVM, and does so using the JNI. If native memory runs out (I
realise that this may not actually be due to malloc() returning NULL,
but the effect is about the same), this failure is handled rather
poorly. It results in an OutOfMemoryError due to "native memory
exhaustion". This results in a segfault of the Postgres backend,
originating from within libjvm.so. There is a workaround - which is to
set the maximum JVM heap size to a sufficiently low value - but in
general the need to do so left me with a very low opinion of pl/java
as a project.
--
Peter Geoghegan http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training and Services