diff options
author | User yamaguti | 2008-02-08 07:37:45 +0000 |
---|---|---|
committer | User yamaguti | 2008-02-08 07:37:45 +0000 |
commit | 87a9569009ae3df7d8020ccda20372994d482339 (patch) | |
tree | 8f31c2899b6591f890bd19cb1775241181279378 | |
parent | 7bf6a6a972605fb1545149aa0e51b19f96de01e4 (diff) |
Added "recovery_timeout" parameter in pgpool.conf edit function.
Added Online Recovery manual to docs and helps.
-rw-r--r-- | definePgpoolConfParam.php | 6 | ||||
-rw-r--r-- | doc/en/pgconfig.html | 42 | ||||
-rw-r--r-- | doc/ja/pgconfig.html | 16 | ||||
-rw-r--r-- | lang/en.lang.php | 1 | ||||
-rw-r--r-- | lang/fr.lang.php | 1 | ||||
-rw-r--r-- | lang/ja.lang.php | 1 | ||||
-rw-r--r-- | templates/help/en/pgconfig.tpl | 42 | ||||
-rw-r--r-- | templates/help/ja/pgconfig.tpl | 61 | ||||
-rw-r--r-- | templates/pgconfig.tpl | 9 |
9 files changed, 174 insertions, 5 deletions
diff --git a/definePgpoolConfParam.php b/definePgpoolConfParam.php index 9939778..8c41b7f 100644 --- a/definePgpoolConfParam.php +++ b/definePgpoolConfParam.php @@ -281,6 +281,12 @@ $pgpoolConfigParam[$key]['type'] ='C'; $pgpoolConfigParam[$key]['default'] =''; $pgpoolConfigParam[$key]['regexp'] = "^[0-9a-zA-Z_/\.\-]*$"; +$key = 'recovery_timeout'; +$pgpoolConfigParam[$key]['type'] ='N'; +$pgpoolConfigParam[$key]['default'] = 90; +$pgpoolConfigParam[$key]['min'] = 0; +$pgpoolConfigParam[$key]['max'] = 65535; + $key = 'failover_command'; $pgpoolConfigParam[$key]['type'] ='C'; $pgpoolConfigParam[$key]['default'] =''; diff --git a/doc/en/pgconfig.html b/doc/en/pgconfig.html index 28965b2..4b6110d 100644 --- a/doc/en/pgconfig.html +++ b/doc/en/pgconfig.html @@ -49,6 +49,7 @@ <li><a href="#logging">Logging</a></li> <li><a href="#replication">Replication</a></li> <li><a href="#health-check">Health Check</a></li> + <li><a href="#online-recovery">Online Recovery</a></li> <li><a href="#system-database">System Database</a></li> <li><a href="#others">Others</a></li> </ul> @@ -331,6 +332,47 @@ Number of connection pools each pgpool server process are keeping. pgpool will m </tr> </tfoot> </table> + <h3><a name="online-recovery">Online Recovery</a></h3> + <table> + <thead> + <tr> + <th>Parameter</th> + <th>Detail</th> + </tr> + </thead> + <tbody> + <tr> + <th><label>PostgreSQL user name for online recovery</label> + <br>recovery_user (string)</th> + <td>A PostgreSQL user name to be used during online recovery process.</td> + </tr> + <tr> + <th><label>PostgreSQL user password for online recovery</label> + <br>recovery_password (string)</th> + <td>"recovery_user"'s password to be used during online recovery process.</td> + </tr> + <tr> + <th><label>Recovery command to be excuted on the first stage</label> + <br>recovery_1st_stage_command (string)</th> + <td>Specifies a script name to be executed for the first stage of an online recovery process. The script needs to be placed in master node's database cluster ($PGDATA)</td> + </tr> + <tr> + <th><label>Recovery command to be excuted on the second stage</label> + <br>recovery_2nd_stage_command (string)</th> + <td>Specifies a script name to be executed for the second stage of an online recovery process. The script needs to be placed in master node's database cluster ($PGDATA</td> + </tr> + <tr> + <th><label>Number of seconds to wait for online recovery to complete. 0 means no wait</label> + <br>recovery_timeout (integer)</th> + <td>Number of seconds to wait for online recovery to complete. Note that 0 means NO WAIT; not no timeout.</td> + </tr> + </tbody> + <tfoot> + <tr> + <td colspan="2"></td> + </tr> + </tfoot> + </table> <h3><a name="system-database">System Database</a></h3> <table> diff --git a/doc/ja/pgconfig.html b/doc/ja/pgconfig.html index 4a421b2..20d4a51 100644 --- a/doc/ja/pgconfig.html +++ b/doc/ja/pgconfig.html @@ -391,8 +391,8 @@ PostgreSQLのバージョンによって使用できるSQLコマンドが違う� <br>recovery_1st_stage_command (string)</th> <td>最初にオンラインリカバリ中に起動するコマンド名を - 指定します。コマンド ファイルはセキュリティ上の観点 - からデータベースクラスタ以下にあるコマ ンドやスクリ + 指定します。コマンドファイルはセキュリティ上の観点 + からデータベースクラスタ以下にあるコマンドやスクリ プトのみを呼び出します。 例えば、 recovery_1st_stage_command = 'sync-command' と設定し てある場 合、$PGDATA/sync-command を起動しようとしま @@ -404,8 +404,8 @@ PostgreSQLのバージョンによって使用できるSQLコマンドが違う� <th><label>オンラインリカバリ第2ステージで実行するコマンド</label> <br>recovery_2nd_stage_command (string)</th> <td>2 回目のオンラインリカバリ中に起動するコマンド名 - を指定します。コマン ドファイルはセキュリティ上の観 - 点からデータベースクラスタ以下にあるコ マンドやスク + を指定します。コマンドファイルはセキュリティ上の観 + 点からデータベースクラスタ以下にあるコマンドやスク リプトのみを呼び出します。 例えば、 recovery_2nd_stage_command = 'sync-command' と設定し てある場 合、$PGDATA/sync-command を起動しようとしま @@ -415,7 +415,13 @@ PostgreSQLのバージョンによって使用できるSQLコマンドが違う� しているクライアントが長時間存在している場合には コ マンドを起動しません。接続を制限し、現在の接続数が 0 になった時点 でコマンドを起動します。</td> - + </tr> + <tr> + <th><label>オンラインリカバリ終了までの待ち時間(秒)</label> + <br>recovery_timeout (integer)</th> + <td>オンラインリカバリ処理の最大待ち時間を指定します。0 を指 + 定すると待ち時間無しとなり、リカバリが一瞬で終了しない場合以 + 外は失敗となります。</td> </tr> </tbody> <tfoot> diff --git a/lang/en.lang.php b/lang/en.lang.php index c004e07..550b400 100644 --- a/lang/en.lang.php +++ b/lang/en.lang.php @@ -66,6 +66,7 @@ $message = array( 'descRecovery_password' => 'PostgreSQL user password for online recovery', 'descRecovery_1st_stage_command' => 'Recovery command to be excuted on the first stage', 'descRecovery_2nd_stage_command' => 'Recovery command to be excuted on the second stage', + 'descRecovery_timeout' => 'Number of seconds to wait for online recovery to complete. 0 means no wait', 'descReplication_mode' => 'Set this to true if you are going to use replication functionality', 'descReplication_stop_on_mismatch' => 'Stop replication mode on data mismatch between master and secondary', 'descReplicate_select' => 'If true, replicate SELECT queries. If false, send only to master ', diff --git a/lang/fr.lang.php b/lang/fr.lang.php index 3c257cb..9b11e27 100644 --- a/lang/fr.lang.php +++ b/lang/fr.lang.php @@ -66,6 +66,7 @@ $message = array( 'descRecovery_password' => 'Mot de passe de l\'utilisateur PostgreSQL pour la récupération en ligne', 'descRecovery_1st_stage_command' => 'Commande de restauration à exécuter à la première étape', 'descRecovery_2nd_stage_command' => 'Commande de restauration à exécuter à la deuxième étape', + 'descRecovery_timeout' => 'Number of seconds to wait for online recovery to complete. 0 means no wait', 'descReplication_mode' => 'Configurer ceci à vrai (true) si vous voulez utiliser la réplication', 'descReplication_stop_on_mismatch' => 'Stopper le mode réplication en as de différence de données entre le maître et l\'esclave', 'descReplicate_select' => 'Si vrai, réplique les requêtes SELECT. Si faux, les envoit seulement au maître', diff --git a/lang/ja.lang.php b/lang/ja.lang.php index 5867b43..94791d0 100644 --- a/lang/ja.lang.php +++ b/lang/ja.lang.php @@ -66,6 +66,7 @@ $message = array( 'descRecovery_password' => 'リカバリを行うためのPostgreSQLユーザパスワード', 'descRecovery_1st_stage_command' => 'オンラインリカバリ第1ステージで実行するコマンド', 'descRecovery_2nd_stage_command' => 'オンラインリカバリ第2ステージで実行するコマンド', + 'descRecovery_timeout' => 'オンラインリカバリ終了までの待ち時間(秒)。0 は待ち時間無し', 'descReplication_mode' => 'レプリケーションモードの有効化', 'descReplication_stop_on_mismatch' => 'trueを指定するとマスタとセカンダリの間でデータの不一致があった場合に強制的に縮退運転', 'descReplicate_select' => 'true ならば SELECT をレプリケーションし、false ならばマスタにのみ送信', diff --git a/templates/help/en/pgconfig.tpl b/templates/help/en/pgconfig.tpl index 697f0f7..b2c51f2 100644 --- a/templates/help/en/pgconfig.tpl +++ b/templates/help/en/pgconfig.tpl @@ -34,6 +34,7 @@ <li><a href="#logging">Logging</a></li> <li><a href="#replication">Replication</a></li> <li><a href="#health-check">Health Check</a></li> + <li><a href="#online-recovery">Online Recovery</a></li> <li><a href="#system-database">System Database</a></li> <li><a href="#others">Others</a></li> </ul> @@ -261,6 +262,47 @@ number of connection pools each pgpool server process are keeping. pgpool will m </tr> </tfoot> </table> + <h3><a name="online-recovery">Online Recovery</a></h3> + <table> + <thead> + <tr> + <th>{$message.strParameter|escape}</th> + <th>{$message.strDetail|escape}</th> + </tr> + </thead> + <tbody> + <tr> + <th><label>{$message.descRecovery_user|escape}</label> + <br>recovery_user (string)</th> + <td>A PostgreSQL user name to be used during online recovery process.</td> + </tr> + <tr> + <th><label>{$message.descRecovery_password|escape}</label> + <br>recovery_password (string)</th> + <td>"recovery_user"'s password to be used during online recovery process.</td> + </tr> + <tr> + <th><label>{$message.descRecovery_1st_stage_command|escape}</label> + <br>recovery_1st_stage_command (string)</th> + <td>Specifies a script name to be executed for the first stage of an online recovery process. The script needs to be placed in master node's database cluster($PGDATA) due to security issues.</td> + </tr> + <tr> + <th><label>{$message.descRecovery_2nd_stage_command|escape}</label> + <br>recovery_2nd_stage_command (string)</th> + <td>Specifies a script name to be executed for the second stage of an online recovery process. The script needs to be placed in master node's database cluster ($PGDATA) due to security issues.</td> + </tr> + <tr> + <th><label>{$message.descRecovery_timeout|escape}</label> + <br>recovery_timeout (integer)</th> + <td>Number of seconds to wait for online recovery to complete. Note that 0 means NO WAIT; not no timeout.</td> + </tr> + </tbody> + <tfoot> + <tr> + <td colspan="2"></td> + </tr> + </tfoot> + </table> <h3><a name="system-database">System Database</a></h3> <table> <thead> diff --git a/templates/help/ja/pgconfig.tpl b/templates/help/ja/pgconfig.tpl index 7ec3676..a819c80 100644 --- a/templates/help/ja/pgconfig.tpl +++ b/templates/help/ja/pgconfig.tpl @@ -35,6 +35,7 @@ <li><a href="#logging">Logging</a></li> <li><a href="#replication">Replication</a></li> <li><a href="#health-check">Health Check</a></li> + <li><a href="#online-recovery">Online Recovery</a></li> <li><a href="#system-database">System Database</a></li> <li><a href="#others">Others</a></li> </ul> @@ -297,6 +298,66 @@ PostgreSQLのバージョンによって使用できるSQLコマンドが違う� </tfoot> </table> + <h3><a name="online-recovery">Online Recovery</a></h3> + <table> + <thead> + <tr> + <th>{$message.strParameter|escape}</th> + <th>{$message.strDetail|escape}</th> + </tr> + </thead> + <tbody> + <tr> + <th><label>{$message.descRecovery_user|escape}</label> + <br>recovery_user (string)</th> + <td>オンラインリカバリを行うための PostgreSQL ユーザ名です。</td> + </tr> + <tr> + <th><label>{$message.descRecovery_password|escape}</label> + <br>recovery_password (string)</th> + <td>オンラインリカバリを行うための PostgreSQL ユーザパスワードです。</td> + </tr> + <tr> + <th><label>{$message.descRecovery_1st_stage_command|escape}</label> + <br>recovery_1st_stage_command (string)</th> + <td>最初にオンラインリカバリ中に起動するコマンド名を + 指定します。コマンド ファイルはセキュリティ上の観点 + からデータベースクラスタ以下にあるコマ ンドやスクリ + プトのみを呼び出します。 例えば、 + recovery_1st_stage_command = 'sync-command' と設定し + てある場 合、$PGDATA/sync-command を起動しようとしま + す。 recovery_1st_stage_command を実行している間は + pgpool ではクライアン トからの接続を制限しません。参 + 照や更新を行うことができます。</td> + </tr> + <tr> + <th><label>{$message.descRecovery_2nd_stage_command|escape}</label> + <br>recovery_2nd_stage_command (string)</th> + <td>2 回目のオンラインリカバリ中に起動するコマンド名 + を指定します。コマン ドファイルはセキュリティ上の観 + 点からデータベースクラスタ以下にあるコ マンドやスク + リプトのみを呼び出します。 例えば、 + recovery_2nd_stage_command = 'sync-command' と設定し + てある場 合、$PGDATA/sync-command を起動しようとしま + す。 recovery_2nd_stage_command を実行している間は + pgpool ではクライアン トから接続、参照、更新処理を一 + 切受け付けません。また、バッチ 処理などによって接続 + しているクライアントが長時間存在している場合には コ + マンドを起動しません。接続を制限し、現在の接続数が 0 + になった時点 でコマンドを起動します。</td> + </tr> + <tr> + <th><label>{$message.descRecovery_timeout|escape}</label> + <br>recovery_timeout (integer)</th> + <td>オンラインリカバリ処理の最大待ち時間を指定します。0 を指定すると待ち時間無しとなり、リカバリが一瞬で終了しない場合以外は失敗となります。</td> + </tr> + </tbody> + <tfoot> + <tr> + <td colspan="2"></td> + </tr> + </tfoot> + </table> <h3><a name="system-database">System Database</a></h3> <table> <thead> diff --git a/templates/pgconfig.tpl b/templates/pgconfig.tpl index 4d4c2b6..45e020f 100644 --- a/templates/pgconfig.tpl +++ b/templates/pgconfig.tpl @@ -586,6 +586,15 @@ function cancelNode() { {/if} <td><input type="text" name="recovery_2nd_stage_command" value="{$params.recovery_2nd_stage_command|escape}"/></td> </tr> + <tr> {if $error.recovery_timeout != null} + <th class="error"><label>{$message.descRecovery_timeout|escape}</label> + <br />recovery_timeout (integer)</th> + {else} + <th><label>{$message.descRecovery_timeout|escape}</label> + <br />recovery_timeout (integer)</th> + {/if} + <td><input type="text" name="recovery_timeout" value="{$params.recovery_timeout|escape}"/></td> + </tr> </tbody> </table> <h3><a name="system-database" id="system-database">System Database</a></h3> |