1<!-- doc/src/sgml/config.sgml -->
2
3<sect1 id="runtime-config-connection">
4 <!--
5 <title>Connections and Authentication</title>
6 -->
7 <title>接続と認証</title>
8
9 <sect2 id="runtime-config-connection-settings">
10  <!--
11  <title>Connection Settings</title>
12  -->
13  <title>接続設定</title>
14
15  <variablelist>
16
17   <varlistentry id="guc-listen-addresses" xreflabel="listen_addresses">
18    <term><varname>listen_addresses</varname> (<type>string</type>)
19     <indexterm>
20      <!--
21      <primary><varname>listen_addresses</varname> configuration parameter</primary>
22      -->
23      <primary><varname>listen_addresses</varname> 設定パラメータ</primary>
24     </indexterm>
25    </term>
26    <listitem>
27     <para>
28      <!--
29      Specifies the hostname or IP address, on which <productname>Pgpool-II</>
30      will accept TCP/IP connections. <literal>'*'</literal>
31      accepts all incoming connections. <literal>''</literal>
32      disables TCP/IP connections. Default
33      is <literal>'localhost'</literal>. Connections via UNIX
34      domain socket are always accepted.
35      -->
36      <productname>Pgpool-II</>がTCP/IP接続を受け付けるホスト名またはIPアドレスを指定します。
37      <literal>*</literal>を指定すると入ってくる全ての接続を受け付けます。
38      <literal>''</literal>を指定するとTCP/IP接続を受け付けません。
39      デフォルト値は<literal>'localhost'</literal>です。
40      UNIXドメインソケット経由の接続は常に受け付けます。
41     </para>
42     <para>
43      <!--
44      This parameter can only be set at server start.
45      -->
46      このパラメータはサーバ起動時にのみ設定可能です。
47     </para>
48    </listitem>
49   </varlistentry>
50
51   <varlistentry id="guc-port" xreflabel="port">
52    <term><varname>port</varname> (<type>integer</type>)
53     <indexterm>
54      <!--
55      <primary><varname>port</varname> configuration parameter</primary>
56      -->
57      <primary><varname>port</varname> 設定パラメータ</primary>
58     </indexterm>
59    </term>
60    <listitem>
61     <para>
62      <!--
63      The port number used
64      by <productname>Pgpool-II</productname> to listen for
65      connections. Default is 9999.
66      -->
67      <productname>Pgpool-II</>が接続を受け付けるために監視するポート番号です。
68      デフォルト値は9999です。
69     </para>
70     <para>
71      <!--
72      This parameter can only be set at server start.
73      -->
74      このパラメータはサーバ起動時にのみ設定可能です。
75     </para>
76    </listitem>
77   </varlistentry>
78
79   <varlistentry id="guc-socket-dir" xreflabel="socket_dir">
80    <term><varname>socket_dir</varname> (<type>string</type>)
81     <indexterm>
82      <!--
83      <primary><varname>socket_dir</varname> configuration parameter</primary>
84      -->
85      <primary><varname>socket_dir</varname> 設定パラメータ</primary>
86     </indexterm>
87    </term>
88    <listitem>
89     <para>
90      <!--
91      The directory where the UNIX domain socket accepting connections for
92      <productname>Pgpool-II</productname> will be
93      created. Default is <literal>/tmp</literal>. Be aware that this
94      socket might be deleted by a cron job. We recommend to set this
95      value to <literal>/var/run</literal> or such directory.
96      -->
97      <productname>Pgpool-II</productname>が接続を受け付けるUNIXドメインソケットを置くディレクトリです。
98      デフォルト値は<literal>/tmp</literal>です。
99      このソケットは、cron によって削除されることがあるので注意してください。
100      <literal>/var/run</literal>などのディレクトリに変更することをお勧めします。
101     </para>
102     <para>
103      <!--
104      This parameter can only be set at server start.
105      -->
106      このパラメータはサーバ起動時にのみ設定可能です。
107     </para>
108    </listitem>
109   </varlistentry>
110
111   <varlistentry id="guc-pcp-listen-addresses" xreflabel="pcp_listen_addresses">
112    <term><varname>pcp_listen_addresses</varname> (<type>string</type>)
113     <indexterm>
114      <!--
115      <primary><varname>pcp_listen_addresses</varname> configuration parameter</primary>
116      -->
117      <primary><varname>pcp_listen_addresses</varname> 設定パラメータ</primary>
118     </indexterm>
119    </term>
120    <listitem>
121     <para>
122      <!--
123      Specifies the hostname or IP address, on which PCP process
124      will accept TCP/IP connections. <literal>*</literal>
125      accepts all incoming connections. <literal>''</literal>
126      disables TCP/IP connections. Default
127      is <literal>*</literal>. Connections via UNIX domain
128      socket are always accepted.
129      -->
130      PCPプロセスがTCP/IP接続を受け付けるホスト名またはIPアドレスを指定します。
131      <literal>*</literal>を指定すると入ってくる全ての接続を受け付けます。
132      <literal>''</literal>を指定するとTCP/IP接続を受け付けません。
133      デフォルト値は<literal>*</literal>です。
134      UNIXドメインソケット経由のコネクションは常に受け付けます。
135     </para>
136     <para>
137      <!--
138      This parameter can only be set at server start.
139      -->
140      このパラメータはサーバ起動時にのみ設定可能です。
141     </para>
142    </listitem>
143   </varlistentry>
144
145   <varlistentry id="guc-pcp-port" xreflabel="pcp_port">
146    <term><varname>pcp_port</varname> (<type>integer</type>)
147     <indexterm>
148      <!--
149      <primary><varname>pcp_port</varname> configuration parameter</primary>
150      -->
151      <primary><varname>pcp_port</varname> 設定パラメータ</primary>
152     </indexterm>
153    </term>
154    <listitem>
155     <para>
156      <!--
157      The port number used by PCP
158      process to listen for connections. Default is 9898.
159      -->
160      PCPプロセスが接続を受け付けるために監視するポート番号です。
161      デフォルト値は9898です。
162     </para>
163     <para>
164      <!--
165      This parameter can only be set at server start.
166      -->
167      このパラメータはサーバ起動時にのみ設定可能です。
168     </para>
169    </listitem>
170   </varlistentry>
171
172   <varlistentry id="guc-pcp-socket-dir" xreflabel="pcp_socket_dir">
173    <term><varname>pcp_socket_dir</varname> (<type>string</type>)
174     <indexterm>
175      <!--
176      <primary><varname>pcp_socket_dir</varname> configuration parameter</primary>
177      -->
178      <primary><varname>pcp_socket_dir</varname> 設定パラメータ</primary>
179     </indexterm>
180    </term>
181    <listitem>
182     <para>
183      <!--
184      The directory where the UNIX domain socket accepting connections for
185      PCP process will be
186      created. Default is <literal>/tmp</literal>. Be aware that
187      this socket might be deleted by a cron job. We recommend
188      to set this value to <literal>/var/run</literal> or such
189      directory.
190      -->
191      PCPプロセスが接続を受け付けるUNIXドメインソケットを置くディレクトリです。
192      デフォルト値は<literal>/tmp</literal>です。
193      このソケットは、cron によって削除されることがあるので注意してください。
194      <literal>/var/run</literal>などのディレクトリに変更することをお勧めします。
195     </para>
196     <para>
197      <!--
198      This parameter can only be set at server start.
199      -->
200      このパラメータはサーバ起動時にのみ設定可能です。
201     </para>
202    </listitem>
203   </varlistentry>
204
205   <varlistentry id="guc-num-init-children" xreflabel="num_init_children">
206    <term><varname>num_init_children</varname> (<type>integer</type>)
207     <indexterm>
208      <!--
209      <primary><varname>num_init_children</varname> configuration parameter</primary>
210      -->
211      <primary><varname>num_init_children</varname> 設定パラメータ</primary>
212     </indexterm>
213    </term>
214    <listitem>
215     <para>
216      <!--
217      The number of
218      preforked <productname>Pgpool-II</productname> server
219      processes. Default is 32.  num_init_children is also the
220      concurrent connections limit
221      to <productname>Pgpool-II</productname> from clients.  If
222      more than num_init_children clients try to connect to
223      <productname>Pgpool-II</productname>, <emphasis>they are
224      blocked (not rejected with an error, like <productname>PostgreSQL</>)
225      until a connection to any <productname>Pgpool-II</productname>
226      process is closed</emphasis>.  Up to
227      <xref linkend="guc-listen-backlog-multiplier">*
228      num_init_children can be queued.
229      -->
230      preforkする<productname>Pgpool-II</productname>のサーバプロセスの数です。
231      デフォルト値は32です。
232      num_init_childrenは<productname>Pgpool-II</productname>に対してクライアントが同時に接続できる上限の数でもあります。
233      num_init_childrenより多いクライアントが<productname>Pgpool-II</productname>に接続しようとした場合、<emphasis>それらのクライアントは、<productname>Pgpool-II</productname>のどれかのプロセスへの接続が閉じられるまで待たされます(<productname>PostgreSQL</>のように接続拒否エラーにはなりません。)</emphasis>。
234
235      待たされる数の上限は、<xref linkend="guc-listen-backlog-multiplier"> * num_init_children です。
236     </para>
237     <para>
238      <!--
239      The queue is inside the kernel called "listen queue". The
240      length of the listen queue is called "backlog".  There is
241      an upper limit of the backlog in some systems, and if
242      num_init_children*<xref linkend="guc-listen-backlog-multiplier">
243      exceeds the number, you need to set the backlog higher.
244      Otherwise, following problems may occur in heavy loaded systems:
245      1) connecting to <productname>Pgpool-II</productname> fails
246      2) connecting to <productname>Pgpool-II</productname> is
247      getting slow because of retries in the kernel.  You can
248      check if the listen queue is actually overflowed by using
249      "netstat -s" command.  If you find something like:
250      -->
251      待ち行列は、OS内部に作られ、「listenキュー」と呼ばれます。
252      listenキューの長さは「バックログ」と呼ばれます。
253      システムによってはバックログの上限が設定されており、<xref linkend="guc-listen-backlog-multiplier">*num_init_childrenがこれを越える場合はバックログを大きく設定する必要があります。
254       さもないと高負荷時に以下のような問題が発生する可能性があります:
255       1) <productname>Pgpool-II</productname>への接続が失敗する。
256       2) カーネル内で行われるリトライにより<productname>Pgpool-II</productname>への接続が遅くなる。
257       実際にlistenキューが溢れているかどうかは、"netstat -s"コマンドを使って確認できます。
258       もし、以下のような出力があった場合、
259       <programlisting>
260	535 times the listen queue of a socket overflowed
261       </programlisting>
262       <!--
263       then the listen queue is definitely overflowed.
264       You should increase the backlog in this case (you will be required a super user privilege).
265       -->
266       listenキューが溢れています。
267       この場合にはバックログを増やす必要があります(スーパユーザ権限が必要になります)。
268
269       <programlisting>
270	# sysctl net.core.somaxconn
271	net.core.somaxconn = 128
272	# sysctl -w net.core.somaxconn = 256
273       </programlisting>
274       <!--
275       You could add following to /etc/sysctl.conf instead.
276       -->
277       /etc/sysctl.confに以下のように書いても構いません。
278       <programlisting>
279	net.core.somaxconn = 256
280       </programlisting>
281     </para>
282     <para>
283      <!--
284      Number of connections to each <productname>PostgreSQL</> is roughly max_pool*num_init_children.
285      -->
286      <productname>PostgreSQL</>へ張られる接続数は大まかにはmax_pool*num_init_childrenとなります。
287     </para>
288
289     <para>
290      <!--
291      However, canceling a query creates another
292      connection to the backend; thus, a query cannot be canceled if
293      all the connections are in use. If you want to ensure that queries can
294      be canceled, set this value to twice the expected connections.
295      -->
296      ただし、問い合わせのキャンセルを行うとバックエンドに対して別の接続が張られます。
297      したがって、すべての接続が使用中の場合には問い合わせのキャンセルができなくなります。
298      問い合わせのキャンセルを必ず保証したい場合は、想定されるコネクション数の倍の値を設定してください。
299     </para>
300     <para>
301      <!--
302      In addition, <productname>PostgreSQL</productname> allows concurrent
303      connections for non superusers up to max_connections -
304      superuser_reserved_connections.
305      -->
306      また、<productname>PostgreSQL</productname>は一般ユーザによる同時接続をmax_connections - superuser_reserved_connections個まで許しています。
307     </para>
308     <para>
309      <!--
310      In summary, max_pool, num_init_children, max_connections,
311      superuser_reserved_connections must satisfy the following formula:
312      -->
313      まとめると、max_pool、num_init_children、max_connections、superuser_reserved_connectionsは、以下の式を満たしていなければなりません。
314      <programlisting>
315       <!--
316       max_pool*num_init_children &lt;= (max_connections - superuser_reserved_connections) (no query canceling needed)
317       max_pool*num_init_children*2 &lt;= (max_connections - superuser_reserved_connections) (query canceling needed)
318       -->
319       max_pool*num_init_children &lt;= (max_connections - superuser_reserved_connections) (クエリのキャンセルを考慮しない場合)
320       max_pool*num_init_children*2 &lt;= (max_connections - superuser_reserved_connections) (クエリのキャンセルを考慮する場合)
321      </programlisting>
322     </para>
323     <para>
324      <!--
325      This parameter can only be set at server start.
326      -->
327      このパラメータはサーバ起動時にのみ設定可能です。
328     </para>
329    </listitem>
330   </varlistentry>
331  </variablelist>
332 </sect2>
333
334 <sect2 id="runtime-config-authentication-settings">
335  <!--
336  <title>Authentication Settings</title>
337  -->
338  <title>認証設定</title>
339  <variablelist>
340
341   <varlistentry id="guc-enable-pool-hba" xreflabel="enable_pool_hba">
342    <term><varname>enable_pool_hba</varname> (<type>boolean</type>)
343     <indexterm>
344      <!--
345      <primary><varname>enable_pool_hba</varname> configuration parameter</primary>
346      -->
347      <primary><varname>enable_pool_hba</varname> 設定パラメータ</primary>
348     </indexterm>
349    </term>
350    <listitem>
351     <para>
352      <!--
353      If true, <productname>Pgpool-II</productname> will use the
354      <filename>pool_hba.conf</filename> for the client authentication.
355      See <xref linkend="auth-pool-hba-conf"> for details on how to configure
356      <filename>pool_hba.conf</filename> for client authentication.
357      Default is <literal>false</literal>
358      -->
359      <literal>true</literal>の場合、<productname>Pgpool-II</productname>はクライアント認証に<filename>pool_hba.conf</filename>を使用します。
360      クライアント認証のため<filename>pool_hba.conf</filename>を設定する方法について、詳細は<xref linkend="auth-pool-hba-conf">を参照してください。
361       デフォルトは<literal>false</literal>です。
362
363     </para>
364     <para>
365      <!--
366      This parameter can be changed by reloading the <productname>Pgpool-II</> configurations.
367      -->
368      このパラメータは<productname>Pgpool-II</>の設定を再読み込みすることで変更可能です。
369     </para>
370    </listitem>
371   </varlistentry>
372
373   <varlistentry id="guc-pool-passwd" xreflabel="pool_passwd">
374    <term><varname>pool_passwd</varname> (<type>string</type>)
375     <indexterm>
376      <!--
377      <primary><varname>pool_passwd</varname> configuration parameter</primary>
378      -->
379      <primary><varname>pool_passwd</varname> 設定パラメータ</primary>
380     </indexterm>
381    </term>
382    <listitem>
383     <para>
384      <!--
385      Specify the password file name for md5 authentication.
386      Default value is <literal>"pool_passwd"</literal>.
387      Specifying <literal>''</literal> (empty) disables the use of password file.
388      See <xref linkend="auth-md5"> for more details.
389      -->
390      md5 認証で用いるパスワードのファイルのファイル名を指定します。
391      デフォルト値は<literal>"pool_passwd"</literal>です。
392      <literal>''</literal>(空文字列)を指定すると パスワードファイルの使用は無効になります。
393      詳細は<xref linkend="auth-md5">を参照してください
394     </para>
395     <para>
396      <!--
397      This parameter can only be set at server start.
398      -->
399      このパラメータはサーバ起動時にのみ設定可能です。
400     </para>
401    </listitem>
402   </varlistentry>
403
404   <varlistentry id="guc-authentication-timeout" xreflabel="authentication_timeout">
405    <term><varname>authentication_timeout</varname> (<type>integer</type>)
406     <indexterm>
407      <!--
408      <primary><varname>authentication_timeout</varname> configuration parameter</primary>
409      -->
410      <primary><varname>authentication_timeout</varname> 設定パラメータ</primary>
411     </indexterm>
412    </term>
413    <listitem>
414     <para>
415      <!--
416      Specify the timeout in seconds for <productname>Pgpool-II</productname>
417      authentication. Specifying 0 disables the time out.
418      Default value is 60
419      -->
420      <productname>Pgpool-II</productname>の認証処理のタイムアウト時間を秒単位で指定します。
421      0 を指定するとタイムアウトを無効にします。
422      デフォルト値は60です。
423     </para>
424     <para>
425      <!--
426      This parameter can be changed by reloading the <productname>Pgpool-II</> configurations.
427      -->
428      このパラメータは<productname>Pgpool-II</>の設定を再読み込みすることで変更可能です。
429     </para>
430    </listitem>
431   </varlistentry>
432
433  </variablelist>
434
435 </sect2>
436</sect1>
437
438<sect1 id="runtime-config-runnung-mode">
439 <!--
440 <title>Running mode</title>
441 -->
442 <title>動作モード</title>
443
444 <sect2 id="runtime-config-master-slave-mode">
445  <!--
446  <title>Master slave mode</title>
447  -->
448  <title>マスタースレーブモード</title>
449
450  <para>
451   <!--
452   This mode is used to couple <productname>Pgpool-II</productname>
453   with another master/slave replication software (like <acronym>Slony-I</acronym>
454   and Streaming replication), that is responsible for doing the actual data replication.
455   -->
456   このモードは<productname>Pgpool-II</productname>と(<acronym>Slony-I</acronym>やストリームレプリケーションのような)他のマスター/スレーブ型のレプリケーションソフトウェアと組み合わせるのに使用されます。
457   実際にデータレプリケーションを行うのはこれらのソフトウェアに任されます。
458  </para>
459
460  <note>
461   <para>
462    <!--
463    The number of slave nodes are not limited to 1 and
464    <productname>Pgpool-II</productname> can have up to 127 slave nodes.
465    master/slave mode can also work just master node without any slave nodes.
466    -->
467    スレーブノードの数は1つに限定されず、<productname>Pgpool-II</productname>は127個までのスレーブノードを持つことができます。
468    マスタースレーブモードは、スレーブノードが1つも存在しない場合マスターノードのみを動作させることができます。
469   </para>
470  </note>
471
472  <para>
473   <!--
474   Load balancing (see <xref linkend="runtime-config-load-balancing"> ) can
475   also be used with master/slave mode to distribute the read load on the
476   standby backend nodes.
477   -->
478   参照負荷をスタンバイバックエンドノードに振り分ける負荷分散(<xref linkend="runtime-config-load-balancing">を参照)もマスタースレーブモードと共に使用可能です。
479  </para>
480  <para>
481   <!--
482   Following options are required to be specified for master/slave mode.
483   -->
484   マスタースレーブモードでは以下のオプションを設定する必要があります。
485  </para>
486
487  <variablelist>
488
489   <varlistentry id="guc-master-slave-mode" xreflabel="master_slave_mode">
490    <term><varname>master_slave_mode</varname> (<type>boolean</type>)
491     <indexterm>
492      <!--
493      <primary><varname>master_slave_mode</varname> configuration parameter</primary>
494      -->
495      <primary><varname>master_slave_mode</varname> 設定パラメータ</primary>
496     </indexterm>
497    </term>
498    <listitem>
499     <para>
500      <!--
501      Setting to on enables the master/slave mode.
502      Default is off.
503      -->
504      マスタースレーブモードを有効にします。
505      デフォルトはoffです。
506     </para>
507     <note>
508      <para>
509       <!--
510       <xref linkend="guc-master-slave-mode"> and <xref linkend="guc-replication-mode">
511       are mutually exclusive and only one can be enabled at a time.
512       -->
513       <xref linkend="guc-master-slave-mode">と<xref linkend="guc-replication-mode">は相互に排他的で、一度に一方しか有効にすることができません。
514      </para>
515     </note>
516     <para>
517      <!--
518      This parameter can only be set at server start.
519      -->
520      このパラメータはサーバ起動時にのみ設定可能です。
521     </para>
522    </listitem>
523   </varlistentry>
524
525   <varlistentry id="guc-master-slave-sub-mode" xreflabel="master_slave_sub_mode">
526    <term><varname>master_slave_sub_mode</varname> (<type>enum</type>)
527     <indexterm>
528      <!--
529      <primary><varname>master_slave_sub_mode</varname> configuration parameter</primary>
530      -->
531      <primary><varname>master_slave_sub_mode</varname> 設定パラメータ</primary>
532     </indexterm>
533    </term>
534    <listitem>
535     <para>
536      <!--
537      Specifies the external replication system used for data replication between
538      <productname>PostgreSQL</> nodes.
539      Below table contains the list of valid values for the parameter.
540      -->
541      <productname>PostgreSQL</>ノード間のデータレプリケーションに用いる外部のレプリケーションシステムを指定します。
542      以下の表にこのパラメータで有効な値のリストを示します。
543
544     </para>
545
546     <table id="master-slave-sub-mode-table">
547      <!--
548      <title>master slave sub mode options</title>
549      -->
550      <title>master_slave_sub_modeオプション</title>
551      <tgroup cols="2">
552       <thead>
553	<row>
554	 <!--
555	 <entry>Value</entry>
556	 <entry>Description</entry>
557	 -->
558	 <entry>値</entry>
559	 <entry>説明</entry>
560	</row>
561       </thead>
562
563       <tbody>
564	<row>
565	 <entry><literal>'slony'</literal></entry>
566	 <!--
567	 <entry>Suitable for <acronym>Slony-I</acronym></entry>
568	 -->
569	 <entry> <acronym>Slony-I</acronym>に適合</entry>
570	</row>
571
572	<row>
573	 <entry><literal>'stream'</literal></entry>
574	 <!--
575	 <entry>Suitable for <productname>PostgreSQL</>'s built-in replication system (Streaming Replication)</entry>
576	 -->
577	 <entry><productname>PostgreSQL</>の組み込みレプリケーションシステム(ストリーミングレプリケーション)に適合</entry>
578	</row>
579
580       </tbody>
581      </tgroup>
582     </table>
583
584     <para>
585      <!--
586      Default is <literal>'slony'</literal>.
587      -->
588      デフォルトは<literal>'slony'</literal>です。
589     </para>
590     <para>
591      <!--
592      This parameter can only be set at server start.
593      -->
594      このパラメータはサーバ起動時にのみ設定可能です。
595     </para>
596    </listitem>
597   </varlistentry>
598
599  </variablelist>
600 </sect2>
601
602 <sect2 id="runtime-config-replication-mode">
603  <!--
604  <title>Replication mode</title>
605  -->
606  <title>レプリケーションモード</title>
607
608  <para>
609   <!--
610   This mode makes the <productname>Pgpool-II</productname> to replicate data
611   between <productname>PostgreSQL</> backends.
612   -->
613   このモードでは<productname>PostgreSQL</>間のデータレプリケーションを<productname>Pgpool-II</productname>に行わせます。
614  </para>
615
616  <para>
617   <!--
618   Load balancing (see <xref linkend="runtime-config-load-balancing"> ) can
619   also be used with replication mode to distribute the load to the
620   attached backend nodes.
621   -->
622   参照負荷をスタンバイバックエンドノードに振り分ける負荷分散(<xref linkend="runtime-config-load-balancing">を参照)もレプリケーションモードと共に使用可能です。
623  </para>
624  <para>
625   <!--
626   Following options affect the behavior of
627   <productname>Pgpool-II</productname> in the replication mode.
628   -->
629   以下のオプションがレプリケーションモードにおける<productname>Pgpool-II</productname>の動作に影響します。
630  </para>
631
632  <variablelist>
633
634   <varlistentry id="guc-replication-mode" xreflabel="replication_mode">
635    <term><varname>replication_mode</varname> (<type>boolean</type>)
636     <indexterm>
637      <!--
638      <primary><varname>replication_mode</varname> configuration parameter</primary>
639      -->
640      <primary><varname>replication_mode</varname> 設定パラメータ</primary>
641     </indexterm>
642    </term>
643    <listitem>
644     <para>
645      <!--
646      Setting to on enables the replication mode.
647      Default is off.
648      -->
649      レプリケーションモードを有効にします。
650      デフォルトはoffです。
651     </para>
652     <note>
653      <para>
654       <!--
655       <xref linkend="guc-replication-mode"> and <xref linkend="guc-master-slave-mode">
656       are mutually exclusive and only one can be enabled at a time.
657       -->
658       <xref linkend="guc-replication-mode">と<xref linkend="guc-master-slave-mode">は相互に排他的で、一度に一方しか有効にすることができません。
659      </para>
660     </note>
661     <para>
662      <!--
663      This parameter can only be set at server start.
664      -->
665      このパラメータはサーバ起動時にのみ設定可能です。
666     </para>
667    </listitem>
668   </varlistentry>
669
670   <varlistentry id="guc-replication-stop-on-mismatch" xreflabel="replication_stop_on_mismatch">
671    <term><varname>replication_stop_on_mismatch</varname> (<type>boolean</type>)
672     <indexterm>
673      <!--
674      <primary><varname>replication_stop_on_mismatch</varname> configuration parameter</primary>
675      -->
676      <primary><varname>replication_stop_on_mismatch</varname> 設定パラメータ</primary>
677     </indexterm>
678    </term>
679    <listitem>
680     <para>
681      <!--
682      When set to on, and all nodes do not reply with the same packet kind
683      to the query that was sent to all <productname>PostgreSQL</> backend nodes, then the
684      backend node whose reply differs from the majority is degenerated
685      by the <productname>Pgpool-II</productname>.
686      If <varname>replication_stop_on_mismatch</varname> is set to off and
687      a similar situation happens then the <productname>Pgpool-II</productname>
688      only terminates the current user session but does not degenerate a backend node.
689      -->
690
691      これがonで、全ての<productname>PostgreSQL</>バックエンドノードに送られたクエリに対して、全てのノードが同じパケット種類で応答しなかった場合、多数派とは異なる応答したバックエンドノードは<productname>Pgpool-II</productname>により切り離されます。
692      <varname>replication_stop_on_mismatch</varname>がoffの場合に同様の状況が発生したときには、<productname>Pgpool-II</productname>は現在のユーザセッションを強制終了するだけにとどめ、バックエンドの切り離しは行いません。
693
694     </para>
695
696     <note>
697      <para>
698       <!--
699       <productname>Pgpool-II</productname> does not examine the data returned
700       by the backends and takes the decision only by comparing the result packet
701       types.
702       -->
703       <productname>Pgpool-II</productname>はバックエンドから返されたデータは調べずに、結果パケットの種類の比較のみにより決断します。
704      </para>
705     </note>
706
707     <para>
708      <!--
709      A typical use case of enabling the <varname>replication_stop_on_mismatch</varname>
710      is to guard against the data inconsistency among the backend nodes.
711      For example, you may want to degenerate a backend node if an UPDATE statement
712      fails on one backend node while passes on others.
713      -->
714      <varname>replication_stop_on_mismatch</varname>を有効にする典型的なユースケースは、バックエンドノード間のデータ不整合の防止です。
715      例えば、UPDATE文が他のノードでは成功しているのにあるバックエンドノードでは失敗した場合、そのバックエンドノードを切り離したいかもしれません。
716     </para>
717     <para>
718      <!--
719      Default is off.
720      -->
721      デフォルトはoffです。
722     </para>
723     <para>
724      <!--
725      This parameter can be changed by reloading the Pgpool-II configurations.
726      -->
727      このパラメータは<productname>Pgpool-II</>の設定を再読み込みすることで変更可能です。
728     </para>
729    </listitem>
730   </varlistentry>
731
732   <varlistentry id="guc-failover-if-affected-tuples-mismatch" xreflabel="failover_if_affected_tuples_mismatch">
733    <term><varname>failover_if_affected_tuples_mismatch</varname> (<type>boolean</type>)
734     <indexterm>
735      <!--
736      <primary><varname>failover_if_affected_tuples_mismatch</varname> configuration parameter</primary>
737      -->
738      <primary><varname>failover_if_affected_tuples_mismatch</varname> 設定パラメータ</primary>
739     </indexterm>
740    </term>
741    <listitem>
742     <para>
743      <!--
744      When set to on, and all nodes do not reply with the same number of
745      affected tuples to the INSERT/UPDATE/DELETE query, then the
746      backend node whose reply differs from the majority is degenerated
747      by the <productname>Pgpool-II</productname>.
748      If <varname>failover_if_affected_tuples_mismatch</varname> is set to off and
749      a similar situation happens then the <productname>Pgpool-II</productname>
750      only terminates the current user session but does not degenerate a backend node.
751      -->
752      これがonで、全てのノードの応答でINSERT/UPDATE/DELETEクエリの影響を受けたタプルの数が同じでなかった場合、多数派とは異なる応答したバックエンドノードは<productname>Pgpool-II</productname>による切り離されます。
753      <varname>failover_if_affected_tuples_mismatch</varname>がoffの場合に同様の状況が発生したときには、<productname>Pgpool-II</productname>は現在のユーザセッションを強制終了するだけにとどめ、バックエンドの切り離しは行いません。
754     </para>
755
756     <note>
757      <para>
758       <!--
759       In case of a tie, when two or more groups have the same number of nodes,
760       then the group containing the master node (backend node having
761       the youngest node id) gets the precedence.
762       -->
763       もし同票で、2つ以上のグループで同じノード数だった場合は、マスターノード(最も若いDBノード番号のバックエンドノード)を含むグループが優先されます。
764      </para>
765     </note>
766
767     <para>
768      <!--
769      Default is off.
770      -->
771      デフォルトはoffです。
772
773     </para>
774     <para>
775      <!--
776      This parameter can be changed by reloading the Pgpool-II configurations.
777      -->
778      このパラメータは<productname>Pgpool-II</>の設定を再読み込みすることで変更可能です。
779     </para>
780    </listitem>
781   </varlistentry>
782
783   <varlistentry id="guc-replicate-select" xreflabel="replicate_select">
784    <term><varname>replicate_select</varname> (<type>boolean</type>)
785     <indexterm>
786      <!--
787      <primary><varname>replicate_select</varname> configuration parameter</primary>
788      -->
789      <primary><varname>replicate_select</varname> 設定パラメータ</primary>
790     </indexterm>
791    </term>
792    <listitem>
793     <para>
794      <!--
795      When set to on, <productname>Pgpool-II</productname> enables the
796      SELECT query replication mode. i.e. The SELECT queries are sent
797      to all backend nodes.
798      -->
799      onを設定すると、<productname>Pgpool-II</productname>はSELECTクエリのレプリケーションモードを有効にします。
800      すなわち、SELECTクエリが全てのバックエンドノードに送信されます。
801     </para>
802
803     <table id="replicate-select-affect-table">
804      <!--
805      <title>replicate_select with <xref linkend="guc-load-balance-mode"> affects on SELECT routing</title>
806      -->
807      <title>replicate_selectと<xref linkend="guc-load-balance-mode">がSELECTのルーティングに与える影響</title>
808      <tgroup cols="6" align="center">
809       <colspec colname="_1" colwidth="1*">
810	<colspec colname="_2" colwidth="1*">
811	 <colspec colname="_3" colwidth="1*">
812	  <colspec colname="_4" colwidth="1*">
813	   <colspec colname="_5" colwidth="1*">
814	    <colspec colname="_6" colwidth="1*">
815
816	     <tbody>
817	      <row>
818	       <!--
819	       <entry>replicate_select is true</entry>
820	       -->
821	       <entry>replicate_selectがtrue</entry>
822	       <entry align="center">Y</entry>
823	       <entry align="center" nameend="_6" namest="_3">N</entry>
824	      </row>
825
826	      <row>
827	       <!--
828	       <entry>load_balance_mode is true</entry>
829	       -->
830	       <entry>load_balance_modeがtrue</entry>
831	       <entry>ANY</entry>
832	       <entry align="center" nameend="_5" namest="_3">Y</entry>
833	       <entry align="center">N</entry>
834	      </row>
835
836	      <row>
837	       <!--
838	       <entry>SELECT is inside a transaction block</entry>
839	       -->
840	       <entry>SELECTがトランザクションブロックの内部にある</entry>
841	       <entry align="center">ANY</entry>
842	       <entry nameend="_4" namest="_3" align="center"> Y </entry>
843	       <entry align="center">N</entry>
844	       <entry align="center">ANY</entry>
845	      </row>
846
847	      <row>
848	       <entry>
849		<!--
850		Transaction isolation level is SERIALIZABLE and
851		the transaction has issued a write query
852		-->
853		トランザクション分離レベルがSERIALIZABLEで、トランザクションが更新クエリを発行済
854	       </entry>
855	       <entry align="center">ANY</entry>
856	       <entry align="center">Y</entry>
857	       <entry align="center">N</entry>
858	       <entry align="center">ANY</entry>
859	       <entry align="center">ANY</entry>
860	      </row>
861
862	      <row>
863	       <entry>
864		<!--
865		results(R:replication, M: send only to master, L: load balance)
866		-->
867		結果(R:レプリケーション、M:マスターのみに送信、L:負荷分散)
868	       </entry>
869	       <entry align="center">R</entry>
870	       <entry align="center">M</entry>
871	       <entry align="center">L</entry>
872	       <entry align="center">L</entry>
873	       <entry align="center">M</entry>
874	      </row>
875
876	     </tbody>
877      </tgroup>
878     </table>
879
880     <para>
881      <!--
882      Default is off.
883      -->
884      デフォルトはoffです。
885     </para>
886     <para>
887      <!--
888      This parameter can be changed by reloading the Pgpool-II configurations.
889      -->
890      このパラメータは<productname>Pgpool-II</>の設定を再読み込みすることで変更可能です。
891     </para>
892    </listitem>
893   </varlistentry>
894
895   <varlistentry id="guc-insert-lock" xreflabel="insert_lock">
896    <term><varname>insert_lock</varname> (<type>boolean</type>)
897     <indexterm>
898      <!--
899      <primary><varname>insert_lock</varname> configuration parameter</primary>
900      -->
901      <primary><varname>insert_lock</varname> 設定パラメータ</primary>
902     </indexterm>
903    </term>
904    <listitem>
905     <para>
906      <!--
907      When set to on, <productname>Pgpool-II</productname> will automatically lock
908      the table on <productname>PostgreSQL</> before an INSERT statement is issued for that.
909      -->
910      onに設定すると、<productname>Pgpool-II</productname>はINSERT文が発行される前に<productname>PostgreSQL</>上のテーブルを自動的にロックします。
911     </para>
912
913     <para>
914      <!--
915      When replicating a table with SERIAL data type,
916      the SERIAL column value may get different values
917      on the different backends.
918      The workaround to this problem is to explicitly lock the table
919      before issuing the INSERT.
920      -->
921      SERIAL型を使っているテーブルをレプリケーションすると、SERIAL型の列の値がDBノードの間で一致しなくなることがあります。
922      この問題の回避策は、INSERT実行前に該当テーブルを明示的にロックすることです。
923     </para>
924     <para>
925      <!--
926      So for automatically locking the table <productname>Pgpool-II</productname> do the following transformation:
927      -->
928      テーブルの自動ロックのため、<productname>Pgpool-II</productname>は以下の変換を行います。
929      <programlisting>
930       INSERT INTO ...
931      </programlisting>
932      <!--
933      to
934      -->
935      これを次のように変換します。
936
937      <programlisting>
938       BEGIN;
939       LOCK TABLE ...
940       INSERT INTO ...
941       COMMIT;
942      </programlisting>
943     </para>
944     <caution>
945      <para>
946       <!--
947       This approach severely degrades the transactions' parallelism
948       -->
949       この方法はトランザクションの並列実行性を大きく劣化させます。
950      </para>
951     </caution>
952
953     <para>
954      <!--
955      <productname>Pgpool-II</productname> <emphasis>V2.2</emphasis> or later,
956      automatically detects whether the table has a SERIAL columns or not,
957      so it never  locks the table if it desn't have the SERIAL columns.
958      -->
959      <productname>Pgpool-II</productname> <emphasis>V2.2</emphasis>以降では、テーブルがSERIAL列を持つかどうか自動判別するため、SERIAL列がなければ決してテーブルをロックしません。
960     </para>
961
962     <para>
963      <!--
964      <productname>Pgpool-II</productname> <emphasis>V3.0</emphasis> until
965      <productname>Pgpool-II</productname> <emphasis>V3.0.4</emphasis> uses a row lock
966      against the sequence relation, rather than table lock.
967      This is intended to minimize lock conflict with <acronym>VACUUM</acronym>
968      (including autovacuum).
969      However this can lead to another problem. After transaction wraparound happens,
970      row locking against the sequence relation causes PostgreSQL internal error
971      (more precisely, access error on pg_clog, which keeps transaction status).
972      To prevent this, <productname>PostgreSQL</> core developers decided to disallow row locking
973      against sequences and this broke the <productname>Pgpool-II</productname>,
974      of course (the "fixed" version of PostgreSQL was released as
975      9.0.5, 8.4.9, 8.3.16 and 8.2.22).
976      -->
977      <productname>Pgpool-II</productname> <emphasis>V3.0.4</emphasis>までの<productname>Pgpool-II</productname> <emphasis>V3.0</emphasis>では、テーブルロックではなくシーケンステーブルに対して行ロックをかけます。
978      これはVACUUM(autovacuumを含む)とのロック競合を最小化することを意図しています。
979      しかし、これは他の問題を引き起こします。
980      トランザクション周回が起きた後、シーケンステーブルに対する行ロックはPostgreSQLの内部エラー (詳細には、トランザクション状態を保持するpg_clogへのアクセスエラー)を起こします。
981      これを防ぐため、PostgreSQLのコア開発者はシーケンステーブルに対する行ロックを許可しないことを決定しました。
982      これはもちろん<productname>Pgpool-II</productname>を動作不能にします(修正されたPostgreSQLはバージョン 9.0.5, 8.4.9, 8.3.16そして8.2.22としてリリースされました)。
983
984     </para>
985
986     <para>
987      <!--
988      <productname>Pgpool-II</productname> <emphasis>V3.0.5</emphasis> or later
989      uses a row lock against <literal>pgpool_catalog.insert_lock</literal> table
990      because new PostgreSQL disallows a row lock against the sequence relation.
991      So creating insert_lock table in all databases which are accessed via
992      <productname>Pgpool-II</productname> beforehand is required.
993      See <xref linkend="create-installlock-table"> for more details.
994      If does not exist insert_lock table, <productname>Pgpool-II</productname>
995      locks the insert target table.
996      This behavior is same as <productname>Pgpool-II</productname> <emphasis>V2.2</emphasis>
997      and <emphasis>V2.3</emphasis> series.
998      -->
999      <productname>Pgpool-II</productname> <emphasis>V3.0.5</emphasis>以降では、新しいPostgreSQLがシーケンステーブルに対するロックを許可しなくなったため、<literal>pgpool_catalog.insert_lock</literal>テーブルに対して行ロックをかけます。
1000      したがって、<productname>Pgpool-II</productname>経由でアクセスするすべてのデータベースにinsert_lockテーブルをあらかじめ作成しておく必要があります。
1001      詳細は<xref linkend="create-installlock-table">をご覧ください。
1002       もし、insert_lockテーブルが存在しない場合は、挿入対象のテーブルに対してロックを行います。
1003       これは、<productname>Pgpool-II</productname> <emphasis>V2.2</emphasis>と<emphasis>V2.3</emphasis>シリーズと同じ動作です。
1004     </para>
1005     <para>
1006      <!--
1007      If you want to use <varname>insert_lock</varname> which is compatible
1008      with older releases, you can specify lock method by configure script.
1009      See <xref linkend="install-pgpool"> for more details.
1010      -->
1011      過去のバージョンと互換性のある<varname>insert_lock</varname>を使用したい場合は、configureスクリプトでロック方法を指定できます。
1012      詳細は<xref linkend="install-pgpool">をご覧下さい。
1013     </para>
1014
1015     <para>
1016      <!--
1017      For fine (per statement) control:
1018      -->
1019      (文ごとの)細かい制御:
1020     </para>
1021
1022     <itemizedlist>
1023      <listitem>
1024       <para>
1025	<!--
1026	set insert_lock to true, and add /*NO INSERT LOCK*/ at the beginning of an
1027	INSERT statement for which you do not want to acquire the table lock.
1028	-->
1029	insert_lockをtrueにして、テーブルロックを獲得してほしくないINSERT文には、先頭に/*NO INSERT LOCK*/コメントを追加します。
1030       </para>
1031      </listitem>
1032      <listitem>
1033       <para>
1034	<!--
1035	set insert_lock to false, and add /*INSERT LOCK*/ at the beginning of an
1036	INSERT statement for which you want to acquire the table lock.
1037	-->
1038	insert_lockをfalseにして、テーブルロックを獲得してほしいINSERT文には、先頭に/*INSERT LOCK*/コメントを追加します。
1039       </para>
1040      </listitem>
1041
1042     </itemizedlist>
1043     <note>
1044      <para>
1045       <!--
1046       If insert_lock is enabled, the regression tests for PostgreSQL 8.0 gets fail
1047       in transactions, privileges, rules, and alter_table.
1048       -->
1049       insert_lockを有効にしてregression testを実行すると、PostgreSQL 8.0では transactions, privileges, rules, alter_tableがfailします。
1050      </para>
1051      <para>
1052       <!--
1053       The reason for this is that <productname>Pgpool-II</productname>
1054       tries to LOCK the VIEW for the rule test, and it produces the below error message:
1055       -->
1056       その理由は、ruleテストで<productname>Pgpool-II</productname>がビューにLOCKを実行しようとするため、そして以下のエラーメッセージが出てしまうためです。
1057       <programlisting>
1058	! ERROR: current transaction is aborted, commands ignored until
1059	end of transaction block
1060       </programlisting>
1061       <!--
1062       For example, the transactions test tries an INSERT into a table which does not exist,
1063       and <productname>Pgpool-II</productname> causes <productname>PostgreSQL</productname> to
1064       acquire the lock for the table. Of cause this results in an error.
1065       The transaction will be aborted, and the following INSERT statement produces the above error message.
1066       -->
1067       たとえば、transactionsテストでは、存在しないテーブルに対してINSERTを試みており、<productname>Pgpool-II</productname>は<productname>PostgerSQL</productname>にそのテーブルのロックを獲得させることになります。
1068       これはもちろんエラーとなります。
1069       トランザクションがアボート状態になり、続くINSERTでは上記エラーが出てしまいます。
1070      </para>
1071     </note>
1072     <para>
1073      <!--
1074      Default is off.
1075      -->
1076      デフォルトはoffです。
1077     </para>
1078     <para>
1079      <!--
1080      This parameter can be changed by reloading the Pgpool-II configurations.
1081      -->
1082      このパラメータは<productname>Pgpool-II</>の設定を再読み込みすることで変更可能です。
1083     </para>
1084    </listitem>
1085   </varlistentry>
1086
1087   <varlistentry id="guc-lobj-lock-table" xreflabel="lobj_lock_table">
1088    <term><varname>lobj_lock_table</varname> (<type>string</type>)
1089     <indexterm>
1090      <!--
1091      <primary><varname>lobj_lock_table</varname> configuration parameter</primary>
1092      -->
1093      <primary><varname>lobj_lock_table</varname> 設定パラメータ</primary>
1094     </indexterm>
1095    </term>
1096    <listitem>
1097     <para>
1098      <!--
1099      Specifies a table name used for large object replication control.
1100      If it is specified, <productname>Pgpool-II</productname> will lock
1101      the table specified by <varname>lobj_lock_table</varname> and generate
1102      a large object id by looking into <literal>pg_largeobject</literal>
1103      system catalog and then call <literal>lo_create</literal> to create
1104      the large object.
1105      This procedure guarantees that <productname>Pgpool-II</productname>
1106      will get the same large object id in all DB nodes in replication mode.
1107      -->
1108      ラージオブジェクトのレプリケーションを行いたいときにロック管理に使うためのテーブル名を指定します。
1109      このテーブルが指定されている場合、<productname>Pgpool-II</productname>は、<varname>lobj_lock_table</varname>で指定されているテーブルをロックした後、<literal>pg_largeobject</literal>システムカタログを参照してラージオブジェクトIDを生成し、<literal>lo_create()</literal>を呼び出してラージオブジェクトの作成を行います。
1110      この方法により、レプリケーションモードにおいて<productname>Pgpool-II</productname>が全てのDBノードで同じラージオブジェクトIDを得られることが保証されます。
1111
1112     </para>
1113     <note>
1114      <para>
1115       <!--
1116       <productname>PostgreSQL</> 8.0 and older does not have <literal>lo_create</literal>,
1117       so this feature does not work with PostgreSQL 8.0 and older versions.
1118       -->
1119       <productname>PostgreSQL</> 8.0以前は<literal>lo_create</literal>を持たないため、<productname>PostgreSQL</> 8.0以前のバージョンではこの処理は行われません。
1120      </para>
1121     </note>
1122     <para>
1123      <!--
1124      A call to the <literal>libpq</literal> function <literal>lo_creat()</literal>
1125      triggers this feature. Also large object creation through <acronym>Java</acronym>
1126      API (<acronym>JDBC</acronym> driver), <acronym>PHP</acronym> API
1127      (<literal>pg_lo_create</literal>, or similar API in PHP library such as PDO),
1128      and this same API in various programming languages are known to use a
1129      similar protocol, and thus should work.
1130      -->
1131      <literal>libpq</literal>の関数<literal>lo_creat()</literal>の呼び出しがこの機能の契機となります。
1132      <acronym>Java</acronym> API(<acronym>JDBC</acronym>ドライバ)、<acronym>PHP</acronym> API(<literal>pg_lo_create</literal>、またはPDOといったPHPライブラリの同様のAPI)、様々なプログラミング言語の同様のAPIを経由したラージオブジェクトの生成においても同じプロトコルが使われることがわかっているので、この機能は動作するはずです。
1133     </para>
1134
1135     <para>
1136      <!--
1137      This feature does not works with following operations on large objects.
1138      -->
1139      この機能はラージオブジェクトに対する以下の操作では動作しません。
1140
1141     </para>
1142     <itemizedlist>
1143      <listitem>
1144       <para>
1145	<!--
1146	All APIs using <literal>lo_create</literal>, <literal>lo_import_with_oid</literal>.
1147	-->
1148	<literal>lo_create</literal>、<literal>lo_import_with_oid</literal>を使う全てのAPI。
1149       </para>
1150      </listitem>
1151      <listitem>
1152       <para>
1153	<!--
1154	<literal>lo_import</literal> function in backend called in SELECT.
1155	-->
1156	バックエンドの<literal>lo_import</literal>関数をSELECTで呼び出す場合
1157       </para>
1158      </listitem>
1159      <listitem>
1160       <para>
1161	<!--
1162	<literal>lo_create</literal> function in backend called in SELECT.
1163	-->
1164	バックエンドの<literal>lo_create</literal>関数をSELECTで呼び出す場合
1165       </para>
1166      </listitem>
1167     </itemizedlist>
1168
1169     <note>
1170      <para>
1171       <!--
1172       All <productname>PostgreSQL</> users must have a write access on <varname>lobj_lock_table</varname>
1173       and it can be created in any schema.
1174       -->
1175       全ての<productname>PostgreSQL</>ユーザは<varname>lobj_lock_table</varname>へ書き込み可能である必要が有ります。
1176       また、これはどのスキーマに作成されてもかまいません。
1177      </para>
1178     </note>
1179
1180     <para>
1181      <!--
1182      Example to create a large object lock table:
1183      -->
1184      ラージオブジェクトロックテーブルを作る例を示します。
1185      <programlisting>
1186       CREATE TABLE public.my_lock_table ();
1187       GRANT ALL ON public.my_lock_table TO PUBLIC;
1188      </programlisting>
1189     </para>
1190     <para>
1191      <!--
1192      Default is <literal>''</literal>(empty), which disables the feature.
1193      -->
1194      デフォルトは<literal>''</literal>(空文字列)で、この機能は無効です。
1195     </para>
1196    </listitem>
1197   </varlistentry>
1198
1199  </variablelist>
1200 </sect2>
1201
1202</sect1>
1203
1204<sect1 id="runtime-config-backend-settings">
1205 <!--
1206 <title>Backend Settings</title>
1207 -->
1208 <title>バックエンドの設定</title>
1209
1210 <sect2 id="runtime-config-backend-connection-settings">
1211  <!--
1212  <title>Backend Connection Settings</title>
1213  -->
1214  <title>バックエンド接続の設定</title>
1215
1216  <variablelist>
1217
1218   <varlistentry id="guc-backend-hostname" xreflabel="backend_hostname">
1219    <term><varname>backend_hostname</varname> (<type>string</type>)
1220     <indexterm>
1221      <!--
1222      <primary><varname>backend_hostname</varname> configuration parameter</primary>
1223      -->
1224      <primary><varname>backend_hostname</varname> 設定パラメータ</primary>
1225     </indexterm>
1226    </term>
1227
1228    <listitem>
1229     <para>
1230      <!--
1231      <varname>backend_hostname</varname> specifies the
1232      <productname>PostgreSQL</productname> backend to be connected to.
1233      It is used by <productname>Pgpool-II</productname> to communicate
1234      with the server.
1235      -->
1236      <varname>backend_hostname</varname>には接続先の<productname>PostgreSQL</productname>バックエンドを指定します。
1237      <productname>Pgpool-II</productname>がサーバと通信するのに使われます。
1238     </para>
1239
1240     <para>
1241      <!--
1242      For TCP/IP communication, this parameter can take a hostname
1243      or an IP address. If this begins with a slash(<literal>/</literal>), it specifies
1244      Unix-domain communication rather than TCP/IP; the value is
1245      the name of the directory in which the socket file is
1246      stored. The default behavior when <varname>backend_hostname</varname> is empty
1247      (<literal>''</literal>) is to connect to a Unix-domain socket in <filename>/tmp</>.
1248      -->
1249      TCP/IP通信では、このパラメータはホスト名またはIPアドレスをとることができます。
1250      スラッシュ(<literal>/</literal>)で始まる場合、TCP/IPではなくUNIXドメインでの通信が使用され、値はソケットファイルが作成されるディレクトリ名となります。
1251      <varname>backend_hostname</varname>に空文字(<literal>''</literal>)が指定された場合のデフォルトの動作は、<filename>/tmp</filename>に作成したUNIXドメインソケットで接続します。
1252     </para>
1253
1254     <para>
1255      <!--
1256      Multiple backends can be specified by adding a number at the
1257      end of the parameter name (e.g.backend_hostname0). This
1258      number is referred to as "DB node ID", and it starts from
1259      0. The backend which was given the DB node ID of 0 will be
1260      called "master node". When multiple backends are defined, the
1261      service can be continued even if the master node is down (not
1262      true in some modes). In this case, the youngest DB node ID
1263      alive will be the new master node.
1264      -->
1265      パラメータ名の末尾に数字を付加することで複数のバックエンドを指定することができます(たとえばbackend_hostname0)。
1266      この数字のことを「DBノードID」と呼び、0から開始します。
1267      DBノードIDが0のバックエンドは「マスターノード」と呼ばれます。
1268      複数のDBノードを定義している場合、条件によってはマスターノードがダウンしても運用を続けることができます(いくつかのモードを除きます)。
1269      この場合は、稼働中かつDBノードIDがもっとも若いものが新しいマスターノードになります。
1270     </para>
1271
1272     <para>
1273      <!--
1274      Please note that the DB node which has id 0 has no special
1275      meaning if operated in streaming replication mode. Rather,
1276      you should care about if the DB node is the "primary node" or
1277      not. See <xref linkend="runtime-config-load-balancing">,
1278      <xref linkend="runtime-config-failover">,
1279      <xref linkend="runtime-streaming-replication-check">
1280      for more details.
1281      -->
1282      ストリーミングレプリケーションモードで運用している場合は、DBノードIDが0のノードには特別な意味はないことに注意して下さい。
1283      むしろ、そのDBノードが「プライマリノード」かどうかを気にするべきです。
1284      詳細は<xref linkend="runtime-config-load-balancing">、 <xref linkend="runtime-config-failover">、<xref linkend="runtime-streaming-replication-check">をご覧ください。
1285     </para>
1286
1287     <para>
1288      <!--
1289      If you plan to use only one <productname>PostgreSQL</> server, specify it by
1290      backend_hostname0.
1291      -->
1292      1台しか<productname>PostgreSQL</>を使用しない場合は、backend_hostname0で指定してください。
1293     </para>
1294
1295     <para>
1296      <!--
1297      New nodes can be added by adding parameter rows and reloading a
1298      configuration file. However, the existing values cannot be updated, so
1299      you must restart <productname>Pgpool-II</productname> in
1300      that case.
1301      -->
1302      新しいノードはパラメータ行を追加して、設定ファイル再読み込みすることで追加できます。
1303      ただし、既存の値を変更することはできないので、その場合には<productname>Pgpool-II</productname>を再起動してください。
1304     </para>
1305
1306    </listitem>
1307
1308   </varlistentry>
1309
1310   <varlistentry id="guc-backend-port" xreflabel="backend_port">
1311    <term><varname>backend_port</varname> (<type>integer</type>)
1312     <indexterm>
1313      <!--
1314      <primary><varname>backend_port</varname> configuration parameter</primary>
1315      -->
1316      <primary><varname>backend_port</varname> 設定パラメータ</primary>
1317     </indexterm>
1318    </term>
1319
1320    <listitem>
1321     <para>
1322      <!--
1323      <varname>backend_port</varname> specifies the port number
1324      of the backends. Multiple backends can be specified by
1325      adding a number at the end of the parameter name
1326      (e.g. backend_port0). If you plan to use only one
1327      <productname>PostgreSQL</> server, specify it by backend_port0.
1328      -->
1329      <varname>backend_port</varname>にはバックエンドのポート番号を指定します。
1330      パラメータ名の末尾に数字を付加することで複数のバックエンドを指定することができます(たとえばbackend_port0)。
1331      1台しか<productname>PostgreSQL</>を使用しない場合は、backend_port0で指定してください。
1332     </para>
1333     <para>
1334      <!--
1335      New backend ports can be added by adding parameter rows and reloading a
1336      configuration file. However, the existing values cannot be updated, so
1337      you must restart <productname>Pgpool-II</productname> in
1338      that case.
1339      -->
1340      新しいノードはパラメータ行を追加して、設定ファイル再読み込みすることで追加できます。
1341      ただし、既存の値を変更することはできないので、その場合には<productname>Pgpool-II</productname>を再起動してください。
1342     </para>
1343
1344    </listitem>
1345   </varlistentry>
1346
1347   <varlistentry id="guc-backend-weight" xreflabel="backend_weight">
1348    <term><varname>backend_weight</varname> (<type>floating point</type>)
1349     <indexterm>
1350      <!--
1351      <primary><varname>backend_weight</varname> configuration parameter</primary>
1352      -->
1353      <primary><varname>backend_weight</varname> 設定パラメータ</primary>
1354     </indexterm>
1355    </term>
1356
1357    <listitem>
1358     <para>
1359      <!--
1360      <varname>backend_weight</varname> specifies the load balance
1361      ratio of the backends. It may be set to any interger or
1362      floating point value greater than or equeal zero.
1363      Multiple backends can be specified by
1364      adding a number at the end of the parameter name
1365      (e.g. backend_weight0). If you plan to use only one
1366      PostgreSQL server, specify it by backend_weight0.
1367      -->
1368      <varname>backend_weight</varname>にはバックエンドの負荷分散の比率を指定します。
1369      0以上の整数または浮動小数点を指定できます。
1370      パラメータ名の末尾に数字を付加することで複数のバックエンドを指定することができます(たとえばbackend_weight0)。
1371      1台しか<productname>PostgreSQL</>を使用しない場合は、backend_weight0で指定してください。
1372     </para>
1373     <para>
1374      <!--
1375      New <varname>backend_weight</> can be added by adding parameter rows and
1376      reloading a configuration file. However, this will take
1377      effect only for new established client sessions.
1378      <productname>Pgpool-II</> <emphasis>V2.2.6</>, <emphasis>V2.3</> or later
1379      allows alllow updating the values by reloading a configuration file.
1380      This is useful if you want to prevent any query sent to
1381      slaves to perform some administrative work in master/slave mode.
1382      -->
1383      新しい<varname>backend_weight</>はパラメータ行を追加して、設定ファイル再読み込みすることで追加できます。
1384      <productname>Pgpool-II</> <emphasis>V2.2.6</>、<emphasis>V2.3</>以降では、設定ファイルの再読込みで値を変更できます。
1385      ただし、この効果が反映されるのは新しく確立されたクライアントセッションからです。
1386      マスタースレーブモードにおいて、スレーブに対して管理業務を実施する都合上、問い合わせがそのスレーブに送られるのを防ぎたい場合に有用です。
1387     </para>
1388    </listitem>
1389   </varlistentry>
1390
1391  </variablelist>
1392 </sect2>
1393
1394 <sect2 id="runtime-config-backend-data">
1395  <!--
1396  <title>Backend Data Settings</title>
1397  -->
1398  <title>バックエンドデータの設定</title>
1399
1400  <variablelist>
1401
1402   <varlistentry id="guc-backend-data-directory" xreflabel="backend_data_directory">
1403    <term><varname>backend_data_directory</varname> (<type>string</type>)
1404     <indexterm>
1405      <!--
1406      <primary><varname>backend_data_directory</varname> configuration parameter</primary>
1407      -->
1408      <primary><varname>backend_data_directory</varname> 設定パラメータ</primary>
1409     </indexterm>
1410    </term>
1411
1412    <listitem>
1413     <para>
1414      <!--
1415      <varname>backend_data_directory</varname> specifies the
1416      database cluster directory of the backend. Multiple backends can be
1417      specified by adding a number at the end of the parameter
1418      name (e.g. backend_data_directory0). If you plan to use
1419      only one PostgreSQL server, specify it by
1420      backend_data_directory0. This parameter is used by online recovery.
1421      If you do not use online recovery, you do not need to set it.
1422      -->
1423      <varname>backend_data_directory</varname>にはバックエンドのデータベースクラスタのディレクトリを指定します。
1424      パラメータ名の末尾に数字を付加することで複数のバックエンドを指定することができます(たとえばbackend_data_directory0)。
1425      1台しか<productname>PostgreSQL</>を使用しない場合は、backend_data_directory0で指定してください。
1426      このパラメータはオンラインリカバリの際に使用します。 オンラインリカバリを使用しない場合には設定する必要はありません。
1427     </para>
1428     <para>
1429      <!--
1430      New <varname>backend data_directory</> can be added by adding parameter rows and reloading a
1431      configuration file. However, the existing values cannot be updated, so
1432      you must restart <productname>Pgpool-II</productname> in
1433      that case.
1434      -->
1435      新しい<varname>backend_data_directory</>はパラメータ行を追加して、設定ファイル再読み込みすることで追加できます。
1436      ただし、既存の値を変更することはできないので、その場合には<productname>Pgpool-II</productname>を再起動してください。
1437     </para>
1438    </listitem>
1439   </varlistentry>
1440
1441   <varlistentry id="guc-backend-flag" xreflabel="backend_flag">
1442    <term><varname>backend_flag</varname> (<type>string</type>)
1443     <indexterm>
1444      <!--
1445      <primary><varname>backend_flag</varname> configuration parameter</primary>
1446      -->
1447      <primary><varname>backend_flag</varname> 設定パラメータ</primary>
1448     </indexterm>
1449    </term>
1450
1451    <listitem>
1452     <para>
1453      <!--
1454      <varname>backend_flag</varname> controls various backend
1455      behavior. Multiple backends can be specified by adding a
1456      number at the end of the parameter name
1457      (e.g. backend_flag0). If you plan to use only one
1458      PostgreSQL server, specify it by backend_flag0.
1459      -->
1460      <varname>backend_flag</varname>はバックエンド単位での様々な挙動を制御するフラグです。
1461      パラメータ名の末尾に数字を付加することで複数のバックエンドを指定することができます(たとえばbackend_flag0)。
1462      1台しか<productname>PostgreSQL</>を使用しない場合は、backend_flag0で指定してください。
1463     </para>
1464     <para>
1465      <!--
1466      New backend flags can be added by adding parameter rows and reloading a
1467      configuration file. Currently followings are allowed. Multiple flags can
1468      be specified by using "|".
1469      -->
1470      新しいバックエンドフラグはパラメータ行を追加して、設定ファイル再読み込みすることで追加できます。
1471      現在以下のものがあります。
1472      複数のフラグを"|"で連結して指定することができます。
1473     </para>
1474
1475     <table id="backend-flag-table">
1476      <!--
1477      <title>Backend flags</title>
1478      -->
1479      <title>バックエンドフラグ</title>
1480      <tgroup cols="2">
1481       <thead>
1482	<row>
1483	 <!--
1484	 <entry>Flag</entry>
1485	 <entry>Description</entry>
1486	 -->
1487	 <entry>フラグ</entry>
1488	 <entry>説明</entry>
1489	</row>
1490       </thead>
1491
1492       <tbody>
1493	<row>
1494	 <entry><literal>ALLOW_TO_FAILOVER</literal></entry>
1495	 <!--
1496	 <entry>Allow to failover or detaching backend. This
1497	 is the default. You cannot specify with
1498	 DISALLOW_TO_FAILOVER at a same time.</entry>
1499	 -->
1500	 <entry>フェイルオーバやデタッチが可能になります。
1501	  これがデフォルトの動作です。
1502	  DISALLOW_TO_FAILOVERと同時には指定できません。
1503	 </entry>
1504	</row>
1505	<row>
1506	 <entry><literal>DISALLOW_TO_FAILOVER</literal></entry>
1507	 <!--
1508	 <entry>Disllow to failover or detaching backend
1509	 This is useful when you protect backend by
1510	 using HA (High Availability) softwares such as
1511	 <productname>Heartbeat</> or <productname>Pacemaker</>. You cannot specify with
1512	 ALLOW_TO_FAILOVER at a same time.
1513	</entry>
1514	 -->
1515	 <entry>フェイルオーバやデタッチを禁止します。
1516	  <productname>Heartbeat</>や<productname>Pacemaker</>などのHA (High Availability)ソフトでバックエンドを保護しているなどの場合に有用です。
1517	  ALLOW_TO_FAILOVERと同時には指定できません。
1518	 </entry>
1519	</row>
1520       </tbody>
1521      </tgroup>
1522     </table>
1523     <para>
1524      <!--
1525      This parameter can be changed by reloading the <productname>Pgpool-II</> configurations.
1526      -->
1527      このパラメータは<productname>Pgpool-II</>の設定を再読み込みすることで変更可能です。
1528     </para>
1529
1530    </listitem>
1531   </varlistentry>
1532
1533  </variablelist>
1534
1535 </sect2>
1536
1537</sect1>
1538