$ vi $PGDATA/postgresql.conf
shared_preload_libraries = 'pg_bigm'
-custom_variable_classes = 'pg_bigm'
$ pg_ctl -D $PGDATA start
$ psql -d <データベース名>
<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>
<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>
$ vi $PGDATA/postgresql.conf
shared_preload_libraries = 'pg_bigm'
-custom_variable_classes = 'pg_bigm'
$ pg_ctl -D $PGDATA start
$ psql -d <database name>
<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>
<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>