<para>
<!--
- <productname>Pgpool-II</productname> can synchronize database nodes and attach
- a node without stopping the service.
- This feature is called <acronym>"online recovery"</acronym>.
+ <productname>Pgpool-II</productname> can synchronize database
+ nodes and attach a node without stopping the service. This
+ feature is called <acronym>"online recovery"</acronym>. Online
+ recovery can be executed by
+ using <xref linkend="pcp-recovery-node"> command.
-->
<productname>Pgpool-II</productname> はサービスを止めることなくデータベースノードを同期させ、ノードを復帰させることができます。
この機能は「<acronym>オンラインリカバリ</acronym>」と呼ばれます。
- </para>
+オンラインリカバリは<xref linkend="pcp-recovery-node">コマンドで実行できます。
+ </para>
<para>
<!--
- For online recovery, the recovery target node must be detached from <productname>Pgpool-II</>.
- If you wish to add a <productname>PostgreSQL</> server node dynamically, reload the
+ For online recovery, the recovery target node must be in detached
+ state. This means the node must be either manually detached by
+ <xref linkend="pcp-detach-node"> or automatically detached
+ by <productname>Pgpool-II</productname> as a consequnece of
+ failover.
+-->
+オンラインリカバリを実施するためには、リカバリ対象のノードは<productname>Pgpool-II</productname>から切り離された状態になっていなければなりません。
+このことは、そのノードが、<xref linkend="pcp-detach-node">で手動で切り離された状態にあるか、フェイルオーバの結果、<productname>Pgpool-II</productname>により自動的に切り離された状態にあるかのいずれかでなければならないことを意味します。
+</para>
+<para>
+<!--
+ If you wish to add a <productname>PostgreSQL</productname> server
+ node dynamically, reload the
<filename>pgpool.conf</filename> after adding the
- <xref linkend="guc-backend-hostname"> and its associated parameters.
- This will register the new server to <productname>Pgpool-II</productname> as a detached backend node.
+ <xref linkend="guc-backend-hostname"> and its associated
+ parameters. This will register the new server
+ to <productname>Pgpool-II</productname> as a detached backend
+ node.
-->
-オンラインリカバリを実施するためには、リカバリ対象のノードは<productname>Pgpool-II</>から切り離されている必要があります。
新しい<productname>PostgreSQL</>サーバを動的に追加したい場合には、<xref linkend="guc-backend-hostname">および関連パラメータを追加した後に<filename>pgpool.conf</filename>を再読み込みします。
これにより新しいサーバが切り離された状態のバックエンドノードとして<productname>Pgpool-II</productname>に登録されます。
</para>
<para>
<!--
+ Online recovery is performed in two phases. The first phase is
+ called "first stage" and the second phase is called "second
+ stage". You need to provide scripts for each
+ stage. Only <xref linkend="guc-replication-mode"> requires the
+ second stage. For other modes including streaming replication
+ mode the second stage is not performed and you don't need to
+ provide a script for the stage
+ in <xref linkend="guc-recovery-2nd-stage-command">. i.e. you can
+ safely leave it as an empty string.
+
Online recovery is performed in two phases. Connections from cliens are
not allowd in second phase of online recovery while the data can be
updated or retrieved during the first phase.
<productname>Pgpool-II</productname> performs the follows steps in online recovery:
-->
オンラインリカバリは2段階に分けて実施されます。
+第1段階は「ファーストステージ」、第2段階は「セカンドステージ」と呼ばれます。
+それぞれのステージ用にスクリプトを用意する必要があります。
+<xref linkend="guc-replication-mode">の時のみセカンドステージが必要です。
+ストリーミングレプリケーションモードを含むその他のモードでは、セカンドステージは実施されず、<xref linkend="guc-recovery-2nd-stage-command">用のスクリプトを用意する必要はありません。
+つまり、そのエントリを空文字にしておいても問題ありません。
+</para>
+<para>
+<!--
+ Connections from cliens are not allowd only in the second stage
+ while the data can be updated or retrieved during the first statge.
+-->
ファーストステージではデータの更新や読み取りができますが、セカンドステージではクライアントからの接続は許されていません。
+</para>
+ <para>
+<!--
+ <productname>Pgpool-II</productname> performs the follows steps in online recovery:
+-->
オンラインリカバリでは<productname>Pgpool-II</productname>は以下の手順を実施します。
</para>
<itemizedlist>
<!--
Wait until all client connections have disconnected.
-->
-全てのクライアント接続が切断されるまで待機
+全てのクライアント接続が切断されるまで待機(<xref linkend="guc-replication-mode">のみ)。
</para>
</listitem>
<listitem>
<para>
- CHECKPOINT.
+ CHECKPOINT(<xref linkend="guc-replication-mode">のみ)。
</para>
</listitem>
<listitem>
<!--
Second stage of online recovery.
-->
-オンラインリカバリのセカンドステージ。
+オンラインリカバリのセカンドステージ(<xref linkend="guc-replication-mode">のみ)。
</para>
</listitem>
<listitem>
<note>
<para>
<!--
- There is a restriction in the online recovery. If
+ There is a restriction in the online recovery in
+ <xref linkend="guc-replication-mode">. If
<productname>Pgpool-II</productname> itself is installed
on multiple hosts, online recovery does not work correctly,
because <productname>Pgpool-II</productname> has to stop all
only one of them will have received the online recovery command and will
block the connections from clients.
-->
-オンラインリカバリには制限事項があります。
+<xref linkend="guc-replication-mode">でのオンラインリカバリには制限事項があります。
<productname>Pgpool-II</productname>が複数のホストにインストールされている場合、<productname>Pgpool-II</productname>はオンラインリカバリの2ndステージの間全てのクライアントを止める必要があるため、オンラインリカバリは正しく動作しません。
複数の<productname>Pgpool-II</productname>ホストがある場合、そのうちの1台のみがオンラインリカバコマンドを受け取り、クライアントからの接続をブロックします。
</para>
<title>Online Recovery</title>
<para>
- <productname>Pgpool-II</productname> can synchronize database nodes and attach
- a node without stopping the service.
- This feature is called <acronym>"online recovery"</acronym>.
+ <productname>Pgpool-II</productname> can synchronize database
+ nodes and attach a node without stopping the service. This
+ feature is called <acronym>"online recovery"</acronym>. Online
+ recovery can be executed by
+ using <xref linkend="pcp-recovery-node"> command.
</para>
<para>
- For online recovery, the recovery target node must be detached from <productname>Pgpool-II</>.
- If you wish to add a <productname>PostgreSQL</> server node dynamically, reload the
+ For online recovery, the recovery target node must be in detached
+ state. This means the node must be either manually detached by
+ <xref linkend="pcp-detach-node"> or automatically detached
+ by <productname>Pgpool-II</productname> as a consequnece of
+ failover.
+ </para>
+ <para>
+ If you wish to add a <productname>PostgreSQL</productname> server
+ node dynamically, reload the
<filename>pgpool.conf</filename> after adding the
- <xref linkend="guc-backend-hostname"> and its associated parameters.
- This will register the new server to <productname>Pgpool-II</productname> as a detached backend node.
+ <xref linkend="guc-backend-hostname"> and its associated
+ parameters. This will register the new server
+ to <productname>Pgpool-II</productname> as a detached backend
+ node.
</para>
<!--
<caution>
-->
<note>
<para>
- The recovery target <productname>PostgreSQL</> server must not be running for performing the online recovery.
- If the target <productname>PostgreSQL</> server has already started, you must shut it down before
- starting the online recovery.
+ The recovery target <productname>PostgreSQL</> server must not
+ be running for performing the online recovery. If the
+ target <productname>PostgreSQL</> server has already started,
+ you must shut it down before starting the online recovery.
</para>
</note>
<para>
- Online recovery is performed in two phases. Connections from cliens are
- not allowd only in second phase of online recovery while the data can be
- updated or retrieved during the first phase.
+ Online recovery is performed in two phases. The first phase is
+ called "first stage" and the second phase is called "second
+ stage". You need to provide scripts for each
+ stage. Only <xref linkend="guc-replication-mode"> requires the
+ second stage. For other modes including streaming replication
+ mode the second stage is not performed and you don't need to
+ provide a script for the stage
+ in <xref linkend="guc-recovery-2nd-stage-command">. i.e. you can
+ safely leave it as an empty string.
+ </para>
+ <para>
+ Connections from cliens are not allowd only in the second stage
+ while the data can be updated or retrieved during the first statge.
+ </para>
+ <para>
<productname>Pgpool-II</productname> performs the follows steps in online recovery:
</para>
<itemizedlist>
</listitem>
<listitem>
<para>
- First stage of online recovery.
+ Execute first stage of online recovery.
</para>
</listitem>
<listitem>
<para>
- Wait until all client connections have disconnected.
+ Wait until all client connections have disconnected (only
+ in <xref linkend="guc-replication-mode">).
</para>
</listitem>
<listitem>
<para>
- CHECKPOINT.
+ CHECKPOINT (only in <xref linkend="guc-replication-mode">).
+ specified).
</para>
</listitem>
<listitem>
<para>
- Second stage of online recovery.
+ Execute second stage of online recovery (only
+ in <xref linkend="guc-replication-mode">).
</para>
</listitem>
<listitem>
</itemizedlist>
<note>
<para>
- There is a restriction in the online recovery. If
+ There is a restriction in the online recovery in
+ <xref linkend="guc-replication-mode">. If
<productname>Pgpool-II</productname> itself is installed
on multiple hosts, online recovery does not work correctly,
because <productname>Pgpool-II</productname> has to stop all
</term>
<listitem>
<para>
- Specifies a command to be run by master(primary) node at the
+ Specifies a command to be run by master (primary) node at the
first stage of online recovery. The command file must be placed in the
database cluster directory for security reasons.
For example, if <varname>recovery_1st_stage_command</varname> = <literal>
<itemizedlist>
<listitem>
<para>
- Path to the database cluster of the master(primary) node.
+ Path to the database cluster of the master (primary) node.
</para>
</listitem>
<listitem>
</listitem>
<listitem>
<para>
- Port number of the master(primary) node.
+ Port number of the master (primary) node.
</para>
</listitem>
</itemizedlist>
<listitem>
<para>
- Specifies a command to be run by master(primary) node at the
- second stage of online recovery. The command file must be placed in the
- database cluster directory for security reasons.
- For example, if <varname>recovery_2nd_stage_command</varname> = <literal>
- 'sync-command'</literal>, then <productname>Pgpool-II</productname> will
- look for the command scrit in <literal>$PGDATA</literal> directory and will
- try to execute <command>$PGDATA/sync-command</command>.
+ Specifies a command to be run by master node at the second
+ stage of online recovery. This parameter only neccessary for
+ <xref linkend="guc-replication-mode">. The command file must
+ be placed in the database cluster directory for security
+ reasons. For example,
+ if <varname>recovery_2nd_stage_command</varname> = <literal>
+ 'sync-command'</literal>,
+ then <productname>Pgpool-II</productname> will look for the
+ command scrit in <literal>$PGDATA</literal> directory and
+ will try to execute <command>$PGDATA/sync-command</command>.
</para>
<para>
<varname>recovery_2nd_stage_command</varname> receives following 4 parameters: