From: | achill at matrix(dot)gatewaynet(dot)com (Achilleas Mantzios) |
---|---|
To: | |
Subject: | [Pljava-dev] doubtful PL/Java's activity |
Date: | 2013-12-13 08:01:24 |
Message-ID: | 52AABED4.7090904@matrix.gatewaynet.com |
Views: | Whole Thread | Raw Message | Download mbox | Resend email |
Thread: | |
Lists: | pljava-dev |
Thanx Thomas,
for the insight.
On 12/12/2013 10:15, Thomas Hallgren wrote:
> PL/Java goes to some length in protecting the single threaded PostgreSQL kernel. All accesses to it must be made from the caller thread. Multiple threads can be used for background tasks but such
> threads will be completely blocked from accessing the PostgreSQL functions.
>
> It works like this:
> A call is made from PostgreSQL. This call grabs a mutex.
> During PL/Java execution, only the thread that owns the mutex can call PostgreSQL.
> When the call eventually returns, the mutex is released.
>
> Java maintenance (garbage collection for instance) will still run in separate threads. If someone should write a finalizer that actually tries to do database access (god forbid), then that finalizer
> would throw an exception.
>
> - thomas
>
> On 2013-12-09 12:16, Taniguchi, Yasunori wrote:
>> Hi,
>>
>> I'm investigating PL/Java and find out a doubtful fact.
>>
>> Postgres is compiled as a single thread application
>> and linked with JavaVM(.so/.dll) which is a multi thread library.
>> Sp, I think PL/Java's activity may not be assured.
>>
>> Thread-unsafe functions and global variables used in single thread
>> standard libraries may be inconsistent with multi thread libraries.
>>
>> Can anybody respond me ?
>>
>>
>> Regards.
>> -----
>> Y.Taniguchi
>>
>>
>> _______________________________________________
>> Pljava-dev mailing list
>> Pljava-dev at lists.pgfoundry.org
>> http://lists.pgfoundry.org/mailman/listinfo/pljava-dev
>
> _______________________________________________
> Pljava-dev mailing list
> Pljava-dev at lists.pgfoundry.org
> http://lists.pgfoundry.org/mailman/listinfo/pljava-dev
--
Achilleas Mantzios
From | Date | Subject | |
---|---|---|---|
Next Message | Hal Hildebrand | 2013-12-13 18:54:51 | [Pljava-dev] How did I not know of this? |
Previous Message | Hal Hildebrand | 2013-12-13 04:46:25 | [Pljava-dev] doubtful PL/Java's activity |