diff options
author | pengbo | 2018-01-19 04:40:08 +0000 |
---|---|---|
committer | pengbo | 2018-01-19 04:40:08 +0000 |
commit | 324d13e783edb3d8ced0166a1fddd9aff2ec285f (patch) | |
tree | 76fdf21a3e8ac4b1d7454f988cfc8ccbb6e64b15 | |
parent | 579833e695e011f8d47a6fff994a3393f9d8a37d (diff) |
Change the PostgreSQL connection timeout parameter name.
-rw-r--r-- | common.php | 12 | ||||
-rw-r--r-- | conf/pgmgt.conf.php | 2 | ||||
-rw-r--r-- | config.php | 6 | ||||
-rw-r--r-- | innerSystemCatalog.php | 2 | ||||
-rw-r--r-- | install/checkParameter.php | 4 | ||||
-rw-r--r-- | install/defaultParameter.php | 2 | ||||
-rw-r--r-- | install/lang/en.lang.php | 2 | ||||
-rw-r--r-- | install/lang/es.lang.php | 2 | ||||
-rw-r--r-- | install/lang/fr.lang.php | 2 | ||||
-rw-r--r-- | install/lang/ja.lang.php | 2 | ||||
-rw-r--r-- | install/lang/zh_cn.lang.php | 2 | ||||
-rw-r--r-- | lang/es.lang.php | 2 | ||||
-rw-r--r-- | queryCache.php | 2 | ||||
-rw-r--r-- | status.php | 2 | ||||
-rw-r--r-- | systemDb.php | 2 |
15 files changed, 23 insertions, 23 deletions
@@ -77,8 +77,8 @@ if (! defined('_PGPOOL2_LANG') || } // PostgreSQL connect timeout, default is 10 -if (! defined('_PGPOOL2_CONNECT_TIMEOUT')) { - define('_PGPOOL2_CONNECT_TIMEOUT', 10); +if (! defined('_PGPOOL2_PG_CONNECT_TIMEOUT')) { + define('_PGPOOL2_PG_CONNECT_TIMEOUT', 10); } /** @@ -161,7 +161,7 @@ function NodeActive($nodeNum) $params['health_check_database'] : 'template1', 'user' => $params['health_check_user'], 'password' => $params['health_check_password'], - 'connect_timeout' => _PGPOOL2_CONNECT_TIMEOUT + 'connect_timeout' => _PGPOOL2_PG_CONNECT_TIMEOUT, )); if ($conn == FALSE) { @@ -192,7 +192,7 @@ function NodeStandby($nodeNum) 'dbname' => 'template1', 'user' => $params['sr_check_user'], 'password' => $params['sr_check_password'], - 'connect_timeout' => _PGPOOL2_CONNECT_TIMEOUT, + 'connect_timeout' => _PGPOOL2_PG_CONNECT_TIMEOUT, )); if ($conn == FALSE) { @@ -231,7 +231,7 @@ function isSuperUser($user_name) 'dbname' => 'template1', 'user' => $_SESSION[SESSION_LOGIN_USER], 'password' => $_SESSION[SESSION_LOGIN_USER_PASSWORD], - 'connect_timeout' => _PGPOOL2_CONNECT_TIMEOUT, + 'connect_timeout' => _PGPOOL2_PG_CONNECT_TIMEOUT, )); // Try to connect health check user @@ -242,7 +242,7 @@ function isSuperUser($user_name) 'dbname' => 'template1', 'user' => $params['health_check_user'], 'password' => $params['health_check_password'], - 'connect_timeout' => _PGPOOL2_CONNECT_TIMEOUT + 'connect_timeout' => _PGPOOL2_PG_CONNECT_TIMEOUT, )); } if ($conn === FALSE) { return NULL; } diff --git a/conf/pgmgt.conf.php b/conf/pgmgt.conf.php index 53530fa..5122081 100644 --- a/conf/pgmgt.conf.php +++ b/conf/pgmgt.conf.php @@ -14,5 +14,5 @@ define('_PGPOOL2_LOG_FILE', '/tmp/pgpool.log'); define('_PGPOOL2_PCP_DIR', '/usr/bin'); define('_PGPOOL2_PCP_HOSTNAME', 'localhost'); define('_PGPOOL2_STATUS_REFRESH_TIME', '0'); -define('_PGPOOL2_CONNECT_TIMEOUT', '10'); +define('_PGPOOL2_PG_CONNECT_TIMEOUT', '10'); ?> @@ -103,8 +103,8 @@ $params['pcp_refresh_time'] = (defined('_PGPOOL2_STATUS_REFRESH_TIME')) ? // PostgreSQL connect timeout. Default is 10. // This is also defined in common.php. -$params['pg_connect_timeout'] = (defined('_PGPOOL2_CONNECT_TIMEOUT')) ? - _PGPOOL2_CONNECT_TIMEOUT : 10; +$params['pg_connect_timeout'] = (defined('_PGPOOL2_PG_CONNECT_TIMEOUT')) ? + _PGPOOL2_PG_CONNECT_TIMEOUT : 10; $tpl->assign('status', NULL); switch ( $action ) { @@ -291,7 +291,7 @@ function writePgmtConf($pgmgtConfigFile) write($fp, '_PGPOOL2_PCP_DIR', $params['pcp_client_dir']); write($fp, '_PGPOOL2_PCP_HOSTNAME', $params['pcp_hostname']); write($fp, '_PGPOOL2_STATUS_REFRESH_TIME', $params['pcp_refresh_time']); - write($fp, '_PGPOOL2_CONNECT_TIMEOUT', $params['pg_connect_timeout']); + write($fp, '_PGPOOL2_PG_CONNECT_TIMEOUT', $params['pg_connect_timeout']); $str = "?>\n"; fputs($fp, $str); diff --git a/innerSystemCatalog.php b/innerSystemCatalog.php index 5788d42..95b5c25 100644 --- a/innerSystemCatalog.php +++ b/innerSystemCatalog.php @@ -53,7 +53,7 @@ $conn = openDBConnection(array( 'dbname' => 'template1', 'user' => $params['health_check_user'], 'password' => $params['health_check_password'], - 'connect_timeout' => _PGPOOL2_CONNECT_TIMEOUT, + 'connect_timeout' => _PGPOOL2_PG_CONNECT_TIMEOUT, )); $rs = execQuery($conn, 'SHOW pool_status'); diff --git a/install/checkParameter.php b/install/checkParameter.php index b760280..a7b6b50 100644 --- a/install/checkParameter.php +++ b/install/checkParameter.php @@ -208,7 +208,7 @@ $msgPgConnectTimeout = ''; if (isset($_POST['pg_connect_timeout']) && $_POST['pg_connect_timeout']) { $pg_connect_timeout = $_POST['pg_connect_timeout']; } else { - $pg_connect_timeout = _PGPOOL2_CONNECT_TIMEOUT; + $pg_connect_timeout = _PGPOOL2_PG_CONNECT_TIMEOUT; } $msgPhpPgsql= ''; @@ -260,7 +260,7 @@ if (!$error && $action == 'next') { write($fp, '_PGPOOL2_PCP_HOSTNAME', $_POST['pcp_hostname']); write($fp, '_PGPOOL2_PCP_TIMEOUT', $_POST['pcp_timeout']); write($fp, '_PGPOOL2_STATUS_REFRESH_TIME', $_POST['pcp_refreshTime']); - write($fp, '_PGPOOL2_CONNECT_TIMEOUT', $_POST['pg_connect_timeout']); + write($fp, '_PGPOOL2_PG_CONNECT_TIMEOUT', $_POST['pg_connect_timeout']); fputs($fp, "?>"."\n"); diff --git a/install/defaultParameter.php b/install/defaultParameter.php index bea5247..ee89234 100644 --- a/install/defaultParameter.php +++ b/install/defaultParameter.php @@ -37,6 +37,6 @@ define("_PGPOOL2_PCP_DIR", "/usr/local/bin"); define("_PGPOOL2_PCP_HOSTNAME", "localhost"); define("_PGPOOL2_PCP_TIMEOUT", "10"); define("_PGPOOL2_STATUS_REFRESH_TIME", "0"); -define("_PGPOOL2_CONNECT_TIMEOUT", "10"); +define("_PGPOOL2_PG_CONNECT_TIMEOUT", "10"); ?> diff --git a/install/lang/en.lang.php b/install/lang/en.lang.php index 1433308..fdb49cb 100644 --- a/install/lang/en.lang.php +++ b/install/lang/en.lang.php @@ -50,7 +50,7 @@ $message = array( 'strPgpoolLogFile' => 'pgpool Logfile', 'strPcpDir' => 'PCP directory', 'strPcpTimeout' => 'PCP Timeout', - 'strPgConnectTimeout' => 'Postgresql Connect Timeout', + 'strPgConnectTimeout' => 'PostgreSQL Connect Timeout', 'strPcpHostName' => 'PCP Hostname', 'strPcpRefreshTime' => 'Refresh Time', 'strDependencies' => 'Dependencies', diff --git a/install/lang/es.lang.php b/install/lang/es.lang.php index f322afb..2b06705 100644 --- a/install/lang/es.lang.php +++ b/install/lang/es.lang.php @@ -50,7 +50,7 @@ $message = array( 'strPgpoolLogFile' => 'Archivo de logs para pgpool', 'strPcpDir' => 'Directorio PCP ', 'strPcpTimeout' => 'PCP Timeout', - 'strPgConnectTimeout' => 'Postgreql connect Timeout', + 'strPgConnectTimeout' => 'PostgreSQL Connect Timeout', 'strPcpHostName' => 'Nombre del host PCP', 'strPcpRefreshTime' => 'Tiempo de actualización', 'msgCongratulations' => '¡Felicitaciones, herramienta de administración está instalada!', diff --git a/install/lang/fr.lang.php b/install/lang/fr.lang.php index bf991a2..8fb7d07 100644 --- a/install/lang/fr.lang.php +++ b/install/lang/fr.lang.php @@ -47,7 +47,7 @@ $message = array( 'strPgpoolLogFile' => 'Journal Pgpool', 'strPcpDir' => 'Répertoire PCP', 'strPcpTimeout' => 'Délai d\'attente PCP', - 'strPgConnectTimeout' => 'Délai d\'attente Postgresql', + 'strPgConnectTimeout' => 'Délai d\'attente PostgreSQL', 'strPcpHostName' => 'Nom d\'hôte PCP', 'strPcpRefreshTime' => 'Temps de rafraichissement', 'msgCongratulations' => 'Félicitations. L\'outil d\'administration de Pgpool a été installé !', diff --git a/install/lang/ja.lang.php b/install/lang/ja.lang.php index 22c0416..bd2d11e 100644 --- a/install/lang/ja.lang.php +++ b/install/lang/ja.lang.php @@ -50,7 +50,7 @@ $message = array( 'strPgpoolLogFile' => 'pgpoolログファイル', 'strPcpDir' => 'PCPディレクトリ', 'strPcpTimeout' => 'PCPタイムアウト', - 'strPgConnectTimeout' => 'Postgreslタイムアウト', + 'strPgConnectTimeout' => 'PostgreSQL 接続タイムアウト', 'strPcpHostName' => 'PCPホスト名', 'strPcpRefreshTime' => '更新間隔(0で自動更新しない)', 'strDependencies' => '依存 PHP モジュール', diff --git a/install/lang/zh_cn.lang.php b/install/lang/zh_cn.lang.php index 9b815cb..d2f4618 100644 --- a/install/lang/zh_cn.lang.php +++ b/install/lang/zh_cn.lang.php @@ -48,7 +48,7 @@ $message = array( 'strPgpoolLogFile' => 'pgpool 日志文件', 'strPcpDir' => 'PCP 目录', 'strPcpTimeout' => 'PCP 超时', - 'strPgConnectTimeout' => 'Postgresql 超时', + 'strPgConnectTimeout' => 'PostgreSQL 连接超时', 'strPcpHostName' => 'PCP 主机名', 'strPcpRefreshTime' => '刷新时间', 'msgCongratulations' => '恭喜,pgpool 管理工具安装完成。', diff --git a/lang/es.lang.php b/lang/es.lang.php index b1b771c..b880265 100644 --- a/lang/es.lang.php +++ b/lang/es.lang.php @@ -296,7 +296,7 @@ $message = array( 'strPcpDir' => 'PCP Directorio', 'strPcpHostName' => 'PCP Nombre del Host', 'strPcpRefreshTime' => 'Tiempo de actualización', - 'strPgConnectTimeout' => 'Postgresql Espera', + 'strPgConnectTimeout' => 'PostgreSQL Espera', 'strPcpTimeout' => 'PCP Espera', 'strPgConfFile' => 'Archivo pgpool.conf', 'strPgConfSetting' => 'Configuración pgpool.conf', diff --git a/queryCache.php b/queryCache.php index e3e794b..2ffef4e 100644 --- a/queryCache.php +++ b/queryCache.php @@ -66,7 +66,7 @@ $sysDbParam['port'] = $sysDbParam['system_db_port']; $sysDbParam['dbname'] = $sysDbParam['system_db_dbname']; $sysDbParam['user'] = $sysDbParam['system_db_user']; $sysDbParam['password'] = $sysDbParam['system_db_password']; -$sysDbParam['connect_timeout'] = _PGPOOL2_CONNECT_TIMEOUT; +$sysDbParam['connect_timeout'] = _PGPOOL2_PG_CONNECT_TIMEOUT; $sysDbSchema = $sysDbParam['system_db_schema']; @@ -532,7 +532,7 @@ function _doPgCtl($nodeNumber, $pg_ctl_action) 'dbname' => 'template1', 'user' => $_SESSION[SESSION_LOGIN_USER], 'password' => $_SESSION[SESSION_LOGIN_USER_PASSWORD], - 'connect_timeout' => _PGPOOL2_CONNECT_TIMEOUT, + 'connect_timeout' => _PGPOOL2_PG_CONNECT_TIMEOUT, )); if ($conn == FALSE) { diff --git a/systemDb.php b/systemDb.php index 8ad4d09..38affb7 100644 --- a/systemDb.php +++ b/systemDb.php @@ -50,7 +50,7 @@ $sysDbParam['port'] = $sysDbParam['system_db_port']; $sysDbParam['dbname'] = $sysDbParam['system_db_dbname']; $sysDbParam['user'] = $sysDbParam['system_db_user']; $sysDbParam['password'] = $sysDbParam['system_db_password']; -$sysDbParam['connect_timeout'] = _PGPOOL2_CONNECT_TIMEOUT; +$sysDbParam['connect_timeout'] = _PGPOOL2_PG_CONNECT_TIMEOUT; $conn = openDBConnection($sysDbParam); if ($conn == FALSE) { |