From d4a8445fb6aa5f32600f9753394117081fefdde5 Mon Sep 17 00:00:00 2001 From: Nozomi Anzai Date: Wed, 6 Jun 2012 15:19:30 +0900 Subject: [PATCH] Add new directive "check_temp_table" --- common.php | 1 + definePgpoolConfParam.php | 4 ++++ lang/en.lang.php | 1 + lang/ja.lang.php | 1 + templates/help/en/pgconfig.tpl | 12 ++++++++++++ templates/help/ja/pgconfig.tpl | 12 ++++++++++++ templates/pgconfig.tpl | 10 ++++++++++ 7 files changed, 41 insertions(+) diff --git a/common.php b/common.php index 0d667b0..49daf7c 100644 --- a/common.php +++ b/common.php @@ -546,6 +546,7 @@ function paramExists($param) case 'white_memqcache_table_lsit': case 'black_memqcache_table_list': case 'relcache_size': + case 'check_temp_table': $add_version = 3.2; break; diff --git a/definePgpoolConfParam.php b/definePgpoolConfParam.php index 5c00985..758fea0 100644 --- a/definePgpoolConfParam.php +++ b/definePgpoolConfParam.php @@ -603,6 +603,10 @@ $pgpoolConfigParam[$key]['default'] = 0; $pgpoolConfigParam[$key]['min'] = 0; $pgpoolConfigParam[$key]['max'] = NUM_MAX; +$key = 'check_temp_table'; +$pgpoolConfigParam[$key]['type'] = 'B'; +$pgpoolConfigParam[$key]['default'] = 'on'; + #------------------------------------------------------------------------------ # Deleted #------------------------------------------------------------------------------ diff --git a/lang/en.lang.php b/lang/en.lang.php index e115c57..951fc26 100644 --- a/lang/en.lang.php +++ b/lang/en.lang.php @@ -43,6 +43,7 @@ $message = array( 'from a client in on line recovery', 'descConnection_cache' => 'If true, cache connections to PostgreSQL', 'descConnection_life_time' => 'Life time for each idle connection in seconds', + 'descCheck_temp_table' => 'If on, enable temporary table check in SELECT statements', 'descDelay_threshold' => 'If the standby server delays more than delay_threshold, '. 'any query goes to the primary only', 'descDebug_level' => 'Debug message verbosity level', diff --git a/lang/ja.lang.php b/lang/ja.lang.php index 974b632..f2e8c4b 100644 --- a/lang/ja.lang.php +++ b/lang/ja.lang.php @@ -36,6 +36,7 @@ $message = array( 'descBackend_data_directory' => 'PostgreSQLサーバのデータベースディレクトリ', 'descBlack_function_list' => 'データベースに書き込みを行なうカンマ区切りの関数のリスト', 'descBlack_memqcache_table_list' => 'SELECT結果をキャッシュしたくないテーブル名のカンマ区切りのリスト', + 'descCheck_temp_table' => '一時テーブルかどうかをチェック', 'descChild_life_time' => 'pgpoolの子プロセスの寿命', 'descChild_max_connections' => '各pgpool子プロセスが終了するまでの接続回数', 'descClient_idle_limit' => 'クライアントからのクエリの最大待ち時間(秒)', diff --git a/templates/help/en/pgconfig.tpl b/templates/help/en/pgconfig.tpl index f3f9d26..84fe310 100644 --- a/templates/help/en/pgconfig.tpl +++ b/templates/help/en/pgconfig.tpl @@ -1825,6 +1825,18 @@ black_function_list = 'nextval,setval,lastval,currval' {/if} + + {if paramExists('check_temp_table')} + +

check_temp_table (bool) + +

If on, enable temporary table check in SELECT statements. + This initiates queries against system catalog of primary/master thus increases load of primary/master. + If you are absolutely sure that your system never uses temporary tables and + you want to save access to primary/master, you could turn this off. Default is on.

+ + + {/if} diff --git a/templates/help/ja/pgconfig.tpl b/templates/help/ja/pgconfig.tpl index e3312a8..4b7c38a 100644 --- a/templates/help/ja/pgconfig.tpl +++ b/templates/help/ja/pgconfig.tpl @@ -1905,6 +1905,18 @@ black_function_list = 'nextval,setval,lastval,currval' {/if} + + {if paramExists('check_temp_table')} + +

check_temp_table (bool) + +

もし on なら、SELECT に含まれるテーブルが一時テーブルかどうかのチェックを行います。 + このチェックは、primary/master のシステムカタログへのアクセスを発生させ、それなりに負荷を上げます。 + もし一時テーブルを使っていないということが確かで、primary/master の負荷を少しでも下げたいのであれば、 + off にすることができます。デフォルトは on です。

+ + + {/if} diff --git a/templates/pgconfig.tpl b/templates/pgconfig.tpl index 2da0181..d4978de 100644 --- a/templates/pgconfig.tpl +++ b/templates/pgconfig.tpl @@ -1341,6 +1341,16 @@ function cancelNode() { {/if} + {if paramExists('check_temp_table')} + + + +
check_temp_table (bool) + + + {/if} + {/if} -- 2.39.5