Message-ID: <5668AFF0.2070400@anastigmatix.net> Date: Wed, 09 Dec 2015 17:49:20 -0500 From: Chapman Flack MIME-Version: 1.0 References: <56666DBD.4030706@hogranch.com> <56668B19.4020900@matrix.gatewaynet.com> <56669A11.4030600@hogranch.com> <5666D4EC.4000505@anastigmatix.net> <5666D73A.3010209@matrix.gatewaynet.com> <56670711.3030708@anastigmatix.net> <5667E1ED.80403@matrix.gatewaynet.com> In-Reply-To: <5667E1ED.80403@matrix.gatewaynet.com> Subject: Re: [Pljava-dev] status of pl/java with current postgres and JDK ? Content-Type: text/plain; charset="us-ascii" On 12/09/15 03:10, Achilleas Mantzios wrote: > When java and threads are involved, things usually get nasty, > not so sure that it will be so easy with FreeBSD. > I remember I had to tweak postgresql compilation switches to get > pljava work in pgsql 9.3/FreeBSD 9.2. Ok, yes, I did find an earlier thread where you had done that. I am pretty sure the real fix for that has to be made in the port for postgresql itself, to make sure the functioning thread library is linked. I do see how that could be tough to explain to the pgsql port maintainers, who might think it isn't necessary because pgsql itself doesn't use threads, but leaving it out will be a problem dynamic linking from pgsql to anything else that uses threads internally, whether Java or ???. I'm doubtful that anything can be done on PL/Java's end to solve the problem, if pgsql itself has been linked with a nonfunctional threads stub. While PL/Java never lets more than one thread into postgres at a time, Java simply does use multiple threads internally and there is no getting around that. With that said, it *might* be possible to have PL/Java at least test for that situation, and give a useful error message (with an errhint to relink postgres with the thread library) instead of just silently hanging and making you guess. That kind of help really does improve the installation experience, so if you know of a (preferably portable) way to check that, it would be a valuable patch. Cheers, -Chap _______________________________________________ Pljava-dev mailing list Pljava-dev@lists.pgfoundry.org http://lists.pgfoundry.org/mailman/listinfo/pljava-dev