summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorAndrew Dunstan2006-11-13 17:13:57 +0000
committerAndrew Dunstan2006-11-13 17:13:57 +0000
commit751e3e6bd8c0de789d9942d925590f63ac3dd715 (patch)
tree139d7fced5c7d7f705234b5d830ec854c8a91868 /doc
parentdc10387eb17fc0b342faad407d81008f60008a12 (diff)
Force plperl and plperlu to run in separate interpreters. Create an error
on an attempt to create the second interpreter if this is not supported by the perl installation. Per recent -hackers discussion.
Diffstat (limited to 'doc')
-rw-r--r--doc/src/sgml/plperl.sgml21
-rw-r--r--doc/src/sgml/release.sgml34
2 files changed, 51 insertions, 4 deletions
diff --git a/doc/src/sgml/plperl.sgml b/doc/src/sgml/plperl.sgml
index b9668103ec..a94163e7be 100644
--- a/doc/src/sgml/plperl.sgml
+++ b/doc/src/sgml/plperl.sgml
@@ -1,4 +1,4 @@
-<!-- $PostgreSQL: pgsql/doc/src/sgml/plperl.sgml,v 2.58 2006/10/23 18:10:31 petere Exp $ -->
+<!-- $PostgreSQL: pgsql/doc/src/sgml/plperl.sgml,v 2.59 2006/11/13 17:13:56 adunstan Exp $ -->
<chapter id="plperl">
<title>PL/Perl - Perl Procedural Language</title>
@@ -646,6 +646,25 @@ $$ LANGUAGE plperl;
If the above function was created by a superuser using the language
<literal>plperlu</>, execution would succeed.
</para>
+
+ <note>
+ <para>
+ For security reasons, to stop a leak of privileged operations from
+ <application>PL/PerlU</> to <application>PL/Perl</>, these two languages
+ have to run in separate instances of the Perl interpreter. If your
+ Perl installation has been appropriately compiled, this is not a problem.
+ However, not all installations are compiled with the requisite flags.
+ If <productname>PostgreSQL</> detects that this is the case then it will
+ not start a second interpreter, but instead create an error. In
+ consequence, in such an installation, you cannot use both
+ <application>PL/PerlU</> and <application>PL/Perl</> in the same backend
+ process. The remedy for this is to obtain a Perl installation created
+ with the appropriate flags, namely either <literal>usemultiplicity</> or
+ both <literal>usethreads</> and <literal>useithreads</>.
+ For more details,see the <literal>perlembed</> manual page.
+ </para>
+ </note>
+
</sect1>
<sect1 id="plperl-triggers">
diff --git a/doc/src/sgml/release.sgml b/doc/src/sgml/release.sgml
index 58b4eaf50b..78a72cea00 100644
--- a/doc/src/sgml/release.sgml
+++ b/doc/src/sgml/release.sgml
@@ -1,4 +1,4 @@
-<!-- $PostgreSQL: pgsql/doc/src/sgml/release.sgml,v 1.482 2006/11/06 17:00:27 tgl Exp $ -->
+<!-- $PostgreSQL: pgsql/doc/src/sgml/release.sgml,v 1.483 2006/11/13 17:13:56 adunstan Exp $ -->
<!--
Typical markup:
@@ -407,6 +407,21 @@ links to the main documentation.
</para>
</listitem>
+ <listitem>
+ <para>
+ Data can no longer be shared between a PL/Perl function and a
+ PL/PerlU function, and modules used by a /PerlU function are no
+ longer available to PL/Perl functions.
+ </para>
+ <para>
+ Some perl installations have not been compiled with the correct flags
+ to allow multiple interpreters to exist within a single process.
+ In this situation PL/Perl and PL/PerlU cannot both be used in a
+ single backend. The solution is to get a Perl installation which
+ supports multiple interpreters. (Andrew)
+ </para>
+ </listitem>
+
<listitem>
<para>
In <filename>contrib/xml2/</>, rename <function>xml_valid()</> to
@@ -1743,8 +1758,21 @@ links to the main documentation.
<para>
Previously, it was lexical, which caused unexpected sharing
violations.
- </para>
- </listitem>
+ </para>
+ </listitem>
+
+ <listitem>
+ <para>
+ Run PL/Perl and PL/PerlU in separate interpreters, for security
+ reasons.
+ </para>
+ <para>
+ In consequence, they can no longer share data nor loaded modules.
+ Also, if Perl has not been compiled with the requisite flags to
+ allow multiple interpreters, only one of these lamguages can be used
+ in any given backend process. (Andrew)
+ </para>
+ </listitem>
</itemizedlist>