pg.ddx.io  pljava-dev@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Subject: [Pljava-dev] doubtful PL/Java's activity
Date: Thu, 12 Dec 2013 08:48:24 -0800
Message-ID: <7A075E77-AB50-4C15-9EF8-A00D239EF9C4@me.com> (raw)
In-Reply-To: <2AB2177C63D24C43AC3BDE9A3A8F71FC1C86280C@G01JPEXMBYT02>
References: <2AB2177C63D24C43AC3BDE9A3A8F71FC1C86280C@G01JPEXMBYT02>

I think you?re confusing things here.  Yes, the PostgreSQL session is single threaded.  But this is managed at the JDBC interface to the PostgreSQL session.  So you simply do not have multiple threads doing unsafe things to the PostgreSQL session.  It just doesn?t happen.  You may, of course, have multiple Java threads in the JVM that resides in the PostgreSQL session.  But any interaction with the session is serialized, so this isn?t a problem at all.

On Dec 9, 2013, at 3:16 AM, 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.
> 
> 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




view thread (15+ messages)  latest in thread

Message-ID: <7A075E77-AB50-4C15-9EF8-A00D239EF9C4@me.com>
Permalink:  ../7A075E77-AB50-4C15-9EF8-A00D239EF9C4@me.com/
Also on:    postgresql.org/message-id/7A075E77-AB50-4C15-9EF8-A00D239EF9C4@me.com

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: <7A075E77-AB50-4C15-9EF8-A00D239EF9C4@me.com>

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

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