agora inbox for pljava-dev@postgresql.org  
help / color / mirror / Atom feed
Subject: [Pljava-dev] doubtful PL/Java's activity
Date: Thu, 12 Dec 2013 10:37:19 +0100
Message-ID: <20131212103719.723e5cfe@sys-251.netcologne.de> (raw)
In-Reply-To: <2AB2177C63D24C43AC3BDE9A3A8F71FC1C86280C@G01JPEXMBYT02>
References: <2AB2177C63D24C43AC3BDE9A3A8F71FC1C86280C@G01JPEXMBYT02>

Hello

On Mon, 9 Dec 2013 11:16:01 +0000
"Taniguchi, Yasunori" <taniguchi.yasu at jp.fujitsu.com> 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.

If I understood it correctly, every PostgreSQL connection has its own
process and for every such process one separate JVM is started.
This model ensures that different connections never end up in the 
same JVM. Inside one connection queries are always executed one after
another. Therefore the JVM can internally do what ever it likes, even 
multithreaded.

Best Regards

-christian-



view thread (15+ messages)  latest in thread

Message-ID: <20131212103719.723e5cfe@sys-251.netcologne.de>
Permalink:  ../20131212103719.723e5cfe@sys-251.netcologne.de/
Also on:    postgresql.org/message-id/20131212103719.723e5cfe@sys-251.netcologne.de

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pljava-dev@postgresql.org
  Subject: Re: [Pljava-dev] doubtful PL/Java's activity
  In-Reply-To: <20131212103719.723e5cfe@sys-251.netcologne.de>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox