OSDN Git Service

Improve document about the setting to preload pg_bigm shared library to server.
authorMasaoFujii <masao.fujii@gmail.com>
Wed, 2 Sep 2015 02:17:05 +0000 (11:17 +0900)
committerMasaoFujii <masao.fujii@gmail.com>
Wed, 2 Sep 2015 02:17:05 +0000 (11:17 +0900)
This commit adds the description explaining that, in PostgreSQL 9.4 or later,
session_preload_libraries parameter instead of shared_preload_libraries can
be used to specify the pg_bigm shared library to preload to the server, into
the document.

Backpatch to 1.1 where 9.4 is supported.

Reviewed by Amit Langote

html/pg_bigm-1-2.html
html/pg_bigm_en-1-2.html

index 035975f..3fa107e 100644 (file)
@@ -160,7 +160,6 @@ $ initdb -D $PGDATA --locale=C --encoding=UTF8
 
 $ vi $PGDATA/postgresql.conf
 shared_preload_libraries = 'pg_bigm'
-custom_variable_classes = 'pg_bigm'
 
 $ pg_ctl -D $PGDATA start
 $ psql -d &lt;データベース名&gt;
@@ -176,9 +175,9 @@ $ psql -d &lt;データベース名&gt;
 <ul>
 <li>$PGDATAは、データベースクラスタのパスを決めて、そのパスで置き換えてください。</li>
 <li>pg_bigmは、PostgreSQLで利用できるすべてのエンコーディングとロケールをサポートしています。</li>
-<li>postgresql.confで、<a href="http://www.postgresql.jp/document/current/html/runtime-config-resource.html#GUC-SHARED-PRELOAD-LIBRARIES">shared_preload_libraries</a>と<a href="http://www.postgresql.jp/document/9.1/html/runtime-config-custom.html#GUC-CUSTOM-VARIABLE-CLASSES">custom_variable_classes</a>にpg_bigmを設定するのは必須です。 
+<li>postgresql.confで、<a href="http://www.postgresql.jp/document/current/html/runtime-config-client.html#GUC-SHARED-PRELOAD-LIBRARIES">shared_preload_libraries</a>または<a href="http://www.postgresql.jp/document/current/html/runtime-config-client.html#GUC-SESSION-PRELOAD-LIBRARIES">session_preload_libraries</a>(PostgreSQL9.4以降で利用可能)に'pg_bigm'を設定して、pg_bigmの共有ライブラリをサーバにプリロードしなければなりません。 
   <ul>
-    <li>PostgreSQL9.2以降ではcustom_variable_classesは存在しません。設定が必要なのはshared_preload_librariesだけです。</li>
+    <li>PostgreSQL9.1では、<a href="http://www.postgresql.jp/document/9.1/html/runtime-config-custom.html#GUC-CUSTOM-VARIABLE-CLASSES">custom_variable_classes</a>も'pg_bigm'に設定しなければなりません。</li>
   </ul>
 </li>
 <li>pg_bigmの登録には、<a href="http://www.postgresql.jp/document/current/html/sql-createextension.html">CREATE EXTENSION</a>を使います。 CREATE EXTENSIONはデータベース単位でモジュールを登録するため、pg_bigmを利用したいデータベースすべてにおいて登録が必要です。</li>
@@ -211,8 +210,8 @@ $ su
 <h3 id="delete_conf">postgresql.confの設定削除</h3>
 <p>postgresql.confの以下の設定を削除します</p>
 <ul>
-<li>shared_preload_libraries</li>
-<li>custom_variable_classes</li>
+<li>shared_preload_librariesまたはsession_preload_libraries</li>
+<li>custom_variable_classes (PostgreSQL9.1のみ)</li>
 <li>pg_bigm.* (pg_bigm.から名前が始まるパラメータ)</li>
 </ul>
 
index e08e2e6..2d61c2e 100644 (file)
@@ -160,7 +160,6 @@ $ initdb -D $PGDATA --locale=C --encoding=UTF8
 
 $ vi $PGDATA/postgresql.conf
 shared_preload_libraries = 'pg_bigm'
-custom_variable_classes = 'pg_bigm'
 
 $ pg_ctl -D $PGDATA start
 $ psql -d &lt;database name&gt;
@@ -176,9 +175,9 @@ $ psql -d &lt;database name&gt;
 <ul>
 <li>Replace $PGDATA with the path to database cluster.</li>
 <li>pg_bigm supports all PostgreSQL encoding and locale.</li>
-<li>In postgresql.conf, pg_bigm must be added into <a href="http://www.postgresql.org/docs/current/static/runtime-config-resource.html#GUC-SHARED-PRELOAD-LIBRARIES">shared_preload_libraries</a> and <a href="http://www.postgresql.org/docs/current/static/runtime-config-custom.html#GUC-CUSTOM-VARIABLE-CLASSES">custom_variable_classes</a>.
+<li>In postgresql.conf, <a href="http://www.postgresql.org/docs/devel/static/runtime-config-client.html#GUC-SHARED-PRELOAD-LIBRARIES">shared_preload_libraries</a> or <a href="http://www.postgresql.org/docs/devel/static/runtime-config-client.html#GUC-SESSION-PRELOAD-LIBRARIES">session_preload_libraries</a> (available in PostgreSQL 9.4 or later) must be set to 'pg_bigm' to preload the pg_bigm shared library into the server.
   <ul>
-    <li>In PostgreSQL 9.2 or later, you need to set only shared_preload_libraries because custom_variable_classes doesn't exist.</li>
+    <li>In PostgreSQL 9.1, <a href="http://www.postgresql.org/docs/9.1/static/runtime-config-custom.html#GUC-CUSTOM-VARIABLE-CLASSES">custom_variable_classes</a> also must be set to 'pg_bigm'.</li>
   </ul>
 </li>
 <li><a href="http://www.postgresql.org/docs/current/static/sql-createextension.html">CREATE EXTENSION</a> pg_bigm needs to be executed in all the databases that you want to use pg_bigm in.</li>
@@ -210,8 +209,8 @@ $ su
 <h3 id="delete_conf">Reset postgresql.conf</h3>
 <p>Delete the following pg_bigm related settings from postgresql.conf.</p>
 <ul>
-<li>shared_preload_libraries</li>
-<li>custom_variable_classes</li>
+<li>shared_preload_libraries or session_preload_libraries</li>
+<li>custom_variable_classes (only PostgreSQL 9.1)</li>
 <li>pg_bigm.* (parameters which begin with pg_bigm)</li>
 </ul>