pgpool2.git / summary / log / commit / refs

commit    89572adbcbee6e82e0f4a47030fba61391d2b1e7
Author:   Tatsuo Ishii <ishii@postgresql.org>
Date:     Tue Jan 24 23:17:51 2017 +0000

    Fix indentations of query cache documents.


doc.ja/src/sgml/memcache.sgml | 1304 ++++++++++++++++++++--------------------- doc/src/sgml/memcache.sgml | 808 ++++++++++++------------- 2 files changed, 1056 insertions(+), 1056 deletions(-) diff --git a/doc.ja/src/sgml/memcache.sgml b/doc.ja/src/sgml/memcache.sgml index 23e68fcce..878eecc7a 100644 --- a/doc.ja/src/sgml/memcache.sgml +++ b/doc.ja/src/sgml/memcache.sgml @@ -1,681 +1,681 @@ <!-- doc/src/sgml/config.sgml --> <sect1 id="runtime-in-memory-query-cache"> -<!-- - <title>In Memory Query Cache</title> ---> + <!-- + <title>In Memory Query Cache</title> + --> <title>インメモリキャッシュ</title> <para> -<!-- - In memory query cache can be used with all modes of - <productname>Pgpool-II</productname>. - <productname>Pgpool-II</productname> does not - need a restart when the cache gets outdated because of - the underlying table updates. ---> -<productname>Pgpool-II</productname>の全てのモードでインメモリクエリキャッシュを利用することができます。 -テーブルが更新によりキャッシュが古くなっても、<productname>Pgpool-II</>の再起動の必要はありません。 - </para> + <!-- + In memory query cache can be used with all modes of + <productname>Pgpool-II</productname>. + <productname>Pgpool-II</productname> does not + need a restart when the cache gets outdated because of + the underlying table updates. + --> + <productname>Pgpool-II</productname>の全てのモードでインメモリクエリキャッシュを利用することができます。 + テーブルが更新によりキャッシュが古くなっても、<productname>Pgpool-II</>の再起動の必要はありません。 +</para> +<para> + <!-- + In memory cache saves the pair of SELECT statement + and its result + (along with the Bind parameters, if the SELECT is an + extended query). If the same SELECTs comes in, + <productname>Pgpool-II</productname> returns the value + from cache. Since no <acronym>SQL</acronym> parsing nor + access to <productname>PostgreSQL</> are involved, the serving of results +from the in memory cache is extremely fast. +--> + インメモリクエリキャッシュは、SELECT文(拡張問い合わせの場合は更にバインドパラメータ)と 検索結果をペアで記録します。 + 同じSELECT文が発行された場合に、<productname>Pgpool-II</productname>はキャッシュから結果を返します。 + <acronym>SQL</acronym>の解析も<productname>PostgreSQL</>へのアクセスも行われないため、インメモリキャッシュからの結果の提供は非常に高速です。 + +</para> +<para> + <!-- + On the other hand, it might be slower than the normal path in some + cases, because it adds some overhead to store cache. Moreover when + a table is updated, <productname>Pgpool-II + </productname> automatically deletes all the caches related to the + table. Therefore, the performance will be degraded by a system with + a lot of updates. If the query cache hit ratio (it can be checked + by using <xref linkend="SQL-SHOW-POOL-CACHE">) is lower than 70%, + you might want to disable in memory cache. + --> + 反面、キャッシュをストアするオーバヘッドが生じるので、通常の方法より遅くなる場合も有ります。 + また、あるテーブルが更新された場合、<productname>Pgpool-II</productname>は自動的にそのテーブルに関係する全てのキャッシュを削除します。 + そのため、更新が多いシステムではパフォーマンスが悪くなります。 + キャッシュのヒット率(<xref linkend="SQL-SHOW-POOL-CACHE">を使って確認できます)が70%以下の場合は、インメモリクエリキャッシュ無効にしたほうがいいかもしれません。 +</para> + +<sect2 id="runtime-in-memory-query-cache-enabling"> + <!-- + <title>Enabling in memory query cache</title> + --> + <title>インメモリクエリキャッシュを有効にする</title> + + <variablelist> + + <varlistentry id="guc-memory-cache-enabled" xreflabel="memory_cache_enabled"> + <term><varname>memory_cache_enabled</varname> (<type>boolean</type>) + <indexterm> + <!-- + <primary><varname>memory_cache_enabled</varname> configuration parameter</primary> + --> + <primary><varname>memory_cache_enabled</varname> 設定パラメータ</primary> + </indexterm> + </term> + <listitem> + <para> + <!-- + Setting to on enables the memory cache. + Default is off. + --> + onにするとメモリキャッシュが有効になります。 + デフォルトはoffです。 + </para> + <para> + <!-- + This parameter can be changed by reloading the <productname>Pgpool-II</> configurations. + --> + このパラメータは<productname>Pgpool-II</>の設定を再読み込みすることで変更可能です。 +</para> +</listitem> +</varlistentry> +</variablelist> +</sect2> + +<sect2 id="runtime-in-memory-query-cache-choose-storage"> + <!-- + <title>Choosing cache storage</title> + --> + <title>キャッシュストレージの選択</title> + + <variablelist> + + <varlistentry id="guc-memqcache-method" xreflabel="memqcache_method"> + <term><varname>memqcache_method</varname> (<type>string</type>) + <indexterm> + <!-- + <primary><varname>memqcache_method</varname> configuration parameter</primary> + --> + <primary><varname>memqcache_method</varname> 設定パラメータ</primary> + </indexterm> + </term> + <listitem> + <para> + <!-- + Specifies the storage type to be used for the cache. + Below table contains the list of all valid values for the parameter. + --> + キャッシュに用いるストレージのタイプを指定します。 + このパラメータで有効な全ての値のリストを以下の表に示します。 + </para> + + <table id="memqcache-method-table"> + <title>Memcache method options</title> + <tgroup cols="2"> + <thead> + <row> + <!-- + <entry>Value</entry> + <entry>Description</entry> + --> + <entry>値</entry> + <entry>説明</entry> + </row> + </thead> + + <tbody> + <row> + <entry><literal>'shmem'</literal></entry> + <!-- + <entry>Use shared memory</entry> + --> + <entry>共有メモリを使用</entry> + </row> + + <row> + <entry><literal>'memcached'</literal></entry> + <!-- + <entry>Use <ulink url="http://memcached.org/">memcached</ulink></entry> + --> + <entry><ulink url="http://memcached.org/">memcached</ulink>を使用</entry> + </row> + + </tbody> + </tgroup> + </table> + + <para> + <!-- + Default is <literal>'shmem'</literal>. + --> + デフォルトは<literal>'shmem'</literal>です。 + </para> + + <para> + <!-- + This parameter can only be set at server start. + --> + このパラメータはサーバ起動時にのみ設定可能です。 + </para> + </listitem> + </varlistentry> + </variablelist> +</sect2> + +<sect2 id="runtime-in-memory-query-cache-config"> + <!-- + <title>Common configurations</title> + --> + <title>共通設定</title> <para> -<!-- - In memory cache saves the pair of SELECT statement - and its result - (along with the Bind parameters, if the SELECT is an - extended query). If the same SELECTs comes in, - <productname>Pgpool-II</productname> returns the value - from cache. Since no <acronym>SQL</acronym> parsing nor - access to <productname>PostgreSQL</> are involved, the serving of results - from the in memory cache is extremely fast. ---> -インメモリクエリキャッシュは、SELECT文(拡張問い合わせの場合は更にバインドパラメータ)と 検索結果をペアで記録します。 -同じSELECT文が発行された場合に、<productname>Pgpool-II</productname>はキャッシュから結果を返します。 -<acronym>SQL</acronym>の解析も<productname>PostgreSQL</>へのアクセスも行われないため、インメモリキャッシュからの結果の提供は非常に高速です。 - + <!-- + These below parameter are valid for both <literal>shmem</literal> + and <literal>memcached</literal> type query cache. + --> + 以下は<literal>shmem</literal>と<literal>memcached</literal>の両タイプのクエリキャッシュで有効なパラメータです。 </para> + <variablelist> + + <varlistentry id="guc-memqcacheexpire" xreflabel="memqcache_expire"> + <term><varname>memqcache_expire</varname> (<type>integer</type>) + <indexterm> + <!-- + <primary><varname>memqcache_expire</varname> configuration parameter</primary> + --> + <primary><varname>memqcache_expire</varname> 設定パラメータ</primary> + </indexterm> + </term> + <listitem> + <para> + <!-- + Specifies the life time of query cache in seconds. + Default is 0. which means no cache expiration and cache remains + valid until the table is updated. + --> + クエリキャッシュの寿命を秒単位で設定します。 + デフォルト0で、キャッシュの期限はなくなり、関連テーブルが更新されるまではキャッシュが有効になります。 + </para> + <para> + <!-- + This parameter can be changed by reloading the <productname>Pgpool-II</> configurations. + --> + このパラメータは<productname>Pgpool-II</>の設定を再読み込みすることで変更可能です。 +</para> + +<note> <para> -<!-- - On the other hand, it might be slower than the normal path - in some cases, because it adds some overhead to store cache. - Moreover when a table is updated, <productname>Pgpool-II - </productname> automatically deletes all the caches related - to the table. Therefore, the performance will be degraded by a system - with a lot of updates. - If the query cache hit ratio (it can be checked by using <xref linkend="SQL-SHOW-POOL-CACHE">) is lower than 70%, you might want - to disable in memory cache. ---> -反面、キャッシュをストアするオーバヘッドが生じるので、通常の方法より遅くなる場合も有ります。 -また、あるテーブルが更新された場合、<productname>Pgpool-II</productname>は自動的にそのテーブルに関係する全てのキャッシュを削除します。 -そのため、更新が多いシステムではパフォーマンスが悪くなります。 -キャッシュのヒット率(<xref linkend="SQL-SHOW-POOL-CACHE">を使って確認できます)が70%以下の場合は、インメモリクエリキャッシュ無効にしたほうがいいかもしれません。 + <!-- + <varname>memqcache_expire</varname> and + <xref linkend="guc-memqcache-auto-cache-invalidation"> are orthogonal to each other. + --> + <varname>memqcache_expire</varname>と<xref linkend="guc-memqcache-auto-cache-invalidation">は互いに独立です。 </para> - - <sect2 id="runtime-in-memory-query-cache-enabling"> -<!-- - <title>Enabling in memory query cache</title> ---> - <title>インメモリクエリキャッシュを有効にする</title> - - <variablelist> - - <varlistentry id="guc-memory-cache-enabled" xreflabel="memory_cache_enabled"> - <term><varname>memory_cache_enabled</varname> (<type>boolean</type>) - <indexterm> -<!-- - <primary><varname>memory_cache_enabled</varname> configuration parameter</primary> ---> - <primary><varname>memory_cache_enabled</varname> 設定パラメータ</primary> - </indexterm> - </term> - <listitem> - <para> -<!-- - Setting to on enables the memory cache. - Default is off. ---> -onにするとメモリキャッシュが有効になります。 -デフォルトはoffです。 - </para> - <para> -<!-- - This parameter can be changed by reloading the <productname>Pgpool-II</> configurations. ---> -このパラメータは<productname>Pgpool-II</>の設定を再読み込みすることで変更可能です。 - </para> - </listitem> - </varlistentry> - </variablelist> - </sect2> - - <sect2 id="runtime-in-memory-query-cache-choose-storage"> -<!-- - <title>Choosing cache storage</title> ---> - <title>キャッシュストレージの選択</title> - - <variablelist> - - <varlistentry id="guc-memqcache-method" xreflabel="memqcache_method"> - <term><varname>memqcache_method</varname> (<type>string</type>) - <indexterm> -<!-- - <primary><varname>memqcache_method</varname> configuration parameter</primary> ---> - <primary><varname>memqcache_method</varname> 設定パラメータ</primary> - </indexterm> - </term> - <listitem> - <para> -<!-- - Specifies the storage type to be used for the cache. - Below table contains the list of all valid values for the parameter. ---> -キャッシュに用いるストレージのタイプを指定します。 -このパラメータで有効な全ての値のリストを以下の表に示します。 - </para> - - <table id="memqcache-method-table"> - <title>Memcache method options</title> - <tgroup cols="2"> - <thead> - <row> -<!-- - <entry>Value</entry> - <entry>Description</entry> ---> - <entry>値</entry> - <entry>説明</entry> - </row> - </thead> - - <tbody> - <row> - <entry><literal>'shmem'</literal></entry> -<!-- - <entry>Use shared memory</entry> ---> - <entry>共有メモリを使用</entry> - </row> - - <row> - <entry><literal>'memcached'</literal></entry> -<!-- - <entry>Use <ulink url="http://memcached.org/">memcached</ulink></entry> ---> - <entry><ulink url="http://memcached.org/">memcached</ulink>を使用</entry> - </row> - - </tbody> - </tgroup> - </table> - - <para> -<!-- - Default is <literal>'shmem'</literal>. ---> -デフォルトは<literal>'shmem'</literal>です。 - </para> - - <para> -<!-- - This parameter can only be set at server start. ---> -このパラメータはサーバ起動時にのみ設定可能です。 - </para> - </listitem> - </varlistentry> - </variablelist> - </sect2> - - <sect2 id="runtime-in-memory-query-cache-config"> -<!-- - <title>Common configurations</title> ---> - <title>共通設定</title> +</note> + +</listitem> +</varlistentry> + +<varlistentry id="guc-memqcache-auto-cache-invalidation" xreflabel="memqcache_auto_cache_invalidation"> + <term><varname>memqcache_auto_cache_invalidation</varname> (<type>boolean</type>) + <indexterm> + <!-- + <primary><varname>memqcache_auto_cache_invalidation</varname> configuration parameter</primary> + --> + <primary><varname>memqcache_auto_cache_invalidation</varname> 設定パラメータ</primary> + </indexterm> + </term> + <listitem> <para> -<!-- - These below parameter are valid for both <literal>shmem</literal> - and <literal>memcached</literal> type query cache. ---> -以下は<literal>shmem</literal>と<literal>memcached</literal>の両タイプのクエリキャッシュで有効なパラメータです。 + <!-- + Setting to on, automatically deletes the cache related to the updated tables. + When off, cache is not deleted. + --> + onに設定した場合、更新されたテーブルに関連するキャッシュを自動で削除します。 + offならばキャッシュは削除されません。 </para> - <variablelist> - - <varlistentry id="guc-memqcacheexpire" xreflabel="memqcache_expire"> - <term><varname>memqcache_expire</varname> (<type>integer</type>) - <indexterm> -<!-- - <primary><varname>memqcache_expire</varname> configuration parameter</primary> ---> - <primary><varname>memqcache_expire</varname> 設定パラメータ</primary> - </indexterm> - </term> - <listitem> - <para> -<!-- - Specifies the life time of query cache in seconds. - Default is 0. which means no cache expiration and cache remains - valid until the table is updated. ---> -クエリキャッシュの寿命を秒単位で設定します。 -デフォルト0で、キャッシュの期限はなくなり、関連テーブルが更新されるまではキャッシュが有効になります。 - </para> - <para> -<!-- - This parameter can be changed by reloading the <productname>Pgpool-II</> configurations. ---> -このパラメータは<productname>Pgpool-II</>の設定を再読み込みすることで変更可能です。 - </para> - - <note> - <para> -<!-- - <varname>memqcache_expire</varname> and - <xref linkend="guc-memqcache-auto-cache-invalidation"> are orthogonal to each other. ---> -<varname>memqcache_expire</varname>と<xref linkend="guc-memqcache-auto-cache-invalidation">は互いに独立です。 - </para> - </note> - - </listitem> - </varlistentry> - - <varlistentry id="guc-memqcache-auto-cache-invalidation" xreflabel="memqcache_auto_cache_invalidation"> - <term><varname>memqcache_auto_cache_invalidation</varname> (<type>boolean</type>) - <indexterm> -<!-- - <primary><varname>memqcache_auto_cache_invalidation</varname> configuration parameter</primary> ---> - <primary><varname>memqcache_auto_cache_invalidation</varname> 設定パラメータ</primary> - </indexterm> - </term> - <listitem> - <para> -<!-- - Setting to on, automatically deletes the cache related to the updated tables. - When off, cache is not deleted. ---> -onに設定した場合、更新されたテーブルに関連するキャッシュを自動で削除します。 -offならばキャッシュは削除されません。 - </para> - <para> -<!-- - Default is on. ---> -デフォルト値はonです。 - </para> - <note> - <para> -<!-- - <varname>memqcache_auto_cache_invalidation</varname> - and <xref linkend="guc-memqcacheexpire"> are orthogonal to each other. ---> -<varname>memqcache_auto_cache_invalidation</varname>と<xref linkend="guc-memqcacheexpire">は互いに独立です。 - </para> - </note> - <para> -<!-- - This parameter can be changed by reloading the <productname>Pgpool-II</> configurations. ---> -このパラメータは<productname>Pgpool-II</>の設定を再読み込みすることで変更可能です。 - </para> - </listitem> - </varlistentry> - - <varlistentry id="guc-memqcache-maxcache" xreflabel="memqcache_maxcache"> - <term><varname>memqcache_maxcache</varname> (<type>integer</type>) - <indexterm> -<!-- - <primary><varname>memqcache_maxcache</varname> configuration parameter</primary> ---> - <primary><varname>memqcache_maxcache</varname> 設定パラメータ</primary> - </indexterm> - </term> - <listitem> - <para> -<!-- - Specifies the maximum size in bytes of the SELECT query result to be cached. - The result with data size larger than this value will not be cached by - <productname>Pgpool-II</productname>. - When the caching of data is rejected because of the size constraint the following - message is shown. ---> -キャッシュされるSELECTクエリ結果の最大サイズをバイト数で指定します。 -この値より大きいサイズのデータの結果は<productname>Pgpool-II</productname>にキャッシュされません。 -サイズの制約によりデータのキャッシュができなかった場合、以下のメッセージが表示されます。 - <programlisting> -LOG: pid 13756: pool_add_temp_query_cache: data size exceeds memqcache_maxcache. current:4095 requested:111 memq_maxcache:4096 - </programlisting> - </para> - <note> - <para> -<!-- - For the shared memory query(<literal>'shmem'</literal>) cache the - <varname>memqcache_maxcache</varname> must be set lower than - <xref linkend="guc-memqcache-cache-block-size"> and for <literal>'memcached'</literal> + <para> + <!-- + Default is on. + --> + デフォルト値はonです。 + </para> + <note> + <para> + <!-- + <varname>memqcache_auto_cache_invalidation</varname> + and <xref linkend="guc-memqcacheexpire"> are orthogonal to each other. + --> + <varname>memqcache_auto_cache_invalidation</varname>と<xref linkend="guc-memqcacheexpire">は互いに独立です。 + </para> + </note> + <para> + <!-- + This parameter can be changed by reloading the <productname>Pgpool-II</> configurations. + --> + このパラメータは<productname>Pgpool-II</>の設定を再読み込みすることで変更可能です。 +</para> +</listitem> +</varlistentry> + +<varlistentry id="guc-memqcache-maxcache" xreflabel="memqcache_maxcache"> + <term><varname>memqcache_maxcache</varname> (<type>integer</type>) + <indexterm> + <!-- + <primary><varname>memqcache_maxcache</varname> configuration parameter</primary> + --> + <primary><varname>memqcache_maxcache</varname> 設定パラメータ</primary> + </indexterm> + </term> + <listitem> + <para> + <!-- + Specifies the maximum size in bytes of the SELECT query result to be cached. + The result with data size larger than this value will not be cached by + <productname>Pgpool-II</productname>. + When the caching of data is rejected because of the size constraint the following + message is shown. + --> + キャッシュされるSELECTクエリ結果の最大サイズをバイト数で指定します。 + この値より大きいサイズのデータの結果は<productname>Pgpool-II</productname>にキャッシュされません。 + サイズの制約によりデータのキャッシュができなかった場合、以下のメッセージが表示されます。 + <programlisting> + LOG: pid 13756: pool_add_temp_query_cache: data size exceeds memqcache_maxcache. current:4095 requested:111 memq_maxcache:4096 + </programlisting> + </para> + <note> + <para> + <!-- + For the shared memory query(<literal>'shmem'</literal>) cache the + <varname>memqcache_maxcache</varname> must be set lower than + <xref linkend="guc-memqcache-cache-block-size"> and for <literal>'memcached'</literal> it must be lower than the size of slab (default is 1 MB). ---> -共有メモリによるクエリキャッシュ(<literal>'shmem'</literal>)の場合は、<varname>memqcache_maxcache</varname>は<xref linkend="guc-memqcache-cache-block-size">を超えないように、<literal>'memcached'</literal>を使用する場合は、slabのサイズ(デフォルトで1MB)を超えないようにしてください。 - </para> - </note> - <para> -<!-- - This parameter can be changed by reloading the <productname>Pgpool-II</> configurations. ---> -このパラメータは<productname>Pgpool-II</>の設定を再読み込みすることで変更可能です。 - </para> - </listitem> - </varlistentry> - - <varlistentry id="guc-white-memqcache-table-list" xreflabel="white_memqcache_table_list"> - <term><varname>white_memqcache_table_list</varname> (<type>string</type>) - <indexterm> -<!-- - <primary><varname>white_memqcache_table_list</varname> configuration parameter</primary> ---> - <primary><varname>white_memqcache_table_list</varname> 設定パラメータ</primary> - </indexterm> - </term> - <listitem> - - <para> -<!-- - Specifies a comma separated list of table names whose SELECT - results should be cached by the <productname>Pgpool-II</productname>. ---> -SELECT結果が<productname>Pgpool-II</productname>にキャッシュされるべきテーブル名のリストをカンマ区切りで指定します。 - </para> - - <para> -<!-- - You can use regular expression into the list to match table name - (to which ^ and $ are automatically added). ---> -テーブル名のマッチングには正規表現も利用できます (指定した各表現に ^ と $ をつけた形で使われます)。 - </para> - - <note> - <para> -<!-- - If the queries can refer the table with and without the schema - qualification then you must add both entries(with and without - schema name) in the list. ---> -スキーマ名を付けないテーブル名とスキーマ名を付けた形の両方をクエリの中で使う場合は、両方共リストに登録してください。 - <programlisting> -#For example: -#If the queries sometime use "table1" and other times "public.table1" -#to refer the table1 then the white_memqcache_table_list -#would be configured as follows. - -white_memqcache_table_list = "table1,public.table1" - - </programlisting> - - </para> - </note> - <note> - <para> -<!-- - <varname>white_memqcache_table_list</varname> takes - precedence over <xref linkend="guc-black-memqcache-table-list"> ---> -<varname>white_memqcache_table_list</varname>は<xref linkend="guc-black-memqcache-table-list">より優先されます。 - </para> - </note> - <para> -<!-- - This parameter can be changed by reloading the <productname>Pgpool-II</> configurations. ---> -このパラメータは<productname>Pgpool-II</>の設定を再読み込みすることで変更可能です。 - </para> - </listitem> - </varlistentry> - - <varlistentry id="guc-black-memqcache-table-list" xreflabel="black_memqcache_table_list"> - <term><varname>black_memqcache_table_list</varname> (<type>string</type>) - <indexterm> -<!-- - <primary><varname>black_memqcache_table_list</varname> configuration parameter</primary> ---> - <primary><varname>black_memqcache_table_list</varname> 設定パラメータ</primary> - </indexterm> - </term> - <listitem> - <para> -<!-- - Specifies a comma separated list of table names whose SELECT - results should <emphasis>NOT</emphasis> be cached by the <productname> - Pgpool-II</productname>. ---> -SELECT結果が<productname>Pgpool-II</productname>にキャッシュされる<emphasis>べきでない</emphasis>テーブル名のリストをカンマ区切りで指定します。 - </para> - - <para> -<!-- - You can use regular expression into the list to match table name - (to which ^ and $ are automatically added), ---> -テーブル名のマッチングには正規表現も利用できます (指定した各表現に ^ と $ をつけた形で使われます)。 - </para> - - <note> - <para> -<!-- - If the queries can refer the table with and without the schema - qualification then you must add both entries(with and without - schema name) in the list. ---> -スキーマ名を付けないテーブル名とスキーマ名を付けた形の両方をクエリの中で使う場合は、両方共リストに登録してください。 - <programlisting> -#For example: -#If the queries sometime use "table1" and other times "public.table1" -#to refer the table1 then the black_memqcache_table_list -#would be configured as follows. - -black_function_list = "table1,public.table1" - - </programlisting> - - </para> - </note> - <para> -<!-- - This parameter can be changed by reloading the <productname>Pgpool-II</> configurations. ---> -このパラメータは<productname>Pgpool-II</>の設定を再読み込みすることで変更可能です。 - </para> - </listitem> - </varlistentry> - - <varlistentry id="guc-memqcache-oiddir" xreflabel="memqcache_oiddir"> - <term><varname>memqcache_oiddir</varname> (<type>string</type>) - <indexterm> -<!-- - <primary><varname>memqcache_oiddir</varname> configuration parameter</primary> ---> - <primary><varname>memqcache_oiddir</varname> 設定パラメータ</primary> - </indexterm> - </term> - <listitem> - <para> -<!-- - Specifies the full path to the directory for storing the - <literal>oids</literal> of tables used by SELECT queries. ---> -SELECTクエリが使用するテーブルに<literal>OID</literal>を格納するディレクトリへのフルパスで指定します。 - - </para> - <para> -<!-- - <varname>memqcache_oiddir</varname> directory contains the sub directories - for the databases. The directory name is the OID of the database. In addition, each - database directory contains the files for each table used by SELECT statement. - Again the name of the file is the OID of the table. - These files contains the pointers to query cache which are used as key for - deleting the caches. ---> -<varname>memqcache_oiddir</varname>には、各データベースのためのディレクトリが格納されます。 -そのディレクトリ名はデータベースのOIDです。 -更に、各データベースディレクトリその下には各テーブルの「ためのファイルが格納されます。 -そのファイル名は同じくテーブルのOIDです。 -これらのファイルの中にはクエリキャッシュへのポインタが格納されており、 キャッシュを削除する際のキーとして使われます。 - </para> - <note> - <para> -<!-- - Normal restart of <productname>Pgpool-II</productname> does not clear the - contents of <varname>memqcache_oiddir</varname>. ---> -<productname>Pgpool-II</productname>の通常の再起動では<varname>memqcache_oiddir</varname>の中身はクリアされません。 - </para> - </note> - <para> -<!-- - This parameter can be changed by reloading the <productname>Pgpool-II</> configurations. ---> -このパラメータは<productname>Pgpool-II</>の設定を再読み込みすることで変更可能です。 - </para> - </listitem> - </varlistentry> - - </variablelist> - </sect2> - - <sect2 id="runtime-in-memory-query-cache-shmem-config"> -<!-- - <title>Configurations to use shared memory</title> ---> - <title>共有メモリ使用時の設定</title> + --> + 共有メモリによるクエリキャッシュ(<literal>'shmem'</literal>)の場合は、<varname>memqcache_maxcache</varname>は<xref linkend="guc-memqcache-cache-block-size">を超えないように、<literal>'memcached'</literal>を使用する場合は、slabのサイズ(デフォルトで1MB)を超えないようにしてください。 + </para> + </note> + <para> + <!-- + This parameter can be changed by reloading the <productname>Pgpool-II</> configurations. + --> + このパラメータは<productname>Pgpool-II</>の設定を再読み込みすることで変更可能です。 +</para> +</listitem> +</varlistentry> + +<varlistentry id="guc-white-memqcache-table-list" xreflabel="white_memqcache_table_list"> + <term><varname>white_memqcache_table_list</varname> (<type>string</type>) + <indexterm> + <!-- + <primary><varname>white_memqcache_table_list</varname> configuration parameter</primary> + --> + <primary><varname>white_memqcache_table_list</varname> 設定パラメータ</primary> + </indexterm> + </term> + <listitem> <para> -<!-- - These are the parameters used with shared memory as the cache storage. ---> -これらはキャッシュストレージとして共有メモリを使用した場合に使われるパラメーターです。 + <!-- + Specifies a comma separated list of table names whose SELECT + results should be cached by the <productname>Pgpool-II</productname>. + --> + SELECT結果が<productname>Pgpool-II</productname>にキャッシュされるべきテーブル名のリストをカンマ区切りで指定します。 </para> - <variablelist> - - <varlistentry id="guc-memqcache-total-size" xreflabel="memqcache_total_size"> - <term><varname>memqcache_total_size</varname> (<type>integer</type>) - <indexterm> -<!-- - <primary><varname>memqcache_total_size</varname> configuration parameter</primary> ---> - <primary><varname>memqcache_total_size</varname> 設定パラメータ</primary> - </indexterm> - </term> - <listitem> - <para> -<!-- - Specifies the shared memory cache size in bytes. ---> -共有メモリのキャッシュサイズをバイト単位で指定します。 - </para> - <para> -<!-- - This parameter can only be set at server start. ---> -このパラメータはサーバ起動時にのみ設定可能です。 - </para> - </listitem> - </varlistentry> - - <varlistentry id="guc-memqcache-max-num-cache" xreflabel="memqcache_max_num_cache"> - <term><varname>memqcache_max_num_cache</varname> (<type>integer</type>) - <indexterm> -<!-- - <primary><varname>memqcache_max_num_cache</varname> configuration parameter</primary> ---> - <primary><varname>memqcache_max_num_cache</varname> 設定パラメータ</primary> - </indexterm> - </term> - <listitem> - <para> -<!-- - Specifies the number of cache entries. This is used to define the size of cache management space. ---> -キャッシュエントリの数を指定します。 -この設定項目は、キャッシュの管理領域の大きさを決めるために使用します。 - </para> - <note> - <para> -<!-- - The management space size can be calculated by: - <varname>memqcache_max_num_cache</varname> * 48 bytes. - Too small number will cause an error while registering cache. - On the other hand too large number will just waste space. ---> -管理領域の大きさは、<varname>memqcache_max_num_cache</varname> * 48バイトで計算できます。 -少なすぎるとキャッシュを登録することができずにエラーになります。 -逆に多すぎると単に空間の無駄になります。 - </para> - </note> - <para> -<!-- - This parameter can only be set at server start. ---> -このパラメータはサーバ起動時にのみ設定可能です。 - </para> - </listitem> - </varlistentry> - - <varlistentry id="guc-memqcache-cache-block-size" xreflabel="memqcache_cache_block_size"> - <term><varname>memqcache_cache_block_size</varname> (<type>integer</type>) - <indexterm> -<!-- - <primary><varname>memqcache_cache_block_size</varname> configuration parameter</primary> ---> - <primary><varname>memqcache_cache_block_size</varname> 設定パラメータ</primary> - </indexterm> - </term> - <listitem> - <para> -<!-- - Specifies the cache block size. <productname>Pgpool-II</productname> uses the - cache memory arranged in <varname>memqcache_cache_block_size</varname> blocks. - SELECT result is packed into the block and must fit in a single block. - Therefore, the results larger than <varname>memqcache_cache_block_size</varname> are - not cached. ---> -キャッシュのブロックサイズを指定します。 -<productname>Pgpool-II</productname>は<varname>memqcache_cache_block_size</varname>のブロックで管理されたキャッシュメモリを利用します。 -SELECT結果はこのブロックに詰め込まれ、1つのブロックに収まらなければなりません。 -従って、<varname>memqcache_cache_block_size</varname>を検索結果が超えると、キャッシュされません。。 - </para> - - <para> -<!-- - <varname>memqcache_cache_block_size</varname> must be set to atleast 512. ---> -<varname>memqcache_cache_block_size</varname>は、512以上の値でなければなりません。 - </para> + <para> + <!-- + You can use regular expression into the list to match table name + (to which ^ and $ are automatically added). + --> + テーブル名のマッチングには正規表現も利用できます (指定した各表現に ^ と $ をつけた形で使われます)。 + </para> - <para> -<!-- - This parameter can only be set at server start. ---> -このパラメータはサーバ起動時にのみ設定可能です。 - </para> - </listitem> - </varlistentry> + <note> + <para> + <!-- + If the queries can refer the table with and without the schema + qualification then you must add both entries(with and without + schema name) in the list. + --> + スキーマ名を付けないテーブル名とスキーマ名を付けた形の両方をクエリの中で使う場合は、両方共リストに登録してください。 + <programlisting> + #For example: + #If the queries sometime use "table1" and other times "public.table1" + #to refer the table1 then the white_memqcache_table_list + #would be configured as follows. + + white_memqcache_table_list = "table1,public.table1" + + </programlisting> + + </para> + </note> + <note> + <para> + <!-- + <varname>white_memqcache_table_list</varname> takes + precedence over <xref linkend="guc-black-memqcache-table-list"> + --> + <varname>white_memqcache_table_list</varname>は<xref linkend="guc-black-memqcache-table-list">より優先されます。 + </para> + </note> + <para> + <!-- + This parameter can be changed by reloading the <productname>Pgpool-II</> configurations. + --> + このパラメータは<productname>Pgpool-II</>の設定を再読み込みすることで変更可能です。 +</para> +</listitem> +</varlistentry> + +<varlistentry id="guc-black-memqcache-table-list" xreflabel="black_memqcache_table_list"> + <term><varname>black_memqcache_table_list</varname> (<type>string</type>) + <indexterm> + <!-- + <primary><varname>black_memqcache_table_list</varname> configuration parameter</primary> + --> + <primary><varname>black_memqcache_table_list</varname> 設定パラメータ</primary> + </indexterm> + </term> + <listitem> + <para> + <!-- + Specifies a comma separated list of table names whose SELECT + results should <emphasis>NOT</emphasis> be cached by the <productname> + Pgpool-II</productname>. + --> + SELECT結果が<productname>Pgpool-II</productname>にキャッシュされる<emphasis>べきでない</emphasis>テーブル名のリストをカンマ区切りで指定します。 + </para> - </variablelist> - </sect2> + <para> + <!-- + You can use regular expression into the list to match table name + (to which ^ and $ are automatically added), + --> + テーブル名のマッチングには正規表現も利用できます (指定した各表現に ^ と $ をつけた形で使われます)。 + </para> - <sect2 id="runtime-in-memory-query-cache-memcached-config"> -<!-- - <title>Configurations to use memcached</title> ---> - <title>memcached使用時の設定</title> + <note> + <para> + <!-- + If the queries can refer the table with and without the schema + qualification then you must add both entries(with and without + schema name) in the list. + --> + スキーマ名を付けないテーブル名とスキーマ名を付けた形の両方をクエリの中で使う場合は、両方共リストに登録してください。 + <programlisting> + #For example: + #If the queries sometime use "table1" and other times "public.table1" + #to refer the table1 then the black_memqcache_table_list + #would be configured as follows. + + black_function_list = "table1,public.table1" + + </programlisting> + + </para> + </note> + <para> + <!-- + This parameter can be changed by reloading the <productname>Pgpool-II</> configurations. + --> + このパラメータは<productname>Pgpool-II</>の設定を再読み込みすることで変更可能です。 +</para> +</listitem> +</varlistentry> + +<varlistentry id="guc-memqcache-oiddir" xreflabel="memqcache_oiddir"> + <term><varname>memqcache_oiddir</varname> (<type>string</type>) + <indexterm> + <!-- + <primary><varname>memqcache_oiddir</varname> configuration parameter</primary> + --> + <primary><varname>memqcache_oiddir</varname> 設定パラメータ</primary> + </indexterm> + </term> + <listitem> + <para> + <!-- + Specifies the full path to the directory for storing the + <literal>oids</literal> of tables used by SELECT queries. + --> + SELECTクエリが使用するテーブルに<literal>OID</literal>を格納するディレクトリへのフルパスで指定します。 + </para> <para> -<!-- - These are the parameters used with memcached as the cache storage. ---> -これらはキャッシュストレージとしてmemcachedを使用した場合に使われるパラメーターです。 + <!-- + <varname>memqcache_oiddir</varname> directory contains the sub directories + for the databases. The directory name is the OID of the database. In addition, each + database directory contains the files for each table used by SELECT statement. + Again the name of the file is the OID of the table. + These files contains the pointers to query cache which are used as key for + deleting the caches. + --> + <varname>memqcache_oiddir</varname>には、各データベースのためのディレクトリが格納されます。 + そのディレクトリ名はデータベースのOIDです。 + 更に、各データベースディレクトリその下には各テーブルの「ためのファイルが格納されます。 + そのファイル名は同じくテーブルのOIDです。 + これらのファイルの中にはクエリキャッシュへのポインタが格納されており、 キャッシュを削除する際のキーとして使われます。 </para> + <note> + <para> + <!-- + Normal restart of <productname>Pgpool-II</productname> does not clear the + contents of <varname>memqcache_oiddir</varname>. + --> + <productname>Pgpool-II</productname>の通常の再起動では<varname>memqcache_oiddir</varname>の中身はクリアされません。 + </para> + </note> + <para> + <!-- + This parameter can be changed by reloading the <productname>Pgpool-II</> configurations. + --> + このパラメータは<productname>Pgpool-II</>の設定を再読み込みすることで変更可能です。 +</para> +</listitem> +</varlistentry> + +</variablelist> +</sect2> + +<sect2 id="runtime-in-memory-query-cache-shmem-config"> + <!-- + <title>Configurations to use shared memory</title> + --> + <title>共有メモリ使用時の設定</title> - <variablelist> + <para> + <!-- + These are the parameters used with shared memory as the cache storage. + --> + これらはキャッシュストレージとして共有メモリを使用した場合に使われるパラメーターです。 + </para> - <varlistentry id="guc-memqcache-memcached-host" xreflabel="memqcache_memcached_host"> - <term><varname>memqcache_memcached_host</varname> (<type>string</type>) - <indexterm> -<!-- - <primary><varname>memqcache_memcached_host</varname> configuration parameter</primary> ---> - <primary><varname>memqcache_memcached_host</varname> 設定パラメータ</primary> - </indexterm> - </term> - <listitem> - <para> -<!-- - Specifies the host name or the IP address on which <literal>memcached</literal> - works. You can use <literal>'localhost'</literal> if <literal>memcached</literal> - and <productname>Pgpool-II</productname> resides on same server. ---> -<literal>memcached</literal>が動いているホスト名またはIPアドレスを指定します。 -<productname>Pgpool-II</productname>と同じマシンで<literal>memcached</literal>を動かす場合は、<literal>'localhost'</literal>が使えます。 - </para> - <para> -<!-- - This parameter can only be set at server start. ---> -このパラメータはサーバ起動時にのみ設定可能です。 - </para> - </listitem> - </varlistentry> - - <varlistentry id="guc-memqcache-memcached-port" xreflabel="memqcache_memcached_port"> - <term><varname>memqcache_memcached_port</varname> (<type>integer</type>) - <indexterm> -<!-- - <primary><varname>memqcache_memcached_port</varname> configuration parameter</primary> ---> - <primary><varname>memqcache_memcached_port</varname> 設定パラメータ</primary> - </indexterm> - </term> - <listitem> - <para> -<!-- - Specifies the port number of <acronym>memcached</acronym>. - Default is 11211. ---> -<acronym>memcached</acronym>のポート番号を指定します。 -デフォルトは 11211 です。 + <variablelist> + + <varlistentry id="guc-memqcache-total-size" xreflabel="memqcache_total_size"> + <term><varname>memqcache_total_size</varname> (<type>integer</type>) + <indexterm> + <!-- + <primary><varname>memqcache_total_size</varname> configuration parameter</primary> + --> + <primary><varname>memqcache_total_size</varname> 設定パラメータ</primary> + </indexterm> + </term> + <listitem> + <para> + <!-- + Specifies the shared memory cache size in bytes. + --> + 共有メモリのキャッシュサイズをバイト単位で指定します。 + </para> + <para> + <!-- + This parameter can only be set at server start. + --> + このパラメータはサーバ起動時にのみ設定可能です。 + </para> + </listitem> + </varlistentry> + + <varlistentry id="guc-memqcache-max-num-cache" xreflabel="memqcache_max_num_cache"> + <term><varname>memqcache_max_num_cache</varname> (<type>integer</type>) + <indexterm> + <!-- + <primary><varname>memqcache_max_num_cache</varname> configuration parameter</primary> + --> + <primary><varname>memqcache_max_num_cache</varname> 設定パラメータ</primary> + </indexterm> + </term> + <listitem> + <para> + <!-- + Specifies the number of cache entries. This is used to define the size of cache management space. + --> + キャッシュエントリの数を指定します。 + この設定項目は、キャッシュの管理領域の大きさを決めるために使用します。 + </para> + <note> + <para> + <!-- + The management space size can be calculated by: + <varname>memqcache_max_num_cache</varname> * 48 bytes. + Too small number will cause an error while registering cache. + On the other hand too large number will just waste space. + --> + 管理領域の大きさは、<varname>memqcache_max_num_cache</varname> * 48バイトで計算できます。 + 少なすぎるとキャッシュを登録することができずにエラーになります。 + 逆に多すぎると単に空間の無駄になります。 + </para> + </note> + <para> + <!-- + This parameter can only be set at server start. + --> + このパラメータはサーバ起動時にのみ設定可能です。 + </para> + </listitem> + </varlistentry> + + <varlistentry id="guc-memqcache-cache-block-size" xreflabel="memqcache_cache_block_size"> + <term><varname>memqcache_cache_block_size</varname> (<type>integer</type>) + <indexterm> + <!-- + <primary><varname>memqcache_cache_block_size</varname> configuration parameter</primary> + --> + <primary><varname>memqcache_cache_block_size</varname> 設定パラメータ</primary> + </indexterm> + </term> + <listitem> + <para> + <!-- + Specifies the cache block size. <productname>Pgpool-II</productname> uses the + cache memory arranged in <varname>memqcache_cache_block_size</varname> blocks. + SELECT result is packed into the block and must fit in a single block. + Therefore, the results larger than <varname>memqcache_cache_block_size</varname> are + not cached. + --> + キャッシュのブロックサイズを指定します。 + <productname>Pgpool-II</productname>は<varname>memqcache_cache_block_size</varname>のブロックで管理されたキャッシュメモリを利用します。 + SELECT結果はこのブロックに詰め込まれ、1つのブロックに収まらなければなりません。 + 従って、<varname>memqcache_cache_block_size</varname>を検索結果が超えると、キャッシュされません。。 + </para> + + <para> + <!-- + <varname>memqcache_cache_block_size</varname> must be set to atleast 512. + --> + <varname>memqcache_cache_block_size</varname>は、512以上の値でなければなりません。 + </para> + + <para> + <!-- + This parameter can only be set at server start. + --> + このパラメータはサーバ起動時にのみ設定可能です。 + </para> + </listitem> + </varlistentry> + + </variablelist> +</sect2> + +<sect2 id="runtime-in-memory-query-cache-memcached-config"> + <!-- + <title>Configurations to use memcached</title> + --> + <title>memcached使用時の設定</title> - </para> - <para> -<!-- - This parameter can only be set at server start. ---> -このパラメータはサーバ起動時にのみ設定可能です。 - </para> - </listitem> - </varlistentry> + <para> + <!-- + These are the parameters used with memcached as the cache storage. + --> + これらはキャッシュストレージとしてmemcachedを使用した場合に使われるパラメーターです。 + </para> - </variablelist> - </sect2> + <variablelist> + + <varlistentry id="guc-memqcache-memcached-host" xreflabel="memqcache_memcached_host"> + <term><varname>memqcache_memcached_host</varname> (<type>string</type>) + <indexterm> + <!-- + <primary><varname>memqcache_memcached_host</varname> configuration parameter</primary> + --> + <primary><varname>memqcache_memcached_host</varname> 設定パラメータ</primary> + </indexterm> + </term> + <listitem> + <para> + <!-- + Specifies the host name or the IP address on which <literal>memcached</literal> + works. You can use <literal>'localhost'</literal> if <literal>memcached</literal> + and <productname>Pgpool-II</productname> resides on same server. + --> + <literal>memcached</literal>が動いているホスト名またはIPアドレスを指定します。 + <productname>Pgpool-II</productname>と同じマシンで<literal>memcached</literal>を動かす場合は、<literal>'localhost'</literal>が使えます。 + </para> + <para> + <!-- + This parameter can only be set at server start. + --> + このパラメータはサーバ起動時にのみ設定可能です。 + </para> + </listitem> + </varlistentry> + + <varlistentry id="guc-memqcache-memcached-port" xreflabel="memqcache_memcached_port"> + <term><varname>memqcache_memcached_port</varname> (<type>integer</type>) + <indexterm> + <!-- + <primary><varname>memqcache_memcached_port</varname> configuration parameter</primary> + --> + <primary><varname>memqcache_memcached_port</varname> 設定パラメータ</primary> + </indexterm> + </term> + <listitem> + <para> + <!-- + Specifies the port number of <acronym>memcached</acronym>. + Default is 11211. + --> + <acronym>memcached</acronym>のポート番号を指定します。 + デフォルトは 11211 です。 + + </para> + <para> + <!-- + This parameter can only be set at server start. + --> + このパラメータはサーバ起動時にのみ設定可能です。 + </para> + </listitem> + </varlistentry> + + </variablelist> +</sect2> </sect1> diff --git a/doc/src/sgml/memcache.sgml b/doc/src/sgml/memcache.sgml index 579357e2f..b2c8fe843 100644 --- a/doc/src/sgml/memcache.sgml +++ b/doc/src/sgml/memcache.sgml @@ -18,432 +18,432 @@ <productname>Pgpool-II</productname> returns the value from cache. Since no <acronym>SQL</acronym> parsing nor access to <productname>PostgreSQL</> are involved, the serving of results - from the in memory cache is extremely fast. +from the in memory cache is extremely fast. +</para> +<para> + On the other hand, it might be slower than the normal path + in some cases, because it adds some overhead to store cache. + Moreover when a table is updated, <productname>Pgpool-II + </productname> automatically deletes all the caches related to the + table. Therefore, the performance will be degraded by a system with + a lot of updates. If the query cache hit ratio (it can be checked + by using <xref linkend="SQL-SHOW-POOL-CACHE">) is lower than 70%, + you might want to disable in memory cache. +</para> + +<sect2 id="runtime-in-memory-query-cache-enabling"> + <title>Enabling in memory query cache</title> + + <variablelist> + + <varlistentry id="guc-memory-cache-enabled" xreflabel="memory_cache_enabled"> + <term><varname>memory_cache_enabled</varname> (<type>boolean</type>) + <indexterm> + <primary><varname>memory_cache_enabled</varname> configuration parameter</primary> + </indexterm> + </term> + <listitem> + <para> + Setting to on enables the memory cache. + Default is off. + </para> + <para> + This parameter can be changed by reloading the <productname>Pgpool-II</> configurations. +</para> +</listitem> +</varlistentry> +</variablelist> +</sect2> + +<sect2 id="runtime-in-memory-query-cache-choose-storage"> + <title>Choosing cache storage</title> + + <variablelist> + + <varlistentry id="guc-memqcache-method" xreflabel="memqcache_method"> + <term><varname>memqcache_method</varname> (<type>string</type>) + <indexterm> + <primary><varname>memqcache_method</varname> configuration parameter</primary> + </indexterm> + </term> + <listitem> + <para> + Specifies the storage type to be used for the cache. + Below table contains the list of all valid values for the parameter. + </para> + + <table id="memqcache-method-table"> + <title>Memcache method options</title> + <tgroup cols="2"> + <thead> + <row> + <entry>Value</entry> + <entry>Description</entry> + </row> + </thead> + + <tbody> + <row> + <entry><literal>'shmem'</literal></entry> + <entry>Use shared memory</entry> + </row> + + <row> + <entry><literal>'memcached'</literal></entry> + <entry>Use <ulink url="http://memcached.org/">memcached</ulink></entry> + </row> + + </tbody> + </tgroup> + </table> + + <para> + Default is <literal>'shmem'</literal>. + </para> + + <para> + This parameter can only be set at server start. + </para> + </listitem> + </varlistentry> + </variablelist> +</sect2> + +<sect2 id="runtime-in-memory-query-cache-config"> + <title>Common configurations</title> + <para> + These below parameter are valid for both <literal>shmem</literal> + and <literal>memcached</literal> type query cache. </para> + <variablelist> + + <varlistentry id="guc-memqcacheexpire" xreflabel="memqcache_expire"> + <term><varname>memqcache_expire</varname> (<type>integer</type>) + <indexterm> + <primary><varname>memqcache_expire</varname> configuration parameter</primary> + </indexterm> + </term> + <listitem> + <para> + Specifies the life time of query cache in seconds. + Default is 0. which means no cache expiration and cache remains + valid until the table is updated. + </para> + <para> + This parameter can be changed by reloading the <productname>Pgpool-II</> configurations. +</para> + +<note> <para> - On the other hand, it might be slower than the normal path - in some cases, because it adds some overhead to store cache. - Moreover when a table is updated, <productname>Pgpool-II - </productname> automatically deletes all the caches related - to the table. Therefore, the performance will be degraded by a system - with a lot of updates. - If the query cache hit ratio (it can be checked by using <xref linkend="SQL-SHOW-POOL-CACHE">) is lower than 70%, you might want - to disable in memory cache. + <varname>memqcache_expire</varname> and + <xref linkend="guc-memqcache-auto-cache-invalidation"> are orthogonal to each other. </para> +</note> + +</listitem> +</varlistentry> + +<varlistentry id="guc-memqcache-auto-cache-invalidation" xreflabel="memqcache_auto_cache_invalidation"> + <term><varname>memqcache_auto_cache_invalidation</varname> (<type>boolean</type>) + <indexterm> + <primary><varname>memqcache_auto_cache_invalidation</varname> configuration parameter</primary> + </indexterm> + </term> + <listitem> + <para> + Setting to on, automatically deletes the cache related to the updated tables. + When off, cache is not deleted. + </para> + <para> + Default is on. + </para> + <note> + <para> + This parameters <xref linkend="guc-memqcache-auto-cache-invalidation"> + and <xref linkend="guc-memqcacheexpire"> are orthogonal to each other. + </para> + </note> + <para> + This parameter can be changed by reloading the <productname>Pgpool-II</> configurations. +</para> +</listitem> +</varlistentry> + +<varlistentry id="guc-memqcache-maxcache" xreflabel="memqcache_maxcache"> + <term><varname>memqcache_maxcache</varname> (<type>integer</type>) + <indexterm> + <primary><varname>memqcache_maxcache</varname> configuration parameter</primary> + </indexterm> + </term> + <listitem> + <para> + Specifies the maximum size in bytes of the SELECT query result to be cached. + The result with data size larger than this value will not be cached by + <productname>Pgpool-II</productname>. + When the caching of data is rejected because of the size constraint the following + message is shown. + <programlisting> + LOG: pid 13756: pool_add_temp_query_cache: data size exceeds memqcache_maxcache. current:4095 requested:111 memq_maxcache:4096 + </programlisting> + </para> + <note> + <para> + For the shared memory query(<literal>'shmem'</literal>) cache the + <varname>memqcache_maxcache</varname> must be set lower than + <xref linkend="guc-memqcache-cache-block-size"> and for <literal>'memcached'</literal> + it must be lower than the size of slab (default is 1 MB). + </para> + </note> + <para> + This parameter can be changed by reloading the <productname>Pgpool-II</> configurations. +</para> +</listitem> +</varlistentry> + +<varlistentry id="guc-white-memqcache-table-list" xreflabel="white_memqcache_table_list"> + <term><varname>white_memqcache_table_list</varname> (<type>string</type>) + <indexterm> + <primary><varname>white_memqcache_table_list</varname> configuration parameter</primary> + </indexterm> + </term> + <listitem> - <sect2 id="runtime-in-memory-query-cache-enabling"> - <title>Enabling in memory query cache</title> - - <variablelist> - - <varlistentry id="guc-memory-cache-enabled" xreflabel="memory_cache_enabled"> - <term><varname>memory_cache_enabled</varname> (<type>boolean</type>) - <indexterm> - <primary><varname>memory_cache_enabled</varname> configuration parameter</primary> - </indexterm> - </term> - <listitem> - <para> - Setting to on enables the memory cache. - Default is off. - </para> - <para> - This parameter can be changed by reloading the <productname>Pgpool-II</> configurations. - </para> - </listitem> - </varlistentry> - </variablelist> - </sect2> - - <sect2 id="runtime-in-memory-query-cache-choose-storage"> - <title>Choosing cache storage</title> - - <variablelist> - - <varlistentry id="guc-memqcache-method" xreflabel="memqcache_method"> - <term><varname>memqcache_method</varname> (<type>string</type>) - <indexterm> - <primary><varname>memqcache_method</varname> configuration parameter</primary> - </indexterm> - </term> - <listitem> - <para> - Specifies the storage type to be used for the cache. - Below table contains the list of all valid values for the parameter. - </para> - - <table id="memqcache-method-table"> - <title>Memcache method options</title> - <tgroup cols="2"> - <thead> - <row> - <entry>Value</entry> - <entry>Description</entry> - </row> - </thead> - - <tbody> - <row> - <entry><literal>'shmem'</literal></entry> - <entry>Use shared memory</entry> - </row> - - <row> - <entry><literal>'memcached'</literal></entry> - <entry>Use <ulink url="http://memcached.org/">memcached</ulink></entry> - </row> - - </tbody> - </tgroup> - </table> - - <para> - Default is <literal>'shmem'</literal>. - </para> - - <para> - This parameter can only be set at server start. - </para> - </listitem> - </varlistentry> - </variablelist> - </sect2> - - <sect2 id="runtime-in-memory-query-cache-config"> - <title>Common configurations</title> <para> - These below parameter are valid for both <literal>shmem</literal> - and <literal>memcached</literal> type query cache. + Specifies a comma separated list of table names whose SELECT + results should be cached by the <productname>Pgpool-II</productname>. </para> - <variablelist> - - <varlistentry id="guc-memqcacheexpire" xreflabel="memqcache_expire"> - <term><varname>memqcache_expire</varname> (<type>integer</type>) - <indexterm> - <primary><varname>memqcache_expire</varname> configuration parameter</primary> - </indexterm> - </term> - <listitem> - <para> - Specifies the life time of query cache in seconds. - Default is 0. which means no cache expiration and cache remains - valid until the table is updated. - </para> - <para> - This parameter can be changed by reloading the <productname>Pgpool-II</> configurations. - </para> - - <note> - <para> - <varname>memqcache_expire</varname> and - <xref linkend="guc-memqcache-auto-cache-invalidation"> are orthogonal to each other. - </para> - </note> - - </listitem> - </varlistentry> - - <varlistentry id="guc-memqcache-auto-cache-invalidation" xreflabel="memqcache_auto_cache_invalidation"> - <term><varname>memqcache_auto_cache_invalidation</varname> (<type>boolean</type>) - <indexterm> - <primary><varname>memqcache_auto_cache_invalidation</varname> configuration parameter</primary> - </indexterm> - </term> - <listitem> - <para> - Setting to on, automatically deletes the cache related to the updated tables. - When off, cache is not deleted. - </para> - <para> - Default is on. - </para> - <note> - <para> - This parameters <xref linkend="guc-memqcache-auto-cache-invalidation"> - and <xref linkend="guc-memqcacheexpire"> are orthogonal to each other. - </para> - </note> - <para> - This parameter can be changed by reloading the <productname>Pgpool-II</> configurations. - </para> - </listitem> - </varlistentry> - - <varlistentry id="guc-memqcache-maxcache" xreflabel="memqcache_maxcache"> - <term><varname>memqcache_maxcache</varname> (<type>integer</type>) - <indexterm> - <primary><varname>memqcache_maxcache</varname> configuration parameter</primary> - </indexterm> - </term> - <listitem> - <para> - Specifies the maximum size in bytes of the SELECT query result to be cached. - The result with data size larger than this value will not be cached by - <productname>Pgpool-II</productname>. - When the caching of data is rejected because of the size constraint the following - message is shown. - <programlisting> -LOG: pid 13756: pool_add_temp_query_cache: data size exceeds memqcache_maxcache. current:4095 requested:111 memq_maxcache:4096 - </programlisting> - </para> - <note> - <para> - For the shared memory query(<literal>'shmem'</literal>) cache the - <varname>memqcache_maxcache</varname> must be set lower than - <xref linkend="guc-memqcache-cache-block-size"> and for <literal>'memcached'</literal> - it must be lower than the size of slab (default is 1 MB). - </para> - </note> - <para> - This parameter can be changed by reloading the <productname>Pgpool-II</> configurations. - </para> - </listitem> - </varlistentry> - - <varlistentry id="guc-white-memqcache-table-list" xreflabel="white_memqcache_table_list"> - <term><varname>white_memqcache_table_list</varname> (<type>string</type>) - <indexterm> - <primary><varname>white_memqcache_table_list</varname> configuration parameter</primary> - </indexterm> - </term> - <listitem> - <para> - Specifies a comma separated list of table names whose SELECT - results should be cached by the <productname>Pgpool-II</productname>. - </para> + <para> + You can use regular expression into the list to match table name + (to which ^ and $ are automatically added). + </para> - <para> - You can use regular expression into the list to match table name - (to which ^ and $ are automatically added). - </para> + <note> + <para> + If the queries can refer the table with and without the schema + qualification then you must add both entries(with and without + schema name) in the list. + <programlisting> + #For example: + #If the queries sometime use "table1" and other times "public.table1" + #to refer the table1 then the white_memqcache_table_list + #would be configured as follows. + + white_memqcache_table_list = "table1,public.table1" + + </programlisting> + + </para> + </note> + <note> + <para> + <varname>white_memqcache_table_list</varname> + precedence over <xref linkend="guc-black-memqcache-table-list"> + </para> + </note> + <para> + This parameter can be changed by reloading the <productname>Pgpool-II</> configurations. +</para> +</listitem> +</varlistentry> + +<varlistentry id="guc-black-memqcache-table-list" xreflabel="black_memqcache_table_list"> + <term><varname>black_memqcache_table_list</varname> (<type>string</type>) + <indexterm> + <primary><varname>black_memqcache_table_list</varname> configuration parameter</primary> + </indexterm> + </term> + <listitem> + <para> + Specifies a comma separated list of table names whose SELECT + results should <emphasis>NOT</emphasis> be cached by the <productname> + Pgpool-II</productname>. + </para> - <note> - <para> - If the queries can refer the table with and without the schema - qualification then you must add both entries(with and without - schema name) in the list. - <programlisting> -#For example: -#If the queries sometime use "table1" and other times "public.table1" -#to refer the table1 then the white_memqcache_table_list -#would be configured as follows. - -white_memqcache_table_list = "table1,public.table1" - - </programlisting> - - </para> - </note> - <note> - <para> - <varname>white_memqcache_table_list</varname> - precedence over <xref linkend="guc-black-memqcache-table-list"> - </para> - </note> - <para> - This parameter can be changed by reloading the <productname>Pgpool-II</> configurations. - </para> - </listitem> - </varlistentry> - - <varlistentry id="guc-black-memqcache-table-list" xreflabel="black_memqcache_table_list"> - <term><varname>black_memqcache_table_list</varname> (<type>string</type>) - <indexterm> - <primary><varname>black_memqcache_table_list</varname> configuration parameter</primary> - </indexterm> - </term> - <listitem> - <para> - Specifies a comma separated list of table names whose SELECT - results should <emphasis>NOT</emphasis> be cached by the <productname> - Pgpool-II</productname>. - </para> + <para> + You can use regular expression into the list to match table name + (to which ^ and $ are automatically added), + </para> - <para> - You can use regular expression into the list to match table name - (to which ^ and $ are automatically added), - </para> + <note> + <para> + If the queries can refer the table with and without the schema + qualification then you must add both entries(with and without + schema name) in the list. + <programlisting> + #For example: + #If the queries sometime use "table1" and other times "public.table1" + #to refer the table1 then the black_memqcache_table_list + #would be configured as follows. - <note> - <para> - If the queries can refer the table with and without the schema - qualification then you must add both entries(with and without - schema name) in the list. - <programlisting> -#For example: -#If the queries sometime use "table1" and other times "public.table1" -#to refer the table1 then the black_memqcache_table_list -#would be configured as follows. - -black_function_list = "table1,public.table1" - - </programlisting> - - </para> - </note> - <para> - This parameter can be changed by reloading the <productname>Pgpool-II</> configurations. - </para> - </listitem> - </varlistentry> - - <varlistentry id="guc-memqcache-oiddir" xreflabel="memqcache_oiddir"> - <term><varname>memqcache_oiddir</varname> (<type>string</type>) - <indexterm> - <primary><varname>memqcache_oiddir</varname> configuration parameter</primary> - </indexterm> - </term> - <listitem> - <para> - Specifies the full path to the directory for storing the - <literal>oids</literal> of tables used by SELECT queries. - </para> - <para> - <varname>memqcache_oiddir</varname> directory contains the sub directories - for the databases. The directory name is the OID of the database. In addition, each - database directory contains the files for each table used by SELECT statement. - Again the name of the file is the OID of the table. - These files contains the pointers to query cache which are used as key for - deleting the caches. - </para> - <note> - <para> - Normal restart of <productname>Pgpool-II</productname> does not clear the - contents of <varname>memqcache_oiddir</varname>. - </para> - </note> - <para> - This parameter can be changed by reloading the <productname>Pgpool-II</> configurations. - </para> - </listitem> - </varlistentry> - - </variablelist> - </sect2> - - <sect2 id="runtime-in-memory-query-cache-shmem-config"> - <title>Configurations to use shared memory</title> + black_function_list = "table1,public.table1" + </programlisting> + + </para> + </note> + <para> + This parameter can be changed by reloading the <productname>Pgpool-II</> configurations. +</para> +</listitem> +</varlistentry> + +<varlistentry id="guc-memqcache-oiddir" xreflabel="memqcache_oiddir"> + <term><varname>memqcache_oiddir</varname> (<type>string</type>) + <indexterm> + <primary><varname>memqcache_oiddir</varname> configuration parameter</primary> + </indexterm> + </term> + <listitem> <para> - These are the parameters used with shared memory as the cache storage. + Specifies the full path to the directory for storing the + <literal>oids</literal> of tables used by SELECT queries. </para> + <para> + <varname>memqcache_oiddir</varname> directory contains the sub directories + for the databases. The directory name is the OID of the database. In addition, each + database directory contains the files for each table used by SELECT statement. + Again the name of the file is the OID of the table. + These files contains the pointers to query cache which are used as key for + deleting the caches. + </para> + <note> + <para> + Normal restart of <productname>Pgpool-II</productname> does not clear the + contents of <varname>memqcache_oiddir</varname>. + </para> + </note> + <para> + This parameter can be changed by reloading the <productname>Pgpool-II</> configurations. +</para> +</listitem> +</varlistentry> + +</variablelist> +</sect2> - <variablelist> - - <varlistentry id="guc-memqcache-total-size" xreflabel="memqcache_total_size"> - <term><varname>memqcache_total_size</varname> (<type>integer</type>) - <indexterm> - <primary><varname>memqcache_total_size</varname> configuration parameter</primary> - </indexterm> - </term> - <listitem> - <para> - Specifies the shared memory cache size in bytes. - </para> - <para> - This parameter can only be set at server start. - </para> - </listitem> - </varlistentry> - - <varlistentry id="guc-memqcache-max-num-cache" xreflabel="memqcache_max_num_cache"> - <term><varname>memqcache_max_num_cache</varname> (<type>integer</type>) - <indexterm> - <primary><varname>memqcache_max_num_cache</varname> configuration parameter</primary> - </indexterm> - </term> - <listitem> - <para> - Specifies the number of cache entries. This is used to define the size of cache management space. - </para> - <note> - <para> - The management space size can be calculated by: - <varname>memqcache_max_num_cache</varname> * 48 bytes. - Too small number will cause an error while registering cache. - On the other hand too large number will just waste space. - </para> - </note> - <para> - This parameter can only be set at server start. - </para> - </listitem> - </varlistentry> - - <varlistentry id="guc-memqcache-cache-block-size" xreflabel="memqcache_cache_block_size"> - <term><varname>memqcache_cache_block_size</varname> (<type>integer</type>) - <indexterm> - <primary><varname>memqcache_cache_block_size</varname> configuration parameter</primary> - </indexterm> - </term> - <listitem> - <para> - Specifies the cache block size. <productname>Pgpool-II</productname> uses the - cache memory arranged in <varname>memqcache_cache_block_size</varname> blocks. - SELECT result is packed into the block and must fit in a single block. - And the results larger than <varname>memqcache_cache_block_size</varname> are - not cached. - </para> +<sect2 id="runtime-in-memory-query-cache-shmem-config"> + <title>Configurations to use shared memory</title> + + <para> + These are the parameters used with shared memory as the cache storage. + </para> + <variablelist> + + <varlistentry id="guc-memqcache-total-size" xreflabel="memqcache_total_size"> + <term><varname>memqcache_total_size</varname> (<type>integer</type>) + <indexterm> + <primary><varname>memqcache_total_size</varname> configuration parameter</primary> + </indexterm> + </term> + <listitem> + <para> + Specifies the shared memory cache size in bytes. + </para> + <para> + This parameter can only be set at server start. + </para> + </listitem> + </varlistentry> + + <varlistentry id="guc-memqcache-max-num-cache" xreflabel="memqcache_max_num_cache"> + <term><varname>memqcache_max_num_cache</varname> (<type>integer</type>) + <indexterm> + <primary><varname>memqcache_max_num_cache</varname> configuration parameter</primary> + </indexterm> + </term> + <listitem> + <para> + Specifies the number of cache entries. This is used to define the size of cache management space. + </para> + <note> <para> - <varname>memqcache_cache_block_size</varname> must be set to atleast 512. + The management space size can be calculated by: + <varname>memqcache_max_num_cache</varname> * 48 bytes. + Too small number will cause an error while registering cache. + On the other hand too large number will just waste space. </para> + </note> + <para> + This parameter can only be set at server start. + </para> + </listitem> + </varlistentry> + + <varlistentry id="guc-memqcache-cache-block-size" xreflabel="memqcache_cache_block_size"> + <term><varname>memqcache_cache_block_size</varname> (<type>integer</type>) + <indexterm> + <primary><varname>memqcache_cache_block_size</varname> configuration parameter</primary> + </indexterm> + </term> + <listitem> + <para> + Specifies the cache block size. <productname>Pgpool-II</productname> uses the + cache memory arranged in <varname>memqcache_cache_block_size</varname> blocks. + SELECT result is packed into the block and must fit in a single block. + And the results larger than <varname>memqcache_cache_block_size</varname> are + not cached. + </para> + + <para> + <varname>memqcache_cache_block_size</varname> must be set to atleast 512. + </para> - <para> - This parameter can only be set at server start. - </para> - </listitem> - </varlistentry> + <para> + This parameter can only be set at server start. + </para> + </listitem> + </varlistentry> - </variablelist> - </sect2> + </variablelist> +</sect2> - <sect2 id="runtime-in-memory-query-cache-memcached-config"> - <title>Configurations to use memcached</title> +<sect2 id="runtime-in-memory-query-cache-memcached-config"> + <title>Configurations to use memcached</title> - <para> - These are the parameters used with memcached as the cache storage. - </para> + <para> + These are the parameters used with memcached as the cache storage. + </para> - <variablelist> - - <varlistentry id="guc-memqcache-memcached-host" xreflabel="memqcache_memcached_host"> - <term><varname>memqcache_memcached_host</varname> (<type>string</type>) - <indexterm> - <primary><varname>memqcache_memcached_host</varname> configuration parameter</primary> - </indexterm> - </term> - <listitem> - <para> - Specifies the host name or the IP address on which <literal>memcached</literal> - works. You can use <literal>'localhost'</literal> if <literal>memcached</literal> - and <productname>Pgpool-II</productname> resides on same server. - </para> - <para> - This parameter can only be set at server start. - </para> - </listitem> - </varlistentry> - - <varlistentry id="guc-memqcache-memcached-port" xreflabel="memqcache_memcached_port"> - <term><varname>memqcache_memcached_port</varname> (<type>integer</type>) - <indexterm> - <primary><varname>memqcache_memcached_port</varname> configuration parameter</primary> - </indexterm> - </term> - <listitem> - <para> - Specifies the port number of <acronym>memcached</acronym>. - Default is 11211. - </para> - <para> - This parameter can only be set at server start. - </para> - </listitem> - </varlistentry> - - </variablelist> - </sect2> + <variablelist> + + <varlistentry id="guc-memqcache-memcached-host" xreflabel="memqcache_memcached_host"> + <term><varname>memqcache_memcached_host</varname> (<type>string</type>) + <indexterm> + <primary><varname>memqcache_memcached_host</varname> configuration parameter</primary> + </indexterm> + </term> + <listitem> + <para> + Specifies the host name or the IP address on which <literal>memcached</literal> + works. You can use <literal>'localhost'</literal> if <literal>memcached</literal> + and <productname>Pgpool-II</productname> resides on same server. + </para> + <para> + This parameter can only be set at server start. + </para> + </listitem> + </varlistentry> + + <varlistentry id="guc-memqcache-memcached-port" xreflabel="memqcache_memcached_port"> + <term><varname>memqcache_memcached_port</varname> (<type>integer</type>) + <indexterm> + <primary><varname>memqcache_memcached_port</varname> configuration parameter</primary> + </indexterm> + </term> + <listitem> + <para> + Specifies the port number of <acronym>memcached</acronym>. + Default is 11211. + </para> + <para> + This parameter can only be set at server start. + </para> + </listitem> + </varlistentry> + + </variablelist> +</sect2> </sect1> [parent: 91143a1066b1]