From: hal.hildebrand at me.com (Hal Hildebrand) Date: Thu, 12 Dec 2013 08:48:24 -0800 Subject: [Pljava-dev] doubtful PL/Java's activity In-Reply-To: <2AB2177C63D24C43AC3BDE9A3A8F71FC1C86280C@G01JPEXMBYT02> References: <2AB2177C63D24C43AC3BDE9A3A8F71FC1C86280C@G01JPEXMBYT02> Message-ID: <7A075E77-AB50-4C15-9EF8-A00D239EF9C4@me.com> 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 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