Skip site navigation (1) Skip section navigation (2)

Re: Pl/Java - next step?

From: Andrew Dunstan <andrew(at)dunslane(dot)net>
To: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Pl/Java - next step?
Date: 2004-02-21 17:43:53
Message-ID: 403798D9.2030503@dunslane.net (view raw or flat)
Thread:
Lists: pgsql-hackers

Thomas Hallgren wrote:

>>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?
>>
>>    
>>
>That's an interesting thougth. The postmaster just forks. It never exec's
>right? Is this true for win32 as well? I've never tried it but it might be
>worth pursuing. Sun's new Java 1.5 jvm does this albeit a bit differently.
>An initializer process starts up and persists its state. Subsequent JVM's
>then reuse that state. I definitely plan for Pl/Java_JNI to take advantage
>of that.
>
>  
>

Unfortunately, WIN32 has no fork(), and we have to exec the backend, in 
effect. You would need to handle both scenarios (#ifdef EXEC_BACKEND). 
For Unix this could be nice, though , and eliminate most of the 
disadvantage of your approach.



cheers

andrew


In response to

pgsql-hackers by date

Next:From: Joe ConwayDate: 2004-02-21 18:46:38
Subject: Re: Pl/Java - next step?
Previous:From: Andrew DunstanDate: 2004-02-21 17:37:13
Subject: pl/perl thoughts

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group