* is" without express or implied warranty.
*
- * @copyright 2003-2016 PgPool Global Development Group
+ * @copyright 2003-2020 PgPool Global Development Group
* @version SVN: $Id$
*/
/* Add */
switch ($param) {
+ // params added in 4.1
+ case 'reserved_connections':
+ case 'backend_application_name':
+ case 'ssl_ecdh_curve':
+ case 'ssl_dh_params_file':
+ case 'statement_level_load_balance':
+ case 'auto_failback':
+ case 'auto_failback_interval':
+ case 'enable_consensus_with_half_votes':
+ case 'enable_shared_relcache':
+ case 'relcache_query_target':
+ $add_version = 4.1;
+ break;
+
// params added in 4.0
case 'allow_clear_text_frontend_auth':
case 'log_client_messages':
case 'disable_load_balance_on_write':
case 'failover_on_backend_error':
case 'detach_false_primary':
+ case 'ssl_ciphers':
+ case 'ssl_prefer_server_ciphers':
$add_version = 4.0;
break;
function versions()
{
- return array('4.0', '3.7', '3.6', '3.5', '3.4', '3.3', '3.2', '3.1', '3.0',
+ return array('4.1', '4.0', '3.7', '3.6', '3.5', '3.4', '3.3', '3.2', '3.1', '3.0',
'2.3', '2.2', '2.1', '2.0');
}
<?php
-define('_PGPOOL2_LANG', 'ja');
-define('_PGPOOL2_VERSION', '4.0');
+define('_PGPOOL2_LANG', 'en');
+define('_PGPOOL2_VERSION', '4.1');
define('_PGPOOL2_CONFIG_FILE', '/etc/pgpool-II/pgpool.conf');
define('_PGPOOL2_PASSWORD_FILE', '/etc/pgpool-II/pcp.conf');
define('_PGPOOL2_COMMAND', '/usr/bin/pgpool');
* is" without express or implied warranty.
*
- * @copyright 2003-2015 PgPool Global Development Group
+ * @copyright 2003-2020 PgPool Global Development Group
* @version CVS: $Id$
*/
$pgpoolConfigParam[$key]['type'] = 'B';
$pgpoolConfigParam[$key]['default'] = 'off';
+$key = 'reserved_connections';
+$pgpoolConfigParam[$key]['type'] = 'N';
+$pgpoolConfigParam[$key]['default'] = '0';
+$pgpoolConfigParam[$key]['max'] = NUM_MAX;
+$pgpoolConfigParam[$key]['restart'] = TRUE;
+
# - pgpool Communication Manager Connection Settings -
$key = 'pcp_listen_addresses';
$pgpoolConfigBackendParam[$key]['regexp'] = selectreg($pgpoolConfigBackendParam[$key]['select']);
$pgpoolConfigBackendParam[$key]['multiple'] = TRUE;
+$key = 'backend_application_name';
+$pgpoolConfigBackendParam[$key]['type'] = 'C';
+$pgpoolConfigBackendParam[$key]['default'] = '';
+$pgpoolConfigBackendParam[$key]['regexp'] = $anyelse;
+$pgpoolConfigBackendParam[$key]['multiple'] = TRUE;
+
# - Authentication -
$key = 'enable_pool_hba';
$pgpoolConfigParam[$key]['restart'] = TRUE;
$pgpoolConfigParam[$key]['parent'] = array('ssl' => 'on');
+$key = 'ssl_ciphers';
+$pgpoolConfigParam[$key]['type'] = 'C';
+$pgpoolConfigParam[$key]['default'] = 'HIGH:MEDIUM:+3DES:!aNULL';
+$pgpoolConfigParam[$key]['restart'] = TRUE;
+$pgpoolConfigParam[$key]['parent'] = array('ssl' => 'on');
+
+$key = 'ssl_prefer_server_ciphers';
+$pgpoolConfigParam[$key]['type'] = 'B';
+$pgpoolConfigParam[$key]['default'] = 'off';
+$pgpoolConfigParam[$key]['restart'] = TRUE;
+$pgpoolConfigParam[$key]['parent'] = array('ssl' => 'on');
+
+$key = 'ssl_ecdh_curve';
+$pgpoolConfigParam[$key]['type'] = 'C';
+$pgpoolConfigParam[$key]['default'] = 'prime256v1';
+$pgpoolConfigParam[$key]['restart'] = TRUE;
+$pgpoolConfigParam[$key]['parent'] = array('ssl' => 'on');
+
+$key = 'ssl_dh_params_file';
+$pgpoolConfigParam[$key]['type'] = 'C';
+$pgpoolConfigParam[$key]['default'] = '';
+$pgpoolConfigParam[$key]['restart'] = TRUE;
+$pgpoolConfigParam[$key]['parent'] = array('ssl' => 'on');
+
#------------------------------------------------------------------------------
# POOLS
#------------------------------------------------------------------------------
$pgpoolConfigParam[$key]['regexp'] = selectreg($pgpoolConfigParam[$key]['select']);
$pgpoolConfigParam[$key]['parent'] = array('load_balance_mode' => 'on');
+$key = 'statement_level_load_balance';
+$pgpoolConfigParam[$key]['type'] = 'B';
+$pgpoolConfigParam[$key]['default'] = 'off';
+$pgpoolConfigParam[$key]['parent'] = array('load_balance_mode' => 'on');
+
#------------------------------------------------------------------------------
# MASTER/SLAVE MODE
#------------------------------------------------------------------------------
$pgpoolConfigParam[$key]['min'] = 0;
$pgpoolConfigParam[$key]['max'] = NUM_MAX;
+$key = 'auto_failback';
+$pgpoolConfigParam[$key]['type'] = 'B';
+$pgpoolConfigParam[$key]['default'] = 'off';
+
+$key = 'auto_failback_interval';
+$pgpoolConfigParam[$key]['type'] = 'N';
+$pgpoolConfigParam[$key]['default'] = 60;
+$pgpoolConfigParam[$key]['min'] = 0;
+$pgpoolConfigParam[$key]['max'] = NUM_MAX;
+
#------------------------------------------------------------------------------
# ONLINE RECOVERY
#------------------------------------------------------------------------------
$key = 'if_up_cmd';
$pgpoolConfigParam[$key]['type'] = 'C';
-$pgpoolConfigParam[$key]['default'] = 'ip addr add $_IP_$/24 dev eth0 label eth0:0';
+if (_PGPOOL2_VERSION >= 4.1) {
+ $pgpoolConfigParam[$key]['default'] = '/usr/bin/sudo /sbin/ip addr add $_IP_$/24 dev eth0 label eth0:0';
+} else {
+ $pgpoolConfigParam[$key]['default'] = 'ip addr add $_IP_$/24 dev eth0 label eth0:0';
+}
$pgpoolConfigParam[$key]['regexp'] = $anyelse;
$pgpoolConfigParam[$key]['parent'] = array('use_watchdog' => 'on');
$key = 'if_down_cmd';
$pgpoolConfigParam[$key]['type'] = 'C';
-$pgpoolConfigParam[$key]['default'] = 'ip addr del $_IP_$/24 dev eth0';
+if (_PGPOOL2_VERSION >= 4.1) {
+ $pgpoolConfigParam[$key]['default'] = '/usr/bin/sudo /sbin/ip addr del $_IP_$/24 dev eth0';
+} else {
+ $pgpoolConfigParam[$key]['default'] = 'ip addr del $_IP_$/24 dev eth0';
+}
$pgpoolConfigParam[$key]['regexp'] = $anyelse;
$pgpoolConfigParam[$key]['parent'] = array('use_watchdog' => 'on');
$key = 'arping_cmd';
$pgpoolConfigParam[$key]['type'] = 'C';
-$pgpoolConfigParam[$key]['default'] = 'arping -U $_IP_$ -w 1';
+if (_PGPOOL2_VERSION >= 4.1) {
+ $pgpoolConfigParam[$key]['default'] = '/usr/bin/sudo /usr/sbin/arping -U $_IP_$ -w 1 -I eth0';
+} else {
+ $pgpoolConfigParam[$key]['default'] = 'arping -U $_IP_$ -w 1 -I eth0';
+}
$pgpoolConfigParam[$key]['regexp'] = $anyelse;
$pgpoolConfigParam[$key]['parent'] = array('use_watchdog' => 'on');
$pgpoolConfigParam[$key]['default'] = 'off';
$pgpoolConfigParam[$key]['parent'] = array('use_watchdog' => 'on');
+$key = 'enable_consensus_with_half_votes';
+$pgpoolConfigParam[$key]['type'] = 'B';
+$pgpoolConfigParam[$key]['default'] = 'off';
+$pgpoolConfigParam[$key]['parent'] = array('use_watchdog' => 'on');
+
# Life checking pgpool-II
# (Common)
$pgpoolConfigParam[$key]['max'] = NUM_MAX;
$key = 'check_temp_table';
+if (_PGPOOL2_VERSION >= 4.1) {
+ $pgpoolConfigParam[$key]['type'] = 'C';
+ $pgpoolConfigParam[$key]['default'] = 'catalog';
+} else {
+ $pgpoolConfigParam[$key]['type'] = 'B';
+ $pgpoolConfigParam[$key]['default'] = 'on';
+}
+
+$key = 'check_unlogged_table';
$pgpoolConfigParam[$key]['type'] = 'B';
$pgpoolConfigParam[$key]['default'] = 'on';
-$key = 'check_unlogged_table';
+$key = 'enable_shared_relcache';
$pgpoolConfigParam[$key]['type'] = 'B';
$pgpoolConfigParam[$key]['default'] = 'on';
+$key = 'relcache_query_target';
+$pgpoolConfigParam[$key]['type'] = 'C';
+$pgpoolConfigParam[$key]['default'] = 'master';
+$pgpoolConfigParam[$key]['regexp'] = $anyelse;
+
#------------------------------------------------------------------------------
# Deleted
#------------------------------------------------------------------------------
* is" without express or implied warranty.
*
- * @copyright 2003-2016 PgPool Global Development Group
+ * @copyright 2003-2020 PgPool Global Development Group
* @version CVS: $Id$
*/
function versions()
{
- return array('4.0', '3.7', '3.6', '3.5', '3.4', '3.3', '3.2', '3.1', '3.0',
+ return array('4.1', '4.0', '3.7', '3.6', '3.5', '3.4', '3.3', '3.2', '3.1', '3.0',
'2.3', '2.2', '2.1', '2.0');
}
* is" without express or implied warranty.
*
- * @copyright 2003-2015 PgPool Global Development Group
+ * @copyright 2003-2020 PgPool Global Development Group
* @version CVS: $Id$
*/
'descAllow_clear_text_frontend_auth' => 'If on, allow the Pgpool-II to use clear-text-password authentication with frontend clients',
'descAllow_multiple_failover_requests_from_node' => 'If on, a single Pgpool-II node can cast multiple votes for the failover',
+ 'descEnable_consensus_with_half_votes' => 'Apply majority rule for consensus and quorum computation at 50% of votes' .
+ 'in a cluster with even number of nodes',
'descAllow_sql_comments' => 'If on, ignore SQL comments when judging if load balance or query cache is possible',
'descApp_name_redirect_preference_list' => '"application name:node id" pairs to specify the node id when the application is used',
'descArping_path' => 'The path of a command to send an ARP request after the virtual IP is switched',
'descArping_cmd' => 'The ommand to send an ARP request after the virtual IP is switched',
'descAuthentication_timeout' => 'Timeout in seconds to complete client authentication',
'descBackend_flag' => 'Allow failover and detach or not',
+ 'descBackend_application_name' => 'walsender\'s application_name, used for "show pool_nodes" command',
'descBackend_hostname' => 'The real PostgreSQL server name pgpool could connect',
'descBackend_port' => 'The port number where real PostgreSQL server is running on',
'descBackend_socket_dir' => 'The socket directory PostgreSQL could connect',
'descBlack_query_pattern_list' => 'Semicolon separated list of SQL patterns not to be load balanced',
'descCheck_temp_table' => 'If on, enable temporary table check in SELECT statements',
'descCheck_unlogged_table' => 'If on, enable unlogged table check in SELECT statements.',
+ 'descEnable_shared_relcache' => 'If on, relation cache stored in memory cache, the cache is shared among child process',
+ 'descRelcache_query_target' => 'Target node to send relcache queries',
'descChild_life_time' => 'Life of an idle child process in seconds',
'descChild_max_connections' => 'If child_max_connections connections were received, child exits',
'descClear_memqcache_on_escalation' => 'If on, watchdog clears all the query cache in the shared memory when pgpool-II escaltes to active',
'descDelegate_IP' => 'The virtual IP address (VIP) of pgpool-II ',
'descDetach_false_primary' => 'If on, detach false primary node',
'descDisable_load_balance_on_write' => 'Specify load balance behavior when write query is issued',
+ 'descStatement_level_load_balance' => 'Enables statement level load balancing',
'descEnable_pool_hba' => 'Use host-based authentication',
'descEnable_query_cache' => 'Perform query cache',
'descFailover_command' => 'Command to execute when detaching a node',
'Timeout in second for monitoring the deadlock',
'descSearch_primary_node_timeout' => 'the maximum amount of time in seconds to search'.
'for a primary node when a failover scenario occurs.',
+ 'descAuto_failback' => 'Reattach dettached backend node automatically if replication_state is \'streaming\'',
+ 'descAuto_failback_interval' => 'Interval of executing auto_failback in seconds',
'descSerialize_accept' => 'Whether to serialize accept() call for incoming client connections.',
'descReset_query_list' => 'Semicolon separated SQL commands to be issued at the end of session',
'descSerialize_accept' => 'Whether to serialize accept() call for incoming client connections',
+ 'descReserved_connections' => 'Number of reserved connections',
'descSsl' => 'The frontend connection',
'descSsl_ca_cert' => 'Path to the SSL private key file',
'descSsl_ca_cert_dir' => 'Path to the SSL public certificate file',
'descSsl_cert' => 'Path to the SSL private key file',
'descSsl_key' => 'Path to the SSL private key file',
+ 'descSsl_ciphers' => 'Allowed SSL ciphers',
+ 'descSsl_prefer_server_ciphers' => 'Use server\'s SSL cipher preferences, rather than the client\'s',
+ 'descSsl_ecdh_curve' => 'Name of the curve to use in ECDH key exchange',
+ 'descSsl_dh_params_file' => 'Name of the file containing Diffie-Hellman parameters',
'descSocket_dir' => 'The socket directory pgpool could connect',
'descSr_check_database' => 'The database to perform streaming replication delay check',
'descSr_check_period' => 'Interval between the streaming replication delay checks in seconds.',
* is" without express or implied warranty.
*
- * @copyright 2003-2013 PgPool Global Development Group
+ * @copyright 2003-2020 PgPool Global Development Group
* @version CVS: $Id$
*/
'descAllow_clear_text_frontend_auth' => 'Pgpool-IIがフロントエンドクライアントとクリアテキストパスワード認証を許可',
'descAllow_multiple_failover_requests_from_node' => '単一のPgpool-IIノードが複数のフェイルオーバ投票ができるどうか',
+ 'descEnable_consensus_with_half_votes' => 'クォーラムとフェイルオーバにおける合意を解決する際に、どのように多数決ルールにおける計算を行うかを設定',
'descAllow_sql_comments' => '負荷分散やクエリキャッシュができるかどうかの判定の際に、SQLコメントを無視するかどうか',
'descApp_name_redirect_preference_list' => 'アプリケーション名によって負荷分散をしたいノード番号を、"アプリケーション名:ノード番号"で指定',
'descArping_path' => 'IP アドレス切り替え後に ARP リクエストを送信するコマンドのパス',
'descArping_cmd' => 'IP アドレス切り替え後に ARP リクエストを送信するコマンド',
'descAuthentication_timeout' => 'クライアント認証のタイムアウト時間(秒)',
'descBackend_flag' => 'フェイルオーバやデタッチの可否',
+ 'descBackend_application_name' => 'walsenderのために使用するapplication_nameを設定',
'descBackend_hostname' => 'pgpoolが接続するPostgreSQLサーバ(postmaster)が動いているホスト名',
'descBackend_port' => 'PostgreSQLサーバのポート番号',
'descBackend_socket_dir' => 'PostgreSQLサーバのUnix domain socketのディレクトリ',
'descBlack_query_pattern_list' => '負荷分散を行わないセミコロン区切りのSQLパターンリスト',
'descCheck_temp_table' => '一時テーブルかどうかをチェック',
'descCheck_unlogged_table' => 'unloggedテーブルかどうかをチェック',
+ 'descEnable_shared_relcache' => 'クエリキャッシュを利用して子プロセス間でリレーションキャッシュを共有するかどうか',
+ 'descRelcache_query_target' => 'リレーションキャッシュを作成するためのクエリを送る先のノード',
'descChild_life_time' => 'pgpoolの子プロセスの寿命',
'descChild_max_connections' => '各pgpool子プロセスが終了するまでの接続回数',
'descClear_memqcache_on_escalation' => 'アクティブ昇格時に共有メモリ上のクエリキャッシュを削除するかどうか',
'descDelegate_IP' => '仮想 IP アドレス',
'descDetach_false_primary' => '不正なプライマリを切り離すかどうか',
'descDisable_load_balance_on_write' => '更新クエリが発行された時の負荷分散の振る舞いを指定',
+ 'descStatement_level_load_balance' => '参照クエリごとに負荷分散先を決めるかどうか',
'descEnable_pool_hba' => 'クライアント認証機能の有無',
'descEnable_query_cache' => 'クエリキャッシュ機能の有無',
'descFailover_command' => 'ノード切り離し時に起動するコマンド',
'厳密でないレプリケーションモードでは、デッドロックが発生しやすくなります。',
'descReset_query_list' => 'セッションが終了するときにコネクションを初期化するためのSQLコマンド',
'descSearch_primary_node_timeout' => 'フェイルオーバーが起きた時にプライマリノードを検索する際のタイムアウト時間(秒)',
+ 'descAuto_failback' => 'ダウンしたスタンバイノードを自動で復帰させるかどうか',
+ 'descAuto_failback_interval' => '自動フェイルバックの実行間隔の最小時間(秒)',
'descSerialize_accept' => 'クライアントからの接続受け付け時、accept() をシリアライズする',
+ 'descReserved_connections' => '(num_init_children - reserved_connections)以上のクライアントからの接続要求を拒否するかどうか',
'descSocket_dir' => 'pgpoolがコネクションを受け付けるUnix domain socketディレクトリ',
'descSsl' => 'pgpool-IIとバックエンドの間のSSL接続',
'descSsl_ca_cert' => 'opensslの-CAFileに指定するパス',
'descSsl_ca_cert_dir' => 'opensslの-CApathに指定するディレクトリパス',
'descSsl_cert' => 'フロントエンドとの接続に使用する公開x509証明書のフルパス',
'descSsl_key' => 'フロントエンドとの接続に使用するプライベートキーファイルのフルパス',
+ 'descSsl_ciphers' => 'セキュアな接続で使用できるSSL暗号スイートのリストを指定する',
+ 'descSsl_prefer_server_ciphers' => 'クライアントではなく、サーバ指定のSSL暗号を選択するかどうか',
+ 'descSsl_ecdh_curve' => 'ECDHキー交換で使われる曲線の名前を指定する',
+ 'descSsl_dh_params_file' => '短命DH系SSL暗号で使用するディフィー・ヘルマンパラメータを格納するファイル名を指定する',
'descSr_check_database' => 'ストリーミングレプリケーションの遅延チェックを行なう対象のデータベース名',
'descSr_check_period' => 'ストリーミングレプリケーションの遅延チェックの間隔(秒)',
'descSr_check_user' => 'ストリーミングレプリケーションの遅延チェックを行うユーザ',
$isError = TRUE;
$error += $logical_errors;
}
+var_dump($error);
/**
* return params which has errors
{if paramExists('backend_socket_dir')}
{custom_tr_pgconfig param='backend_socket_dir'}
{/if}
+ {if paramExists('reserved_connections')}
+ {custom_tr_pgconfig param='reserved_connections'}
+ {/if}
</tbody>
<tbody id="tb_connection_pcp">
{custom_tr_pgconfig param='ssl_cert'}
{custom_tr_pgconfig param='ssl_ca_cert'}
{custom_tr_pgconfig param='ssl_ca_cert_dir'}
+ {if paramExists('ssl_ciphers')}
+ {custom_tr_pgconfig param='ssl_ciphers'}
+ {/if}
+ {if paramExists('ssl_prefer_server_ciphers')}
+ {custom_tr_pgconfig param='ssl_prefer_server_ciphers'}
+ {/if}
+ {if paramExists('ssl_ecdh_curve')}
+ {custom_tr_pgconfig param='ssl_ecdh_curve'}
+ {/if}
+ {if paramExists('ssl_dh_params_file')}
+ {custom_tr_pgconfig param='ssl_dh_params_file'}
+ {/if}
</tbody>
{/if}
</table>
{if paramExists('backend_flag')}
{custom_tr_pgconfig param='backend_flag' num=$node_num}
{/if}
+ {if paramExists('backend_application_name')}
+ {custom_tr_pgconfig param='backend_application_name' num=$node_num}
+ {/if}
</tbody>
{/foreach}
{if paramExists('disable_load_balance_on_write')}
{custom_tr_pgconfig param='disable_load_balance_on_write'}
{/if}
+ {if paramExists('statement_level_load_balance')}
+ {custom_tr_pgconfig param='statement_level_load_balance'}
+ {/if}
</tbody>
</table>
{if paramExists('search_primary_node_timeout')}
{custom_tr_pgconfig param='search_primary_node_timeout'}
{/if}
+ {if paramExists('auto_failback')}
+ {custom_tr_pgconfig param='auto_failback'}
+ {/if}
+ {if paramExists('auto_failback_interval')}
+ {custom_tr_pgconfig param='auto_failback_interval'}
+ {/if}
</tbody>
</table>
{if paramExists('wd_monitoring_interfaces_list')}
{custom_tr_pgconfig param='wd_monitoring_interfaces_list'}
{/if}
+ {if paramExists('enable_consensus_with_half_votes')}
+ {custom_tr_pgconfig param='enable_consensus_with_half_votes'}
+ {/if}
</tbody>
{if paramExists('failover_when_quorum_exists')}
{if paramExists('check_unlogged_table')}
{custom_tr_pgconfig param='check_unlogged_table'}
{/if}
+ {if paramExists('enable_shared_relcache')}
+ {custom_tr_pgconfig param='enable_shared_relcache'}
+ {/if}
+ {if paramExists('relcache_query_target')}
+ {custom_tr_pgconfig param='relcache_query_target'}
+ {/if}
</tbody>
</table>
{/if}
* is" without express or implied warranty.\r
*\r
- * @copyright 2003-2018 PgPool Global Development Group\r
+ * @copyright 2003-2020 PgPool Global Development Group\r
* @version SVN: $Id$\r
*/\r
\r
-$version = '4.0.1';\r
+$version = '4.1.0';\r
\r
?>\r