diff --git a/product/en/docs-mogdb/v1.1/developer-guide/proc/1-9-transaction-management.md b/product/en/docs-mogdb/v1.1/developer-guide/proc/1-9-transaction-management.md index 3c5a0c7dea16cc024fc99abd868871e492fe77e1..71e5668b83a6eb4e50101a6cc976f034175a9d30 100644 --- a/product/en/docs-mogdb/v1.1/developer-guide/proc/1-9-transaction-management.md +++ b/product/en/docs-mogdb/v1.1/developer-guide/proc/1-9-transaction-management.md @@ -238,10 +238,10 @@ The following content cannot be committed or rolled back: BEGIN EXP_OUT := 0; COMMIT; - DBE_OUTPUT.PRINT_LINE('EXP IS:'||EXP); + RAISE NOTICE '%', 'EXP IS:'||EXP; EXP_OUT := 1; ROLLBACK; - DBE_OUTPUT.PRINT_LINE('EXP IS:'||EXP); + RAISE NOTICE '%', 'EXP IS:'||EXP; END; / ``` diff --git a/product/en/docs-mogdb/v2.0/developer-guide/proc/1-9-transaction-management.md b/product/en/docs-mogdb/v2.0/developer-guide/proc/1-9-transaction-management.md index 3c5a0c7dea16cc024fc99abd868871e492fe77e1..71e5668b83a6eb4e50101a6cc976f034175a9d30 100644 --- a/product/en/docs-mogdb/v2.0/developer-guide/proc/1-9-transaction-management.md +++ b/product/en/docs-mogdb/v2.0/developer-guide/proc/1-9-transaction-management.md @@ -238,10 +238,10 @@ The following content cannot be committed or rolled back: BEGIN EXP_OUT := 0; COMMIT; - DBE_OUTPUT.PRINT_LINE('EXP IS:'||EXP); + RAISE NOTICE '%', 'EXP IS:'||EXP; EXP_OUT := 1; ROLLBACK; - DBE_OUTPUT.PRINT_LINE('EXP IS:'||EXP); + RAISE NOTICE '%', 'EXP IS:'||EXP; END; / ``` diff --git a/product/en/docs-mogdb/v2.1/developer-guide/plpgsql/1-9-transaction-management.md b/product/en/docs-mogdb/v2.1/developer-guide/plpgsql/1-9-transaction-management.md index 88b4885cfd54bc23eae36f6d1c41c7af40cd4067..b0a8dff0a22080594896038975e89667d494ddba 100644 --- a/product/en/docs-mogdb/v2.1/developer-guide/plpgsql/1-9-transaction-management.md +++ b/product/en/docs-mogdb/v2.1/developer-guide/plpgsql/1-9-transaction-management.md @@ -254,10 +254,10 @@ The following content cannot be committed or rolled back: BEGIN EXP_OUT := 0; COMMIT; - DBE_OUTPUT.PRINT_LINE('EXP IS:'||EXP); + RAISE NOTICE '%', 'EXP IS:'||EXP; EXP_OUT := 1; ROLLBACK; - DBE_OUTPUT.PRINT_LINE('EXP IS:'||EXP); + RAISE NOTICE '%', 'EXP IS:'||EXP; END; / ``` diff --git a/product/en/docs-mogdb/v2.1/security-guide/security/4-setting-encrypted-equality-query.md b/product/en/docs-mogdb/v2.1/security-guide/security/4-setting-encrypted-equality-query.md index 82293c784fee6cf0d0e75dd601a1d2573b058ee4..5927f98f3aa8633fb0aefae12ab3fe1869aa5ce3 100644 --- a/product/en/docs-mogdb/v2.1/security-guide/security/4-setting-encrypted-equality-query.md +++ b/product/en/docs-mogdb/v2.1/security-guide/security/4-setting-encrypted-equality-query.md @@ -315,7 +315,7 @@ The **gs_encrypted_proc** system catalog is added to the function or stored proc > > - Because the query, that is, the dynamic query statement executed in a function or stored procedure, is compiled during execution, the table name and column name in the function or stored procedure must be known in the creation phase. The input parameter cannot be used as a table name or column name, or any connection mode. > - Among the **RETURNS**, **IN**, and **OUT** parameters, encrypted and non-encrypted parameters cannot be used together. Although the parameter types are all original, the actual types are different. -> - For advanced package interfaces, for example, **dbe_output.print_line()**, decryption is not performed on the interfaces whose output is printed on the server. This is because when the encrypted data type is forcibly converted into the plaintext original data type, the default value of the data type is printed. +> - For advanced package interfaces, decryption is not performed on the interfaces whose output is printed on the server. This is because when the encrypted data type is forcibly converted into the plaintext original data type, the default value of the data type is printed. > - In the current version, **LANGUAGE** of functions and stored procedures can only be **SQL** and **PL/pgSQL**, and does not support other procedural languages such as **C** and **Java**. > - Other functions or stored procedures for querying encrypted columns cannot be executed in a function or stored procedure. > - In the current version, default values cannot be assigned to variables in **DEFAULT** or **DECLARE** statements, and return values in **DECLARE** statements cannot be decrypted. You can use input parameters and output parameters instead when executing functions. diff --git a/product/en/docs-mogdb/v5.0/developer-guide/plpgsql/1-4-arrays-and-records.md b/product/en/docs-mogdb/v5.0/developer-guide/plpgsql/1-4-arrays-and-records.md index e61ac6a53169c7e4aa4b54dda77fbd73e0882b7c..c533bdb437e865bd010dda082ea68460e5efcbe4 100644 --- a/product/en/docs-mogdb/v5.0/developer-guide/plpgsql/1-4-arrays-and-records.md +++ b/product/en/docs-mogdb/v5.0/developer-guide/plpgsql/1-4-arrays-and-records.md @@ -619,9 +619,9 @@ The set functions support **multiset union**, **intersect**, **except all**, and for i in 1 .. v2.count loop fetch c1 into tmp; if tmp is null then - dbe_output.print_line(i || ': is null'); + RAISE NOTICE '%', i || ': is null'; else - dbe_output.print_line(i || ': ' || tmp); + RAISE NOTICE '%', i || ': ' || tmp; end if; end loop; close c1; @@ -662,9 +662,9 @@ The set functions support **multiset union**, **intersect**, **except all**, and for i in 1 .. v2.count loop fetch c1 into tmp; if tmp is null then - dbe_output.print_line(i || ': is null'); + RAISE NOTICE '%', i || ': is null'; else - dbe_output.print_line(i || ': ' || tmp); + RAISE NOTICE '%', i || ': ' || tmp; end if; end loop; close c1; diff --git a/product/en/docs-mogdb/v5.0/upgrade-guide/2-read-before-upgrade.md b/product/en/docs-mogdb/v5.0/upgrade-guide/2-read-before-upgrade.md index cbbe75de7b0ced8be63630843ead8969fc89b789..9146d3c6773641c88c79af32377465c7e4f66c6c 100644 --- a/product/en/docs-mogdb/v5.0/upgrade-guide/2-read-before-upgrade.md +++ b/product/en/docs-mogdb/v5.0/upgrade-guide/2-read-before-upgrade.md @@ -69,4 +69,8 @@ MogDB 5.0.6 supports parallel import/export, which relies on the new built-in pl ```sql create extension tidrangescan; -``` \ No newline at end of file +``` + +### Target Version 5.0.8 + +After upgrading the old version of MogDB to version 5.0.8, when using the dolphin extension to do union (set calculation) in the B-compatible database, all text types will be converted to text type (support for multiple union type inference and conversion to ensure that union returns a fixed type of result set). For the old version of the database using the dolphin extension, you need to do the adaptation of the client transformation. \ No newline at end of file diff --git a/product/en/docs-mogdb/v6.0/developer-guide/plpgsql/1-4-arrays-and-records.md b/product/en/docs-mogdb/v6.0/developer-guide/plpgsql/1-4-arrays-and-records.md index e580331f876004e1a12f1f197a70443f24bc376d..797dcff650ea8490681a781b4a0c6d57432a518d 100644 --- a/product/en/docs-mogdb/v6.0/developer-guide/plpgsql/1-4-arrays-and-records.md +++ b/product/en/docs-mogdb/v6.0/developer-guide/plpgsql/1-4-arrays-and-records.md @@ -632,9 +632,9 @@ The set functions support **multiset union**, **intersect**, **except all**, and for i in 1 .. v2.count loop fetch c1 into tmp; if tmp is null then - dbe_output.print_line(i || ': is null'); + gms_output.put(i || ': is null'); else - dbe_output.print_line(i || ': ' || tmp); + gms_output.put(i || ': ' || tmp); end if; end loop; close c1; @@ -675,9 +675,9 @@ The set functions support **multiset union**, **intersect**, **except all**, and for i in 1 .. v2.count loop fetch c1 into tmp; if tmp is null then - dbe_output.print_line(i || ': is null'); + gms_output.put(i || ': is null'); else - dbe_output.print_line(i || ': ' || tmp); + gms_output.put(i || ': ' || tmp); end if; end loop; close c1; diff --git a/product/zh/docs-mogdb/v1.1/developer-guide/proc/1-9-transaction-management.md b/product/zh/docs-mogdb/v1.1/developer-guide/proc/1-9-transaction-management.md index e7bc386ebbedfe0b193b4635c95691a1fe51c08c..bda41b60588f34a24136c1a7c5dcc5dfaf7c0801 100644 --- a/product/zh/docs-mogdb/v1.1/developer-guide/proc/1-9-transaction-management.md +++ b/product/zh/docs-mogdb/v1.1/developer-guide/proc/1-9-transaction-management.md @@ -238,10 +238,10 @@ date: 2021-03-04 BEGIN EXP_OUT := 0; COMMIT; - DBE_OUTPUT.PRINT_LINE('EXP IS:'||EXP); + RAISE NOTICE '%', 'EXP IS:'||EXP; EXP_OUT := 1; ROLLBACK; - DBE_OUTPUT.PRINT_LINE('EXP IS:'||EXP); + RAISE NOTICE '%', 'EXP IS:'||EXP; END; / ``` diff --git a/product/zh/docs-mogdb/v2.0/developer-guide/proc/1-9-transaction-management.md b/product/zh/docs-mogdb/v2.0/developer-guide/proc/1-9-transaction-management.md index e7bc386ebbedfe0b193b4635c95691a1fe51c08c..bda41b60588f34a24136c1a7c5dcc5dfaf7c0801 100644 --- a/product/zh/docs-mogdb/v2.0/developer-guide/proc/1-9-transaction-management.md +++ b/product/zh/docs-mogdb/v2.0/developer-guide/proc/1-9-transaction-management.md @@ -238,10 +238,10 @@ date: 2021-03-04 BEGIN EXP_OUT := 0; COMMIT; - DBE_OUTPUT.PRINT_LINE('EXP IS:'||EXP); + RAISE NOTICE '%', 'EXP IS:'||EXP; EXP_OUT := 1; ROLLBACK; - DBE_OUTPUT.PRINT_LINE('EXP IS:'||EXP); + RAISE NOTICE '%', 'EXP IS:'||EXP; END; / ``` diff --git a/product/zh/docs-mogdb/v2.1/developer-guide/plpgsql/1-9-transaction-management.md b/product/zh/docs-mogdb/v2.1/developer-guide/plpgsql/1-9-transaction-management.md index 6523976e19bba7b7741f79f3e5a7b49c17c36b18..5252fd2a21532764223493b3d91d1c2f6b2baf12 100644 --- a/product/zh/docs-mogdb/v2.1/developer-guide/plpgsql/1-9-transaction-management.md +++ b/product/zh/docs-mogdb/v2.1/developer-guide/plpgsql/1-9-transaction-management.md @@ -248,10 +248,10 @@ date: 2021-03-04 BEGIN EXP_OUT := 0; COMMIT; - DBE_OUTPUT.PRINT_LINE('EXP IS:'||EXP); + RAISE NOTICE '%', 'EXP IS:'||EXP; EXP_OUT := 1; ROLLBACK; - DBE_OUTPUT.PRINT_LINE('EXP IS:'||EXP); + RAISE NOTICE '%', 'EXP IS:'||EXP; END; / ``` diff --git a/product/zh/docs-mogdb/v2.1/reference-guide/guc-parameters/26-query.md b/product/zh/docs-mogdb/v2.1/reference-guide/guc-parameters/26-query.md index 36f0498d706751c47ece1dca986891f586fafdca..0aaac53e6bfcf8f8eab4b97b9db9281dc782170b 100644 --- a/product/zh/docs-mogdb/v2.1/reference-guide/guc-parameters/26-query.md +++ b/product/zh/docs-mogdb/v2.1/reference-guide/guc-parameters/26-query.md @@ -13,7 +13,7 @@ date: 2021-04-20 该值由大变小将会清空系统中原有的数据重新统计(备机不支持此能力);从小变大不受影响。 -当系统中产生的unique sql条目数量大于instr_unique_sql_count时,若开启了unique sql自动淘汰,则系统会按unique sql的更新时间由远到近自动淘汰一定比例的条目,使得新产生的unique sql信息可以继续被统计。若没有开启自动淘汰,则系统产生的新的unique sql信息将不再被统计。 +当系统中产生的unique sql条目数量大于instr_unique_sql_count时,若开启了unique sql自动淘汰,则系统会按unique sql的更新时间由远到近自动淘汰10%的条目,使得新产生的unique sql信息可以继续被统计。若没有开启自动淘汰,则系统产生的新的unique sql信息将不再被统计。 该参数属于SIGHUP类型参数,请参考表[GUC参数分类](30-appendix.md)中对应设置方法进行设置。 diff --git a/product/zh/docs-mogdb/v2.1/security-guide/security/4-setting-encrypted-equality-query.md b/product/zh/docs-mogdb/v2.1/security-guide/security/4-setting-encrypted-equality-query.md index 85476413eab5147a4fc2bc457553883ea2435ca3..b0f4824522f9c935588e9f8cb109c36e104c1ac8 100644 --- a/product/zh/docs-mogdb/v2.1/security-guide/security/4-setting-encrypted-equality-query.md +++ b/product/zh/docs-mogdb/v2.1/security-guide/security/4-setting-encrypted-equality-query.md @@ -318,7 +318,7 @@ pstmt.close(); > > - 函数/存储过程中的“执行动态查询语句”中的查询是在执行过程中编译,因此函数/存储过程中的表名、列名不能在创建阶段未知,输入参数不能用于表名、列名或以任何方式连接。 > - 在RETURNS、IN和OUT的参数中,不支持混合使用加密和非加密类型参数。虽然参数类型都是原始数据类型,但实际类型不同。 -> - 对高级包接口中,如dbe_output.print_line()等在服务端打印输出的接口不会做解密操作,加密数据类型在强转成明文原始数据类型时会打印出该数据类型的默认值。 +> - 对高级包接口中,服务端打印输出的接口不会做解密操作,加密数据类型在强转成明文原始数据类型时会打印出该数据类型的默认值。 > - 当前版本函数/存储过程的LANGUAGE只支持SQL和PL/pgSQL,不支持C和JAVA等其他过程语言。 > - 不支持在函数/存储过程中执行其他查询加密列的函数/存储过程。 > - 当前版本不支持default、DECLARE中为变量赋予默认值,且不支持对DECLARE中的返回值进行解密,用户可以用执行函数时用输入参数,输出参数来代替使用。 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 52ecb6386299e6bf16000feb668fa395c85e1d19..ad26377046d8abde93cb9b3148baf500150a398f 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 @@ -13,7 +13,7 @@ date: 2021-04-20 该值由大变小将会清空系统中原有的数据重新统计(备机不支持此能力);从小变大不受影响。 -当系统中产生的unique sql条目数量大于instr_unique_sql_count时,若开启了unique sql自动淘汰,则系统会按unique sql的更新时间由远到近自动淘汰一定比例的条目,使得新产生的unique sql信息可以继续被统计。若没有开启自动淘汰,则系统产生的新的unique sql信息将不再被统计。 +当系统中产生的unique sql条目数量大于instr_unique_sql_count时,若开启了unique sql自动淘汰,则系统会按unique sql的更新时间由远到近自动淘汰10%的条目,使得新产生的unique sql信息可以继续被统计。若没有开启自动淘汰,则系统产生的新的unique sql信息将不再被统计。 在x86平台集中式部署下,硬件配置规格为32核CPU/256GB内存,使用Benchmark SQL 5.0工具测试性能,开关此参数性能影响约3%。 diff --git a/product/zh/docs-mogdb/v3.1/reference-guide/guc-parameters/26-query.md b/product/zh/docs-mogdb/v3.1/reference-guide/guc-parameters/26-query.md index f95ee1ee8c3a25976d06729b4799e161144a8e7d..2647f8c09969b053b2cf5f6f2b16fbd096093ec1 100644 --- a/product/zh/docs-mogdb/v3.1/reference-guide/guc-parameters/26-query.md +++ b/product/zh/docs-mogdb/v3.1/reference-guide/guc-parameters/26-query.md @@ -13,7 +13,7 @@ date: 2021-04-20 该值由大变小将会清空系统中原有的数据重新统计(备机不支持此能力);从小变大不受影响。 -当系统中产生的unique sql条目数量(dbe_perf.statement/dbe_perf.summary_statement统计)大于instr_unique_sql_count时,若开启了unique sql自动淘汰,则系统会按unique sql的更新时间由远到近自动淘汰一定比例的条目,使得新产生的unique sql信息可以继续被统计。若没有开启自动淘汰,则系统产生的新的unique sql信息将不再被统计。 +当系统中产生的unique sql条目数量(dbe_perf.statement/dbe_perf.summary_statement统计)大于instr_unique_sql_count时,若开启了unique sql自动淘汰,则系统会按unique sql的更新时间由远到近自动淘汰10%的条目,使得新产生的unique sql信息可以继续被统计。若没有开启自动淘汰,则系统产生的新的unique sql信息将不再被统计。 在x86平台集中式部署下,硬件配置规格为32核CPU/256GB内存,使用Benchmark SQL 5.0工具测试性能,开关此参数性能影响约3%。 diff --git a/product/zh/docs-mogdb/v5.0/developer-guide/plpgsql/1-4-arrays-and-records.md b/product/zh/docs-mogdb/v5.0/developer-guide/plpgsql/1-4-arrays-and-records.md index 704826051fbbcafc50db6fa547bc86de159419d7..16a4f0e59b53c7f56f88c98fdd578202f4f392ed 100644 --- a/product/zh/docs-mogdb/v5.0/developer-guide/plpgsql/1-4-arrays-and-records.md +++ b/product/zh/docs-mogdb/v5.0/developer-guide/plpgsql/1-4-arrays-and-records.md @@ -785,9 +785,9 @@ MogDB=# DROP PROCEDURE nest_table_proc; for i in 1 .. v2.count loop fetch c1 into tmp; if tmp is null then - dbe_output.print_line(i || ': is null'); + RAISE NOTICE '%', i || ': is null'; else - dbe_output.print_line(i || ': ' || tmp); + RAISE NOTICE '%', i || ': ' || tmp; end if; end loop; close c1; @@ -828,9 +828,9 @@ MogDB=# DROP PROCEDURE nest_table_proc; for i in 1 .. v2.count loop fetch c1 into tmp; if tmp is null then - dbe_output.print_line(i || ': is null'); + RAISE NOTICE '%', i || ': is null'; else - dbe_output.print_line(i || ': ' || tmp); + RAISE NOTICE '%', i || ': ' || tmp; end if; end loop; close c1; diff --git a/product/zh/docs-mogdb/v5.0/reference-guide/guc-parameters/query.md b/product/zh/docs-mogdb/v5.0/reference-guide/guc-parameters/query.md index 9c7533fc29bced0ad59b268b3d90b3e5c58391fa..2502209477f28e0ea036982821fba533b6fff55b 100644 --- a/product/zh/docs-mogdb/v5.0/reference-guide/guc-parameters/query.md +++ b/product/zh/docs-mogdb/v5.0/reference-guide/guc-parameters/query.md @@ -13,7 +13,7 @@ date: 2021-04-20 该值由大变小将会清空系统中原有的数据重新统计(备机不支持此能力);从小变大不受影响。 -当系统中产生的unique sql条目数量(dbe_perf.statement/dbe_perf.summary_statement统计)大于instr_unique_sql_count时,若开启了unique sql自动淘汰,则系统会按unique sql的更新时间由远到近自动淘汰一定比例的条目,使得新产生的unique sql信息可以继续被统计。若没有开启自动淘汰,则系统产生的新的unique sql信息将不再被统计。 +当系统中产生的unique sql条目数量(dbe_perf.statement/dbe_perf.summary_statement统计)大于instr_unique_sql_count时,若开启了unique sql自动淘汰,则系统会按unique sql的更新时间由远到近自动淘汰10%的条目,使得新产生的unique sql信息可以继续被统计。若没有开启自动淘汰,则系统产生的新的unique sql信息将不再被统计。 在x86平台集中式部署下,硬件配置规格为32核CPU/256GB内存,使用Benchmark SQL 5.0工具测试性能,开关此参数性能影响约3%。 diff --git a/product/zh/docs-mogdb/v5.0/upgrade-guide/2-read-before-upgrade.md b/product/zh/docs-mogdb/v5.0/upgrade-guide/2-read-before-upgrade.md index 76be950136ebba6ff813d0530a984e45a383d34b..a2c412615d9cd096d312b97cc06802152080c6cf 100644 --- a/product/zh/docs-mogdb/v5.0/upgrade-guide/2-read-before-upgrade.md +++ b/product/zh/docs-mogdb/v5.0/upgrade-guide/2-read-before-upgrade.md @@ -69,4 +69,8 @@ MogDB 5.0.6新增并行导入导出功能(详见[逻辑备份恢复效率增 ```sql create extension tidrangescan; -``` \ No newline at end of file +``` + +### 目标版本为5.0.8 + +5.0.8之前的版本升级到5.0.8的情况下,使用dolphin插件的B兼容性数据库,做union(集合计算)的时候,所有文本类型均会转为text类型(支持多个union的类型推断和转换,确保union返回结果集类型固定),对于在5.0.8版本之前使用了dolphin插件的情况,需要客户端做适配改造。 \ No newline at end of file diff --git a/product/zh/docs-mogdb/v5.2/reference-guide/guc-parameters/query.md b/product/zh/docs-mogdb/v5.2/reference-guide/guc-parameters/query.md index a55e2f35e6c46a9943687bb7676882b133e7d504..ee9ea1ffacaedd83cc0007c938274272e9bf102c 100644 --- a/product/zh/docs-mogdb/v5.2/reference-guide/guc-parameters/query.md +++ b/product/zh/docs-mogdb/v5.2/reference-guide/guc-parameters/query.md @@ -13,7 +13,7 @@ date: 2021-04-20 该值由大变小将会清空系统中原有的数据重新统计(备机不支持此能力);从小变大不受影响。 -当系统中产生的unique sql条目数量(dbe_perf.statement/dbe_perf.summary_statement统计)大于instr_unique_sql_count时,若开启了unique sql自动淘汰,则系统会按unique sql的更新时间由远到近自动淘汰一定比例的条目,使得新产生的unique sql信息可以继续被统计。若没有开启自动淘汰,则系统产生的新的unique sql信息将不再被统计。 +当系统中产生的unique sql条目数量(dbe_perf.statement/dbe_perf.summary_statement统计)大于instr_unique_sql_count时,若开启了unique sql自动淘汰,则系统会按unique sql的更新时间由远到近自动淘汰10%的条目,使得新产生的unique sql信息可以继续被统计。若没有开启自动淘汰,则系统产生的新的unique sql信息将不再被统计。 在x86平台集中式部署下,硬件配置规格为32核CPU/256GB内存,使用Benchmark SQL 5.0工具测试性能,开关此参数性能影响约3%。 diff --git a/product/zh/docs-mogdb/v6.0/characteristic-description/high-availability/enhanced-efficiency-of-logical-backup-and-restore.md b/product/zh/docs-mogdb/v6.0/characteristic-description/high-availability/enhanced-efficiency-of-logical-backup-and-restore.md new file mode 100644 index 0000000000000000000000000000000000000000..04824fc99e1fbee0e6e6eff7ea4bed4d7a67db24 --- /dev/null +++ b/product/zh/docs-mogdb/v6.0/characteristic-description/high-availability/enhanced-efficiency-of-logical-backup-and-restore.md @@ -0,0 +1,175 @@ +--- +title: 逻辑备份恢复效率增强 +summary: 逻辑备份恢复效率增强 +author: 郭欢 王焱 +date: 2024-03-22 +--- + +# 逻辑备份恢复效率增强 + +## 可获得性 + +本特性自MogDB 5.0.6版本开始引入。 + +## 特性简介 + +本特性提升了逻辑备份和恢复的效率,支持逻辑备份在导出文件格式为目录(-F, --format=d)的场景下并行执行,同时支持对目录格式的导出文件执行并行导入。 + +## 客户价值 + +满足在数据量大的场景下客户对备份效率的要求,为数据库用户节省时间和空间成本,并行导入导出效率提升表现优异,最优场景下分别有4~10倍的提升。 + +## 特性描述 + +gs_dump工具新增`-j, --jobs=NUM`参数,支持在导出文件格式为目录的场景下执行表间并行数据导出,指定执行备份任务的worker数量,实现备份数据导出效率提升。 + +gs_restore工具支持对导出文件格式为目录和自定义归档格式(.dmp)的文件执行并行导入,实现备份数据导入效率提升。 + +此外,本特性支持通过对单表数据分片,并行执行每个分片的数据导入/导出;MogDB 5.0.8开始支持通过对分区表的每个分区进行分组,并行执行每个分组中的每个分区数据导入/导出,实现备份效率提升。 + +> 说明: +> +> - -j/--jobs参数指定为1相当于关闭并行导出/导入功能。 +> - worker指执行备份导入/导出的进程。 +> - 并行导入导出会根据不同并行度相应提高MogDB的CPU使用率,导致机器负载升高。 + +## 特性约束 + +- 单表分片并行导出和分区表分组并行导出仅适用于1G以上的大表。 + +- 只有并行导出的单表可以并行导入(gs_dump和gs_restore的-j参数需要配合使用,参数值必须大于1)。例如: + + ```shell + gs_dump -f backupdir/dir_bdat postgres -F d -j 4 -t <表名> + gs_restore backupdir/dir_bdat -d postgres -j 4 -t <表名> + ``` + +- 使用gs_dump工具时若指定了--inserts/--column-inserts参数,则无法进行单表并行导出。 + +## 示例 + +```shell +-- 指定导出并行worker的数量为4 +-- 方式一: +gs_dump -f backupdir/dir_bdat postgres -F d -j 4 +-- 方式二: +gs_dump -f backupdir/dir_bdat postgres -F d --jobs=4 + +-- 指定导入并行worker的数量为4 +-- 方式一: +gs_restore backupdir/dir_bdat -d postgres -j 4 +-- 方式二: +gs_restore backupdir/dir_bdat -d postgres --jobs=4 +``` + +## 性能测试 + +性能测试共7组,分别是: + +1. 标准TPCC数据集并行导出导入 +2. 标准TPCH数据集并行导出导入 +3. 1000个小表并行导出导入 +4. 大单表并行导出导入 +5. 17GB分区大表并行导出导入 +6. 51GB分区大表并行导出导入 +7. 103GB分区大表并行导出导入 + +**1. 标准TPCC数据集并行导出导入** + +导出: + +![1](https://cdn-mogdb.enmotech.com/docs-media/mogdb/characteristic-description/concurrency1.png) + +导入: + +![2](https://cdn-mogdb.enmotech.com/docs-media/mogdb/characteristic-description/concurrency2.png) + +**2. 标准TPCH数据集并行导出导入** + +导出: + +![3](https://cdn-mogdb.enmotech.com/docs-media/mogdb/characteristic-description/concurrency3.png) + +导入: + +![4](https://cdn-mogdb.enmotech.com/docs-media/mogdb/characteristic-description/concurrency4.png) + +**3. 1000个小表并行导出导入** + +导出: + +![5](https://cdn-mogdb.enmotech.com/docs-media/mogdb/characteristic-description/concurrency5.png) + +导入: + +![6](https://cdn-mogdb.enmotech.com/docs-media/mogdb/characteristic-description/concurrency6.png) + +**4. 大单表并行并行导出导入** + +导出: + +![7](https://cdn-mogdb.enmotech.com/docs-media/mogdb/characteristic-description/concurrency7.png) + +导入: + +![8](https://cdn-mogdb.enmotech.com/docs-media/mogdb/characteristic-description/concurrency8.png) + +**1-4组结果分析** + +**gs_dump** + +- 表数量很多和单个大表的情况下均表现优越 + +- TPCC数据集导出效率提升至原先的12.5倍,TPCH可提升7.1倍,1000张小表时并行可提升7.9倍,普通大表并行至多可提升6.3~7.9倍 + +- 并行度为8~20之间表现最优,继续提高并行度不会进一步增加导出效率,导出时MogDB的CPU使用率与并发数成正比 + +**gs_restore** + +- 表数量较多时或只有单表时在目录格式表现优越,dmp格式由于无法使用gs_dump拆分数据并行提升效果比较有限,但是大量小表的场景依然表现优越 + +- 目录格式TPCC数据集导入性能至多可以提升至原先的3.1倍,TPCH可提升2倍,1000张小表时并行可提升3.8倍,普通大表并行至多可提升5.5倍 + +- dmp格式TPCC数据集导入性能至多可以提升至原先的1.5倍,TPCH可提升1.2倍,1000张小表时并行可提升3.8倍,普通大表由于gs_dump无法拆分无提升效果 + +- 并行度为10~20之间表现最优,继续提高并行度不会进一步增加导入效率,导出时MogDB的CPU使用率与并发数成正比 + +**5. 17GB分区大表并行导出导入** + +导出: + +![9](https://cdn-mogdb.enmotech.com/docs-media/mogdb/characteristic-description/concurrency9.png) + +导入: + +![10](https://cdn-mogdb.enmotech.com/docs-media/mogdb/characteristic-description/concurrency10.png) + +**6. 51GB分区大表并行导出导入** + +导出: + +![11](https://cdn-mogdb.enmotech.com/docs-media/mogdb/characteristic-description/concurrency11.png) + +导入: + +![12](https://cdn-mogdb.enmotech.com/docs-media/mogdb/characteristic-description/concurrency12.png) + +**7. 103GB分区大表并行导出导入** + +导出: + +![13](https://cdn-mogdb.enmotech.com/docs-media/mogdb/characteristic-description/concurrency13.png) + +导入: + +![14](https://cdn-mogdb.enmotech.com/docs-media/mogdb/characteristic-description/concurrency14.png) + +**5-7组结果分析** + +针对103GB的分区大表,相比于串行导入导出,并行度设置为2、4、8时的性能(导入导出时间)分别提升了1倍、3倍、7倍。 + +由此可见,随着并行度的增加,对分区大表进行并行导出和导入的性能提高达到预期,17GB的分区表、51GB的分区表和103GB的分区表并发线性扩展基本一致。 + +## 相关页面 + +[gs_dump](../../reference-guide/tool-reference/server-tools/gs_dump.md)、[gs_restore](../../reference-guide/tool-reference/server-tools/gs_restore.md) diff --git a/product/zh/docs-mogdb/v6.0/developer-guide/plpgsql/1-4-arrays-and-records.md b/product/zh/docs-mogdb/v6.0/developer-guide/plpgsql/1-4-arrays-and-records.md index 0777d07f11b212eabc579e5c1336d1450b74c8a6..3780cac543415489af6d56777e07579419a9c599 100644 --- a/product/zh/docs-mogdb/v6.0/developer-guide/plpgsql/1-4-arrays-and-records.md +++ b/product/zh/docs-mogdb/v6.0/developer-guide/plpgsql/1-4-arrays-and-records.md @@ -798,9 +798,9 @@ MogDB=# DROP PROCEDURE nest_table_proc; for i in 1 .. v2.count loop fetch c1 into tmp; if tmp is null then - dbe_output.print_line(i || ': is null'); + gms_output.put(i || ': is null'); else - dbe_output.print_line(i || ': ' || tmp); + gms_output.put(i || ': ' || tmp); end if; end loop; close c1; @@ -841,9 +841,9 @@ MogDB=# DROP PROCEDURE nest_table_proc; for i in 1 .. v2.count loop fetch c1 into tmp; if tmp is null then - dbe_output.print_line(i || ': is null'); + gms_output.put(i || ': is null'); else - dbe_output.print_line(i || ': ' || tmp); + gms_output.put(i || ': ' || tmp); end if; end loop; close c1; diff --git a/product/zh/docs-mogdb/v6.0/reference-guide/guc-parameters/query.md b/product/zh/docs-mogdb/v6.0/reference-guide/guc-parameters/query.md index c6f37e19f33f9fb2a4b07a9e83bdf3a3e01a0f8b..04b0eed7c2b963903dbd832b9c7110c8f7174d30 100644 --- a/product/zh/docs-mogdb/v6.0/reference-guide/guc-parameters/query.md +++ b/product/zh/docs-mogdb/v6.0/reference-guide/guc-parameters/query.md @@ -13,7 +13,7 @@ date: 2021-04-20 该值由大变小将会清空系统中原有的数据重新统计(备机不支持此能力);从小变大不受影响。 -当系统中产生的unique sql条目数量(dbe_perf.statement/dbe_perf.summary_statement统计)大于instr_unique_sql_count时,若开启了unique sql自动淘汰,则系统会按unique sql的更新时间由远到近自动淘汰一定比例的条目,使得新产生的unique sql信息可以继续被统计。若没有开启自动淘汰,则系统产生的新的unique sql信息将不再被统计。 +当系统中产生的unique sql条目数量(dbe_perf.statement/dbe_perf.summary_statement统计)大于instr_unique_sql_count时,若开启了unique sql自动淘汰,则系统会按unique sql的更新时间由远到近自动淘汰10%的条目,使得新产生的unique sql信息可以继续被统计。若没有开启自动淘汰,则系统产生的新的unique sql信息将不再被统计。 在x86平台集中式部署下,硬件配置规格为32核CPU/256GB内存,使用Benchmark SQL 5.0工具测试性能,开关此参数性能影响约3%。 diff --git a/product/zh/docs-mogdb/v6.0/upgrade-guide/2-read-before-upgrade.md b/product/zh/docs-mogdb/v6.0/upgrade-guide/2-read-before-upgrade.md index c00718b61d3e3040b22adf6ca0cbe697c2e3d72d..bd4c45aba49ab6100940379a01deb88731e49f6d 100644 --- a/product/zh/docs-mogdb/v6.0/upgrade-guide/2-read-before-upgrade.md +++ b/product/zh/docs-mogdb/v6.0/upgrade-guide/2-read-before-upgrade.md @@ -59,4 +59,16 @@ select pg_get_viewdef('viewname') def where def like '%ROWNUM%' or def like '%CO Create view as viewdef; ``` - viewdef代表第一步中获取的视图定义。 \ No newline at end of file + viewdef代表第一步中获取的视图定义。 + +### 目标版本为5.0.6 + +MogDB 5.0.6新增并行导入导出功能(详见[逻辑备份恢复效率增强](../characteristic-description/high-availability/enhanced-efficiency-of-logical-backup-and-restore.md)),该功能依赖于新增内置插件tidrangescan。升级完成后,如需使用gs_dump、gs_restore并行导入导出功能,需在要进行导入导出的库里手动创建tidrangescan插件: + +```sql +create extension tidrangescan; +``` + +### 目标版本为5.0.8 + +5.0.8之前的版本升级到5.0.8的情况下,使用dolphin插件的B兼容性数据库,做union(集合计算)的时候,所有文本类型均会转为text类型(支持多个union的类型推断和转换,确保union返回结果集类型固定),对于在5.0.8版本之前使用了dolphin插件的情况,需要客户端做适配改造。 \ No newline at end of file