[Pljava-dev] [HACKERS] Shared memory

Thomas Hallgren thomas at tada.se
Mon Mar 27 14:15:38 UTC 2006


Rakesh Vidyadharan wrote:
> I agree with your view of connection pools.  The only time I wished 
> that PL/Java did not have such a "heavy" initialisation requirement 
> was when I needed to use a Java stored procedure from C (it was too 
> trivial to explore using a connection pool).  I ended up writing an 
> equivalent stored procedure in pgsql.  This may be a major issue for 
> some people, since one of the main benefits of using stored procedures 
> is that your database logic becomes available to multiple technologies.
Good point.


>
> In my view the main benefit that may be derived form using a shared 
> JVM is that you may be able to support more connections.  Maybe you 
> can just wait for the multi-tasking JVM to arrive on the scene.  I am 
> not sure how far the Java committee is on that, but there has been 
> talk of developing one for quite a while now.
>

I think you mean the JSR121, where many JVM's can share resources by 
running as "Java Isolates" in a MVM?. Unfortunately that will not help 
much. A PostgreSQL backend process will still need to use ipc in order 
to talk to the MVM process. What would help is if multiple JVM's, each 
running as a separate process, could share a lot of resources but I 
haven't seen any viable effort in that direction. I doubt it's doable 
without major parts of the JVM being built into the kernel.

Regards,
Thomas Hallgren




More information about the Pljava-dev mailing list