X-Original-To: pgsql-hackers-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by postgresql.org (Postfix) with ESMTP id 43F649DCA3E for ; Tue, 28 Mar 2006 13:11:13 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 11079-01 for ; Tue, 28 Mar 2006 13:11:12 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey- Received: from tada.se (1-1-2-48a.rny.sth.bostream.se [82.182.133.12]) by postgresql.org (Postfix) with ESMTP id 9F73F9DC9EF for ; Tue, 28 Mar 2006 13:11:10 -0400 (AST) Received: from [127.0.0.1] (unverified [127.0.0.1]) by tada.se (SurgeMail 3.7a) with ESMTP id 5637 for multiple; Tue, 28 Mar 2006 19:11:00 +0200 Message-ID: <44296E24.5010602@tada.se> Date: Tue, 28 Mar 2006 19:11:00 +0200 From: Thomas Hallgren User-Agent: Thunderbird 1.5 (Windows/20051201) MIME-Version: 1.0 To: Tom Lane CC: Simon Riggs , Martijn van Oosterhout , PostgreSQL-development , PL/Java Development Subject: Re: Shared memory References: <4423CF32.3060406@tada.se> <20060324125851.GC8718@svana.org> <4427A8F1.3020009@tada.se> <14559.1143473507@sss.pgh.pa.us> <4428125D.7000707@tada.se> <1143541439.3839.323.camel@localhost.localdomain> <44295AB0.5060203@tada.se> <2966.1143563883@sss.pgh.pa.us> In-Reply-To: <2966.1143563883@sss.pgh.pa.us> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Server: High Performance Mail Server - http://surgemail.com r=849097733 X-Authenticated-User: thomas@tada.se X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=0.104 required=5 tests=[AWL=0.104] X-Spam-Score: 0.104 X-Spam-Level: X-Archive-Number: 200603/1192 X-Sequence-Number: 81590 Tom Lane wrote: > Thomas Hallgren writes: > >> This FENCED/NOT FENCED terminology would be a good way to >> differentiate between the two approaches. Any chance of that syntax >> making it into the PostgreSQL grammar, should the need arise? >> > > Of what value would it be to have it in the grammar? The behavior would > be entirely internal to any particular PL in any case. > > Not necessarily but perhaps the term FENCED is incorrect for the concept that I have in mind. All languages that are implemented using a VM could benefit from the same remote UDF protocol. Java, C#, perhaps even Perl or Ruby. The flag that I'd like to have would control 'in-process' versus 'remote'. I'm not too keen on the term FENCED, since it, in the PL/Java case will lead to poorer isolation. Multiple threads running in the same JVM will be able to share data and a JVM crash will affect all connected sessions. Then again, perhaps it's a bad idea to have this in the function declaration in the first place. A custom GUC parameter might be a better choice. It will not be possible to have some functions use the in-process approach and others to execute remotely but I doubt that will matter that much. I'm still eager to hear what it is in the current PL/Java that you consider fundamental unresolvable problems. Regards, Thomas Hallgren