From 307357ff1c15f0af57f220aa2037dd021541f0d9 Mon Sep 17 00:00:00 2001 From: yunlongg <504072751@qq.com> Date: Wed, 1 Jun 2022 15:36:08 +0800 Subject: [PATCH 1/2] modify guc value --- .../7-recommended-parameter-settings.md | 8 ++++---- .../v3.0/reference-guide/guc-parameters/26-query.md | 2 +- .../7-recommended-parameter-settings.md | 8 ++++---- .../v3.0/reference-guide/guc-parameters/26-query.md | 2 +- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/product/en/docs-mogdb/v3.0/installation-guide/standard-installation/7-recommended-parameter-settings.md b/product/en/docs-mogdb/v3.0/installation-guide/standard-installation/7-recommended-parameter-settings.md index ed07f08e..8a283828 100644 --- a/product/en/docs-mogdb/v3.0/installation-guide/standard-installation/7-recommended-parameter-settings.md +++ b/product/en/docs-mogdb/v3.0/installation-guide/standard-installation/7-recommended-parameter-settings.md @@ -21,7 +21,7 @@ After installing the database, it is recommended to execute the following shell source ~/.bashrc memory=`free|awk '{print $2}' |sed -n 2p` -if [[ $memory -lt 4*1024*1024 ]] +if [[ $memory -le 4*1024*1024 ]] then max_process_memory=2GB shared_buffers=128MB @@ -29,7 +29,7 @@ then work_mem=4MB maintenance_work_mem=256MB echo "If the database fails to start, lower the parameters max_process_memory and shared_buffers" -elif [[ $memory -gt 4*1024*1024 ]] && [[ $memory -lt 8*1024*1024 ]] +elif [[ $memory -gt 4*1024*1024 ]] && [[ $memory -le 8*1024*1024 ]] then max_process_memory=5GB shared_buffers=1GB @@ -102,7 +102,7 @@ gs_guc set -I all -N all -c "autovacuum_analyze_scale_factor=0.02" gs_guc set -I all -N all -c "autovacuum_vacuum_threshold=200" gs_guc set -I all -N all -c "autovacuum_analyze_threshold=200" gs_guc set -I all -N all -c "autovacuum_io_limits=104857600" -gs_guc set -I all -N all -c "instr_unique_sql_count=20000" +gs_guc set -I all -N all -c "instr_unique_sql_count=200000" gs_guc set -I all -N all -c "enable_save_datachanged_timestamp=off" gs_guc set -I all -N all -c "track_sql_count=off" gs_guc set -I all -N all -c "enable_instr_rt_percentile=off" @@ -114,7 +114,7 @@ gs_guc set -I all -N all -c "enable_nestloop=on" gs_guc set -I all -N all -c "enable_pbe_optimization=off" gs_guc set -I all -N all -c "enable_resource_track=on" gs_guc set -I all -N all -c "enable_wdr_snapshot=on" -gs_guc set -I all -N all -c "instr_unique_sql_count=5000" +gs_guc set -I all -N all -c "log_min_duration_statement=200" ##Client whitelist gs_guc set -I all -N all -h "host all all 0.0.0.0/0 md5" diff --git a/product/en/docs-mogdb/v3.0/reference-guide/guc-parameters/26-query.md b/product/en/docs-mogdb/v3.0/reference-guide/guc-parameters/26-query.md index 32995336..98d71410 100644 --- a/product/en/docs-mogdb/v3.0/reference-guide/guc-parameters/26-query.md +++ b/product/en/docs-mogdb/v3.0/reference-guide/guc-parameters/26-query.md @@ -147,7 +147,7 @@ The first part indicates the tracing level of full SQL statements. The value can The second part indicates the tracing level of slow SQL statements. The value can be **OFF**, **L0**, **L1**, or **L2**. -> ![img](https://cdn-mogdb.enmotech.com/docs-media/icon/icon-note.gif) **NOTE:** If the full SQL tracing level is not **OFF**, the current SQL tracing level is the higher level (L2 > L1 > L0) of the full SQL and slow SQL statements. For details about the levels, see Table 1 [GUC parameters](30-appendix). +> ![img](https://cdn-mogdb.enmotech.com/docs-media/icon/icon-note.gif) **NOTE:** If the full SQL tracing level is not **OFF**, the current SQL tracing level is the higher level (L2 > L1 > L0) of the full SQL and slow SQL statements. L1 record sql execute plan and L2 record detail information of lock. **Default value**: **OFF,L0** diff --git a/product/zh/docs-mogdb/v3.0/installation-guide/standard-installation/7-recommended-parameter-settings.md b/product/zh/docs-mogdb/v3.0/installation-guide/standard-installation/7-recommended-parameter-settings.md index b294c2cc..76eae70c 100644 --- a/product/zh/docs-mogdb/v3.0/installation-guide/standard-installation/7-recommended-parameter-settings.md +++ b/product/zh/docs-mogdb/v3.0/installation-guide/standard-installation/7-recommended-parameter-settings.md @@ -21,7 +21,7 @@ date: 2021-06-24 source ~/.bashrc memory=`free|awk '{print $2}' |sed -n 2p` -if [[ $memory -lt 4*1024*1024 ]] +if [[ $memory -le 4*1024*1024 ]] then max_process_memory=2GB shared_buffers=128MB @@ -29,7 +29,7 @@ then work_mem=4MB maintenance_work_mem=256MB echo "If the database fails to start, lower the parameters max_process_memory and shared_buffers" -elif [[ $memory -gt 4*1024*1024 ]] && [[ $memory -lt 8*1024*1024 ]] +elif [[ $memory -gt 4*1024*1024 ]] && [[ $memory -le 8*1024*1024 ]] then max_process_memory=5GB shared_buffers=1GB @@ -102,7 +102,7 @@ gs_guc set -I all -N all -c "autovacuum_analyze_scale_factor=0.02" gs_guc set -I all -N all -c "autovacuum_vacuum_threshold=200" gs_guc set -I all -N all -c "autovacuum_analyze_threshold=200" gs_guc set -I all -N all -c "autovacuum_io_limits=104857600" -gs_guc set -I all -N all -c "instr_unique_sql_count=20000" +gs_guc set -I all -N all -c "instr_unique_sql_count=200000" gs_guc set -I all -N all -c "enable_save_datachanged_timestamp=off" gs_guc set -I all -N all -c "track_sql_count=off" gs_guc set -I all -N all -c "enable_instr_rt_percentile=off" @@ -114,7 +114,7 @@ gs_guc set -I all -N all -c "enable_nestloop=on" gs_guc set -I all -N all -c "enable_pbe_optimization=off" gs_guc set -I all -N all -c "enable_resource_track=on" gs_guc set -I all -N all -c "enable_wdr_snapshot=on" -gs_guc set -I all -N all -c "instr_unique_sql_count=5000" +gs_guc set -I all -N all -c "log_min_duration_statement=200" ##客户端白名单 gs_guc set -I all -N all -h "host all all 0.0.0.0/0 md5" diff --git a/product/zh/docs-mogdb/v3.0/reference-guide/guc-parameters/26-query.md b/product/zh/docs-mogdb/v3.0/reference-guide/guc-parameters/26-query.md index 890f49c0..c50778ad 100644 --- a/product/zh/docs-mogdb/v3.0/reference-guide/guc-parameters/26-query.md +++ b/product/zh/docs-mogdb/v3.0/reference-guide/guc-parameters/26-query.md @@ -154,7 +154,7 @@ full sql stat level为全量SQL跟踪级别,取值范围为OFF、L0、L1、L2 slow sql stat level为慢SQL的跟踪级别,取值范围为OFF、L0、L1、L2 -> ![img](https://cdn-mogdb.enmotech.com/docs-media/icon/icon-note.gif) **说明:** 若全量SQL跟踪级别值为非OFF时,当前SQL跟踪级别值为全量SQL和慢SQL的较高级别(L2 > L1 > L0),级别说明请参见表[GUC参数分类](30-appendix)。 +> ![img](https://cdn-mogdb.enmotech.com/docs-media/icon/icon-note.gif) **说明:** 若全量SQL跟踪级别值为非OFF时,当前SQL跟踪级别值为全量SQL和慢SQL的较高级别(L2 > L1 > L0),L1在L0的基础上记录了执行计划,L2在L1的基础上记录了详细锁信息。 **默认值**:OFF,L0 -- Gitee From 86f9e47135ec34ed6624c4a8e4953b25f221500f Mon Sep 17 00:00:00 2001 From: yunlongg <504072751@qq.com> Date: Wed, 1 Jun 2022 16:07:45 +0800 Subject: [PATCH 2/2] add guc reference --- .../docs-mogdb/v3.0/reference-guide/guc-parameters/26-query.md | 2 +- .../docs-mogdb/v3.0/reference-guide/guc-parameters/26-query.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/product/en/docs-mogdb/v3.0/reference-guide/guc-parameters/26-query.md b/product/en/docs-mogdb/v3.0/reference-guide/guc-parameters/26-query.md index 98d71410..74efcd82 100644 --- a/product/en/docs-mogdb/v3.0/reference-guide/guc-parameters/26-query.md +++ b/product/en/docs-mogdb/v3.0/reference-guide/guc-parameters/26-query.md @@ -147,7 +147,7 @@ The first part indicates the tracing level of full SQL statements. The value can The second part indicates the tracing level of slow SQL statements. The value can be **OFF**, **L0**, **L1**, or **L2**. -> ![img](https://cdn-mogdb.enmotech.com/docs-media/icon/icon-note.gif) **NOTE:** If the full SQL tracing level is not **OFF**, the current SQL tracing level is the higher level (L2 > L1 > L0) of the full SQL and slow SQL statements. L1 record sql execute plan and L2 record detail information of lock. +> ![img](https://cdn-mogdb.enmotech.com/docs-media/icon/icon-note.gif) **NOTE:** If the full SQL tracing level is not **OFF**, the current SQL tracing level is the higher level (L2 > L1 > L0) of the full SQL and slow SQL statements. L1 record sql execute plan and L2 record detail information of lock,Please reference [STATEMENT_HISTORY](STATEMENT_HISTORY). **Default value**: **OFF,L0** diff --git a/product/zh/docs-mogdb/v3.0/reference-guide/guc-parameters/26-query.md b/product/zh/docs-mogdb/v3.0/reference-guide/guc-parameters/26-query.md index c50778ad..2591a877 100644 --- a/product/zh/docs-mogdb/v3.0/reference-guide/guc-parameters/26-query.md +++ b/product/zh/docs-mogdb/v3.0/reference-guide/guc-parameters/26-query.md @@ -154,7 +154,7 @@ full sql stat level为全量SQL跟踪级别,取值范围为OFF、L0、L1、L2 slow sql stat level为慢SQL的跟踪级别,取值范围为OFF、L0、L1、L2 -> ![img](https://cdn-mogdb.enmotech.com/docs-media/icon/icon-note.gif) **说明:** 若全量SQL跟踪级别值为非OFF时,当前SQL跟踪级别值为全量SQL和慢SQL的较高级别(L2 > L1 > L0),L1在L0的基础上记录了执行计划,L2在L1的基础上记录了详细锁信息。 +> ![img](https://cdn-mogdb.enmotech.com/docs-media/icon/icon-note.gif) **说明:** 若全量SQL跟踪级别值为非OFF时,当前SQL跟踪级别值为全量SQL和慢SQL的较高级别(L2 > L1 > L0),L1在L0的基础上记录了执行计划,L2在L1的基础上记录了锁的详细信息,详情请参考[STATEMENT_HISTORY](STATEMENT_HISTORY)。 **默认值**:OFF,L0 -- Gitee