diff --git a/product/en/docs-mogdb/v1.1/reference-guide/functions-and-operators/14-sequence-functions.md b/product/en/docs-mogdb/v1.1/reference-guide/functions-and-operators/14-sequence-functions.md index 75527422acc7a3d78bbddc0b034ecf353b273aff..f5fc167ed941f0306b4a5b2485f9ef8f8bb6296f 100644 --- a/product/en/docs-mogdb/v1.1/reference-guide/functions-and-operators/14-sequence-functions.md +++ b/product/en/docs-mogdb/v1.1/reference-guide/functions-and-operators/14-sequence-functions.md @@ -124,4 +124,4 @@ The sequence functions provide a simple method to ensure security of multiple us > Because the sequence is non-transactional, the change caused by **setval** will not be undone by transaction rollback. > > ![img](https://cdn-mogdb.enmotech.com/docs-media/icon/icon-notice.gif) **NOTICE:** - > The **nextval** function can be executed only on the primary node. It is not supported on standby nodes. + > The **setval** function can be executed only on the primary node. It is not supported on standby nodes. diff --git a/product/en/docs-mogdb/v2.0/reference-guide/functions-and-operators/14-sequence-functions.md b/product/en/docs-mogdb/v2.0/reference-guide/functions-and-operators/14-sequence-functions.md index 75527422acc7a3d78bbddc0b034ecf353b273aff..f5fc167ed941f0306b4a5b2485f9ef8f8bb6296f 100644 --- a/product/en/docs-mogdb/v2.0/reference-guide/functions-and-operators/14-sequence-functions.md +++ b/product/en/docs-mogdb/v2.0/reference-guide/functions-and-operators/14-sequence-functions.md @@ -124,4 +124,4 @@ The sequence functions provide a simple method to ensure security of multiple us > Because the sequence is non-transactional, the change caused by **setval** will not be undone by transaction rollback. > > ![img](https://cdn-mogdb.enmotech.com/docs-media/icon/icon-notice.gif) **NOTICE:** - > The **nextval** function can be executed only on the primary node. It is not supported on standby nodes. + > The **setval** function can be executed only on the primary node. It is not supported on standby nodes. diff --git a/product/en/docs-mogdb/v2.1/reference-guide/functions-and-operators/14-sequence-functions.md b/product/en/docs-mogdb/v2.1/reference-guide/functions-and-operators/14-sequence-functions.md index 75527422acc7a3d78bbddc0b034ecf353b273aff..f5fc167ed941f0306b4a5b2485f9ef8f8bb6296f 100644 --- a/product/en/docs-mogdb/v2.1/reference-guide/functions-and-operators/14-sequence-functions.md +++ b/product/en/docs-mogdb/v2.1/reference-guide/functions-and-operators/14-sequence-functions.md @@ -124,4 +124,4 @@ The sequence functions provide a simple method to ensure security of multiple us > Because the sequence is non-transactional, the change caused by **setval** will not be undone by transaction rollback. > > ![img](https://cdn-mogdb.enmotech.com/docs-media/icon/icon-notice.gif) **NOTICE:** - > The **nextval** function can be executed only on the primary node. It is not supported on standby nodes. + > The **setval** function can be executed only on the primary node. It is not supported on standby nodes. diff --git a/product/en/docs-mogdb/v3.0/reference-guide/functions-and-operators/14-sequence-functions.md b/product/en/docs-mogdb/v3.0/reference-guide/functions-and-operators/14-sequence-functions.md index b75648045eb92474129b73b6a4930a902c6b7d63..f73f298893ef855d7c2d3137f1d4ec0e58808185 100644 --- a/product/en/docs-mogdb/v3.0/reference-guide/functions-and-operators/14-sequence-functions.md +++ b/product/en/docs-mogdb/v3.0/reference-guide/functions-and-operators/14-sequence-functions.md @@ -124,7 +124,7 @@ The sequence functions provide a simple method to ensure security of multiple us > Because the sequence is non-transactional, the change caused by **setval** will not be undone by transaction rollback. > > ![img](https://cdn-mogdb.enmotech.com/docs-media/icon/icon-notice.gif) **NOTICE:** - > The **nextval** function can be executed only on the primary node. It is not supported on standby nodes. + > The **setval** function can be executed only on the primary node. It is not supported on standby nodes. - pg_sequence_last_value(sequence_oid oid, OUT cache_value int16, OUT last_value int16) diff --git a/product/en/docs-mogdb/v3.0/reference-guide/guc-parameters/35-undo.md b/product/en/docs-mogdb/v3.0/reference-guide/guc-parameters/35-undo.md deleted file mode 100644 index 2775e9aa3c4986952a59ba27800345e10437100d..0000000000000000000000000000000000000000 --- a/product/en/docs-mogdb/v3.0/reference-guide/guc-parameters/35-undo.md +++ /dev/null @@ -1,28 +0,0 @@ ---- -title: Undo -summary: Undo -author: Zhang Cuiping -date: 2021-11-08 ---- - -# Undo - -## undo_space_limit_size - -**Parameter description**: Specifies the threshold for forcibly recycling undo space. When the undo space usage reaches 80% of the threshold, forcible recycling starts. You can set this parameter to a large value based on service requirements and then set it to a proper value based on the actual undo space usage. - -This parameter is a POSTMASTER parameter. Set it based on instructions provided in Table 1 [GUC parameters](30-appendix.md). - -**Value range**: an integer ranging from 800 MB to 32 TB - -**Default value**: **256 GB** - -## undo_limit_size_per_transaction - -**Parameter description**: Specifies the undo space threshold of a single transaction. If the threshold is reached, the transaction is rolled back due to an error. - -This parameter is a POSTMASTER parameter. Set it based on instructions provided in Table 1 [GUC parameters](30-appendix.md). - -**Value range**: an integer ranging from 100 MB to 32 TB - -**Default value**: **32 GB** \ No newline at end of file diff --git a/product/en/docs-mogdb/v3.0/reference-guide/guc-parameters/38-rollback-parameters.md b/product/en/docs-mogdb/v3.0/reference-guide/guc-parameters/38-rollback-parameters.md index 53246e9c755873ef7b7edf4921196bd6bcbe0c9f..37c5f39ee048dbd78c48f981c15105282738cd4d 100644 --- a/product/en/docs-mogdb/v3.0/reference-guide/guc-parameters/38-rollback-parameters.md +++ b/product/en/docs-mogdb/v3.0/reference-guide/guc-parameters/38-rollback-parameters.md @@ -16,3 +16,23 @@ This parameter is a SIGHUP parameter. Set it based on instructions provided in T **Value range:** an integer ranging from 1 to 100 **Default value**: **5** + +## undo_space_limit_size + +**Parameter description**: Specifies the threshold for forcibly recycling undo space. When the undo space usage reaches 80% of the threshold, forcible recycling starts. You can set this parameter to a large value based on service requirements and then set it to a proper value based on the actual undo space usage. + +This parameter is a POSTMASTER parameter. Set it based on instructions provided in Table 1 [GUC parameters](30-appendix.md). + +**Value range**: an integer ranging from 800 MB to 32 TB + +**Default value**: **256 GB** + +## undo_limit_size_per_transaction + +**Parameter description**: Specifies the undo space threshold of a single transaction. If the threshold is reached, the transaction is rolled back due to an error. + +This parameter is a POSTMASTER parameter. Set it based on instructions provided in Table 1 [GUC parameters](30-appendix.md). + +**Value range**: an integer ranging from 100 MB to 32 TB + +**Default value**: **32 GB** diff --git a/product/en/docs-mogdb/v3.0/reference-guide/guc-parameters/7-ha-replication/1-sending-server.md b/product/en/docs-mogdb/v3.0/reference-guide/guc-parameters/7-ha-replication/1-sending-server.md index 01aceac19dd0f64c8444f512221f13a8d25622ac..df3e3305fe6ce1d900f63f5c538b533d2fb7b849 100644 --- a/product/en/docs-mogdb/v3.0/reference-guide/guc-parameters/7-ha-replication/1-sending-server.md +++ b/product/en/docs-mogdb/v3.0/reference-guide/guc-parameters/7-ha-replication/1-sending-server.md @@ -149,3 +149,17 @@ This parameter is a POSTMASTER parameter. Set it based on instructions provided **Value range**: a string. An empty string indicates that no information about the node is configured. **Default value**: empty + +## pgxc_node_name + +**Parameter description**: Specifies the name of a node. + +This parameter is a POSTMASTER parameter. Set it based on Table 1 [GUC parameters](../30-appendix.md). + +When a standby node requests to replicate logs on the primary node, if the **application_name** parameter is not set, the **pgxc_node_name** parameter is used as the name of the streaming replication slot of the standby node on the primary node. The streaming replication slot is named in the following format: Value of this parameter_IP address of the standby node_Port number of the standby node. The IP address and port number of the standby node are obtained from the IP address and port number of the standby node specified by the **replconninfo** parameter. The maximum length of a streaming replication slot name is 61 characters. If the length of the concatenated string exceeds 61 characters, the truncated **pgxc_node_name** will be used for concatenation to ensure that the length of the streaming replication slot name is less than or equal to 61 characters. + +> ![img](https://cdn-mogdb.enmotech.com/docs-media/icon/icon-note.gif) **Note**: After this parameter is modified, the database instance will fail to be connected. You are advised not to modify this parameter. + +**Value range**: a string + +**Default value**: current node name diff --git a/product/en/docs-mogdb/v3.0/reference-guide/guc-parameters/7-ha-replication/2-primary-server.md b/product/en/docs-mogdb/v3.0/reference-guide/guc-parameters/7-ha-replication/2-primary-server.md index 1e8d3c41dde714708112d2b243d4c1d8e390be8b..c385c0283ada24fc77bb1672e8d62a11d82370d2 100644 --- a/product/en/docs-mogdb/v3.0/reference-guide/guc-parameters/7-ha-replication/2-primary-server.md +++ b/product/en/docs-mogdb/v3.0/reference-guide/guc-parameters/7-ha-replication/2-primary-server.md @@ -234,3 +234,17 @@ This parameter is a POSTMASTER parameter. Set it based on instructions provided > - The sender actively synchronizes the configuration file to the receiver, and the receiver requests the sender to synchronize the configuration file, which are two independent events, so that the configuration files are synchronized. If you do not want to synchronize configuration files, set this parameter to **none_node** on the receiver. If the sender is a standby node, set this parameter to **none_node** only. If the sender is a primary node, set this parameter to **none_node** when the primary node does not synchronize with any standby node; or set this parameter to **only_sync_node** when the primary node synchronizes with synchronous standby nodes only and does not synchronize with asynchronous standby nodes. > - To be specific, the sender sends a configuration file which directly overwrites the corresponding parameter in the configuration file of the receiver. After the policy for synchronizing configuration files is set, even if you modify configuration parameters of the receiver, the modification does not take effect because the sender immediately overwrites these parameters. > - The following configuration parameters are not synchronized even if the policy for synchronizing configuration files is set: application_name, archive_command, audit_directory, available_zone, comm_control_port, comm_sctp_port, listen_addresses, log_directory, port, replconninfo1, replconninfo2, replconninfo3, replconninfo4, replconninfo5, replconninfo6, replconninfo7, replconninfo8, replconninfo9, replconninfo10, replconninfo11, replconninfo12, replconninfo13, replconninfo14, replconninfo15, replconninfo16, replconninfo17, replconninfo18, ssl, ssl_ca_file, ssl_cert_file, ssl_ciphers, ssl_crl_file, ssl_key_file, ssl_renegotiation_limit, ssl_cert_notify_time, synchronous_standby_names, local_bind_address, perf_directory, query_log_directory, asp_log_directory, streaming_router_port, enable_upsert_to_merge, archive_dest, recovery_min_apply_delay, and sync_config_strategy. + +## pgxc_node_name + +**Parameter description**: Specifies the name of a node. + +This parameter is a POSTMASTER parameter. Set it based on Table 1 [GUC parameters](../30-appendix.md). + +When a standby node requests to replicate logs on the primary node, if the **application_name** parameter is not set, the **pgxc_node_name** parameter is used as the name of the streaming replication slot of the standby node on the primary node. The streaming replication slot is named in the following format: Value of this parameter_IP address of the standby node_Port number of the standby node. The IP address and port number of the standby node are obtained from the IP address and port number of the standby node specified by the **replconninfo** parameter. The maximum length of a streaming replication slot name is 61 characters. If the length of the concatenated string exceeds 61 characters, the truncated **pgxc_node_name** will be used for concatenation to ensure that the length of the streaming replication slot name is less than or equal to 61 characters. + +> ![img](https://cdn-mogdb.enmotech.com/docs-media/icon/icon-note.gif) **Note**: After this parameter is modified, the database instance will fail to be connected. You are advised not to modify this parameter. + +**Value range**: a string + +**Default value**: current node name diff --git a/product/en/docs-mogdb/v3.0/reference-guide/guc-parameters/7-ha-replication/3-standby-server.md b/product/en/docs-mogdb/v3.0/reference-guide/guc-parameters/7-ha-replication/3-standby-server.md index 5cf74b1a4d136097ea7d409262651ef78b81b95a..dbd5672c4072c1a766f82eb26e3487a5c467cf94 100644 --- a/product/en/docs-mogdb/v3.0/reference-guide/guc-parameters/7-ha-replication/3-standby-server.md +++ b/product/en/docs-mogdb/v3.0/reference-guide/guc-parameters/7-ha-replication/3-standby-server.md @@ -144,4 +144,18 @@ This parameter is a POSTMASTER parameter. Set it based on instructions provided **Value range**: an integer ranging from 0 to 262143 -**Default value:** **4** \ No newline at end of file +**Default value:** **4** + +## pgxc_node_name + +**Parameter description**: Specifies the name of a node. + +This parameter is a POSTMASTER parameter. Set it based on Table 1 [GUC parameters](../30-appendix.md). + +When a standby node requests to replicate logs on the primary node, if the **application_name** parameter is not set, the **pgxc_node_name** parameter is used as the name of the streaming replication slot of the standby node on the primary node. The streaming replication slot is named in the following format: Value of this parameter_IP address of the standby node_Port number of the standby node. The IP address and port number of the standby node are obtained from the IP address and port number of the standby node specified by the **replconninfo** parameter. The maximum length of a streaming replication slot name is 61 characters. If the length of the concatenated string exceeds 61 characters, the truncated **pgxc_node_name** will be used for concatenation to ensure that the length of the streaming replication slot name is less than or equal to 61 characters. + +> ![img](https://cdn-mogdb.enmotech.com/docs-media/icon/icon-note.gif) **Note**: After this parameter is modified, the database instance will fail to be connected. You are advised not to modify this parameter. + +**Value range**: a string + +**Default value**: current node name \ No newline at end of file diff --git a/product/en/docs-mogdb/v3.0/reference-guide/guc-parameters/guc-parameter-list.md b/product/en/docs-mogdb/v3.0/reference-guide/guc-parameters/guc-parameter-list.md index 0d44af970e89176c4718c40b3e168a9f23971e4a..0d394bfb8e56c6ecd653f8121d0179f35332a129 100644 --- a/product/en/docs-mogdb/v3.0/reference-guide/guc-parameters/guc-parameter-list.md +++ b/product/en/docs-mogdb/v3.0/reference-guide/guc-parameters/guc-parameter-list.md @@ -648,9 +648,9 @@ date: 2022-05-26 | [udf_memory_limit](33-user-defined-functions.md#udf_memory_limit) | | [UDFWorkerMemHardLimit](33-user-defined-functions.md#udfworkermemhardlimit) | | [uncontrolled_memory_context](../../reference-guide/guc-parameters/4-resource-consumption/1-memory.md#uncontrolled_memory_context) | -| [undo_limit_size_per_transaction](35-undo.md#undo_limit_size_per_transaction) | +| [undo_limit_size_per_transaction](38-rollback-parameters.md#undo_limit_size_per_transaction) | | [undo_retention_time](37-flashback.md#undo_retention_time) | -| [undo_space_limit_size](35-undo.md#undo_space_limit_size) | +| [undo_space_limit_size](38-rollback-parameters.md#undo_space_limit_size) | | [undo_zone_count](39-reserved-parameters.md) | | [unix_socket_directory](../../reference-guide/guc-parameters/3-connection-and-authentication/1-connection-settings.md#unix_socket_directory) | | [unix_socket_group](../../reference-guide/guc-parameters/3-connection-and-authentication/1-connection-settings.md#unix_socket_group) | diff --git a/product/en/docs-mogdb/v3.0/reference-guide/sql-syntax/CLUSTER.md b/product/en/docs-mogdb/v3.0/reference-guide/sql-syntax/CLUSTER.md index 2c6104b8703d569d6238cf0124a5c9e4d3dbbdd5..8b1b10314a13a251c6828ccdba7167ebd64f1955 100644 --- a/product/en/docs-mogdb/v3.0/reference-guide/sql-syntax/CLUSTER.md +++ b/product/en/docs-mogdb/v3.0/reference-guide/sql-syntax/CLUSTER.md @@ -119,10 +119,4 @@ MogDB=# DROP INDEX tpcds.ds_inventory_p1_index1; -- Delete the partitioned table. MogDB=# DROP TABLE tpcds.inventory_p1; -``` - -## Suggestions - -- cluster - - It is recommended that you run **ANALYZE** on a newly clustered table. Otherwise, the optimizer might make poor choices of query plans. - - **CLUSTER** cannot be executed in transactions. +``` \ No newline at end of file diff --git a/product/en/docs-mogdb/v3.0/reference-guide/sql-syntax/CREATE-DATABASE.md b/product/en/docs-mogdb/v3.0/reference-guide/sql-syntax/CREATE-DATABASE.md index 5e4a58d21382807c0e1672c3ba779dfbf204287f..e9fb81f5df8b2b917634cd0c80c90edf7b51899a 100644 --- a/product/en/docs-mogdb/v3.0/reference-guide/sql-syntax/CREATE-DATABASE.md +++ b/product/en/docs-mogdb/v3.0/reference-guide/sql-syntax/CREATE-DATABASE.md @@ -225,14 +225,4 @@ MogDB=# DROP DATABASE ora_compatible_db; ## Helpful Links -[ALTER DATABASE](ALTER-DATABASE.md) and [DROP DATABASE](DROP-DATABASE.md) - -## Suggestions - -- **create database** - - Database cannot be created in a transaction. - -- **ENCODING LC_COLLATE LC_CTYPE** - - If the new database Encoding, LC-Collate, or LC_Ctype does not match the template database (SQL_ASCII) (**'GBK'**, **'UTF8'**, or **'LATIN1'**), **template [=] template0** must be specified. +[ALTER DATABASE](ALTER-DATABASE.md) and [DROP DATABASE](DROP-DATABASE.md) \ No newline at end of file diff --git a/product/en/docs-mogdb/v3.0/reference-guide/sql-syntax/CREATE-INDEX.md b/product/en/docs-mogdb/v3.0/reference-guide/sql-syntax/CREATE-INDEX.md index 55fabacd3c48a63569ed564cb7c3be95d79495d8..3d2e548cc7fb5bc564a2f074964ef3d7dc739a45 100644 --- a/product/en/docs-mogdb/v3.0/reference-guide/sql-syntax/CREATE-INDEX.md +++ b/product/en/docs-mogdb/v3.0/reference-guide/sql-syntax/CREATE-INDEX.md @@ -397,26 +397,4 @@ CREATE INDEX ## Helpful Links -[ALTER INDEX](ALTER-INDEX.md),[DROP INDEX](DROP-INDEX.md) - -## Suggestions - -- create index - - You are advised to create indexes on: - - - Columns that are often queried - - Join conditions. For a query on joined columns, you are advised to create a composite index on the columns, For example, for **select \* from t1 join t2 on t1.a=t2.a and t1.b=t2.b**, you can create a composite index on columns **a** and **b** in table **t1**. - - Columns having filter criteria (especially scope criteria) of a **where** clause - - Columns that appear after **order by**, **group by**, and **distinct** - - Constraints: - - - Partial indexes cannot be created in a partitioned table. - - When a GLOBAL index is created on a partitioned table, the following constraints apply: - - Expression indexes and partial indexes are not supported. - - Row-store tables are not supported. - - Only B-tree indexes are supported. - - In the same attribute column, the LOCAL index and GLOBAL index of a partition cannot coexist. - - GLOBAL index supports a maximum of 31 columns. - - If the **ALTER** statement does not contain **UPDATE GLOBAL INDEX**, the original GLOBAL index is invalid. In this case, other indexes are used for query. If the ALTER statement contains UPDATE GLOBAL INDEX, the original GLOBAL index is still valid and the index function is correct. +[ALTER INDEX](ALTER-INDEX.md),[DROP INDEX](DROP-INDEX.md) \ No newline at end of file diff --git a/product/en/docs-mogdb/v3.0/reference-guide/sql-syntax/CREATE-PROCEDURE.md b/product/en/docs-mogdb/v3.0/reference-guide/sql-syntax/CREATE-PROCEDURE.md index 9d2dc00fb7a8db176e3175a5b12fd5b118bd1637..3ab22b86303ff301b3bb6014798c01984d0dbf29 100644 --- a/product/en/docs-mogdb/v3.0/reference-guide/sql-syntax/CREATE-PROCEDURE.md +++ b/product/en/docs-mogdb/v3.0/reference-guide/sql-syntax/CREATE-PROCEDURE.md @@ -113,10 +113,4 @@ plsql_body ## Helpful Links -[DROP PROCEDURE](DROP-PROCEDURE.md) - -## Suggestions - -- analyse | analyze - - Do not run **ANALYZE** in a transaction or anonymous block. - - Do not run **ANALYZE** in a function or stored procedure. +[DROP PROCEDURE](DROP-PROCEDURE.md) \ No newline at end of file diff --git a/product/en/docs-mogdb/v3.0/reference-guide/sql-syntax/CREATE-TABLE.md b/product/en/docs-mogdb/v3.0/reference-guide/sql-syntax/CREATE-TABLE.md index 405139016622ff41d81ba699cd31669cc26bdf8b..8338059de07ddffc3d05a3802016c208fca3f888 100644 --- a/product/en/docs-mogdb/v3.0/reference-guide/sql-syntax/CREATE-TABLE.md +++ b/product/en/docs-mogdb/v3.0/reference-guide/sql-syntax/CREATE-TABLE.md @@ -992,34 +992,4 @@ MogDB=# DROP SCHEMA IF EXISTS joe CASCADE; ## Helpful Links -[ALTER TABLE](ALTER-TABLE.md), [DROP TABLE](DROP-TABLE.md), and [CREATE TABLESPACE](CREATE-TABLESPACE.md) - -## Suggestions - -- UNLOGGED - - The unlogged table and its indexes do not use the WAL log mechanism during data writing. Their write speed is much higher than that of ordinary tables. Therefore, they can be used for storing intermediate result sets of complex queries to improve query performance. - - The unlogged table has no primary/standby mechanism. In case of system faults or abnormal breakpoints, data loss may occur. Therefore, the unlogged table cannot be used to store basic data. -- TEMPORARY | TEMP - - A temporary table is automatically dropped at the end of a session. -- LIKE - - The new table automatically inherits all column names, data types, and not-null constraints from this table. The new table is irrelevant to the original table after the creation. -- LIKE INCLUDING DEFAULTS - - The default expressions are copied from the original table to the new table only if **INCLUDING DEFAULTS** is specified. The default behavior is to exclude default expressions, resulting in the copied columns in the new table having default values null. -- LIKE INCLUDING CONSTRAINTS - - The **CHECK** constraints are copied from the original table to the new table only when **INCLUDING CONSTRAINTS** is specified. Other types of constraints are never copied to the new table. Not-null constraints are always copied to the new table. These rules also apply to column constraints and table constraints. -- LIKE INCLUDING INDEXES - - Any indexes on the original table will not be created on the new table, unless the **INCLUDING INDEXES** clause is specified. -- LIKE INCLUDING STORAGE - - **STORAGE** settings for the copied column definitions are copied only if **INCLUDING STORAGE** is specified. The default behavior is to exclude **STORAGE** settings. -- LIKE INCLUDING COMMENTS - - If **INCLUDING COMMENTS** is specified, comments for the copied columns, constraints, and indexes are copied. The default behavior is to exclude comments. -- LIKE INCLUDING PARTITION - - If **INCLUDING PARTITION** is specified, the partition definitions of the source table are copied to the new table, and the new table no longer uses the **PARTITION BY** clause. The default behavior is to exclude partition definition of the original table. -- LIKE INCLUDING RELOPTIONS - - If **INCLUDING RELOPTIONS** is specified, the new table will copy the storage parameter (that is, **WITH** clause) of the source table. The default behavior is to exclude partition definition of the storage parameter of the original table. -- LIKE INCLUDING ALL - - **INCLUDING ALL** contains the meaning of **INCLUDING DEFAULTS**, **INCLUDING CONSTRAINTS**, **INCLUDING INDEXES**, **INCLUDING STORAGE**, **INCLUDING COMMENTS**, **INCLUDING PARTITION**, and **INCLUDING RELOPTIONS**. -- ORIENTATION ROW - - Creates a row-store table. Row-store applies to the OLTP service, which has many interactive transactions. An interaction involves many columns in the table. Using row-store can improve the efficiency. -- ORIENTATION COLUMN - - Creates a column-store table. Column-store applies to the DWS, which has a large amount of aggregation computing, and involves a few column operations. +[ALTER TABLE](ALTER-TABLE.md), [DROP TABLE](DROP-TABLE.md), and [CREATE TABLESPACE](CREATE-TABLESPACE.md) \ No newline at end of file diff --git a/product/en/docs-mogdb/v3.0/reference-guide/sql-syntax/CREATE-TABLESPACE.md b/product/en/docs-mogdb/v3.0/reference-guide/sql-syntax/CREATE-TABLESPACE.md index 825219928b61dac4abf45658343fbdd5b6acc1d3..ae6bb5ff88c86d8041726682de6132d7116ed62f 100644 --- a/product/en/docs-mogdb/v3.0/reference-guide/sql-syntax/CREATE-TABLESPACE.md +++ b/product/en/docs-mogdb/v3.0/reference-guide/sql-syntax/CREATE-TABLESPACE.md @@ -127,10 +127,4 @@ MogDB=# DROP ROLE jay; ## Helpful Links -[CREATE DATABASE](CREATE-DATABASE.md),[CREATE TABLE](CREATE-TABLE.md),[CREATE INDEX](CREATE-INDEX.md),[DROP TABLESPACE](DROP-TABLESPACE.md),[ALTER TABLESPACE](ALTER-TABLESPACE.md) - -## Suggestions - -- create tablespace - - You are not advised to create tablespaces in a transaction. +[CREATE DATABASE](CREATE-DATABASE.md),[CREATE TABLE](CREATE-TABLE.md),[CREATE INDEX](CREATE-INDEX.md),[DROP TABLESPACE](DROP-TABLESPACE.md),[ALTER TABLESPACE](ALTER-TABLESPACE.md) \ No newline at end of file diff --git a/product/en/docs-mogdb/v3.0/reference-guide/sql-syntax/DELETE.md b/product/en/docs-mogdb/v3.0/reference-guide/sql-syntax/DELETE.md index 5b90d32d8be7a48134e0d71789bd099c955e4896..6b57cf1c3af2ea4c0d87ad97106f7077dfaff653 100644 --- a/product/en/docs-mogdb/v3.0/reference-guide/sql-syntax/DELETE.md +++ b/product/en/docs-mogdb/v3.0/reference-guide/sql-syntax/DELETE.md @@ -115,10 +115,4 @@ MogDB=# DELETE FROM tpcds.customer_address_bak; Delete the tpcds.customer_address_bak table. MogDB=# DROP TABLE tpcds.customer_address_bak; -``` - -## Suggestions - -- delete - - To delete all records in a table, use the **truncate** syntax. +``` \ No newline at end of file diff --git a/product/en/docs-mogdb/v3.0/reference-guide/sql-syntax/DROP-DATABASE.md b/product/en/docs-mogdb/v3.0/reference-guide/sql-syntax/DROP-DATABASE.md index 8e21dd5af92384391725c5a866827043998cd79b..b8214b2cac2e3373201a5eadc1710e838c92311f 100644 --- a/product/en/docs-mogdb/v3.0/reference-guide/sql-syntax/DROP-DATABASE.md +++ b/product/en/docs-mogdb/v3.0/reference-guide/sql-syntax/DROP-DATABASE.md @@ -45,10 +45,4 @@ See **Examples** in **CREATE DATABASE**. ## Helpful Links -[CREATE DATABASE](CREATE-DATABASE.md) - -## Suggestions - -- drop database - - Do not delete databases during transactions. +[CREATE DATABASE](CREATE-DATABASE.md) \ No newline at end of file diff --git a/product/en/docs-mogdb/v3.0/reference-guide/sql-syntax/DROP-TABLESPACE.md b/product/en/docs-mogdb/v3.0/reference-guide/sql-syntax/DROP-TABLESPACE.md index 8b3689c2f0db317cb754e749bee2507004ec4081..4e8991a7096a5bf165d07333b38bf0b0bd2df098 100644 --- a/product/en/docs-mogdb/v3.0/reference-guide/sql-syntax/DROP-TABLESPACE.md +++ b/product/en/docs-mogdb/v3.0/reference-guide/sql-syntax/DROP-TABLESPACE.md @@ -43,10 +43,4 @@ See **Examples** in [CREATE TABLESPACE](CREATE-TABLESPACE.md). ## Helpful Links -[ALTER TABLESPACE](ALTER-TABLESPACE.md) and [CREATE TABLESPACE](CREATE-TABLESPACE.md) - -## Suggestions - -- drop database - - Do not delete databases during transactions. +[ALTER TABLESPACE](ALTER-TABLESPACE.md) and [CREATE TABLESPACE](CREATE-TABLESPACE.md) \ No newline at end of file diff --git a/product/en/docs-mogdb/v3.0/reference-guide/sql-syntax/INSERT.md b/product/en/docs-mogdb/v3.0/reference-guide/sql-syntax/INSERT.md index bcdf44b267f180a625a1d589d99ce8480c7ed6a8..40bca97a428840ec6635e177f3c3fda18a057d49 100644 --- a/product/en/docs-mogdb/v3.0/reference-guide/sql-syntax/INSERT.md +++ b/product/en/docs-mogdb/v3.0/reference-guide/sql-syntax/INSERT.md @@ -177,10 +177,4 @@ MogDB=# INSERT INTO tpcds.reason_t2 VALUES (5, 'BBBBBBBBCAAAAAAA','reason5'),(6, -- Delete the tpcds.reason_t2. MogDB=# DROP TABLE tpcds.reason_t2; -``` - -## Suggestions - -- VALUES - - When you run the **INSERT** statement to insert data in batches, you are advised to combine multiple records into one statement to improve data loading performance. Example: **INSERT INTO sections VALUES (30, 'Administration', 31, 1900),(40, 'Development', 35, 2000), (50, 'Development' , 60 , 2001);** +``` \ No newline at end of file diff --git a/product/en/docs-mogdb/v3.0/reference-guide/sql-syntax/REINDEX.md b/product/en/docs-mogdb/v3.0/reference-guide/sql-syntax/REINDEX.md index b2e13856bca7148e069d5c5f190d1849ac0ada9c..2d5a7301c4446371b39e8bf1e94b8c337010edac 100644 --- a/product/en/docs-mogdb/v3.0/reference-guide/sql-syntax/REINDEX.md +++ b/product/en/docs-mogdb/v3.0/reference-guide/sql-syntax/REINDEX.md @@ -150,18 +150,4 @@ MogDB=# REINDEX TABLE CONCURRENTLY tpcds.customer_t1; -- Delete the tpcds.customer_t1 table. MogDB=# DROP TABLE tpcds.customer_t1; -``` - -## Suggestions - -- INTERNAL TABLE - - This scenario is used for fault recovery. You are not advised to perform concurrent operations. - -- DATABASE - - You can not reindex a database in a transaction. - -- SYSTEM - - You can not reindex system catalogs in transactions. +``` \ No newline at end of file diff --git a/product/en/docs-mogdb/v3.0/reference-guide/sql-syntax/SELECT-INTO.md b/product/en/docs-mogdb/v3.0/reference-guide/sql-syntax/SELECT-INTO.md index 221087147b9e07fe6ccf40917faa0c393791fceb..a4cecafcc0cf70d3dea0f2029cc3e219aefc3e66 100644 --- a/product/en/docs-mogdb/v3.0/reference-guide/sql-syntax/SELECT-INTO.md +++ b/product/en/docs-mogdb/v3.0/reference-guide/sql-syntax/SELECT-INTO.md @@ -84,14 +84,4 @@ MogDB=# DROP TABLE tpcds.reason_t1; ## Helpful Links -[SELECT](SELECT.md) - -## Suggestions - -- **DATABASE** - - You are not advised to reindex a database in a transaction. - -- **SYSTEM** - - You are not advised to reindex system catalogs in transactions. +[SELECT](SELECT.md) \ No newline at end of file diff --git a/product/en/docs-mogdb/v3.0/reference-guide/sql-syntax/VACUUM.md b/product/en/docs-mogdb/v3.0/reference-guide/sql-syntax/VACUUM.md index d09e87810dd58ca945554f875392ee7ec39dc924..7d27f4bcdf457fa04be72fc233d4be7e41be449f 100644 --- a/product/en/docs-mogdb/v3.0/reference-guide/sql-syntax/VACUUM.md +++ b/product/en/docs-mogdb/v3.0/reference-guide/sql-syntax/VACUUM.md @@ -113,12 +113,4 @@ MogDB=# VACUUM (VERBOSE, ANALYZE) tpcds.reason; -- Drop an index. MogDB=# DROP INDEX ds_reason_index1 CASCADE; MogDB=# DROP TABLE tpcds.reason; -``` - -## Suggestions - -- vacuum - - **VACUUM** cannot be executed inside a transaction block. - - It is recommended that active production databases be vacuumed frequently (at least nightly), in order to remove dead rows. It is strongly recommended that you run **VACUUM ANALYZE** after adding or deleting a large number of records. - - **FULL** is recommended only in special scenarios. For example, you wish to physically narrow the table to decrease the occupied disk space after deleting most rows of a table. - - Before performing the VACUUM FULL operation, you are advised to delete all indexes in related tables, run **VACUUM FULL**, and then re-create the index. +``` \ No newline at end of file diff --git a/product/en/docs-mogdb/v3.0/toc.md b/product/en/docs-mogdb/v3.0/toc.md index 41eb98a9872361c4920df8234af5e2154d4261e3..07512f449deeffac1d04d2450026321c75039094 100644 --- a/product/en/docs-mogdb/v3.0/toc.md +++ b/product/en/docs-mogdb/v3.0/toc.md @@ -1160,7 +1160,6 @@ + [Thread Pool](/reference-guide/guc-parameters/32-thread-pool.md) + [User-defined Functions](/reference-guide/guc-parameters/33-user-defined-functions.md) + [Backup and Restoration](/reference-guide/guc-parameters/34-backup-and-restoration.md) - + [Undo](/reference-guide/guc-parameters/35-undo.md) + [DCF Parameters Settings](/reference-guide/guc-parameters/36-DCF-parameters-settings.md) + [Flashback](/reference-guide/guc-parameters/37-flashback.md) + [Rollback Parameters](/reference-guide/guc-parameters/38-rollback-parameters.md) diff --git a/product/en/docs-mogdb/v3.0/toc_parameters-and-tools.md b/product/en/docs-mogdb/v3.0/toc_parameters-and-tools.md index 1b964d13c3c03b8b6b1e44bec0b49b204b585213..a9e3d570bd5c71c9fbf7ea990a22d73ab249b885 100644 --- a/product/en/docs-mogdb/v3.0/toc_parameters-and-tools.md +++ b/product/en/docs-mogdb/v3.0/toc_parameters-and-tools.md @@ -79,7 +79,6 @@ + [Thread Pool](/reference-guide/guc-parameters/32-thread-pool.md) + [User-defined Functions](/reference-guide/guc-parameters/33-user-defined-functions.md) + [Backup and Restoration](/reference-guide/guc-parameters/34-backup-and-restoration.md) - + [Undo](/reference-guide/guc-parameters/35-undo.md) + [DCF Parameters Settings](/reference-guide/guc-parameters/36-DCF-parameters-settings.md) + [Flashback](/reference-guide/guc-parameters/37-flashback.md) + [Rollback Parameters](/reference-guide/guc-parameters/38-rollback-parameters.md) diff --git a/product/en/docs-mogdb/v3.1/reference-guide/functions-and-operators/14-sequence-functions.md b/product/en/docs-mogdb/v3.1/reference-guide/functions-and-operators/14-sequence-functions.md index 5573c37814f4f7aad31e965330f12bcdcdad7ed3..e60feae66def499577f4f7bcbd2efb14fcdd8d30 100644 --- a/product/en/docs-mogdb/v3.1/reference-guide/functions-and-operators/14-sequence-functions.md +++ b/product/en/docs-mogdb/v3.1/reference-guide/functions-and-operators/14-sequence-functions.md @@ -124,7 +124,7 @@ The sequence functions provide a simple method to ensure security of multiple us > Because the sequence is non-transactional, the change caused by **setval** will not be undone by transaction rollback. > > ![img](https://cdn-mogdb.enmotech.com/docs-media/icon/icon-notice.gif) **NOTICE:** - > The **nextval** function can be executed only on the primary node. It is not supported on standby nodes. + > The **setval** function can be executed only on the primary node. It is not supported on standby nodes. - pg_sequence_last_value(sequence_oid oid, OUT cache_value int16, OUT last_value int16) diff --git a/product/en/docs-mogdb/v5.0/performance-tuning/TPCC-performance-tuning-guide.md b/product/en/docs-mogdb/v5.0/performance-tuning/TPCC-performance-tuning-guide.md index a44cf66ebc7b97be362bd9eb1c3b97e79ad8c1bd..d1655d38bbe9b24d79660da275dc29890012b038 100644 --- a/product/en/docs-mogdb/v5.0/performance-tuning/TPCC-performance-tuning-guide.md +++ b/product/en/docs-mogdb/v5.0/performance-tuning/TPCC-performance-tuning-guide.md @@ -388,10 +388,12 @@ Adjust BIOS. yum install numa -y ``` - Install the NIC driver on the database server and client server. For details, see the **Network Configuration** section. + Install the NIC driver on the database server and client server. For details, see the [Network Configuration](#4-network-configuration) section. * Database server + [bind_net_irq.sh](https://gitee.com/opengauss/openGauss-server/blob/master/src/bin/scripts/bind_net_irq.sh) + ```bash cp `find /opt -name "bind*.sh"|head -1 ` /root sh /root/bind_net_irq.sh 12 @@ -405,6 +407,7 @@ Adjust BIOS. ``` Stop the database. + Change the database start command to the following: ```bash @@ -412,6 +415,7 @@ Adjust BIOS. ``` * Client server + Copy **/root/bind_net_irq.sh** to the client server. ```bash @@ -432,10 +436,12 @@ Adjust BIOS. yum install numa* -y ``` - Install the NIC driver on the database server and client server. For details, see the **Network Configuration** section. + Install the NIC driver on the database server and client server. For details, see the [Network Configuration](#4-network-configuration) section. * Database server + [bind_net_irq.sh](https://gitee.com/opengauss/openGauss-server/blob/master/src/bin/scripts/bind_net_irq.sh) + ```bash cp `find /opt -name "bind*.sh"|head -1 ` /root sh /root/bind_net_irq.sh 24 @@ -449,6 +455,7 @@ Adjust BIOS. ``` Stop the database + Change the database start command to the following: ```bash @@ -456,6 +463,7 @@ Adjust BIOS. ``` * Client server + Copy **/root/bind_net_irq.sh** to the client server. ```bash diff --git a/product/en/docs-mogdb/v5.0/reference-guide/functions-and-operators/sequence-functions.md b/product/en/docs-mogdb/v5.0/reference-guide/functions-and-operators/sequence-functions.md index 5573c37814f4f7aad31e965330f12bcdcdad7ed3..1e2626b56a58b654d32f5f7e9ca8df83428d7ecf 100644 --- a/product/en/docs-mogdb/v5.0/reference-guide/functions-and-operators/sequence-functions.md +++ b/product/en/docs-mogdb/v5.0/reference-guide/functions-and-operators/sequence-functions.md @@ -1,165 +1,165 @@ ---- -title: SEQUENCE Functions -summary: SEQUENCE Functions -author: Zhang Cuiping -date: 2021-04-20 ---- - -# SEQUENCE Functions - -The sequence functions provide a simple method to ensure security of multiple users for users to obtain sequence values from sequence objects. - -- nextval(regclass) - - Description: Specifies an increasing sequence and returns a new value. - - > ![img](https://cdn-mogdb.enmotech.com/docs-media/icon/icon-note.gif) **NOTE:** - > To avoid blocking of concurrent transactions that obtain numbers from the same sequence, a nextval operation is never rolled back; that is, once a value has been fetched it is considered used, even if the transaction that did the nextval later aborts. This means that aborted transactions may leave unused "holes" in the sequence of assigned values. Therefore, MogDB sequences cannot be used to obtain sequence without gaps. - > - > ![img](https://cdn-mogdb.enmotech.com/docs-media/icon/icon-notice.gif) **NOTICE:** - > The **nextval** function can be executed only on the primary node. It is not supported on standby nodes. - - Return type: numeric - - The **nextval** function can be invoked in either of the following ways: (In example 2, the sequence name cannot contain a dot.) - - Example 1: - - ```sql - MogDB=# select nextval('seqDemo'); - nextval - --------- - 2 - (1 row) - ``` - - Example 2: - - ```sql - MogDB=# select seqDemo.nextval; - nextval - --------- - 2 - (1 row) - ``` - -- currval(regclass) - - Returns the last value of **nextval** for a specified sequence in the current session. If **nextval** has not been invoked for the specified sequence in the current session, an error is reported when **currval** is invoked. - - Return type: numeric - - The **currval** function can be invoked in either of the following ways: (In example 2, the sequence name cannot contain a dot.) - - Example 1: - - ```sql - MogDB=# select currval('seq1'); - currval - --------- - 2 - (1 row) - ``` - - Example 2: - - ```sql - MogDB=# select seq1.currval; - currval - --------- - 2 - (1 row) - ``` - -- lastval() - - Description: Returns the last value of **nextval** in the current session. This function is equivalent to **currval**, but **lastval** does not have a parameter. If **nextval** has not been invoked in the current session, invoking **lastval** will report an error. - - Return type: numeric - - Example: - - ```sql - MogDB=# select lastval(); - lastval - --------- - 2 - (1 row) - ``` - -- setval(regclass, numeric) - - Description: Sets the current value of a sequence. - - Return type: numeric - - Example: - - ```sql - MogDB=# select setval('seqDemo',1); - setval - -------- - 1 - (1 row) - ``` - -- setval(regclass, numeric, Boolean) - - Description: Sets the current value of a sequence and the is_called sign. - - Return type: numeric - - Example: - - ```sql - MogDB=# select setval('seqDemo',1,true); - setval - -------- - 1 - (1 row) - ``` - - > ![img](https://cdn-mogdb.enmotech.com/docs-media/icon/icon-note.gif) **NOTE:** - > The current session will take effect immediately after **setval** is performed. If other sessions have buffered sequence values, **setval** will take effect only after the values are used up. Therefore, to prevent sequence value conflicts, you are advised to use **setval** with caution. - > Because the sequence is non-transactional, the change caused by **setval** will not be undone by transaction rollback. - > - > ![img](https://cdn-mogdb.enmotech.com/docs-media/icon/icon-notice.gif) **NOTICE:** - > The **nextval** function can be executed only on the primary node. It is not supported on standby nodes. - -- pg_sequence_last_value(sequence_oid oid, OUT cache_value int16, OUT last_value int16) - - Description: Obtains the parameters of a specified sequence, including the cache value and current value. - - Return type: int16, int16 - -- last\_insert\_id\(\) - - Description: Gets the first auto-generated value that was last successfully inserted for an auto-increment column. - - Return type: int16 - -- last\_insert\_id\(int16\) - - Description: Sets the return value of the next last\_insert\_id\(\) function and returns the value. If the parameter is NULL, set the return value of the next last\_insert\_id\(\) function to **0**. This function returns NULL. - - Return type: int16 - - Example: - - ```sql - MogDB=# select last_insert_id(100); - last_insert_id - ---------------- - 100 - (1 row) - MogDB=# select last_insert_id(); - last_insert_id - ---------------- - 100 - (1 row) - ``` - - >![img](https://cdn-mogdb.enmotech.com/docs-media/icon/icon-note.gif) **NOTE:** - > - > - last\_insert\_id\(\) and last\_insert\_id\(int16\) are session-level functions. If no data is inserted into the auto-increment column in the current session, last\_insert\_id\(\) returns **0**. +--- +title: SEQUENCE Functions +summary: SEQUENCE Functions +author: Zhang Cuiping +date: 2021-04-20 +--- + +# SEQUENCE Functions + +The sequence functions provide a simple method to ensure security of multiple users for users to obtain sequence values from sequence objects. + +- nextval(regclass) + + Description: Specifies an increasing sequence and returns a new value. + + > ![img](https://cdn-mogdb.enmotech.com/docs-media/icon/icon-note.gif) **NOTE:** + > To avoid blocking of concurrent transactions that obtain numbers from the same sequence, a nextval operation is never rolled back; that is, once a value has been fetched it is considered used, even if the transaction that did the nextval later aborts. This means that aborted transactions may leave unused "holes" in the sequence of assigned values. Therefore, MogDB sequences cannot be used to obtain sequence without gaps. + > + > ![img](https://cdn-mogdb.enmotech.com/docs-media/icon/icon-notice.gif) **NOTICE:** + > The **nextval** function can be executed only on the primary node. It is not supported on standby nodes. + + Return type: numeric + + The **nextval** function can be invoked in either of the following ways: (In example 2, the sequence name cannot contain a dot.) + + Example 1: + + ```sql + MogDB=# select nextval('seqDemo'); + nextval + --------- + 2 + (1 row) + ``` + + Example 2: + + ```sql + MogDB=# select seqDemo.nextval; + nextval + --------- + 2 + (1 row) + ``` + +- currval(regclass) + + Returns the last value of **nextval** for a specified sequence in the current session. If **nextval** has not been invoked for the specified sequence in the current session, an error is reported when **currval** is invoked. + + Return type: numeric + + The **currval** function can be invoked in either of the following ways: (In example 2, the sequence name cannot contain a dot.) + + Example 1: + + ```sql + MogDB=# select currval('seq1'); + currval + --------- + 2 + (1 row) + ``` + + Example 2: + + ```sql + MogDB=# select seq1.currval; + currval + --------- + 2 + (1 row) + ``` + +- lastval() + + Description: Returns the last value of **nextval** in the current session. This function is equivalent to **currval**, but **lastval** does not have a parameter. If **nextval** has not been invoked in the current session, invoking **lastval** will report an error. + + Return type: numeric + + Example: + + ```sql + MogDB=# select lastval(); + lastval + --------- + 2 + (1 row) + ``` + +- setval(regclass, numeric) + + Description: Sets the current value of a sequence. + + Return type: numeric + + Example: + + ```sql + MogDB=# select setval('seqDemo',1); + setval + -------- + 1 + (1 row) + ``` + +- setval(regclass, numeric, Boolean) + + Description: Sets the current value of a sequence and the is_called sign. + + Return type: numeric + + Example: + + ```sql + MogDB=# select setval('seqDemo',1,true); + setval + -------- + 1 + (1 row) + ``` + + > ![img](https://cdn-mogdb.enmotech.com/docs-media/icon/icon-note.gif) **NOTE:** + > The current session will take effect immediately after **setval** is performed. If other sessions have buffered sequence values, **setval** will take effect only after the values are used up. Therefore, to prevent sequence value conflicts, you are advised to use **setval** with caution. + > Because the sequence is non-transactional, the change caused by **setval** will not be undone by transaction rollback. + > + > ![img](https://cdn-mogdb.enmotech.com/docs-media/icon/icon-notice.gif) **NOTICE:** + > The **setval** function can be executed only on the primary node. It is not supported on standby nodes. + +- pg_sequence_last_value(sequence_oid oid, OUT cache_value int16, OUT last_value int16) + + Description: Obtains the parameters of a specified sequence, including the cache value and current value. + + Return type: int16, int16 + +- last\_insert\_id\(\) + + Description: Gets the first auto-generated value that was last successfully inserted for an auto-increment column. + + Return type: int16 + +- last\_insert\_id\(int16\) + + Description: Sets the return value of the next last\_insert\_id\(\) function and returns the value. If the parameter is NULL, set the return value of the next last\_insert\_id\(\) function to **0**. This function returns NULL. + + Return type: int16 + + Example: + + ```sql + MogDB=# select last_insert_id(100); + last_insert_id + ---------------- + 100 + (1 row) + MogDB=# select last_insert_id(); + last_insert_id + ---------------- + 100 + (1 row) + ``` + + >![img](https://cdn-mogdb.enmotech.com/docs-media/icon/icon-note.gif) **NOTE:** + > + > - last\_insert\_id\(\) and last\_insert\_id\(int16\) are session-level functions. If no data is inserted into the auto-increment column in the current session, last\_insert\_id\(\) returns **0**. > - last\_insert\_id\(\) and last\_insert\_id\(int16\) are available only when **sql\_compatibility** is set to **B**. \ No newline at end of file diff --git a/product/en/docs-mogdb/v5.0/reference-guide/guc-parameters/file-location.md b/product/en/docs-mogdb/v5.0/reference-guide/guc-parameters/file-location.md index 0d2d69d85ced0d4eb8603f43e55deb6f490af8ff..89f221d61600b6a24ec91bdffb494e11fb06c85d 100644 --- a/product/en/docs-mogdb/v5.0/reference-guide/guc-parameters/file-location.md +++ b/product/en/docs-mogdb/v5.0/reference-guide/guc-parameters/file-location.md @@ -1,69 +1,85 @@ ---- -title: File Location -summary: File Location -author: Zhang Cuiping -date: 2021-04-20 ---- - -# File Location - -After a database has been installed, three configuration files (**postgresql.conf**, **pg_hba.conf**, and **pg_ident.conf**) are automatically generated and saved in the data directory. You can use the methods described in this section to change the names and save paths of these configuration files. - -When changing the storage directory of a configuration file, set **data_directory** in **postgresql.conf** to the actual data directory. - -> ![img](https://cdn-mogdb.enmotech.com/docs-media/icon/icon-notice.gif) **NOTICE:** -> If a configuration file is incorrectly modified, the database will be seriously affected. Do not modify the configuration files mentioned in this section after installation. - -## data_directory - -**Parameter description**: Specifies the data directory of MogDB. You can set this parameter using one of the following methods: - -- Set it when you install MogDB. -- This parameter is a POSTMASTER parameter. Set it based on instructions provided in Table 1 [GUC parameters](appendix.md). - -**Value range**: a string, consisting of one or more characters. - -**Default value**: Specify this parameter during installation. If this parameter is not specified during installation, the database is not initialized by default. - -## config_file - -**Parameter description**: Specifies the configuration file (**postgresql.conf**) of the primary server. - -This parameter is a POSTMASTER parameter. Set it based on instructions provided in Table 1 [GUC parameters](appendix.md). This parameter cannot be modified based on Method 4 in Table 2 [Methods for setting GUC parameters](appendix.md). - -**Value range**: a string, consisting of one or more characters. - -**Default value**: **postgresql.conf** (The absolute directory of this file may be displayed in the actual situation.) - -## hba_file - -**Parameter description**: Specifies the configuration file (**pg_hba.conf**) for host-based authentication (HBA). You can set this parameter only in the configuration file **postgresql.conf**. - -This parameter is a POSTMASTER parameter. Set it based on instructions provided in Table 1 [GUC parameters](appendix.md). - -**Value range**: a string - -**Default value**: **pg_hba.conf** (The absolute directory of this file may be displayed in the actual situation.) - -## ident_file - -**Parameter description**: Specifies the configuration file (**pg_ident.conf)** for client authentication. - -This parameter is a POSTMASTER parameter. Set it based on instructions provided in Table 1 [GUC parameters](appendix.md). - -**Value range**: a string - -**Default value**: **pg_ident.conf** (The absolute directory of this file may be displayed in the actual situation.) - -## external_pid_file - -**Parameter description**: Specifies the extra PID file that can be used by the server management program. - -This parameter is a POSTMASTER parameter. Set it based on instructions provided in Table 1 [GUC parameters](appendix.md). - -> ![img](https://cdn-mogdb.enmotech.com/docs-media/icon/icon-notice.gif) **NOTICE:** -> This parameter takes effect only after the database restarts. - -**Value range**: a string - -**Default value**: empty +--- +title: File Location +summary: File Location +author: Zhang Cuiping +date: 2021-04-20 +--- + +# File Location + +After a database has been installed, three configuration files (**postgresql.conf**, **pg_hba.conf**, and **pg_ident.conf**) are automatically generated and saved in the data directory. You can use the methods described in this section to change the names and save paths of these configuration files. + +When changing the storage directory of a configuration file, set **data_directory** in **postgresql.conf** to the actual data directory. + +> ![img](https://cdn-mogdb.enmotech.com/docs-media/icon/icon-notice.gif) **NOTICE:** +> If a configuration file is incorrectly modified, the database will be seriously affected. Do not modify the configuration files mentioned in this section after installation. + +## data_directory + +**Parameter description**: Specifies the data directory of MogDB. You can set this parameter using one of the following methods: + +- Set it when you install MogDB. +- This parameter is a POSTMASTER parameter. Set it based on instructions provided in Table 1 [GUC parameters](appendix.md). + +**Value range**: a string, consisting of one or more characters. + +**Default value**: Specify this parameter during installation. If this parameter is not specified during installation, the database is not initialized by default. + +## config_file + +**Parameter description**: Specifies the configuration file (**postgresql.conf**) of the primary server. + +This parameter is a POSTMASTER parameter. Set it based on instructions provided in Table 1 [GUC parameters](appendix.md). This parameter cannot be modified based on Method 4 in Table 2 [Methods for setting GUC parameters](appendix.md). + +**Value range**: a string, consisting of one or more characters. + +**Default value**: **postgresql.conf** (The absolute directory of this file may be displayed in the actual situation.) + +## hba_file + +**Parameter description**: Specifies the configuration file (**pg_hba.conf**) for host-based authentication (HBA). You can set this parameter only in the configuration file **postgresql.conf**. + +This parameter is a POSTMASTER parameter. Set it based on instructions provided in Table 1 [GUC parameters](appendix.md). + +**Value range**: a string + +**Default value**: **pg_hba.conf** (The absolute directory of this file may be displayed in the actual situation.) + +## ident_file + +**Parameter description**: Specifies the configuration file (**pg_ident.conf)** for client authentication. + +This parameter is a POSTMASTER parameter. Set it based on instructions provided in Table 1 [GUC parameters](appendix.md). + +**Value range**: a string + +**Default value**: **pg_ident.conf** (The absolute directory of this file may be displayed in the actual situation.) + +## external_pid_file + +**Parameter description**: Specifies the extra PID file that can be used by the server management program. + +This parameter is a POSTMASTER parameter. Set it based on instructions provided in Table 1 [GUC parameters](appendix.md). + +> ![img](https://cdn-mogdb.enmotech.com/docs-media/icon/icon-notice.gif) **NOTICE:** +> This parameter takes effect only after the database restarts. + +**Value range**: a string + +**Default value**: empty + +## enable_default_cfunc_libpath + +**Parameter description**: Specifies whether the default path is used for the .so file when the C function is created in MogDB. + +This parameter is a POSTMASTER parameter. Set it based on instructions provided in Table 1 [GUC parameters](appendix.md). + +**Value range**: Boolean + +**on**: indicates that the .so file must be placed in the specified directory (**$libdir/proc_srclib**) when the C function is created. + +**off**: indicates that the .so file can be stored in any accessible directory when the C function is created. + +**Default value**: **on** + +> ![img](https://cdn-mogdb.enmotech.com/docs-media/icon/icon-notice.gif) **NOTICE:** If this parameter is set to **off**, the .so file can be placed in any accessible directory or the .so file provided by the system can be used, which poses security risks. Therefore, you are not advised to set this parameter to **off**. diff --git a/product/en/docs-mogdb/v5.0/reference-guide/guc-parameters/guc-parameter-list.md b/product/en/docs-mogdb/v5.0/reference-guide/guc-parameters/guc-parameter-list.md index f7c55a8fe6b4617501976980c3e1d4fcc1c05790..4e3edd8b735a91a407fced37e007d016ec42a9f8 100644 --- a/product/en/docs-mogdb/v5.0/reference-guide/guc-parameters/guc-parameter-list.md +++ b/product/en/docs-mogdb/v5.0/reference-guide/guc-parameters/guc-parameter-list.md @@ -257,6 +257,7 @@ date: 2022-05-26 | [enable_data_replicate](../../reference-guide/guc-parameters/ha-replication/primary-server.md#enable_data_replicate) | | [enable_dcf](../../reference-guide/guc-parameters/cm-parameters/cm_agent.md#enable_dcf) | | [enable_debug_vacuum](../../reference-guide/guc-parameters/error-reporting-and-logging/logging-content.md#enable_debug_vacuum) | +| [enable_default_cfunc_libpath](file-location.md#enable_default_cfunc_libpath) | | [enable_default_ustore_table](miscellaneous-parameters.md#enable_default_ustore_table) | | [enable_defer_calculate_snapshot](MogDB-transaction.md#enable_defer_calculate_snapshot) | | [enable_double_write](../../reference-guide/guc-parameters/write-ahead-log/checkpoints.md#enable_double_write) | @@ -346,7 +347,7 @@ date: 2022-05-26 | [failed_login_attempts](../../reference-guide/guc-parameters/connection-and-authentication/security-and-authentication.md#failed_login_attempts) | | [fast_extend_file_size](../../reference-guide/guc-parameters/resource-consumption/asynchronous-io-operations.md#fast_extend_file_size) | | [fault_mon_timeout](lock-management.md#fault_mon_timeout) | -| [FencedUDFMemoryLimit](user-defined-functions.md#fencedudfmemorylimit) | +| [FencedUDFMemoryLimit](guc-user-defined-functions.md#fencedudfmemorylimit) | | [force_bitmapand](../../reference-guide/guc-parameters/query-planning/optimizer-method-configuration.md#force_bitmapand) | | [force_pseudo_codegen_mot](mot.md#force_pseudo_codegen_mot) | | [force_promote](../../reference-guide/guc-parameters/write-ahead-log/settings.md#force_promote) | @@ -534,7 +535,7 @@ date: 2022-05-26 | [plan_cache_mode](../../reference-guide/guc-parameters/query-planning/other-optimizer-options.md#plan_cache_mode) | | [plan_mode_seed](../../reference-guide/guc-parameters/query-planning/other-optimizer-options.md#plan_mode_seed) | | [pldebugger_timeout](developer-options.md#pldebugger_timeout) | -| [pljava_vmoptions](user-defined-functions.md#pljava_vmoptions) | +| [pljava_vmoptions](guc-user-defined-functions.md#pljava_vmoptions) | | [plog_merge_age](../../reference-guide/guc-parameters/error-reporting-and-logging/logging-time.md#plog_merge_age) | | [plpgsql.variable_conflict](../../reference-guide/guc-parameters/version-and-platform-compatibility/platform-and-client-compatibility.md#plpgsqlvariable_conflict) | | [plsql_show_all_error](developer-options.md#plsql_show_all_error) | @@ -662,12 +663,12 @@ date: 2022-05-26 | [transparent_encrypt_kms_url](miscellaneous-parameters.md#transparent_encrypt_kms_url) | | [transparent_encrypted_string](miscellaneous-parameters.md#transparent_encrypted_string) | | [try_vector_engine_strategy](../../reference-guide/guc-parameters/query-planning/optimizer-method-configuration.md#try_vector_engine_strategy) | -| [udf_memory_limit](user-defined-functions.md#udf_memory_limit) | -| [UDFWorkerMemHardLimit](user-defined-functions.md#udfworkermemhardlimit) | +| [udf_memory_limit](guc-user-defined-functions.md#udf_memory_limit) | +| [UDFWorkerMemHardLimit](guc-user-defined-functions.md#udfworkermemhardlimit) | | [uncontrolled_memory_context](../../reference-guide/guc-parameters/resource-consumption/memory.md#uncontrolled_memory_context) | -| [undo_limit_size_per_transaction](undo.md#undo_limit_size_per_transaction) | +| [undo_limit_size_per_transaction](rollback-parameters.md#undo_limit_size_per_transaction) | | [undo_retention_time](flashback.md#undo_retention_time) | -| [undo_space_limit_size](undo.md#undo_space_limit_size) | +| [undo_space_limit_size](rollback-parameters.md#undo_space_limit_size) | | [undo_zone_count](reserved-parameters.md) | | [unix_socket_directory](../../reference-guide/guc-parameters/connection-and-authentication/connection-settings.md#unix_socket_directory) | | [unix_socket_group](../../reference-guide/guc-parameters/connection-and-authentication/connection-settings.md#unix_socket_group) | diff --git a/product/en/docs-mogdb/v5.0/reference-guide/guc-parameters/user-defined-functions.md b/product/en/docs-mogdb/v5.0/reference-guide/guc-parameters/guc-user-defined-functions.md similarity index 100% rename from product/en/docs-mogdb/v5.0/reference-guide/guc-parameters/user-defined-functions.md rename to product/en/docs-mogdb/v5.0/reference-guide/guc-parameters/guc-user-defined-functions.md diff --git a/product/en/docs-mogdb/v5.0/reference-guide/guc-parameters/ha-replication/ha-replication.md b/product/en/docs-mogdb/v5.0/reference-guide/guc-parameters/ha-replication/ha-replication.md index 514e83b931c149310d22c5c3eee7ac76a6017353..29916c94ffa185e58e3fed4991b1eac2704cde36 100644 --- a/product/en/docs-mogdb/v5.0/reference-guide/guc-parameters/ha-replication/ha-replication.md +++ b/product/en/docs-mogdb/v5.0/reference-guide/guc-parameters/ha-replication/ha-replication.md @@ -1,12 +1,12 @@ ---- -title: HA Replication -summary: HA Replication -author: zhang cuiping -date: 2023-04-07 ---- - -# HA Replication - -- **[HA Replication](sending-server.md)** -- **[Primary Server](primary-server.md)** +--- +title: HA Replication +summary: HA Replication +author: zhang cuiping +date: 2023-04-07 +--- + +# HA Replication + +- **[Sending Server](sending-server.md)** +- **[Primary Server](primary-server.md)** - **[Standby Server](standby-server.md)** \ No newline at end of file diff --git a/product/en/docs-mogdb/v5.0/reference-guide/guc-parameters/ha-replication/primary-server.md b/product/en/docs-mogdb/v5.0/reference-guide/guc-parameters/ha-replication/primary-server.md index d734a9972e9db88a3fd9ef2c74d30124e3a35eb1..74f019245cdb89a76e7c7eacd6a8958fbc0649a9 100644 --- a/product/en/docs-mogdb/v5.0/reference-guide/guc-parameters/ha-replication/primary-server.md +++ b/product/en/docs-mogdb/v5.0/reference-guide/guc-parameters/ha-replication/primary-server.md @@ -258,4 +258,18 @@ This parameter is a POSTMASTER parameter. Set it based on instructions provided > >- After this function is enabled, if the primary node is stopped while waiting for the standby node to achieve majority consistency, the system does not display a message indicating that the transaction has been committed locally and may not be synchronized to the remote node. This prevents upper-layer services from considering that data has been consistent. > ->- After this function is enabled, the synchronization waiting time is prolonged due to persistent data. As a result, the performance of the primary and standby clusters with synchronous standby nodes is affected. According to the test data, the performance decreases by about 20% compared with that when this function is disabled. \ No newline at end of file +>- After this function is enabled, the synchronization waiting time is prolonged due to persistent data. As a result, the performance of the primary and standby clusters with synchronous standby nodes is affected. According to the test data, the performance decreases by about 20% compared with that when this function is disabled. + +## pgxc_node_name + +**Parameter description**: Specifies the name of a node. + +This parameter is a POSTMASTER parameter. Set it based on Table 1 [GUC parameters](../appendix.md). + +When a standby node requests to replicate logs on the primary node, if the **application_name** parameter is not set, the **pgxc_node_name** parameter is used as the name of the streaming replication slot of the standby node on the primary node. The streaming replication slot is named in the following format: Value of this parameter_IP address of the standby node_Port number of the standby node. The IP address and port number of the standby node are obtained from the IP address and port number of the standby node specified by the **replconninfo** parameter. The maximum length of a streaming replication slot name is 61 characters. If the length of the concatenated string exceeds 61 characters, the truncated **pgxc_node_name** will be used for concatenation to ensure that the length of the streaming replication slot name is less than or equal to 61 characters. + +> ![img](https://cdn-mogdb.enmotech.com/docs-media/icon/icon-note.gif) **Note**: After this parameter is modified, the database instance will fail to be connected. You are advised not to modify this parameter. + +**Value range**: a string + +**Default value**: current node name \ No newline at end of file diff --git a/product/en/docs-mogdb/v5.0/reference-guide/guc-parameters/ha-replication/sending-server.md b/product/en/docs-mogdb/v5.0/reference-guide/guc-parameters/ha-replication/sending-server.md index f0b977c6677532f8fea246c98be384737001e9a7..6dce5284d437c659afee664532e9a991be54a5ac 100644 --- a/product/en/docs-mogdb/v5.0/reference-guide/guc-parameters/ha-replication/sending-server.md +++ b/product/en/docs-mogdb/v5.0/reference-guide/guc-parameters/ha-replication/sending-server.md @@ -149,3 +149,17 @@ This parameter is a POSTMASTER parameter. Set it based on instructions provided **Value range**: a string. An empty string indicates that no information about the node is configured. **Default value**: empty + +## pgxc_node_name + +**Parameter description**: Specifies the name of a node. + +This parameter is a POSTMASTER parameter. Set it based on Table 1 [GUC parameters](../appendix.md). + +When a standby node requests to replicate logs on the primary node, if the **application_name** parameter is not set, the **pgxc_node_name** parameter is used as the name of the streaming replication slot of the standby node on the primary node. The streaming replication slot is named in the following format: Value of this parameter_IP address of the standby node_Port number of the standby node. The IP address and port number of the standby node are obtained from the IP address and port number of the standby node specified by the **replconninfo** parameter. The maximum length of a streaming replication slot name is 61 characters. If the length of the concatenated string exceeds 61 characters, the truncated **pgxc_node_name** will be used for concatenation to ensure that the length of the streaming replication slot name is less than or equal to 61 characters. + +> ![img](https://cdn-mogdb.enmotech.com/docs-media/icon/icon-note.gif) **Note**: After this parameter is modified, the database instance will fail to be connected. You are advised not to modify this parameter. + +**Value range**: a string + +**Default value**: current node name diff --git a/product/en/docs-mogdb/v5.0/reference-guide/guc-parameters/ha-replication/standby-server.md b/product/en/docs-mogdb/v5.0/reference-guide/guc-parameters/ha-replication/standby-server.md index 6499a6c08e5445b75310b3c1a9c7b4ce4a66e3a8..207963b4fc71c7c94a35e4eef66c394478336379 100644 --- a/product/en/docs-mogdb/v5.0/reference-guide/guc-parameters/ha-replication/standby-server.md +++ b/product/en/docs-mogdb/v5.0/reference-guide/guc-parameters/ha-replication/standby-server.md @@ -154,4 +154,18 @@ This parameter is a SIGHUP parameter. Set it based on instructions provided in T **Value range**: an integer ranging from 0 to 262143 -**Default value**: **2** \ No newline at end of file +**Default value**: **2** + +## pgxc_node_name + +**Parameter description**: Specifies the name of a node. + +This parameter is a POSTMASTER parameter. Set it based on Table 1 [GUC parameters](../appendix.md). + +When a standby node requests to replicate logs on the primary node, if the **application_name** parameter is not set, the **pgxc_node_name** parameter is used as the name of the streaming replication slot of the standby node on the primary node. The streaming replication slot is named in the following format: Value of this parameter_IP address of the standby node_Port number of the standby node. The IP address and port number of the standby node are obtained from the IP address and port number of the standby node specified by the **replconninfo** parameter. The maximum length of a streaming replication slot name is 61 characters. If the length of the concatenated string exceeds 61 characters, the truncated **pgxc_node_name** will be used for concatenation to ensure that the length of the streaming replication slot name is less than or equal to 61 characters. + +> ![img](https://cdn-mogdb.enmotech.com/docs-media/icon/icon-note.gif) **Note**: After this parameter is modified, the database instance will fail to be connected. You are advised not to modify this parameter. + +**Value range**: a string + +**Default value**: current node name \ No newline at end of file diff --git a/product/en/docs-mogdb/v5.0/reference-guide/guc-parameters/reference-guide-guc-parameters.md b/product/en/docs-mogdb/v5.0/reference-guide/guc-parameters/reference-guide-guc-parameters.md index 5294322b8153fddae40f66c8a2ddfa75ffbfddfe..4ee2945c3f3c8e61840493a7bdd6f5f590e38a32 100644 --- a/product/en/docs-mogdb/v5.0/reference-guide/guc-parameters/reference-guide-guc-parameters.md +++ b/product/en/docs-mogdb/v5.0/reference-guide/guc-parameters/reference-guide-guc-parameters.md @@ -39,11 +39,10 @@ date: 2023-04-07 - **[Security Configuration](security-configuration.md)** - **[Global Temporary Table](global-temporary-table.md)** - **[HyperLogLog](HyperLogLog.md)** -- **[User-defined Functions](user-defined-functions.md)** +- **[User-defined Functions](guc-user-defined-functions.md)** - **[Scheduled Task](scheduled-task.md)** - **[Thread Pool](thread-pool.md)** - **[Backup and Restoration](backup-and-restoration-parameter.md)** -- **[Undo](undo.md)** - **[Backup and Restoration](DCF-parameters-settings.md)** - **[Flashback](flashback.md)** - **[Rollback Parameters](rollback-parameters.md)** diff --git a/product/en/docs-mogdb/v5.0/reference-guide/guc-parameters/rollback-parameters.md b/product/en/docs-mogdb/v5.0/reference-guide/guc-parameters/rollback-parameters.md index 388d56d203fb3e80ea02ea1b1f55627bcf3e8091..978c16307fb1c89b90fe6cd49ec1e8411ef7de55 100644 --- a/product/en/docs-mogdb/v5.0/reference-guide/guc-parameters/rollback-parameters.md +++ b/product/en/docs-mogdb/v5.0/reference-guide/guc-parameters/rollback-parameters.md @@ -1,18 +1,38 @@ ---- -title: Rollback Parameters -summary: Rollback Parameters -author: Zhang Cuiping -date: 2021-11-08 ---- - -# Rollback Parameters - -## max_undo_workers - -**Parameter description**: Specifies the number of undo worker threads invoked during asynchronous rollback. The parameter setting takes effect after the system is restarted. - -This parameter is a SIGHUP parameter. Set it based on instructions provided in Table 1 [GUC parameters](appendix.md). - -**Value range:** an integer ranging from 1 to 100 - -**Default value**: **5** +--- +title: Rollback Parameters +summary: Rollback Parameters +author: Zhang Cuiping +date: 2021-11-08 +--- + +# Rollback Parameters + +## max_undo_workers + +**Parameter description**: Specifies the number of undo worker threads invoked during asynchronous rollback. The parameter setting takes effect after the system is restarted. + +This parameter is a SIGHUP parameter. Set it based on instructions provided in Table 1 [GUC parameters](appendix.md). + +**Value range:** an integer ranging from 1 to 100 + +**Default value**: **5** + +## undo_space_limit_size + +**Parameter description**: Specifies the threshold for forcibly recycling undo space. When the undo space usage reaches 80% of the threshold, forcible recycling starts. You can set this parameter to a large value based on service requirements and then set it to a proper value based on the actual undo space usage. + +This parameter is a POSTMASTER parameter. Set it based on instructions provided in Table 1 [GUC parameters](appendix.md). + +**Value range**: an integer ranging from 800 MB to 32 TB + +**Default value**: **256 GB** + +## undo_limit_size_per_transaction + +**Parameter description**: Specifies the undo space threshold of a single transaction. If the threshold is reached, the transaction is rolled back due to an error. + +This parameter is a POSTMASTER parameter. Set it based on instructions provided in Table 1 [GUC parameters](appendix.md). + +**Value range**: an integer ranging from 100 MB to 32 TB + +**Default value**: **32 GB** diff --git a/product/en/docs-mogdb/v5.0/reference-guide/guc-parameters/undo.md b/product/en/docs-mogdb/v5.0/reference-guide/guc-parameters/undo.md deleted file mode 100644 index 1801481ab0ebb04b7b0b688a2dc176185cec8021..0000000000000000000000000000000000000000 --- a/product/en/docs-mogdb/v5.0/reference-guide/guc-parameters/undo.md +++ /dev/null @@ -1,28 +0,0 @@ ---- -title: Undo -summary: Undo -author: Zhang Cuiping -date: 2021-11-08 ---- - -# Undo - -## undo_space_limit_size - -**Parameter description**: Specifies the threshold for forcibly recycling undo space. When the undo space usage reaches 80% of the threshold, forcible recycling starts. You can set this parameter to a large value based on service requirements and then set it to a proper value based on the actual undo space usage. - -This parameter is a POSTMASTER parameter. Set it based on instructions provided in Table 1 [GUC parameters](appendix.md). - -**Value range**: an integer ranging from 800 MB to 32 TB - -**Default value**: **256 GB** - -## undo_limit_size_per_transaction - -**Parameter description**: Specifies the undo space threshold of a single transaction. If the threshold is reached, the transaction is rolled back due to an error. - -This parameter is a POSTMASTER parameter. Set it based on instructions provided in Table 1 [GUC parameters](appendix.md). - -**Value range**: an integer ranging from 100 MB to 32 TB - -**Default value**: **32 GB** \ No newline at end of file diff --git a/product/en/docs-mogdb/v5.0/reference-guide/sql-syntax/CLUSTER.md b/product/en/docs-mogdb/v5.0/reference-guide/sql-syntax/CLUSTER.md index 2c6104b8703d569d6238cf0124a5c9e4d3dbbdd5..8b1b10314a13a251c6828ccdba7167ebd64f1955 100644 --- a/product/en/docs-mogdb/v5.0/reference-guide/sql-syntax/CLUSTER.md +++ b/product/en/docs-mogdb/v5.0/reference-guide/sql-syntax/CLUSTER.md @@ -119,10 +119,4 @@ MogDB=# DROP INDEX tpcds.ds_inventory_p1_index1; -- Delete the partitioned table. MogDB=# DROP TABLE tpcds.inventory_p1; -``` - -## Suggestions - -- cluster - - It is recommended that you run **ANALYZE** on a newly clustered table. Otherwise, the optimizer might make poor choices of query plans. - - **CLUSTER** cannot be executed in transactions. +``` \ No newline at end of file diff --git a/product/en/docs-mogdb/v5.0/reference-guide/sql-syntax/CREATE-INDEX.md b/product/en/docs-mogdb/v5.0/reference-guide/sql-syntax/CREATE-INDEX.md index 1bfb4ee42520cb4af3a84bce7678287f23bf9199..970746bfd9684de9f6321c108f77018d4e0c3aae 100644 --- a/product/en/docs-mogdb/v5.0/reference-guide/sql-syntax/CREATE-INDEX.md +++ b/product/en/docs-mogdb/v5.0/reference-guide/sql-syntax/CREATE-INDEX.md @@ -424,26 +424,4 @@ CREATE INDEX ## Helpful Links -[ALTER INDEX](ALTER-INDEX.md),[DROP INDEX](DROP-INDEX.md) - -## Suggestions - -- create index - - You are advised to create indexes on: - - - Columns that are often queried - - Join conditions. For a query on joined columns, you are advised to create a composite index on the columns, For example, for **select \* from t1 join t2 on t1.a=t2.a and t1.b=t2.b**, you can create a composite index on columns **a** and **b** in table **t1**. - - Columns having filter criteria (especially scope criteria) of a **where** clause - - Columns that appear after **order by**, **group by**, and **distinct** - - Constraints: - - - Partial indexes cannot be created in a partitioned table. - - When a GLOBAL index is created on a partitioned table, the following constraints apply: - - Expression indexes and partial indexes are not supported. - - Row-store tables are not supported. - - Only B-tree indexes are supported. - - In the same attribute column, the LOCAL index and GLOBAL index of a partition cannot coexist. - - GLOBAL index supports a maximum of 31 columns. - - If the **ALTER** statement does not contain **UPDATE GLOBAL INDEX**, the original GLOBAL index is invalid. In this case, other indexes are used for query. If the ALTER statement contains UPDATE GLOBAL INDEX, the original GLOBAL index is still valid and the index function is correct. +[ALTER INDEX](ALTER-INDEX.md),[DROP INDEX](DROP-INDEX.md) \ No newline at end of file diff --git a/product/en/docs-mogdb/v5.0/reference-guide/sql-syntax/CREATE-PROCEDURE.md b/product/en/docs-mogdb/v5.0/reference-guide/sql-syntax/CREATE-PROCEDURE.md index de7fd65b9d687f2a97ab03ca3d34d7c4f6a21211..0aca913c2483ed822cc76fc960994f334904da23 100644 --- a/product/en/docs-mogdb/v5.0/reference-guide/sql-syntax/CREATE-PROCEDURE.md +++ b/product/en/docs-mogdb/v5.0/reference-guide/sql-syntax/CREATE-PROCEDURE.md @@ -118,10 +118,4 @@ plsql_body ## Helpful Links -[DROP PROCEDURE](DROP-PROCEDURE.md) - -## Suggestions - -- analyse | analyze - - Do not run **ANALYZE** in a transaction or anonymous block. - - Do not run **ANALYZE** in a function or stored procedure. +[DROP PROCEDURE](DROP-PROCEDURE.md) \ No newline at end of file diff --git a/product/en/docs-mogdb/v5.0/reference-guide/sql-syntax/CREATE-TABLE.md b/product/en/docs-mogdb/v5.0/reference-guide/sql-syntax/CREATE-TABLE.md index 50bfc499f5fbdbf810eb81eebed071859bc657c0..74125b35abe78cab006e96c1b9efcebc40f291e3 100644 --- a/product/en/docs-mogdb/v5.0/reference-guide/sql-syntax/CREATE-TABLE.md +++ b/product/en/docs-mogdb/v5.0/reference-guide/sql-syntax/CREATE-TABLE.md @@ -1066,34 +1066,4 @@ MogDB=# DROP SCHEMA IF EXISTS joe CASCADE; ## Helpful Links -[ALTER TABLE](ALTER-TABLE.md), [DROP TABLE](DROP-TABLE.md), and [CREATE TABLESPACE](CREATE-TABLESPACE.md) - -## Suggestions - -- UNLOGGED - - The unlogged table and its indexes do not use the WAL log mechanism during data writing. Their write speed is much higher than that of ordinary tables. Therefore, they can be used for storing intermediate result sets of complex queries to improve query performance. - - The unlogged table has no primary/standby mechanism. In case of system faults or abnormal breakpoints, data loss may occur. Therefore, the unlogged table cannot be used to store basic data. -- TEMPORARY | TEMP - - A temporary table is automatically dropped at the end of a session. -- LIKE - - The new table automatically inherits all column names, data types, and not-null constraints from this table. The new table is irrelevant to the original table after the creation. -- LIKE INCLUDING DEFAULTS - - The default expressions are copied from the original table to the new table only if **INCLUDING DEFAULTS** is specified. The default behavior is to exclude default expressions, resulting in the copied columns in the new table having default values null. -- LIKE INCLUDING CONSTRAINTS - - The **CHECK** constraints are copied from the original table to the new table only when **INCLUDING CONSTRAINTS** is specified. Other types of constraints are never copied to the new table. Not-null constraints are always copied to the new table. These rules also apply to column constraints and table constraints. -- LIKE INCLUDING INDEXES - - Any indexes on the original table will not be created on the new table, unless the **INCLUDING INDEXES** clause is specified. -- LIKE INCLUDING STORAGE - - **STORAGE** settings for the copied column definitions are copied only if **INCLUDING STORAGE** is specified. The default behavior is to exclude **STORAGE** settings. -- LIKE INCLUDING COMMENTS - - If **INCLUDING COMMENTS** is specified, comments for the copied columns, constraints, and indexes are copied. The default behavior is to exclude comments. -- LIKE INCLUDING PARTITION - - If **INCLUDING PARTITION** is specified, the partition definitions of the source table are copied to the new table, and the new table no longer uses the **PARTITION BY** clause. The default behavior is to exclude partition definition of the original table. -- LIKE INCLUDING RELOPTIONS - - If **INCLUDING RELOPTIONS** is specified, the new table will copy the storage parameter (that is, **WITH** clause) of the source table. The default behavior is to exclude partition definition of the storage parameter of the original table. -- LIKE INCLUDING ALL - - **INCLUDING ALL** contains the meaning of **INCLUDING DEFAULTS**, **INCLUDING CONSTRAINTS**, **INCLUDING INDEXES**, **INCLUDING STORAGE**, **INCLUDING COMMENTS**, **INCLUDING PARTITION**, and **INCLUDING RELOPTIONS**. -- ORIENTATION ROW - - Creates a row-store table. Row-store applies to the OLTP service, which has many interactive transactions. An interaction involves many columns in the table. Using row-store can improve the efficiency. -- ORIENTATION COLUMN - - Creates a column-store table. Column-store applies to the DWS, which has a large amount of aggregation computing, and involves a few column operations. +[ALTER TABLE](ALTER-TABLE.md), [DROP TABLE](DROP-TABLE.md), and [CREATE TABLESPACE](CREATE-TABLESPACE.md) \ No newline at end of file diff --git a/product/en/docs-mogdb/v5.0/reference-guide/sql-syntax/CREATE-TABLESPACE.md b/product/en/docs-mogdb/v5.0/reference-guide/sql-syntax/CREATE-TABLESPACE.md index 825219928b61dac4abf45658343fbdd5b6acc1d3..ae6bb5ff88c86d8041726682de6132d7116ed62f 100644 --- a/product/en/docs-mogdb/v5.0/reference-guide/sql-syntax/CREATE-TABLESPACE.md +++ b/product/en/docs-mogdb/v5.0/reference-guide/sql-syntax/CREATE-TABLESPACE.md @@ -127,10 +127,4 @@ MogDB=# DROP ROLE jay; ## Helpful Links -[CREATE DATABASE](CREATE-DATABASE.md),[CREATE TABLE](CREATE-TABLE.md),[CREATE INDEX](CREATE-INDEX.md),[DROP TABLESPACE](DROP-TABLESPACE.md),[ALTER TABLESPACE](ALTER-TABLESPACE.md) - -## Suggestions - -- create tablespace - - You are not advised to create tablespaces in a transaction. +[CREATE DATABASE](CREATE-DATABASE.md),[CREATE TABLE](CREATE-TABLE.md),[CREATE INDEX](CREATE-INDEX.md),[DROP TABLESPACE](DROP-TABLESPACE.md),[ALTER TABLESPACE](ALTER-TABLESPACE.md) \ No newline at end of file diff --git a/product/en/docs-mogdb/v5.0/reference-guide/sql-syntax/DELETE.md b/product/en/docs-mogdb/v5.0/reference-guide/sql-syntax/DELETE.md index 7ec87258dc7fe10b730f3982e530897f62561c98..5286b7c9317d44bc6cc734c40ef45dfe05bf809f 100644 --- a/product/en/docs-mogdb/v5.0/reference-guide/sql-syntax/DELETE.md +++ b/product/en/docs-mogdb/v5.0/reference-guide/sql-syntax/DELETE.md @@ -162,10 +162,4 @@ MogDB=# DELETE FROM tpcds.customer_address_bak; Delete the tpcds.customer_address_bak table. MogDB=# DROP TABLE tpcds.customer_address_bak; -``` - -## Suggestions - -- delete - - To delete all records in a table, use the **truncate** syntax. +``` \ No newline at end of file diff --git a/product/en/docs-mogdb/v5.0/reference-guide/sql-syntax/DROP-DATABASE.md b/product/en/docs-mogdb/v5.0/reference-guide/sql-syntax/DROP-DATABASE.md index 8e21dd5af92384391725c5a866827043998cd79b..b8214b2cac2e3373201a5eadc1710e838c92311f 100644 --- a/product/en/docs-mogdb/v5.0/reference-guide/sql-syntax/DROP-DATABASE.md +++ b/product/en/docs-mogdb/v5.0/reference-guide/sql-syntax/DROP-DATABASE.md @@ -45,10 +45,4 @@ See **Examples** in **CREATE DATABASE**. ## Helpful Links -[CREATE DATABASE](CREATE-DATABASE.md) - -## Suggestions - -- drop database - - Do not delete databases during transactions. +[CREATE DATABASE](CREATE-DATABASE.md) \ No newline at end of file diff --git a/product/en/docs-mogdb/v5.0/reference-guide/sql-syntax/DROP-TABLESPACE.md b/product/en/docs-mogdb/v5.0/reference-guide/sql-syntax/DROP-TABLESPACE.md index 8b3689c2f0db317cb754e749bee2507004ec4081..4e8991a7096a5bf165d07333b38bf0b0bd2df098 100644 --- a/product/en/docs-mogdb/v5.0/reference-guide/sql-syntax/DROP-TABLESPACE.md +++ b/product/en/docs-mogdb/v5.0/reference-guide/sql-syntax/DROP-TABLESPACE.md @@ -43,10 +43,4 @@ See **Examples** in [CREATE TABLESPACE](CREATE-TABLESPACE.md). ## Helpful Links -[ALTER TABLESPACE](ALTER-TABLESPACE.md) and [CREATE TABLESPACE](CREATE-TABLESPACE.md) - -## Suggestions - -- drop database - - Do not delete databases during transactions. +[ALTER TABLESPACE](ALTER-TABLESPACE.md) and [CREATE TABLESPACE](CREATE-TABLESPACE.md) \ No newline at end of file diff --git a/product/en/docs-mogdb/v5.0/reference-guide/sql-syntax/INSERT.md b/product/en/docs-mogdb/v5.0/reference-guide/sql-syntax/INSERT.md index eeb52cd5dcf01a09195c2330c1aae87cbacafe75..311a8468a97563a5c3d70d676120a38eed45652d 100644 --- a/product/en/docs-mogdb/v5.0/reference-guide/sql-syntax/INSERT.md +++ b/product/en/docs-mogdb/v5.0/reference-guide/sql-syntax/INSERT.md @@ -177,10 +177,4 @@ MogDB=# INSERT INTO tpcds.reason_t2 VALUES (5, 'BBBBBBBBCAAAAAAA','reason5'),(6, -- Delete the tpcds.reason_t2. MogDB=# DROP TABLE tpcds.reason_t2; -``` - -## Suggestions - -- VALUES - - When you run the **INSERT** statement to insert data in batches, you are advised to combine multiple records into one statement to improve data loading performance. Example: **INSERT INTO sections VALUES (30, 'Administration', 31, 1900),(40, 'Development', 35, 2000), (50, 'Development' , 60 , 2001);** +``` \ No newline at end of file diff --git a/product/en/docs-mogdb/v5.0/reference-guide/sql-syntax/REINDEX.md b/product/en/docs-mogdb/v5.0/reference-guide/sql-syntax/REINDEX.md index a18e81bcc47cf175dda223277ed44edaba91f6de..f2aa6515e9d101b46b914976e4d26226d87c0d6f 100644 --- a/product/en/docs-mogdb/v5.0/reference-guide/sql-syntax/REINDEX.md +++ b/product/en/docs-mogdb/v5.0/reference-guide/sql-syntax/REINDEX.md @@ -158,18 +158,4 @@ MogDB=# REINDEX TABLE CONCURRENTLY tpcds.customer_t1; -- Delete the tpcds.customer_t1 table. MogDB=# DROP TABLE tpcds.customer_t1; -``` - -## Suggestions - -- INTERNAL TABLE - - This scenario is used for fault recovery. You are not advised to perform concurrent operations. - -- DATABASE - - You can not reindex a database in a transaction. - -- SYSTEM - - You can not reindex system catalogs in transactions. +``` \ No newline at end of file diff --git a/product/en/docs-mogdb/v5.0/reference-guide/sql-syntax/SELECT-INTO.md b/product/en/docs-mogdb/v5.0/reference-guide/sql-syntax/SELECT-INTO.md index 221087147b9e07fe6ccf40917faa0c393791fceb..a4cecafcc0cf70d3dea0f2029cc3e219aefc3e66 100644 --- a/product/en/docs-mogdb/v5.0/reference-guide/sql-syntax/SELECT-INTO.md +++ b/product/en/docs-mogdb/v5.0/reference-guide/sql-syntax/SELECT-INTO.md @@ -84,14 +84,4 @@ MogDB=# DROP TABLE tpcds.reason_t1; ## Helpful Links -[SELECT](SELECT.md) - -## Suggestions - -- **DATABASE** - - You are not advised to reindex a database in a transaction. - -- **SYSTEM** - - You are not advised to reindex system catalogs in transactions. +[SELECT](SELECT.md) \ No newline at end of file diff --git a/product/en/docs-mogdb/v5.0/reference-guide/sql-syntax/VACUUM.md b/product/en/docs-mogdb/v5.0/reference-guide/sql-syntax/VACUUM.md index ee20c4227262f07d6b19d7dc105efb5570503220..48b886108bd1c9d4f1701811416b20e3ffa98d8b 100644 --- a/product/en/docs-mogdb/v5.0/reference-guide/sql-syntax/VACUUM.md +++ b/product/en/docs-mogdb/v5.0/reference-guide/sql-syntax/VACUUM.md @@ -117,12 +117,4 @@ MogDB=# VACUUM (VERBOSE, ANALYZE) tpcds.reason; -- Drop an index. MogDB=# DROP INDEX ds_reason_index1 CASCADE; MogDB=# DROP TABLE tpcds.reason; -``` - -## Suggestions - -- vacuum - - **VACUUM** cannot be executed inside a transaction block. - - It is recommended that active production databases be vacuumed frequently (at least nightly), in order to remove dead rows. It is strongly recommended that you run **VACUUM ANALYZE** after adding or deleting a large number of records. - - **FULL** is recommended only in special scenarios. For example, you wish to physically narrow the table to decrease the occupied disk space after deleting most rows of a table. - - Before performing the VACUUM FULL operation, you are advised to delete all indexes in related tables, run **VACUUM FULL**, and then re-create the index. +``` \ No newline at end of file diff --git a/product/en/docs-mogdb/v5.0/toc.md b/product/en/docs-mogdb/v5.0/toc.md index a7c22136ccf62636418797448163f0ee6faa351a..bba40b033520950894aa1d57374808793ac6abf5 100644 --- a/product/en/docs-mogdb/v5.0/toc.md +++ b/product/en/docs-mogdb/v5.0/toc.md @@ -1420,9 +1420,8 @@ + [HyperLogLog](./reference-guide/guc-parameters/HyperLogLog.md) + [Scheduled Task](./reference-guide/guc-parameters/scheduled-task.md) + [Thread Pool](./reference-guide/guc-parameters/thread-pool.md) - + [User-defined Functions](./reference-guide/guc-parameters/user-defined-functions.md) + + [User-defined Functions](./reference-guide/guc-parameters/guc-user-defined-functions.md) + [Backup and Restoration](./reference-guide/guc-parameters/backup-and-restoration-parameter.md) - + [Undo](./reference-guide/guc-parameters/undo.md) + [DCF Parameters Settings](./reference-guide/guc-parameters/DCF-parameters-settings.md) + [Flashback](./reference-guide/guc-parameters/flashback.md) + [Rollback Parameters](./reference-guide/guc-parameters/rollback-parameters.md) diff --git a/product/en/docs-mogdb/v5.0/toc_parameters-and-tools.md b/product/en/docs-mogdb/v5.0/toc_parameters-and-tools.md index 824b9f4359ecd3545e73357dd00766187fced915..fc0159325271351ccd317d1b70f8554681684e44 100644 --- a/product/en/docs-mogdb/v5.0/toc_parameters-and-tools.md +++ b/product/en/docs-mogdb/v5.0/toc_parameters-and-tools.md @@ -77,9 +77,8 @@ + [HyperLogLog](./reference-guide/guc-parameters/HyperLogLog.md) + [Scheduled Task](./reference-guide/guc-parameters/scheduled-task.md) + [Thread Pool](./reference-guide/guc-parameters/thread-pool.md) - + [User-defined Functions](./reference-guide/guc-parameters/user-defined-functions.md) + + [User-defined Functions](./reference-guide/guc-parameters/guc-user-defined-functions.md) + [Backup and Restoration](./reference-guide/guc-parameters/backup-and-restoration-parameter.md) - + [Undo](./reference-guide/guc-parameters/undo.md) + [DCF Parameters Settings](./reference-guide/guc-parameters/DCF-parameters-settings.md) + [Flashback](./reference-guide/guc-parameters/flashback.md) + [Rollback Parameters](./reference-guide/guc-parameters/rollback-parameters.md) diff --git a/product/en/docs-mogdb/v5.1/performance-tuning/TPCC-performance-tuning-guide.md b/product/en/docs-mogdb/v5.1/performance-tuning/TPCC-performance-tuning-guide.md index a44cf66ebc7b97be362bd9eb1c3b97e79ad8c1bd..d1655d38bbe9b24d79660da275dc29890012b038 100644 --- a/product/en/docs-mogdb/v5.1/performance-tuning/TPCC-performance-tuning-guide.md +++ b/product/en/docs-mogdb/v5.1/performance-tuning/TPCC-performance-tuning-guide.md @@ -388,10 +388,12 @@ Adjust BIOS. yum install numa -y ``` - Install the NIC driver on the database server and client server. For details, see the **Network Configuration** section. + Install the NIC driver on the database server and client server. For details, see the [Network Configuration](#4-network-configuration) section. * Database server + [bind_net_irq.sh](https://gitee.com/opengauss/openGauss-server/blob/master/src/bin/scripts/bind_net_irq.sh) + ```bash cp `find /opt -name "bind*.sh"|head -1 ` /root sh /root/bind_net_irq.sh 12 @@ -405,6 +407,7 @@ Adjust BIOS. ``` Stop the database. + Change the database start command to the following: ```bash @@ -412,6 +415,7 @@ Adjust BIOS. ``` * Client server + Copy **/root/bind_net_irq.sh** to the client server. ```bash @@ -432,10 +436,12 @@ Adjust BIOS. yum install numa* -y ``` - Install the NIC driver on the database server and client server. For details, see the **Network Configuration** section. + Install the NIC driver on the database server and client server. For details, see the [Network Configuration](#4-network-configuration) section. * Database server + [bind_net_irq.sh](https://gitee.com/opengauss/openGauss-server/blob/master/src/bin/scripts/bind_net_irq.sh) + ```bash cp `find /opt -name "bind*.sh"|head -1 ` /root sh /root/bind_net_irq.sh 24 @@ -449,6 +455,7 @@ Adjust BIOS. ``` Stop the database + Change the database start command to the following: ```bash @@ -456,6 +463,7 @@ Adjust BIOS. ``` * Client server + Copy **/root/bind_net_irq.sh** to the client server. ```bash diff --git a/product/en/docs-mogdb/v5.1/reference-guide/functions-and-operators/sequence-functions.md b/product/en/docs-mogdb/v5.1/reference-guide/functions-and-operators/sequence-functions.md index 5d39d4735cfad4bd8a13916b761a6b94fee67fd6..1e2626b56a58b654d32f5f7e9ca8df83428d7ecf 100644 --- a/product/en/docs-mogdb/v5.1/reference-guide/functions-and-operators/sequence-functions.md +++ b/product/en/docs-mogdb/v5.1/reference-guide/functions-and-operators/sequence-functions.md @@ -124,7 +124,7 @@ The sequence functions provide a simple method to ensure security of multiple us > Because the sequence is non-transactional, the change caused by **setval** will not be undone by transaction rollback. > > ![img](https://cdn-mogdb.enmotech.com/docs-media/icon/icon-notice.gif) **NOTICE:** - > The **nextval** function can be executed only on the primary node. It is not supported on standby nodes. + > The **setval** function can be executed only on the primary node. It is not supported on standby nodes. - pg_sequence_last_value(sequence_oid oid, OUT cache_value int16, OUT last_value int16) diff --git a/product/en/docs-mogdb/v5.1/reference-guide/guc-parameters/file-location.md b/product/en/docs-mogdb/v5.1/reference-guide/guc-parameters/file-location.md index a5e8f52551ba99062fe684bd64e457674080632d..89f221d61600b6a24ec91bdffb494e11fb06c85d 100644 --- a/product/en/docs-mogdb/v5.1/reference-guide/guc-parameters/file-location.md +++ b/product/en/docs-mogdb/v5.1/reference-guide/guc-parameters/file-location.md @@ -67,3 +67,19 @@ This parameter is a POSTMASTER parameter. Set it based on instructions provided **Value range**: a string **Default value**: empty + +## enable_default_cfunc_libpath + +**Parameter description**: Specifies whether the default path is used for the .so file when the C function is created in MogDB. + +This parameter is a POSTMASTER parameter. Set it based on instructions provided in Table 1 [GUC parameters](appendix.md). + +**Value range**: Boolean + +**on**: indicates that the .so file must be placed in the specified directory (**$libdir/proc_srclib**) when the C function is created. + +**off**: indicates that the .so file can be stored in any accessible directory when the C function is created. + +**Default value**: **on** + +> ![img](https://cdn-mogdb.enmotech.com/docs-media/icon/icon-notice.gif) **NOTICE:** If this parameter is set to **off**, the .so file can be placed in any accessible directory or the .so file provided by the system can be used, which poses security risks. Therefore, you are not advised to set this parameter to **off**. diff --git a/product/en/docs-mogdb/v5.1/reference-guide/guc-parameters/guc-parameter-list.md b/product/en/docs-mogdb/v5.1/reference-guide/guc-parameters/guc-parameter-list.md index 9b55210c5ef103b3cd2b84377c860d978e29f5cd..a98ede838d98c2b01927833d494fee4bf2d30489 100644 --- a/product/en/docs-mogdb/v5.1/reference-guide/guc-parameters/guc-parameter-list.md +++ b/product/en/docs-mogdb/v5.1/reference-guide/guc-parameters/guc-parameter-list.md @@ -665,9 +665,9 @@ date: 2022-05-26 | [udf_memory_limit](guc-user-defined-functions.md#udf_memory_limit) | | [UDFWorkerMemHardLimit](guc-user-defined-functions.md#udfworkermemhardlimit) | | [uncontrolled_memory_context](../../reference-guide/guc-parameters/resource-consumption/memory.md#uncontrolled_memory_context) | -| [undo_limit_size_per_transaction](undo.md#undo_limit_size_per_transaction) | +| [undo_limit_size_per_transaction](rollback-parameters.md#undo_limit_size_per_transaction) | | [undo_retention_time](flashback.md#undo_retention_time) | -| [undo_space_limit_size](undo.md#undo_space_limit_size) | +| [undo_space_limit_size](rollback-parameters.md#undo_space_limit_size) | | [undo_zone_count](reserved-parameters.md) | | [unix_socket_directory](../../reference-guide/guc-parameters/connection-and-authentication/connection-settings.md#unix_socket_directory) | | [unix_socket_group](../../reference-guide/guc-parameters/connection-and-authentication/connection-settings.md#unix_socket_group) | diff --git a/product/en/docs-mogdb/v5.1/reference-guide/guc-parameters/ha-replication/ha-replication.md b/product/en/docs-mogdb/v5.1/reference-guide/guc-parameters/ha-replication/ha-replication.md index a24eb9e35d3b0f88ecf33ef8ed6b86272d52ff46..29916c94ffa185e58e3fed4991b1eac2704cde36 100644 --- a/product/en/docs-mogdb/v5.1/reference-guide/guc-parameters/ha-replication/ha-replication.md +++ b/product/en/docs-mogdb/v5.1/reference-guide/guc-parameters/ha-replication/ha-replication.md @@ -7,6 +7,6 @@ date: 2023-04-07 # HA Replication -- **[HA Replication](sending-server.md)** +- **[Sending Server](sending-server.md)** - **[Primary Server](primary-server.md)** - **[Standby Server](standby-server.md)** \ No newline at end of file diff --git a/product/en/docs-mogdb/v5.1/reference-guide/guc-parameters/ha-replication/primary-server.md b/product/en/docs-mogdb/v5.1/reference-guide/guc-parameters/ha-replication/primary-server.md index d734a9972e9db88a3fd9ef2c74d30124e3a35eb1..74f019245cdb89a76e7c7eacd6a8958fbc0649a9 100644 --- a/product/en/docs-mogdb/v5.1/reference-guide/guc-parameters/ha-replication/primary-server.md +++ b/product/en/docs-mogdb/v5.1/reference-guide/guc-parameters/ha-replication/primary-server.md @@ -258,4 +258,18 @@ This parameter is a POSTMASTER parameter. Set it based on instructions provided > >- After this function is enabled, if the primary node is stopped while waiting for the standby node to achieve majority consistency, the system does not display a message indicating that the transaction has been committed locally and may not be synchronized to the remote node. This prevents upper-layer services from considering that data has been consistent. > ->- After this function is enabled, the synchronization waiting time is prolonged due to persistent data. As a result, the performance of the primary and standby clusters with synchronous standby nodes is affected. According to the test data, the performance decreases by about 20% compared with that when this function is disabled. \ No newline at end of file +>- After this function is enabled, the synchronization waiting time is prolonged due to persistent data. As a result, the performance of the primary and standby clusters with synchronous standby nodes is affected. According to the test data, the performance decreases by about 20% compared with that when this function is disabled. + +## pgxc_node_name + +**Parameter description**: Specifies the name of a node. + +This parameter is a POSTMASTER parameter. Set it based on Table 1 [GUC parameters](../appendix.md). + +When a standby node requests to replicate logs on the primary node, if the **application_name** parameter is not set, the **pgxc_node_name** parameter is used as the name of the streaming replication slot of the standby node on the primary node. The streaming replication slot is named in the following format: Value of this parameter_IP address of the standby node_Port number of the standby node. The IP address and port number of the standby node are obtained from the IP address and port number of the standby node specified by the **replconninfo** parameter. The maximum length of a streaming replication slot name is 61 characters. If the length of the concatenated string exceeds 61 characters, the truncated **pgxc_node_name** will be used for concatenation to ensure that the length of the streaming replication slot name is less than or equal to 61 characters. + +> ![img](https://cdn-mogdb.enmotech.com/docs-media/icon/icon-note.gif) **Note**: After this parameter is modified, the database instance will fail to be connected. You are advised not to modify this parameter. + +**Value range**: a string + +**Default value**: current node name \ No newline at end of file diff --git a/product/en/docs-mogdb/v5.1/reference-guide/guc-parameters/ha-replication/sending-server.md b/product/en/docs-mogdb/v5.1/reference-guide/guc-parameters/ha-replication/sending-server.md index f0b977c6677532f8fea246c98be384737001e9a7..6dce5284d437c659afee664532e9a991be54a5ac 100644 --- a/product/en/docs-mogdb/v5.1/reference-guide/guc-parameters/ha-replication/sending-server.md +++ b/product/en/docs-mogdb/v5.1/reference-guide/guc-parameters/ha-replication/sending-server.md @@ -149,3 +149,17 @@ This parameter is a POSTMASTER parameter. Set it based on instructions provided **Value range**: a string. An empty string indicates that no information about the node is configured. **Default value**: empty + +## pgxc_node_name + +**Parameter description**: Specifies the name of a node. + +This parameter is a POSTMASTER parameter. Set it based on Table 1 [GUC parameters](../appendix.md). + +When a standby node requests to replicate logs on the primary node, if the **application_name** parameter is not set, the **pgxc_node_name** parameter is used as the name of the streaming replication slot of the standby node on the primary node. The streaming replication slot is named in the following format: Value of this parameter_IP address of the standby node_Port number of the standby node. The IP address and port number of the standby node are obtained from the IP address and port number of the standby node specified by the **replconninfo** parameter. The maximum length of a streaming replication slot name is 61 characters. If the length of the concatenated string exceeds 61 characters, the truncated **pgxc_node_name** will be used for concatenation to ensure that the length of the streaming replication slot name is less than or equal to 61 characters. + +> ![img](https://cdn-mogdb.enmotech.com/docs-media/icon/icon-note.gif) **Note**: After this parameter is modified, the database instance will fail to be connected. You are advised not to modify this parameter. + +**Value range**: a string + +**Default value**: current node name diff --git a/product/en/docs-mogdb/v5.1/reference-guide/guc-parameters/ha-replication/standby-server.md b/product/en/docs-mogdb/v5.1/reference-guide/guc-parameters/ha-replication/standby-server.md index 6499a6c08e5445b75310b3c1a9c7b4ce4a66e3a8..207963b4fc71c7c94a35e4eef66c394478336379 100644 --- a/product/en/docs-mogdb/v5.1/reference-guide/guc-parameters/ha-replication/standby-server.md +++ b/product/en/docs-mogdb/v5.1/reference-guide/guc-parameters/ha-replication/standby-server.md @@ -154,4 +154,18 @@ This parameter is a SIGHUP parameter. Set it based on instructions provided in T **Value range**: an integer ranging from 0 to 262143 -**Default value**: **2** \ No newline at end of file +**Default value**: **2** + +## pgxc_node_name + +**Parameter description**: Specifies the name of a node. + +This parameter is a POSTMASTER parameter. Set it based on Table 1 [GUC parameters](../appendix.md). + +When a standby node requests to replicate logs on the primary node, if the **application_name** parameter is not set, the **pgxc_node_name** parameter is used as the name of the streaming replication slot of the standby node on the primary node. The streaming replication slot is named in the following format: Value of this parameter_IP address of the standby node_Port number of the standby node. The IP address and port number of the standby node are obtained from the IP address and port number of the standby node specified by the **replconninfo** parameter. The maximum length of a streaming replication slot name is 61 characters. If the length of the concatenated string exceeds 61 characters, the truncated **pgxc_node_name** will be used for concatenation to ensure that the length of the streaming replication slot name is less than or equal to 61 characters. + +> ![img](https://cdn-mogdb.enmotech.com/docs-media/icon/icon-note.gif) **Note**: After this parameter is modified, the database instance will fail to be connected. You are advised not to modify this parameter. + +**Value range**: a string + +**Default value**: current node name \ No newline at end of file diff --git a/product/en/docs-mogdb/v5.1/reference-guide/guc-parameters/reference-guide-guc-parameters.md b/product/en/docs-mogdb/v5.1/reference-guide/guc-parameters/reference-guide-guc-parameters.md index 63df4196ff32fc6d326cd721bf4704a9d1f7e759..4ee2945c3f3c8e61840493a7bdd6f5f590e38a32 100644 --- a/product/en/docs-mogdb/v5.1/reference-guide/guc-parameters/reference-guide-guc-parameters.md +++ b/product/en/docs-mogdb/v5.1/reference-guide/guc-parameters/reference-guide-guc-parameters.md @@ -43,7 +43,6 @@ date: 2023-04-07 - **[Scheduled Task](scheduled-task.md)** - **[Thread Pool](thread-pool.md)** - **[Backup and Restoration](backup-and-restoration-parameter.md)** -- **[Undo](undo.md)** - **[Backup and Restoration](DCF-parameters-settings.md)** - **[Flashback](flashback.md)** - **[Rollback Parameters](rollback-parameters.md)** diff --git a/product/en/docs-mogdb/v5.1/reference-guide/guc-parameters/rollback-parameters.md b/product/en/docs-mogdb/v5.1/reference-guide/guc-parameters/rollback-parameters.md index 5e94421bd68a25b34262da79709dcccc19920cb5..978c16307fb1c89b90fe6cd49ec1e8411ef7de55 100644 --- a/product/en/docs-mogdb/v5.1/reference-guide/guc-parameters/rollback-parameters.md +++ b/product/en/docs-mogdb/v5.1/reference-guide/guc-parameters/rollback-parameters.md @@ -16,3 +16,23 @@ This parameter is a SIGHUP parameter. Set it based on instructions provided in T **Value range:** an integer ranging from 1 to 100 **Default value**: **5** + +## undo_space_limit_size + +**Parameter description**: Specifies the threshold for forcibly recycling undo space. When the undo space usage reaches 80% of the threshold, forcible recycling starts. You can set this parameter to a large value based on service requirements and then set it to a proper value based on the actual undo space usage. + +This parameter is a POSTMASTER parameter. Set it based on instructions provided in Table 1 [GUC parameters](appendix.md). + +**Value range**: an integer ranging from 800 MB to 32 TB + +**Default value**: **256 GB** + +## undo_limit_size_per_transaction + +**Parameter description**: Specifies the undo space threshold of a single transaction. If the threshold is reached, the transaction is rolled back due to an error. + +This parameter is a POSTMASTER parameter. Set it based on instructions provided in Table 1 [GUC parameters](appendix.md). + +**Value range**: an integer ranging from 100 MB to 32 TB + +**Default value**: **32 GB** diff --git a/product/en/docs-mogdb/v5.1/reference-guide/guc-parameters/undo.md b/product/en/docs-mogdb/v5.1/reference-guide/guc-parameters/undo.md deleted file mode 100644 index fd1e7726796d0da68c44eba107fb203c02b71eef..0000000000000000000000000000000000000000 --- a/product/en/docs-mogdb/v5.1/reference-guide/guc-parameters/undo.md +++ /dev/null @@ -1,28 +0,0 @@ ---- -title: Undo -summary: Undo -author: Zhang Cuiping -date: 2021-11-08 ---- - -# Undo - -## undo_space_limit_size - -**Parameter description**: Specifies the threshold for forcibly recycling undo space. When the undo space usage reaches 80% of the threshold, forcible recycling starts. You can set this parameter to a large value based on service requirements and then set it to a proper value based on the actual undo space usage. - -This parameter is a POSTMASTER parameter. Set it based on instructions provided in Table 1 [GUC parameters](appendix.md). - -**Value range**: an integer ranging from 800 MB to 32 TB - -**Default value**: **256 GB** - -## undo_limit_size_per_transaction - -**Parameter description**: Specifies the undo space threshold of a single transaction. If the threshold is reached, the transaction is rolled back due to an error. - -This parameter is a POSTMASTER parameter. Set it based on instructions provided in Table 1 [GUC parameters](appendix.md). - -**Value range**: an integer ranging from 100 MB to 32 TB - -**Default value**: **32 GB** \ No newline at end of file diff --git a/product/en/docs-mogdb/v5.1/reference-guide/sql-syntax/CLUSTER.md b/product/en/docs-mogdb/v5.1/reference-guide/sql-syntax/CLUSTER.md index 2c6104b8703d569d6238cf0124a5c9e4d3dbbdd5..8b1b10314a13a251c6828ccdba7167ebd64f1955 100644 --- a/product/en/docs-mogdb/v5.1/reference-guide/sql-syntax/CLUSTER.md +++ b/product/en/docs-mogdb/v5.1/reference-guide/sql-syntax/CLUSTER.md @@ -119,10 +119,4 @@ MogDB=# DROP INDEX tpcds.ds_inventory_p1_index1; -- Delete the partitioned table. MogDB=# DROP TABLE tpcds.inventory_p1; -``` - -## Suggestions - -- cluster - - It is recommended that you run **ANALYZE** on a newly clustered table. Otherwise, the optimizer might make poor choices of query plans. - - **CLUSTER** cannot be executed in transactions. +``` \ No newline at end of file diff --git a/product/en/docs-mogdb/v5.1/reference-guide/sql-syntax/CREATE-INDEX.md b/product/en/docs-mogdb/v5.1/reference-guide/sql-syntax/CREATE-INDEX.md index 1bfb4ee42520cb4af3a84bce7678287f23bf9199..970746bfd9684de9f6321c108f77018d4e0c3aae 100644 --- a/product/en/docs-mogdb/v5.1/reference-guide/sql-syntax/CREATE-INDEX.md +++ b/product/en/docs-mogdb/v5.1/reference-guide/sql-syntax/CREATE-INDEX.md @@ -424,26 +424,4 @@ CREATE INDEX ## Helpful Links -[ALTER INDEX](ALTER-INDEX.md),[DROP INDEX](DROP-INDEX.md) - -## Suggestions - -- create index - - You are advised to create indexes on: - - - Columns that are often queried - - Join conditions. For a query on joined columns, you are advised to create a composite index on the columns, For example, for **select \* from t1 join t2 on t1.a=t2.a and t1.b=t2.b**, you can create a composite index on columns **a** and **b** in table **t1**. - - Columns having filter criteria (especially scope criteria) of a **where** clause - - Columns that appear after **order by**, **group by**, and **distinct** - - Constraints: - - - Partial indexes cannot be created in a partitioned table. - - When a GLOBAL index is created on a partitioned table, the following constraints apply: - - Expression indexes and partial indexes are not supported. - - Row-store tables are not supported. - - Only B-tree indexes are supported. - - In the same attribute column, the LOCAL index and GLOBAL index of a partition cannot coexist. - - GLOBAL index supports a maximum of 31 columns. - - If the **ALTER** statement does not contain **UPDATE GLOBAL INDEX**, the original GLOBAL index is invalid. In this case, other indexes are used for query. If the ALTER statement contains UPDATE GLOBAL INDEX, the original GLOBAL index is still valid and the index function is correct. +[ALTER INDEX](ALTER-INDEX.md),[DROP INDEX](DROP-INDEX.md) \ No newline at end of file diff --git a/product/en/docs-mogdb/v5.1/reference-guide/sql-syntax/CREATE-PROCEDURE.md b/product/en/docs-mogdb/v5.1/reference-guide/sql-syntax/CREATE-PROCEDURE.md index de7fd65b9d687f2a97ab03ca3d34d7c4f6a21211..0aca913c2483ed822cc76fc960994f334904da23 100644 --- a/product/en/docs-mogdb/v5.1/reference-guide/sql-syntax/CREATE-PROCEDURE.md +++ b/product/en/docs-mogdb/v5.1/reference-guide/sql-syntax/CREATE-PROCEDURE.md @@ -118,10 +118,4 @@ plsql_body ## Helpful Links -[DROP PROCEDURE](DROP-PROCEDURE.md) - -## Suggestions - -- analyse | analyze - - Do not run **ANALYZE** in a transaction or anonymous block. - - Do not run **ANALYZE** in a function or stored procedure. +[DROP PROCEDURE](DROP-PROCEDURE.md) \ No newline at end of file diff --git a/product/en/docs-mogdb/v5.1/reference-guide/sql-syntax/CREATE-TABLE.md b/product/en/docs-mogdb/v5.1/reference-guide/sql-syntax/CREATE-TABLE.md index 50bfc499f5fbdbf810eb81eebed071859bc657c0..74125b35abe78cab006e96c1b9efcebc40f291e3 100644 --- a/product/en/docs-mogdb/v5.1/reference-guide/sql-syntax/CREATE-TABLE.md +++ b/product/en/docs-mogdb/v5.1/reference-guide/sql-syntax/CREATE-TABLE.md @@ -1066,34 +1066,4 @@ MogDB=# DROP SCHEMA IF EXISTS joe CASCADE; ## Helpful Links -[ALTER TABLE](ALTER-TABLE.md), [DROP TABLE](DROP-TABLE.md), and [CREATE TABLESPACE](CREATE-TABLESPACE.md) - -## Suggestions - -- UNLOGGED - - The unlogged table and its indexes do not use the WAL log mechanism during data writing. Their write speed is much higher than that of ordinary tables. Therefore, they can be used for storing intermediate result sets of complex queries to improve query performance. - - The unlogged table has no primary/standby mechanism. In case of system faults or abnormal breakpoints, data loss may occur. Therefore, the unlogged table cannot be used to store basic data. -- TEMPORARY | TEMP - - A temporary table is automatically dropped at the end of a session. -- LIKE - - The new table automatically inherits all column names, data types, and not-null constraints from this table. The new table is irrelevant to the original table after the creation. -- LIKE INCLUDING DEFAULTS - - The default expressions are copied from the original table to the new table only if **INCLUDING DEFAULTS** is specified. The default behavior is to exclude default expressions, resulting in the copied columns in the new table having default values null. -- LIKE INCLUDING CONSTRAINTS - - The **CHECK** constraints are copied from the original table to the new table only when **INCLUDING CONSTRAINTS** is specified. Other types of constraints are never copied to the new table. Not-null constraints are always copied to the new table. These rules also apply to column constraints and table constraints. -- LIKE INCLUDING INDEXES - - Any indexes on the original table will not be created on the new table, unless the **INCLUDING INDEXES** clause is specified. -- LIKE INCLUDING STORAGE - - **STORAGE** settings for the copied column definitions are copied only if **INCLUDING STORAGE** is specified. The default behavior is to exclude **STORAGE** settings. -- LIKE INCLUDING COMMENTS - - If **INCLUDING COMMENTS** is specified, comments for the copied columns, constraints, and indexes are copied. The default behavior is to exclude comments. -- LIKE INCLUDING PARTITION - - If **INCLUDING PARTITION** is specified, the partition definitions of the source table are copied to the new table, and the new table no longer uses the **PARTITION BY** clause. The default behavior is to exclude partition definition of the original table. -- LIKE INCLUDING RELOPTIONS - - If **INCLUDING RELOPTIONS** is specified, the new table will copy the storage parameter (that is, **WITH** clause) of the source table. The default behavior is to exclude partition definition of the storage parameter of the original table. -- LIKE INCLUDING ALL - - **INCLUDING ALL** contains the meaning of **INCLUDING DEFAULTS**, **INCLUDING CONSTRAINTS**, **INCLUDING INDEXES**, **INCLUDING STORAGE**, **INCLUDING COMMENTS**, **INCLUDING PARTITION**, and **INCLUDING RELOPTIONS**. -- ORIENTATION ROW - - Creates a row-store table. Row-store applies to the OLTP service, which has many interactive transactions. An interaction involves many columns in the table. Using row-store can improve the efficiency. -- ORIENTATION COLUMN - - Creates a column-store table. Column-store applies to the DWS, which has a large amount of aggregation computing, and involves a few column operations. +[ALTER TABLE](ALTER-TABLE.md), [DROP TABLE](DROP-TABLE.md), and [CREATE TABLESPACE](CREATE-TABLESPACE.md) \ No newline at end of file diff --git a/product/en/docs-mogdb/v5.1/reference-guide/sql-syntax/CREATE-TABLESPACE.md b/product/en/docs-mogdb/v5.1/reference-guide/sql-syntax/CREATE-TABLESPACE.md index 825219928b61dac4abf45658343fbdd5b6acc1d3..ae6bb5ff88c86d8041726682de6132d7116ed62f 100644 --- a/product/en/docs-mogdb/v5.1/reference-guide/sql-syntax/CREATE-TABLESPACE.md +++ b/product/en/docs-mogdb/v5.1/reference-guide/sql-syntax/CREATE-TABLESPACE.md @@ -127,10 +127,4 @@ MogDB=# DROP ROLE jay; ## Helpful Links -[CREATE DATABASE](CREATE-DATABASE.md),[CREATE TABLE](CREATE-TABLE.md),[CREATE INDEX](CREATE-INDEX.md),[DROP TABLESPACE](DROP-TABLESPACE.md),[ALTER TABLESPACE](ALTER-TABLESPACE.md) - -## Suggestions - -- create tablespace - - You are not advised to create tablespaces in a transaction. +[CREATE DATABASE](CREATE-DATABASE.md),[CREATE TABLE](CREATE-TABLE.md),[CREATE INDEX](CREATE-INDEX.md),[DROP TABLESPACE](DROP-TABLESPACE.md),[ALTER TABLESPACE](ALTER-TABLESPACE.md) \ No newline at end of file diff --git a/product/en/docs-mogdb/v5.1/reference-guide/sql-syntax/DELETE.md b/product/en/docs-mogdb/v5.1/reference-guide/sql-syntax/DELETE.md index 7ec87258dc7fe10b730f3982e530897f62561c98..5286b7c9317d44bc6cc734c40ef45dfe05bf809f 100644 --- a/product/en/docs-mogdb/v5.1/reference-guide/sql-syntax/DELETE.md +++ b/product/en/docs-mogdb/v5.1/reference-guide/sql-syntax/DELETE.md @@ -162,10 +162,4 @@ MogDB=# DELETE FROM tpcds.customer_address_bak; Delete the tpcds.customer_address_bak table. MogDB=# DROP TABLE tpcds.customer_address_bak; -``` - -## Suggestions - -- delete - - To delete all records in a table, use the **truncate** syntax. +``` \ No newline at end of file diff --git a/product/en/docs-mogdb/v5.1/reference-guide/sql-syntax/DROP-DATABASE.md b/product/en/docs-mogdb/v5.1/reference-guide/sql-syntax/DROP-DATABASE.md index 8e21dd5af92384391725c5a866827043998cd79b..b8214b2cac2e3373201a5eadc1710e838c92311f 100644 --- a/product/en/docs-mogdb/v5.1/reference-guide/sql-syntax/DROP-DATABASE.md +++ b/product/en/docs-mogdb/v5.1/reference-guide/sql-syntax/DROP-DATABASE.md @@ -45,10 +45,4 @@ See **Examples** in **CREATE DATABASE**. ## Helpful Links -[CREATE DATABASE](CREATE-DATABASE.md) - -## Suggestions - -- drop database - - Do not delete databases during transactions. +[CREATE DATABASE](CREATE-DATABASE.md) \ No newline at end of file diff --git a/product/en/docs-mogdb/v5.1/reference-guide/sql-syntax/DROP-TABLESPACE.md b/product/en/docs-mogdb/v5.1/reference-guide/sql-syntax/DROP-TABLESPACE.md index 8b3689c2f0db317cb754e749bee2507004ec4081..4e8991a7096a5bf165d07333b38bf0b0bd2df098 100644 --- a/product/en/docs-mogdb/v5.1/reference-guide/sql-syntax/DROP-TABLESPACE.md +++ b/product/en/docs-mogdb/v5.1/reference-guide/sql-syntax/DROP-TABLESPACE.md @@ -43,10 +43,4 @@ See **Examples** in [CREATE TABLESPACE](CREATE-TABLESPACE.md). ## Helpful Links -[ALTER TABLESPACE](ALTER-TABLESPACE.md) and [CREATE TABLESPACE](CREATE-TABLESPACE.md) - -## Suggestions - -- drop database - - Do not delete databases during transactions. +[ALTER TABLESPACE](ALTER-TABLESPACE.md) and [CREATE TABLESPACE](CREATE-TABLESPACE.md) \ No newline at end of file diff --git a/product/en/docs-mogdb/v5.1/reference-guide/sql-syntax/INSERT.md b/product/en/docs-mogdb/v5.1/reference-guide/sql-syntax/INSERT.md index eeb52cd5dcf01a09195c2330c1aae87cbacafe75..311a8468a97563a5c3d70d676120a38eed45652d 100644 --- a/product/en/docs-mogdb/v5.1/reference-guide/sql-syntax/INSERT.md +++ b/product/en/docs-mogdb/v5.1/reference-guide/sql-syntax/INSERT.md @@ -177,10 +177,4 @@ MogDB=# INSERT INTO tpcds.reason_t2 VALUES (5, 'BBBBBBBBCAAAAAAA','reason5'),(6, -- Delete the tpcds.reason_t2. MogDB=# DROP TABLE tpcds.reason_t2; -``` - -## Suggestions - -- VALUES - - When you run the **INSERT** statement to insert data in batches, you are advised to combine multiple records into one statement to improve data loading performance. Example: **INSERT INTO sections VALUES (30, 'Administration', 31, 1900),(40, 'Development', 35, 2000), (50, 'Development' , 60 , 2001);** +``` \ No newline at end of file diff --git a/product/en/docs-mogdb/v5.1/reference-guide/sql-syntax/REINDEX.md b/product/en/docs-mogdb/v5.1/reference-guide/sql-syntax/REINDEX.md index a18e81bcc47cf175dda223277ed44edaba91f6de..f2aa6515e9d101b46b914976e4d26226d87c0d6f 100644 --- a/product/en/docs-mogdb/v5.1/reference-guide/sql-syntax/REINDEX.md +++ b/product/en/docs-mogdb/v5.1/reference-guide/sql-syntax/REINDEX.md @@ -158,18 +158,4 @@ MogDB=# REINDEX TABLE CONCURRENTLY tpcds.customer_t1; -- Delete the tpcds.customer_t1 table. MogDB=# DROP TABLE tpcds.customer_t1; -``` - -## Suggestions - -- INTERNAL TABLE - - This scenario is used for fault recovery. You are not advised to perform concurrent operations. - -- DATABASE - - You can not reindex a database in a transaction. - -- SYSTEM - - You can not reindex system catalogs in transactions. +``` \ No newline at end of file diff --git a/product/en/docs-mogdb/v5.1/reference-guide/sql-syntax/SELECT-INTO.md b/product/en/docs-mogdb/v5.1/reference-guide/sql-syntax/SELECT-INTO.md index 221087147b9e07fe6ccf40917faa0c393791fceb..a4cecafcc0cf70d3dea0f2029cc3e219aefc3e66 100644 --- a/product/en/docs-mogdb/v5.1/reference-guide/sql-syntax/SELECT-INTO.md +++ b/product/en/docs-mogdb/v5.1/reference-guide/sql-syntax/SELECT-INTO.md @@ -84,14 +84,4 @@ MogDB=# DROP TABLE tpcds.reason_t1; ## Helpful Links -[SELECT](SELECT.md) - -## Suggestions - -- **DATABASE** - - You are not advised to reindex a database in a transaction. - -- **SYSTEM** - - You are not advised to reindex system catalogs in transactions. +[SELECT](SELECT.md) \ No newline at end of file diff --git a/product/en/docs-mogdb/v5.1/reference-guide/sql-syntax/VACUUM.md b/product/en/docs-mogdb/v5.1/reference-guide/sql-syntax/VACUUM.md index ee20c4227262f07d6b19d7dc105efb5570503220..48b886108bd1c9d4f1701811416b20e3ffa98d8b 100644 --- a/product/en/docs-mogdb/v5.1/reference-guide/sql-syntax/VACUUM.md +++ b/product/en/docs-mogdb/v5.1/reference-guide/sql-syntax/VACUUM.md @@ -117,12 +117,4 @@ MogDB=# VACUUM (VERBOSE, ANALYZE) tpcds.reason; -- Drop an index. MogDB=# DROP INDEX ds_reason_index1 CASCADE; MogDB=# DROP TABLE tpcds.reason; -``` - -## Suggestions - -- vacuum - - **VACUUM** cannot be executed inside a transaction block. - - It is recommended that active production databases be vacuumed frequently (at least nightly), in order to remove dead rows. It is strongly recommended that you run **VACUUM ANALYZE** after adding or deleting a large number of records. - - **FULL** is recommended only in special scenarios. For example, you wish to physically narrow the table to decrease the occupied disk space after deleting most rows of a table. - - Before performing the VACUUM FULL operation, you are advised to delete all indexes in related tables, run **VACUUM FULL**, and then re-create the index. +``` \ No newline at end of file diff --git a/product/en/docs-mogdb/v5.1/toc.md b/product/en/docs-mogdb/v5.1/toc.md index fa93e130c43abbbd53e520c15062e2402da37096..d8c7cee054a4d388a0746bcbd60242a2551c6c93 100644 --- a/product/en/docs-mogdb/v5.1/toc.md +++ b/product/en/docs-mogdb/v5.1/toc.md @@ -1419,7 +1419,6 @@ + [Thread Pool](./reference-guide/guc-parameters/thread-pool.md) + [User-defined Functions](./reference-guide/guc-parameters/guc-user-defined-functions.md) + [Backup and Restoration](./reference-guide/guc-parameters/backup-and-restoration-parameter.md) - + [Undo](./reference-guide/guc-parameters/undo.md) + [DCF Parameters Settings](./reference-guide/guc-parameters/DCF-parameters-settings.md) + [Flashback](./reference-guide/guc-parameters/flashback.md) + [Rollback Parameters](./reference-guide/guc-parameters/rollback-parameters.md) diff --git a/product/en/docs-mogdb/v5.1/toc_parameters-and-tools.md b/product/en/docs-mogdb/v5.1/toc_parameters-and-tools.md index e570f2ec37174add0b63e0ec8eb87b8e885abf27..c5f76a7f7f14c42463a14848a553fb3af61bd506 100644 --- a/product/en/docs-mogdb/v5.1/toc_parameters-and-tools.md +++ b/product/en/docs-mogdb/v5.1/toc_parameters-and-tools.md @@ -79,7 +79,6 @@ + [Thread Pool](./reference-guide/guc-parameters/thread-pool.md) + [User-defined Functions](./reference-guide/guc-parameters/guc-user-defined-functions.md) + [Backup and Restoration](./reference-guide/guc-parameters/backup-and-restoration-parameter.md) - + [Undo](./reference-guide/guc-parameters/undo.md) + [DCF Parameters Settings](./reference-guide/guc-parameters/DCF-parameters-settings.md) + [Flashback](./reference-guide/guc-parameters/flashback.md) + [Rollback Parameters](./reference-guide/guc-parameters/rollback-parameters.md) diff --git a/product/zh/docs-mogdb/v1.1/reference-guide/functions-and-operators/14-sequence-functions.md b/product/zh/docs-mogdb/v1.1/reference-guide/functions-and-operators/14-sequence-functions.md index dcf4de1268702528ef56e61a27ce50948872c590..73cc6ad04e4828df75221eb1de2b26c7e8031398 100644 --- a/product/zh/docs-mogdb/v1.1/reference-guide/functions-and-operators/14-sequence-functions.md +++ b/product/zh/docs-mogdb/v1.1/reference-guide/functions-and-operators/14-sequence-functions.md @@ -124,4 +124,4 @@ date: 2021-04-20 > 因为序列是非事务的,setval造成的改变不会由于事务的回滚而撤销。 > > ![img](https://cdn-mogdb.enmotech.com/docs-media/icon/icon-notice.gif) **须知:** - > nextval函数只能在主机上执行,备机不支持执行此函数。 + > setval函数只能在主机上执行,备机不支持执行此函数。 diff --git a/product/zh/docs-mogdb/v2.0/reference-guide/functions-and-operators/14-sequence-functions.md b/product/zh/docs-mogdb/v2.0/reference-guide/functions-and-operators/14-sequence-functions.md index dcf4de1268702528ef56e61a27ce50948872c590..73cc6ad04e4828df75221eb1de2b26c7e8031398 100644 --- a/product/zh/docs-mogdb/v2.0/reference-guide/functions-and-operators/14-sequence-functions.md +++ b/product/zh/docs-mogdb/v2.0/reference-guide/functions-and-operators/14-sequence-functions.md @@ -124,4 +124,4 @@ date: 2021-04-20 > 因为序列是非事务的,setval造成的改变不会由于事务的回滚而撤销。 > > ![img](https://cdn-mogdb.enmotech.com/docs-media/icon/icon-notice.gif) **须知:** - > nextval函数只能在主机上执行,备机不支持执行此函数。 + > setval函数只能在主机上执行,备机不支持执行此函数。 diff --git a/product/zh/docs-mogdb/v2.1/reference-guide/functions-and-operators/14-sequence-functions.md b/product/zh/docs-mogdb/v2.1/reference-guide/functions-and-operators/14-sequence-functions.md index 8939a10822bb9a66e9f6795adbb20f5022570289..0eae16d1b4c56048c78d60997df68dc27cf3adfb 100644 --- a/product/zh/docs-mogdb/v2.1/reference-guide/functions-and-operators/14-sequence-functions.md +++ b/product/zh/docs-mogdb/v2.1/reference-guide/functions-and-operators/14-sequence-functions.md @@ -124,4 +124,4 @@ date: 2021-04-20 > 因为序列是非事务的,setval造成的改变不会由于事务的回滚而撤销。 > > ![img](https://cdn-mogdb.enmotech.com/docs-media/icon/icon-notice.gif) **须知**: - > nextval函数只能在主机上执行,备机不支持执行此函数。 + > setval函数只能在主机上执行,备机不支持执行此函数。 diff --git a/product/zh/docs-mogdb/v3.0/reference-guide/functions-and-operators/14-sequence-functions.md b/product/zh/docs-mogdb/v3.0/reference-guide/functions-and-operators/14-sequence-functions.md index 1c4e40a54a4fcf2389aef680652d0f68b49b2f0e..e763d13abda7998bba68860b7783204da1aac278 100644 --- a/product/zh/docs-mogdb/v3.0/reference-guide/functions-and-operators/14-sequence-functions.md +++ b/product/zh/docs-mogdb/v3.0/reference-guide/functions-and-operators/14-sequence-functions.md @@ -124,7 +124,7 @@ date: 2021-04-20 > 因为序列是非事务的,setval造成的改变不会由于事务的回滚而撤销。 > > ![img](https://cdn-mogdb.enmotech.com/docs-media/icon/icon-notice.gif) **须知**: - > nextval函数只能在主机上执行,备机不支持执行此函数。 + > setval函数只能在主机上执行,备机不支持执行此函数。 - pg_sequence_last_value(sequence_oid oid, OUT cache_value int16, OUT last_value int16) diff --git a/product/zh/docs-mogdb/v3.0/reference-guide/functions-and-operators/24-system-management-functions/8-logical-replication-functions.md b/product/zh/docs-mogdb/v3.0/reference-guide/functions-and-operators/24-system-management-functions/8-logical-replication-functions.md index 955b329e52c2d27ca9375f3bbce702a773d1a590..965c50e05c600a61dec244f61ddc43270965dba8 100644 --- a/product/zh/docs-mogdb/v3.0/reference-guide/functions-and-operators/24-system-management-functions/8-logical-replication-functions.md +++ b/product/zh/docs-mogdb/v3.0/reference-guide/functions-and-operators/24-system-management-functions/8-logical-replication-functions.md @@ -163,7 +163,7 @@ date: 2021-04-20 - pg_logical_slot_peek_binary_changes('slot_name', 'LSN', upto_nchanges, 'options_name', 'options_value') - 描述:以二进制格解码且不推进流复制槽(下次解码可以再次获取本次解出的数据)。 + 描述:以二进制格式解码且不推进流复制槽(下次解码可以再次获取本次解出的数据)。 参数说明: diff --git a/product/zh/docs-mogdb/v3.0/reference-guide/guc-parameters/35-undo.md b/product/zh/docs-mogdb/v3.0/reference-guide/guc-parameters/35-undo.md deleted file mode 100644 index 59e4371ec1aada4b382edacdfe3d2d43f9cd4ee3..0000000000000000000000000000000000000000 --- a/product/zh/docs-mogdb/v3.0/reference-guide/guc-parameters/35-undo.md +++ /dev/null @@ -1,28 +0,0 @@ ---- -title: Undo -summary: Undo -author: Zhang Cuiping -date: 2021-11-08 ---- - -# Undo - -## undo_space_limit_size - -**参数说明**: 用于控制undo强制回收阈值,达到阈值的80%启动强制回收,用户需要根据自己的业务情况,设置该值,可以通过先设置一个较大值,然后观察实际业务运行占用undo空间,再将该值调整为合理值。 - -该参数属于POSTMASTER类型参数,请参考表[GUC参数分类](30-appendix.md)中对应设置方法进行设置。 - -**取值范围**: 整型,800M~16TB - -**默认值**: 256GB - -## undo_limit_size_per_transaction - -**参数说明**: 用于控制单事务undo分配空间阈值,达到阈值时事务报错回滚。 - -该参数属于POSTMASTER类型参数,请参考表[GUC参数分类](30-appendix.md)中对应设置方法进行设置。 - -**取值范围**: 整型,2M~16TB - -**默认值**: 32GB diff --git a/product/zh/docs-mogdb/v3.0/reference-guide/guc-parameters/38-rollback-parameters.md b/product/zh/docs-mogdb/v3.0/reference-guide/guc-parameters/38-rollback-parameters.md index 2d98d8cf2aec82eb06d39e5e231b83227a9f8542..9b263f1cc7d1735f1c3b9ae59c38018d1024444c 100644 --- a/product/zh/docs-mogdb/v3.0/reference-guide/guc-parameters/38-rollback-parameters.md +++ b/product/zh/docs-mogdb/v3.0/reference-guide/guc-parameters/38-rollback-parameters.md @@ -16,3 +16,23 @@ date: 2021-11-08 **取值范围**: 整型,1~100 **默认值**: 5 + +## undo_space_limit_size + +**参数说明**: 用于控制undo强制回收阈值,达到阈值的80%启动强制回收,用户需要根据自己的业务情况,设置该值,可以通过先设置一个较大值,然后观察实际业务运行占用undo空间,再将该值调整为合理值。 + +该参数属于POSTMASTER类型参数,请参考表[GUC参数分类](30-appendix.md)中对应设置方法进行设置。 + +**取值范围**: 整型,800M~16TB + +**默认值**: 256GB + +## undo_limit_size_per_transaction + +**参数说明**: 用于控制单事务undo分配空间阈值,达到阈值时事务报错回滚。 + +该参数属于POSTMASTER类型参数,请参考表[GUC参数分类](30-appendix.md)中对应设置方法进行设置。 + +**取值范围**: 整型,2M~16TB + +**默认值**: 32GB diff --git a/product/zh/docs-mogdb/v3.0/reference-guide/guc-parameters/7-ha-replication/1-sending-server.md b/product/zh/docs-mogdb/v3.0/reference-guide/guc-parameters/7-ha-replication/1-sending-server.md index 97cee4172e23a482c95aa793204b384b7b85b3da..80780153df0dc01645d7b8cc4a8435e2f9c575ac 100644 --- a/product/zh/docs-mogdb/v3.0/reference-guide/guc-parameters/7-ha-replication/1-sending-server.md +++ b/product/zh/docs-mogdb/v3.0/reference-guide/guc-parameters/7-ha-replication/1-sending-server.md @@ -68,7 +68,7 @@ date: 2021-04-20 **设置建议**: -当使用双机复制、逻辑解码时,该参数值建议设为:当前物理流复制槽数+所需的逻辑复制槽数。如果实际设置值比上述建议值要小,那么可能造成这些功能不可用或异常。 +当使用主备复制、逻辑解码时,该参数值建议设为:当前物理流复制槽数+所需的逻辑复制槽数。如果实际设置值比上述建议值要小,那么可能造成这些功能不可用或异常。 - 物理流复制槽提供了一种自动化的方法来确保主节点在所有备节点或从备节点收到xlog之前,xlog不会被移除。也就是说物理流复制槽用于支撑主备HA。数据库所需要的物理流复制槽数为备节点加从备的和与主节点之间的比例。例如,假设数据库高可用方案为1主、1备、1从备,则所需物理流复制槽数为2。假设数据库的高可用方案为1主3备,则所需物理流复制槽数为3。 - 目前默认不支持主备从部署方式。 @@ -148,8 +148,22 @@ date: 2021-04-20 **参数说明**: 设置本端节点所在区域信息。 -该参数属于POSTMASTER类型参数,请参考表[GUC参数分类](../../../reference-guide/guc-parameters/30-appendix.md)中对应设置方法进行设置。 +该参数属于POSTMASTER类型参数,请参考表[GUC参数分类](../30-appendix.md)中对应设置方法进行设置。 **取值范围**: 字符串。其中空字符串表示没有配置节点信息。 **默认值**: 空字符串 + +## pgxc_node_name + +**参数说明**: 指定节点名称。 + +该参数属于POSTMASTER类型参数,请参考表[GUC参数分类](../30-appendix.md)中对应设置方法进行设置。 + +在备机请求主机进行日志复制时,如果application_name参数没有设置,那么该参数会被用来作为备机在主机上的流复制槽名字。该流复制槽的命名方式为 “该参数值\_备机ip\_备机port”。其中,备机ip和备机port取自replconninfo参数中指定的备机ip和端口号。该流复制槽最大长度为61个字符,如果拼接后的字符串超过该长度,则会使用截断后的pgxc_node_name进行拼接,以保证流复制槽名字长度小于等于61个字符。 + +> ![img](https://cdn-mogdb.enmotech.com/docs-media/icon/icon-note.gif) **注意:** 此参数修改后会导致连接数据库实例失败,不建议进行修改。 + +**取值范围**: 字符串 + +**默认值**: 当前节点名称 diff --git a/product/zh/docs-mogdb/v3.0/reference-guide/guc-parameters/7-ha-replication/2-primary-server.md b/product/zh/docs-mogdb/v3.0/reference-guide/guc-parameters/7-ha-replication/2-primary-server.md index 8bce8d5c4d55a97a29b3fcdc762083ea0b2c0fdf..a16e0fc75064e2cd9edc00db783102bde8798301 100644 --- a/product/zh/docs-mogdb/v3.0/reference-guide/guc-parameters/7-ha-replication/2-primary-server.md +++ b/product/zh/docs-mogdb/v3.0/reference-guide/guc-parameters/7-ha-replication/2-primary-server.md @@ -246,3 +246,17 @@ date: 2021-04-20 > - 发送端主动向接收端同步配置文件、接收端请求发送端同步配置文件是两个独立的事件,均会使得配置文件同步。若不希望配置文件同步,则需要将集群中所有节点的sync_config_strategy参数配置为none_node;若仅希望主机与同步备机同步配置文件,则需要将主机的sync_config_strategy参数配置为only_sync_node,其余节点配置为none_node;若希望所有节点同步配置文件,则需要将所有节点的sync_config_strategy参数配置为all_node。目前暂不支持自定义指定任意节点间的同步策略。 > - 配置参数同步的具体表现为,发送端发送配置文件,对接收端配置文件中的对应参数直接覆盖。若设置了配置文件需要同步的策略,则修改接收端配置参数后,发送端会立刻覆盖接收端的配置参数,使得接收端修改不生效。 > - 即使设置了配置文件需要同步的策略,仍有部分配置参数不会被同步。它们是:“application_name”、 “archive_command”、 “audit_directory”、 “available_zone”、 “comm_control_port”、 “comm_sctp_port”、 “listen_addresses”、 “log_directory”、 “port”、 “replconninfo1”、 “replconninfo2”、 “replconninfo3”、 “replconninfo4”、 “replconninfo5”、 “replconninfo6”、 “replconninfo7”、 “replconninfo8”、 “ssl”、 “ssl_ca_file”、 “ssl_cert_file”、 “ssl_ciphers”、 “ssl_crl_file”、 “ssl_key_file”、 “ssl_renegotiation_limit”、 “ssl_cert_notify_time”、 “synchronous_standby_names”、 “local_bind_address”、 “perf_directory”、 “query_log_directory”、 “asp_log_directory”、 “streaming_router_port”、 “enable_upsert_to_merge”、 “archive_dest”、 “recovery_min_apply_delay”、 “sync_config_strategy”。 + +## pgxc_node_name + +**参数说明**: 指定节点名称。 + +该参数属于POSTMASTER类型参数,请参考表[GUC参数分类](../30-appendix.md)中对应设置方法进行设置。 + +在备机请求主机进行日志复制时,如果application_name参数没有设置,那么该参数会被用来作为备机在主机上的流复制槽名字。该流复制槽的命名方式为 “该参数值\_备机ip\_备机port”。其中,备机ip和备机port取自replconninfo参数中指定的备机ip和端口号。该流复制槽最大长度为61个字符,如果拼接后的字符串超过该长度,则会使用截断后的pgxc_node_name进行拼接,以保证流复制槽名字长度小于等于61个字符。 + +> ![img](https://cdn-mogdb.enmotech.com/docs-media/icon/icon-note.gif) **注意:** 此参数修改后会导致连接数据库实例失败,不建议进行修改。 + +**取值范围**: 字符串 + +**默认值**: 当前节点名称 diff --git a/product/zh/docs-mogdb/v3.0/reference-guide/guc-parameters/7-ha-replication/3-standby-server.md b/product/zh/docs-mogdb/v3.0/reference-guide/guc-parameters/7-ha-replication/3-standby-server.md index 5b51b65d616d8eaf110f70e1a82a2fffa8748a00..c1583d945b8a324c326ceff1dadf5146fcbd65e3 100644 --- a/product/zh/docs-mogdb/v3.0/reference-guide/guc-parameters/7-ha-replication/3-standby-server.md +++ b/product/zh/docs-mogdb/v3.0/reference-guide/guc-parameters/7-ha-replication/3-standby-server.md @@ -146,3 +146,17 @@ date: 2021-04-20 **取值范围**: 整型,0~262143 **默认值**: 4 + +## pgxc_node_name + +**参数说明**: 指定节点名称。 + +该参数属于POSTMASTER类型参数,请参考表[GUC参数分类](../30-appendix.md)中对应设置方法进行设置。 + +在备机请求主机进行日志复制时,如果application_name参数没有设置,那么该参数会被用来作为备机在主机上的流复制槽名字。该流复制槽的命名方式为 “该参数值\_备机ip\_备机port”。其中,备机ip和备机port取自replconninfo参数中指定的备机ip和端口号。该流复制槽最大长度为61个字符,如果拼接后的字符串超过该长度,则会使用截断后的pgxc_node_name进行拼接,以保证流复制槽名字长度小于等于61个字符。 + +> ![img](https://cdn-mogdb.enmotech.com/docs-media/icon/icon-note.gif) **注意:** 此参数修改后会导致连接数据库实例失败,不建议进行修改。 + +**取值范围**: 字符串 + +**默认值**: 当前节点名称 diff --git a/product/zh/docs-mogdb/v3.0/reference-guide/guc-parameters/guc-parameter-list.md b/product/zh/docs-mogdb/v3.0/reference-guide/guc-parameters/guc-parameter-list.md index a51df2c9d2275c7950ad4ad7000173f52ca9bf95..ee768c203fb8c76bb7d67a3a740564d48203859a 100644 --- a/product/zh/docs-mogdb/v3.0/reference-guide/guc-parameters/guc-parameter-list.md +++ b/product/zh/docs-mogdb/v3.0/reference-guide/guc-parameters/guc-parameter-list.md @@ -648,9 +648,9 @@ date: 2022-05-26 | [udf_memory_limit](33-user-defined-functions.md#udf_memory_limit) | | [UDFWorkerMemHardLimit](33-user-defined-functions.md#udfworkermemhardlimit) | | [uncontrolled_memory_context](../../reference-guide/guc-parameters/4-resource-consumption/1-memory.md#uncontrolled_memory_context) | -| [undo_limit_size_per_transaction](35-undo.md#undo_limit_size_per_transaction) | +| [undo_limit_size_per_transaction](38-rollback-parameters.md#undo_limit_size_per_transaction) | | [undo_retention_time](37-flashback.md#undo_retention_time) | -| [undo_space_limit_size](35-undo.md#undo_space_limit_size) | +| [undo_space_limit_size](38-rollback-parameters.md#undo_space_limit_size) | | [undo_zone_count](39-reserved-parameters.md) | | [unix_socket_directory](../../reference-guide/guc-parameters/3-connection-and-authentication/1-connection-settings.md#unix_socket_directory) | | [unix_socket_group](../../reference-guide/guc-parameters/3-connection-and-authentication/1-connection-settings.md#unix_socket_group) | diff --git a/product/zh/docs-mogdb/v3.0/reference-guide/sql-syntax/CLUSTER.md b/product/zh/docs-mogdb/v3.0/reference-guide/sql-syntax/CLUSTER.md index 97070fc1a9aeb2451401cc4030274220964592e6..1de8130bee12a407e733432c51fd3e4c3f64fcc6 100644 --- a/product/zh/docs-mogdb/v3.0/reference-guide/sql-syntax/CLUSTER.md +++ b/product/zh/docs-mogdb/v3.0/reference-guide/sql-syntax/CLUSTER.md @@ -119,10 +119,4 @@ MogDB=# DROP INDEX ds_inventory_p1_index1; --删除分区表。 MogDB=# DROP TABLE inventory_p1; -``` - -## 优化建议 - -- cluster - - 建议在新近聚簇的表上运行ANALYZE。否则,优化器可能会选择很差劲的查询规划。 - - 不允许在事务中执行CLUSTER。 +``` \ No newline at end of file diff --git a/product/zh/docs-mogdb/v3.0/reference-guide/sql-syntax/CREATE-DATABASE.md b/product/zh/docs-mogdb/v3.0/reference-guide/sql-syntax/CREATE-DATABASE.md index d8ac84c620b0caf96288eda6d8ddf81f66eac8e7..c50827949dd6ac703fb74b51db98fbd1105ea8d2 100644 --- a/product/zh/docs-mogdb/v3.0/reference-guide/sql-syntax/CREATE-DATABASE.md +++ b/product/zh/docs-mogdb/v3.0/reference-guide/sql-syntax/CREATE-DATABASE.md @@ -223,14 +223,4 @@ MogDB=# DROP DATABASE ora_compatible_db; ## 相关链接 -[ALTER DATABASE](ALTER-DATABASE.md),[DROP DATABASE](DROP-DATABASE.md) - -## 优化建议 - -- **create database** - - 事务中不支持创建database。 - -- **ENCODING LC_COLLATE LC_CTYPE** - - 当新建数据库Encoding、LC-Collate 或LC_Ctype与模板数据库(SQL_ASCII)不匹配(为'GBK' /'UTF8'/'LATIN1')时,必须指定template [=] template0。 +[ALTER DATABASE](ALTER-DATABASE.md),[DROP DATABASE](DROP-DATABASE.md) \ No newline at end of file diff --git a/product/zh/docs-mogdb/v3.0/reference-guide/sql-syntax/CREATE-INDEX.md b/product/zh/docs-mogdb/v3.0/reference-guide/sql-syntax/CREATE-INDEX.md index dd9e184a9993a4e28098fc0c9d8ec22f12482f4e..d33cac7817f79f10e7f1911f56074a8b50d269be 100644 --- a/product/zh/docs-mogdb/v3.0/reference-guide/sql-syntax/CREATE-INDEX.md +++ b/product/zh/docs-mogdb/v3.0/reference-guide/sql-syntax/CREATE-INDEX.md @@ -523,26 +523,4 @@ Time: 11146.399 ms ## 相关链接 -[ALTER INDEX](ALTER-INDEX.md),[DROP INDEX](DROP-INDEX.md) - -## 优化建议 - -### create index - -建议仅在匹配如下条件之一时创建索引: - -- 经常执行查询的字段。 -- 在连接条件上创建索引,对于存在多字段连接的查询,建议在这些字段上建立组合索引。例如,select * from t1 join t2 on t1.a=t2.a and t1.b=t2.b,可以在t1表上的a,b字段上建立组合索引。 -- where子句的过滤条件字段上(尤其是范围条件)。 -- 在经常出现在order by、group by和distinct后的字段。 - -约束限制: - -- 分区表上不支持创建部分索引。 -- 分区表创建GLOBAL索引时,存在以下约束条件: - - 不支持表达式索引、部分索引 - - 不支持列存表 - - 仅支持B-tree索引 -- 在相同属性列上,分区LOCAL索引与GLOBAL索引不能共存。 -- GLOBAL索引,最大支持31列。 -- 如果alter语句不带有UPDATE GLOBAL INDEX,那么原有的GLOBAL索引将失效,查询时将使用其他索引进行查询;如果alter语句带有UPDATE GLOBAL INDEX,原有的GLOBAL索引仍然有效,并且索引功能正确。 +[ALTER INDEX](ALTER-INDEX.md),[DROP INDEX](DROP-INDEX.md) \ No newline at end of file diff --git a/product/zh/docs-mogdb/v3.0/reference-guide/sql-syntax/CREATE-PROCEDURE.md b/product/zh/docs-mogdb/v3.0/reference-guide/sql-syntax/CREATE-PROCEDURE.md index 27678e9109746db6ae6719be2d0e0d2dd9899ce9..8e0f678ad14167333c031d723d70639388393223 100644 --- a/product/zh/docs-mogdb/v3.0/reference-guide/sql-syntax/CREATE-PROCEDURE.md +++ b/product/zh/docs-mogdb/v3.0/reference-guide/sql-syntax/CREATE-PROCEDURE.md @@ -110,10 +110,4 @@ plsql_body ## 相关链接 -[DROP PROCEDURE](DROP-PROCEDURE.md) - -## 优化建议 - -- analyse | analyze - - 不支持在事务或匿名块中执行analyze 。 - - 不支持在函数或存储过程中执行analyze操作。 +[DROP PROCEDURE](DROP-PROCEDURE.md) \ No newline at end of file diff --git a/product/zh/docs-mogdb/v3.0/reference-guide/sql-syntax/CREATE-TABLE.md b/product/zh/docs-mogdb/v3.0/reference-guide/sql-syntax/CREATE-TABLE.md index 97fce6a461f7a14e4af4a5c13363ee0c0ee6fff8..c4ace611ab8a29a934e0cec6c6fdcce3ef01b0e0 100644 --- a/product/zh/docs-mogdb/v3.0/reference-guide/sql-syntax/CREATE-TABLE.md +++ b/product/zh/docs-mogdb/v3.0/reference-guide/sql-syntax/CREATE-TABLE.md @@ -1063,61 +1063,4 @@ MogDB=# DROP SCHEMA IF EXISTS joe CASCADE; ## 相关链接 -[ALTER TABLE](ALTER-TABLE.md), [DROP TABLE](DROP-TABLE.md), [CREATE TABLESPACE](CREATE-TABLESPACE.md) - -## 优化建议 - -- UNLOGGED - - - UNLOGGED表和表上的索引因为数据写入时不通过WAL日志机制,写入速度远高于普通表。因此,可以用于缓冲存储复杂查询的中间结果集,增强复杂查询的性能。 - - UNLOGGED表无主备机制,在系统故障或异常断点等情况下,会有数据丢失风险,因此,不可用来存储基础数据。 - -- TEMPORARY | TEMP - -- 临时表只在当前会话可见,会话结束后会自动删除。 - -- LIKE - -- 新表自动从这个表中继承所有字段名及其数据类型和非空约束,新表与源表之间在创建动作完毕之后是完全无关的。 - -- LIKE INCLUDING DEFAULTS - -- 源表上的字段缺省表达式只有在指定INCLUDING DEFAULTS时,才会复制到新表中。缺省是包含缺省表达式的,即新表中的所有字段的缺省值,如果在原表中是表达式,则新表中也是表达式。 - -- LIKE INCLUDING CONSTRAINTS - -- 源表上的CHECK约束仅在指定INCLUDING CONSTRAINTS时,会复制到新表中,而其他类型的约束永远不会复制到新表中。非空约束总是复制到新表中。此规则同时适用于表约束和列约束。 - -- LIKE INCLUDING INDEXES - -- 如果指定了INCLUDING INDEXES,则源表上的索引也将在新表上创建,默认不建立索引。 - -- LIKE INCLUDING STORAGE - -- 如果指定了INCLUDING STORAGE,则复制列的STORAGE设置会复制到新表中,默认情况下不包含STORAGE设置。 - -- LIKE INCLUDING COMMENTS - -- 如果指定了INCLUDING COMMENTS,则源表列、约束和索引的注释会复制到新表中。默认情况下,不复制源表的注释。 - -- LIKE INCLUDING PARTITION - - - 如果指定了INCLUDING PARTITION,则源表的分区定义会复制到新表中,同时新表将不能再使用PARTITION BY子句。默认情况下,不拷贝源表的分区定义。 - - > ![img](https://cdn-mogdb.enmotech.com/docs-media/icon/icon-notice.gif) **须知:** 列表/哈希分区表暂不支持LIKE INCLUDING PARTITION。 - -- LIKE INCLUDING RELOPTIONS - -- 如果指定了INCLUDING RELOPTIONS,则源表的存储参数(即源表的WITH子句)会复制到新表中。默认情况下,不复制源表的存储参数。 - -- LIKE INCLUDING ALL - -- INCLUDING ALL包含了INCLUDING DEFAULTS、INCLUDING CONSTRAINTS、INCLUDING INDEXES、INCLUDING STORAGE、INCLUDING COMMENTS、INCLUDING PARTITION、INCLUDING RELOPTIONS的内容。 - -- ORIENTATION ROW - -- 创建行存表,行存储适合于OLTP业务,此类型的表上交互事务比较多,一次交互会涉及表中的多个列,用行存查询效率较高。 - -- ORIENTATION COLUMN - - - 创建列存表,列存储适合于数据仓库业务,此类型的表上会做大量的汇聚计算,且涉及的列操作较少。 +[ALTER TABLE](ALTER-TABLE.md), [DROP TABLE](DROP-TABLE.md), [CREATE TABLESPACE](CREATE-TABLESPACE.md) \ No newline at end of file diff --git a/product/zh/docs-mogdb/v3.0/reference-guide/sql-syntax/CREATE-TABLESPACE.md b/product/zh/docs-mogdb/v3.0/reference-guide/sql-syntax/CREATE-TABLESPACE.md index 7a1fdd03154d4a90f352df83c745b156447e1737..3c975069a4ed13b59c38d04f8ca4cc360b80791c 100644 --- a/product/zh/docs-mogdb/v3.0/reference-guide/sql-syntax/CREATE-TABLESPACE.md +++ b/product/zh/docs-mogdb/v3.0/reference-guide/sql-syntax/CREATE-TABLESPACE.md @@ -127,10 +127,4 @@ MogDB=# DROP ROLE jay; ## 相关链接 -[CREATE DATABASE](CREATE-DATABASE.md),[CREATE TABLE](CREATE-TABLE.md),[CREATE INDEX](CREATE-INDEX.md),[DROP TABLESPACE](DROP-TABLESPACE.md),[ALTER TABLESPACE](ALTER-TABLESPACE.md) - -## 优化建议 - -- create tablespace - - 不建议在事务内部创建表空间。 +[CREATE DATABASE](CREATE-DATABASE.md),[CREATE TABLE](CREATE-TABLE.md),[CREATE INDEX](CREATE-INDEX.md),[DROP TABLESPACE](DROP-TABLESPACE.md),[ALTER TABLESPACE](ALTER-TABLESPACE.md) \ No newline at end of file diff --git a/product/zh/docs-mogdb/v3.0/reference-guide/sql-syntax/DELETE.md b/product/zh/docs-mogdb/v3.0/reference-guide/sql-syntax/DELETE.md index ea78c88b506a0ffc2003ea8cee14a1f9575fccc3..ce6e9bb66033926acea5ef58a1b401af42d94257 100644 --- a/product/zh/docs-mogdb/v3.0/reference-guide/sql-syntax/DELETE.md +++ b/product/zh/docs-mogdb/v3.0/reference-guide/sql-syntax/DELETE.md @@ -113,10 +113,4 @@ MogDB=# DELETE FROM customer_address_bak; --删除customer_address_bak表。 MogDB=# DROP TABLE customer_address_bak; -``` - -## 优化建议 - -- delete - - 如果要删除表中的所有记录,建议使用truncate语法。 +``` \ No newline at end of file diff --git a/product/zh/docs-mogdb/v3.0/reference-guide/sql-syntax/DROP-DATABASE.md b/product/zh/docs-mogdb/v3.0/reference-guide/sql-syntax/DROP-DATABASE.md index 4794cc76c750eae0168ab5854c8046adabb1da9b..04b92ddcf961a6b659b3484802d1841b41275620 100644 --- a/product/zh/docs-mogdb/v3.0/reference-guide/sql-syntax/DROP-DATABASE.md +++ b/product/zh/docs-mogdb/v3.0/reference-guide/sql-syntax/DROP-DATABASE.md @@ -45,10 +45,4 @@ DropDatabase ::= DROP DATABASE [ IF EXISTS ] database_name ; ## 相关链接 -[CREATE DATABASE](CREATE-DATABASE.md) - -## 优化建议 - -- drop database - - 不支持在事务中删除database。 +[CREATE DATABASE](CREATE-DATABASE.md) \ No newline at end of file diff --git a/product/zh/docs-mogdb/v3.0/reference-guide/sql-syntax/DROP-TABLESPACE.md b/product/zh/docs-mogdb/v3.0/reference-guide/sql-syntax/DROP-TABLESPACE.md index 1338806702aebfde7f2387862ebd11c4557f2911..0cb051d1e0e8d4298ad11e55e5a6a80607264fde 100644 --- a/product/zh/docs-mogdb/v3.0/reference-guide/sql-syntax/DROP-TABLESPACE.md +++ b/product/zh/docs-mogdb/v3.0/reference-guide/sql-syntax/DROP-TABLESPACE.md @@ -43,10 +43,4 @@ DropTablespace ::= DROP TABLESPACE [ IF EXISTS ] tablespace_name; ## 相关链接 -[ALTER TABLESPACE](ALTER-TABLESPACE.md), [CREATE TABLESPACE](CREATE-TABLESPACE.md) - -## 优化建议 - -- drop database - - 不支持在事务中删除database。 +[ALTER TABLESPACE](ALTER-TABLESPACE.md), [CREATE TABLESPACE](CREATE-TABLESPACE.md) \ No newline at end of file diff --git a/product/zh/docs-mogdb/v3.0/reference-guide/sql-syntax/INSERT.md b/product/zh/docs-mogdb/v3.0/reference-guide/sql-syntax/INSERT.md index 385c4ae2dcf930328fe43396977e2cc902a3871b..dba877bc01c101eb52ad184df8bd685559a73e41 100644 --- a/product/zh/docs-mogdb/v3.0/reference-guide/sql-syntax/INSERT.md +++ b/product/zh/docs-mogdb/v3.0/reference-guide/sql-syntax/INSERT.md @@ -183,10 +183,4 @@ MogDB=# INSERT INTO reason_t2 VALUES (5, 'BBBBBBBBCAAAAAAA','reason5'),(6, 'AAAA --删除表reason_t2。 MogDB=# DROP TABLE reason_t2; -``` - -## 优化建议 - -- VALUES - - 通过insert语句批量插入数据时,建议将多条记录合并入一条语句中执行插入,以提高数据加载性能。例如,INSERT INTO sections VALUES (30, 'Administration', 31, 1900),(40, 'Development', 35, 2000), (50, 'Development' , 60 , 2001); +``` \ No newline at end of file diff --git a/product/zh/docs-mogdb/v3.0/reference-guide/sql-syntax/REINDEX.md b/product/zh/docs-mogdb/v3.0/reference-guide/sql-syntax/REINDEX.md index 737f02043ca5a30bd927afbc4888fa0596940654..bde3938bd90befcce446a066a8eedf15e37f8fdf 100644 --- a/product/zh/docs-mogdb/v3.0/reference-guide/sql-syntax/REINDEX.md +++ b/product/zh/docs-mogdb/v3.0/reference-guide/sql-syntax/REINDEX.md @@ -151,18 +151,4 @@ MogDB=# REINDEX TABLE CONCURRENTLY customer_t1; --删除customer_t1表。 MogDB=# DROP TABLE customer_t1; -``` - -## 优化建议 - -- INTERNAL TABLE - - 此种情况大多用于故障恢复,不建议进行并发操作。 - -- DATABASE - - 不能在事务中reindex database。 - -- SYSTEM - - 不能在事务中reindex系统表。 +``` \ No newline at end of file diff --git a/product/zh/docs-mogdb/v3.0/reference-guide/sql-syntax/SELECT-INTO.md b/product/zh/docs-mogdb/v3.0/reference-guide/sql-syntax/SELECT-INTO.md index 9f3ff932c0f36a026577e3318721aa16587d3f05..399cdf69429ba8dfd3545338ecb7a55dfeb67311 100644 --- a/product/zh/docs-mogdb/v3.0/reference-guide/sql-syntax/SELECT-INTO.md +++ b/product/zh/docs-mogdb/v3.0/reference-guide/sql-syntax/SELECT-INTO.md @@ -87,14 +87,4 @@ MogDB=# DROP TABLE reason_t1; ## 相关链接 -[SELECT](SELECT.md) - -## 优化建议 - -- **DATABASE** - - 不建议在事务中reindex database。 - -- **SYSTEM** - - 不建议在事务中reindex系统表。 +[SELECT](SELECT.md) \ No newline at end of file diff --git a/product/zh/docs-mogdb/v3.0/reference-guide/sql-syntax/VACUUM.md b/product/zh/docs-mogdb/v3.0/reference-guide/sql-syntax/VACUUM.md index 7f8c396892faf729758b296488f5a0ce513a7ed7..086285454783f85c264426915065e4cd5079e37d 100644 --- a/product/zh/docs-mogdb/v3.0/reference-guide/sql-syntax/VACUUM.md +++ b/product/zh/docs-mogdb/v3.0/reference-guide/sql-syntax/VACUUM.md @@ -112,11 +112,3 @@ MogDB=# VACUUM (VERBOSE, ANALYZE) reason; MogDB=# DROP INDEX ds_reason_index1 CASCADE; MogDB=# DROP TABLE reason; ``` - -## 优化建议 - -- vacuum - - VACUUM不能在事务块内执行。 - - 建议生产数据库经常清理(至少每晚一次),以保证不断地删除失效的行。尤其是在增删了大量记录后,对相关表执行VACUUM ANALYZE命令。 - - 不建议日常使用FULL选项,但是可以在特殊情况下使用。例如,一个例子就是在用户删除了一个表的大部分行之后,希望从物理上缩小该表以减少磁盘空间占用。 - - 执行VACUUM FULL操作时,建议首先删除相关表上的所有索引,再运行VACUUM FULL命令,最后重建索引。 diff --git a/product/zh/docs-mogdb/v3.0/toc.md b/product/zh/docs-mogdb/v3.0/toc.md index 8d5baefc97c3bb9cba03319ac9b7dadbeb5bb05d..b0f75490f1f5167d7fea6c5e0aca27f4960f934f 100644 --- a/product/zh/docs-mogdb/v3.0/toc.md +++ b/product/zh/docs-mogdb/v3.0/toc.md @@ -1105,7 +1105,7 @@ + [检查点](/reference-guide/guc-parameters/6-write-ahead-log/2-checkpoints.md) + [日志回放](/reference-guide/guc-parameters/6-write-ahead-log/3-log-replay.md) + [归档](/reference-guide/guc-parameters/6-write-ahead-log/4-archiving.md) - + 双机复制 + + 主备复制 + [发送端服务器](/reference-guide/guc-parameters/7-ha-replication/1-sending-server.md) + [主服务器](/reference-guide/guc-parameters/7-ha-replication/2-primary-server.md) + [备服务器](/reference-guide/guc-parameters/7-ha-replication/3-standby-server.md) @@ -1159,7 +1159,6 @@ + [线程池](/reference-guide/guc-parameters/32-thread-pool.md) + [用户自定义函数](/reference-guide/guc-parameters/33-user-defined-functions.md) + [备份恢复](/reference-guide/guc-parameters/34-backup-and-restoration.md) - + [Undo](/reference-guide/guc-parameters/35-undo.md) + [DCF参数设置](/reference-guide/guc-parameters/36-DCF-parameters-settings.md) + [闪回相关参数](/reference-guide/guc-parameters/37-flashback.md) + [回滚相关参数](/reference-guide/guc-parameters/38-rollback-parameters.md) diff --git a/product/zh/docs-mogdb/v3.0/toc_parameters-and-tools.md b/product/zh/docs-mogdb/v3.0/toc_parameters-and-tools.md index 767188d936e54071fa99a89febaee629443b0421..904be3650314d340a6408463d2420431e7316ded 100644 --- a/product/zh/docs-mogdb/v3.0/toc_parameters-and-tools.md +++ b/product/zh/docs-mogdb/v3.0/toc_parameters-and-tools.md @@ -25,7 +25,7 @@ + [检查点](./reference-guide/guc-parameters/6-write-ahead-log/2-checkpoints.md) + [日志回放](./reference-guide/guc-parameters/6-write-ahead-log/3-log-replay.md) + [归档](./reference-guide/guc-parameters/6-write-ahead-log/4-archiving.md) - + 双机复制 + + 主备复制 + [发送端服务器](./reference-guide/guc-parameters/7-ha-replication/1-sending-server.md) + [主服务器](./reference-guide/guc-parameters/7-ha-replication/2-primary-server.md) + [备服务器](./reference-guide/guc-parameters/7-ha-replication/3-standby-server.md) @@ -79,7 +79,6 @@ + [线程池](./reference-guide/guc-parameters/32-thread-pool.md) + [用户自定义函数](./reference-guide/guc-parameters/33-user-defined-functions.md) + [备份恢复](./reference-guide/guc-parameters/34-backup-and-restoration.md) - + [Undo](./reference-guide/guc-parameters/35-undo.md) + [DCF参数设置](./reference-guide/guc-parameters/36-DCF-parameters-settings.md) + [闪回相关参数](./reference-guide/guc-parameters/37-flashback.md) + [回滚相关参数](./reference-guide/guc-parameters/38-rollback-parameters.md) diff --git a/product/zh/docs-mogdb/v3.1/reference-guide/functions-and-operators/14-sequence-functions.md b/product/zh/docs-mogdb/v3.1/reference-guide/functions-and-operators/14-sequence-functions.md index 0f7b3d29f17e304c4803e93c37b306033f952936..e7eb9770ba6ac607bfffcfab7e40c79fc6f1bfc1 100644 --- a/product/zh/docs-mogdb/v3.1/reference-guide/functions-and-operators/14-sequence-functions.md +++ b/product/zh/docs-mogdb/v3.1/reference-guide/functions-and-operators/14-sequence-functions.md @@ -124,7 +124,7 @@ date: 2021-04-20 > 因为序列是非事务的,setval造成的改变不会由于事务的回滚而撤销。 > > ![img](https://cdn-mogdb.enmotech.com/docs-media/icon/icon-notice.gif) **须知**: - > nextval函数只能在主机上执行,备机不支持执行此函数。 + > setval函数只能在主机上执行,备机不支持执行此函数。 - pg_sequence_last_value(sequence_oid oid, OUT cache_value int16, OUT last_value int16) diff --git a/product/zh/docs-mogdb/v3.1/reference-guide/functions-and-operators/24-system-management-functions/8-logical-replication-functions.md b/product/zh/docs-mogdb/v3.1/reference-guide/functions-and-operators/24-system-management-functions/8-logical-replication-functions.md index bf81a38cff5bd2f46fa0bcaf3c2e8a16c6d4792c..fff08b3f99d55aa3a278054bca52e79aa613e2f4 100644 --- a/product/zh/docs-mogdb/v3.1/reference-guide/functions-and-operators/24-system-management-functions/8-logical-replication-functions.md +++ b/product/zh/docs-mogdb/v3.1/reference-guide/functions-and-operators/24-system-management-functions/8-logical-replication-functions.md @@ -163,7 +163,7 @@ date: 2021-04-20 - pg_logical_slot_peek_binary_changes('slot_name', 'LSN', upto_nchanges, 'options_name', 'options_value') - 描述:以二进制格解码且不推进流复制槽(下次解码可以再次获取本次解出的数据)。 + 描述:以二进制格式解码且不推进流复制槽(下次解码可以再次获取本次解出的数据)。 参数说明: diff --git a/product/zh/docs-mogdb/v5.0/about-mogdb/mogdb-new-feature/5.0.4.md b/product/zh/docs-mogdb/v5.0/about-mogdb/mogdb-new-feature/5.0.4.md index fe1c64ec5ff0d752a1a0d03e3ff0cd7c1c16f3f4..f3eff920a7718b60ea6d446aa24a983f1f639e9a 100644 --- a/product/zh/docs-mogdb/v5.0/about-mogdb/mogdb-new-feature/5.0.4.md +++ b/product/zh/docs-mogdb/v5.0/about-mogdb/mogdb-new-feature/5.0.4.md @@ -15,7 +15,7 @@ MogDB 5.0.4是MogDB 5.0.0的补丁版本,于2023年11月30日发布,其在Mo ## 2. 新增特性 -1. 支持了pivot和unpivot语法 +1. [支持了pivot和unpivot语法](../../characteristic-description/compatibility/pivot-and-unpivot.md) 2. A兼容模式支持使用like模糊匹配条件进行btree索引扫描 diff --git a/product/zh/docs-mogdb/v5.0/administrator-guide/routine-maintenance/8-routinely-maintaining-tables.md b/product/zh/docs-mogdb/v5.0/administrator-guide/routine-maintenance/8-routinely-maintaining-tables.md index 79fbb0368fad381b46179becb9dbec24f9081a7e..579d6e12f3439a66f2c561d003841d49ed951a67 100644 --- a/product/zh/docs-mogdb/v5.0/administrator-guide/routine-maintenance/8-routinely-maintaining-tables.md +++ b/product/zh/docs-mogdb/v5.0/administrator-guide/routine-maintenance/8-routinely-maintaining-tables.md @@ -88,7 +88,7 @@ date: 2021-03-04 VACUUM ``` - > ![img](https://cdn-mogdb.enmotech.com/docs-media/icon/icon-note.gif) **说明:** VACUUM和ANALYZE会导致I/O流量的大幅增加,这可能会影响其他活动会话的性能。因此,建议通过"vacuum_cost_delay"参数设置《开发者指南》中"GUC参数说明 > 资源消耗 > 基于开销的清理延迟"。 + > ![img](https://cdn-mogdb.enmotech.com/docs-media/icon/icon-note.gif) **说明:** VACUUM和ANALYZE会导致I/O流量的大幅增加,这可能会影响其他活动会话的性能。因此,建议通过"[vacuum_cost_delay](../../reference-guide/guc-parameters/resource-consumption/cost-based-vacuum-delay.md#vacuum_cost_delay)"参数设置。 3. 删除表。 @@ -109,3 +109,443 @@ date: 2021-03-04 - 定期对部分大表做VACUUM FULL,在性能下降后为全库做VACUUM FULL,目前暂定每月做一次VACUUM FULL。 - 定期对系统表做VACUUM FULL,主要是PG_ATTRIBUTE。 - 启用系统自动清理线程(AUTOVACUUM)自动执行VACUUM和ANALYZE,回收被标识为删除状态的记录空间,并更新表的统计数据。 + +
+ +## MogDB空闲空间回收机制简介 + +### VACUUM的作用 + +#### 空闲空间回收 + +由于MogDB的MVCC机制,表中会同时存放一行记录的多个历史版本,对于经常更新的表来说,会造成表空间的膨胀。为了解决这个问题,引入了空闲空间回收机制,并提供三种不同力度的空闲空间回收方式,用于不同场景下的空闲空间回收。根据触发时机和清理方式的不同,空闲空间回收分为三类: + +- 轻量级:轻量级空间回收在访问数据页时顺带清理页面中的过期元组,不清理索引,磁盘上的物理空间不会回收 +- 中量级:中量级空间回收有两种触发场景,一是后台线程自动发起的autovacuum,另一种是用户手动执行的VACUUM操作,会对索引和数据页面进行清理,特殊场景下会回收磁盘上的物理空间 +- 重量级:重量级空间回收主要由VACUUM FULL操作触发,会对指定的表进行彻底重建,回收磁盘上的物理空间 + +#### 更新统计信息 + +中量级的空间回收会更新系统的统计信息,使planner能够计算出更准确的执行计划。 + +#### 更新vm + +在MogDB中,通过visibility map来标记数据页面的可见性,被vm标记的数据页面中没有过期元组,下一次VACUUM时会跳过该页面。此外,在进行索引扫描时,会首先检查页面的vm标记,以判断是否可进行indexonlyscan。 + +### VACUUM的分类 + +#### 轻量级 + +当查询扫描到某个数据页面时,会顺带清理页面中的过期元组。由于是顺带清理页面内容,因此只会删除过期元组本身,在页面内释放过期元组占用的空间,行指针则不做处理,避免在索引侧造成空指针或空引用。一个特殊情况是HOT场景,HOT场景是指对于表上的所有的索引,更新前后的索引键值均没有发生变化,因此对于更新后的元组只需要在数据页面中插入一条新记录,而不需要插入一条新的索引记录,通过HOT链来维护数据元组的新老版本。在轻量级空间回收时,只保留第一个版本的行指针,并将其重定向到第一个需要保留的元组版本的行指针。 + +![img](https://cdn-mogdb.enmotech.com/docs-media/mogdb/administrator-guide/routinely-maintaining-tables-1.png) + +#### 中量级 + +MogDB提供VACUUM语句来让用户主动执行对某个astore表及其表上的索引进行空间回收,在astore中,新老版本的数据混合存储,进行VACUUM时会会首先对数据页面进行顺序扫描,判断哪些元组需要被清理,对于需要被清理的元组,会首先清理其对应的索引,然后再清理数据页面中的元组,从而避免索侧的空指针/空引用问题。 + +除了用户手动执行VACUUM操作外,MogDB还提供了自动的空闲空间回收功能,通过autovacuum周期性对表中的过期元组进行清理。与手动的VACUUM不同的是,autovacuum清理表和表的toast表是分开处理的,而手动vacuum是连续处理(该差异在MogDB 3.0.8最新补丁版本提供参数handle_toast_in_autovac供用户选择)。此外,autovacuum会被DDL操作中断,而手动的VACUUM操作则会阻塞DDL操作。 + +![img](https://cdn-mogdb.enmotech.com/docs-media/mogdb/administrator-guide/routinely-maintaining-tables-2.png) + +#### 重量级 + +轻量级和中量级的空间回收都无法彻底释放磁盘上的物理空间,只能将数据页内的过期元组回收,释放其占用的空间,但是这些空间只能被当前表复用,无法将磁盘空间归还给操作系统。因此,MogDB提供了重量级的空闲空间回收VACUUM FULL操作。VACUUM FULL操作会将一个表中所有未过期元组从原数据页面中读取出来,然后重新紧密地插入到新的数据文件中,对于有索引的表,会在新的数据文件上重建索引,以彻底回收表中过期元组占用的空间。重量级空间回收操作的主体流程中只允许执行查询操作,而在提交流程,只读查询也会被阻塞。 + +![img](https://cdn-mogdb.enmotech.com/docs-media/mogdb/administrator-guide/routinely-maintaining-tables-3.png) + +### 示例及说明 + +#### 自动空闲空间回收autovacuum + +```sql +-- 1. update后等待连续的两次autovacuum +MogDB=# create table tb(id int, name text); +CREATE TABLE +MogDB=# insert into tb values(0, 'asdf'); +INSERT 0 1 +MogDB=# update tb set id = 1 ; +UPDATE 1 +MogDB=# select relname, n_tup_ins, n_tup_del, n_live_tup, n_dead_tup, last_autovacuum, autovacuum_count from pg_stat_user_tables where relname = 'tb'; + relname | n_tup_ins | n_tup_del | n_live_tup | n_dead_tup | last_autovacuum | autovacuum_count +---------+-----------+-----------+------------+------------+-----------------+------------------ + tb | 1 | 0 | 1 | 1 | | 0 +(1 row) + +MogDB=# select lp, t_xmin, t_xmax, t_infomask2, t_infomask, t_ctid from heap_page_items(get_raw_page('tb', 0)); + lp | t_xmin | t_xmax | t_infomask2 | t_infomask | t_ctid +----+--------+--------+-------------+------------+-------- + 1 | 17095 | 17096 | 16386 | 258 | (0,2) + 2 | 17096 | 0 | 32770 | 10242 | (0,2) +(2 rows) + +MogDB=# select relname, n_tup_ins, n_tup_del, n_live_tup, n_dead_tup, last_autovacuum, autovacuum_count from pg_stat_user_tables where relname = 'tb'; + relname | n_tup_ins | n_tup_del | n_live_tup | n_dead_tup | last_autovacuum | autovacuum_count +---------+-----------+-----------+------------+------------+-------------------------------+------------------ + tb | 1 | 0 | 1 | 1 | 2023-12-24 15:36:23.018133+08 | 1 +(1 row) + +MogDB=# select relname, n_tup_ins, n_tup_del, n_live_tup, n_dead_tup, last_autovacuum, autovacuum_count from pg_stat_user_tables where relname = 'tb'; + relname | n_tup_ins | n_tup_del | n_live_tup | n_dead_tup | last_autovacuum | autovacuum_count +---------+-----------+-----------+------------+------------+-------------------------------+------------------ + tb | 1 | 0 | 1 | 0 | 2023-12-24 15:37:23.079814+08 | 2 +(1 row) + + +-- 2. update后等待一次autovacuum,然后insert一条记录,查看xid是否被推进 +MogDB=# create table tb(id int, name text); +CREATE TABLE +MogDB=# insert into tb values(0, 'asdf'); +INSERT 0 1 +MogDB=# update tb set id = 1 ; +UPDATE 1 +MogDB=# select relname, n_tup_ins, n_tup_del, n_live_tup, n_dead_tup, last_autovacuum, autovacuum_count from pg_stat_user_tables where relname = 'tb'; + relname | n_tup_ins | n_tup_del | n_live_tup | n_dead_tup | last_autovacuum | autovacuum_count +---------+-----------+-----------+------------+------------+-----------------+------------------ + tb | 1 | 0 | 1 | 1 | | 0 +(1 row) + +MogDB=# select lp, t_xmin, t_xmax, t_infomask2, t_infomask, t_ctid from heap_page_items(get_raw_page('tb', 0)); + lp | t_xmin | t_xmax | t_infomask2 | t_infomask | t_ctid +----+--------+--------+-------------+------------+-------- + 1 | 17088 | 17089 | 16386 | 258 | (0,2) + 2 | 17089 | 0 | 32770 | 10242 | (0,2) +(2 rows) + +MogDB=# select lp, t_xmin, t_xmax, t_infomask2, t_infomask, t_ctid from heap_page_items(get_raw_page('tb', 0)); + lp | t_xmin | t_xmax | t_infomask2 | t_infomask | t_ctid +----+--------+--------+-------------+------------+-------- + 1 | 17088 | 17089 | 16386 | 1282 | (0,2) + 2 | 17089 | 0 | 32770 | 10498 | (0,2) +(2 rows) + +MogDB=# select relname, n_tup_ins, n_tup_del, n_live_tup, n_dead_tup, last_autovacuum, autovacuum_count from pg_stat_user_tables where relname = 'tb'; + relname | n_tup_ins | n_tup_del | n_live_tup | n_dead_tup | last_autovacuum | autovacuum_count +---------+-----------+-----------+------------+------------+-------------------------------+------------------ + tb | 1 | 0 | 1 | 1 | 2023-12-24 15:33:22.873957+08 | 1 +(1 row) + +MogDB=# insert into tb values(0, 'asdf'); +INSERT 0 1 +MogDB=# select lp, t_xmin, t_xmax, t_infomask2, t_infomask, t_ctid from heap_page_items(get_raw_page('tb', 0)); + lp | t_xmin | t_xmax | t_infomask2 | t_infomask | t_ctid +----+--------+--------+-------------+------------+-------- + 1 | 17088 | 17089 | 16386 | 1282 | (0,2) + 2 | 17089 | 0 | 32770 | 10498 | (0,2) + 3 | 17091 | 0 | 2 | 2050 | (0,3) +(3 rows) + +MogDB=# select relname, n_tup_ins, n_tup_del, n_live_tup, n_dead_tup, last_autovacuum, autovacuum_count from pg_stat_user_tables where relname = 'tb'; + relname | n_tup_ins | n_tup_del | n_live_tup | n_dead_tup | last_autovacuum | autovacuum_count +---------+-----------+-----------+------------+------------+-------------------------------+------------------ + tb | 2 | 0 | 2 | 0 | 2023-12-24 15:34:22.897349+08 | 2 +(1 row) + +MogDB=# select lp, t_xmin, t_xmax, t_infomask2, t_infomask, t_ctid from heap_page_items(get_raw_page('tb', 0)); + lp | t_xmin | t_xmax | t_infomask2 | t_infomask | t_ctid +----+--------+--------+-------------+------------+-------- + 1 | | | | | + 2 | 17089 | 0 | 32770 | 10498 | (0,2) + 3 | 17091 | 0 | 2 | 2306 | (0,3) +(3 rows) +``` + +- 从第一个示例可以看到,update后,第二次对表执行autovacuum,表中的过期元组将被清理掉 + +- 在第二个示例中,第一次insert的xid是17088,update的xid是17089,等待一次autovacuum之后再次进行insert的xid是17091,也就是autovacuum将xid从17089推进到了17090 + +#### 手动空闲空间回收VACUUM + +```sql +-- 1. update后直接vacuum +MogDB=# create table tb(id int, name text); +CREATE TABLE +MogDB=# insert into tb values(0, 'asdf'); +INSERT 0 1 +MogDB=# select lp, t_xmin, t_xmax, t_infomask2, t_infomask, t_ctid from heap_page_items(get_raw_page('tb', 0)); + lp | t_xmin | t_xmax | t_infomask2 | t_infomask | t_ctid +----+--------+--------+-------------+------------+-------- + 1 | 16702 | 0 | 2 | 2050 | (0,1) +(1 row) +MogDB=# select relname, n_tup_ins, n_tup_del, n_live_tup, n_dead_tup, last_autovacuum, autovacuum_count from pg_stat_user_tables where relname = 'tb'; + relname | n_tup_ins | n_tup_del | n_live_tup | n_dead_tup | last_autovacuum | autovacuum_count +---------+-----------+-----------+------------+------------+-----------------+------------------ + tb | 1 | 0 | 1 | 0 | | 0 +(1 row) + +MogDB=# update tb set id = 1; +UPDATE 1 +MogDB=# select relname, n_tup_ins, n_tup_del, n_live_tup, n_dead_tup, last_autovacuum, autovacuum_count from pg_stat_user_tables where relname = 'tb'; + relname | n_tup_ins | n_tup_del | n_live_tup | n_dead_tup | last_autovacuum | autovacuum_count +---------+-----------+-----------+------------+------------+-----------------+------------------ + tb | 1 | 0 | 1 | 1 | | 0 +(1 row) +MogDB=# select lp, t_xmin, t_xmax, t_infomask2, t_infomask, t_ctid from heap_page_items(get_raw_page('tb', 0)); + lp | t_xmin | t_xmax | t_infomask2 | t_infomask | t_ctid +----+--------+--------+-------------+------------+-------- + 1 | 16702 | 16703 | 16386 | 258 | (0,2) + 2 | 16703 | 0 | 32770 | 10242 | (0,2) +(2 rows) + +MogDB=# vacuum tb; +VACUUM +MogDB=# select lp, t_xmin, t_xmax, t_infomask2, t_infomask, t_ctid from heap_page_items(get_raw_page('tb', 0)); + lp | t_xmin | t_xmax | t_infomask2 | t_infomask | t_ctid +----+--------+--------+-------------+------------+-------- + 1 | 16702 | 16703 | 16386 | 1282 | (0,2) + 2 | 16703 | 0 | 32770 | 10498 | (0,2) +(2 rows) +MogDB=# select relname, n_tup_ins, n_tup_del, n_live_tup, n_dead_tup, last_autovacuum, autovacuum_count from pg_stat_user_tables where relname = 'tb'; + relname | n_tup_ins | n_tup_del | n_live_tup | n_dead_tup | last_autovacuum | autovacuum_count +---------+-----------+-----------+------------+------------+-----------------+------------------ + tb | 1 | 0 | 1 | 1 | | 0 +(1 row) + +MogDB=# insert into tb values(0, 'asdf'); +INSERT 0 1 +MogDB=# select lp, t_xmin, t_xmax, t_infomask2, t_infomask, t_ctid from heap_page_items(get_raw_page('tb', 0)); + lp | t_xmin | t_xmax | t_infomask2 | t_infomask | t_ctid +----+--------+--------+-------------+------------+-------- + 1 | 16702 | 16703 | 16386 | 1282 | (0,2) + 2 | 16703 | 0 | 32770 | 10498 | (0,2) + 3 | 16704 | 0 | 2 | 2050 | (0,3) +(3 rows) + +MogDB=# vacuum tb; +VACUUM +MogDB=# select lp, t_xmin, t_xmax, t_infomask2, t_infomask, t_ctid from heap_page_items(get_raw_page('tb', 0)); + lp | t_xmin | t_xmax | t_infomask2 | t_infomask | t_ctid +----+--------+--------+-------------+------------+-------- + 1 | | | | | + 2 | 16703 | 0 | 32770 | 10498 | (0,2) + 3 | 16704 | 0 | 2 | 2306 | (0,3) +(3 rows) +MogDB=# select relname, n_tup_ins, n_tup_del, n_live_tup, n_dead_tup, last_autovacuum, autovacuum_count from pg_stat_user_tables where relname = 'tb'; + relname | n_tup_ins | n_tup_del | n_live_tup | n_dead_tup | last_autovacuum | autovacuum_count +---------+-----------+-----------+------------+------------+-----------------+------------------ + tb | 2 | 0 | 2 | 0 | | 0 +(1 row) + +-- 2. update后执行其他操作推进一下xid,然后再vacuum +MogDB=# create table tb(id int, name text); +CREATE TABLE +MogDB=# insert into tb values(0, 'asdf'); +INSERT 0 1 +MogDB=# update tb set id = 1; +UPDATE 1 +MogDB=# select lp, t_xmin, t_xmax, t_infomask2, t_infomask, t_ctid from heap_page_items(get_raw_page('tb', 0)); + lp | t_xmin | t_xmax | t_infomask2 | t_infomask | t_ctid +----+--------+--------+-------------+------------+-------- + 1 | 16719 | 16720 | 16386 | 258 | (0,2) + 2 | 16720 | 0 | 32770 | 10242 | (0,2) +(2 rows) + +MogDB=# create table tbb(id int); +CREATE TABLE +MogDB=# vacuum tb; +VACUUM +MogDB=# select lp, t_xmin, t_xmax, t_infomask2, t_infomask, t_ctid from heap_page_items(get_raw_page('tb', 0)); + lp | t_xmin | t_xmax | t_infomask2 | t_infomask | t_ctid +----+--------+--------+-------------+------------+-------- + 1 | | | | | + 2 | 16720 | 0 | 32770 | 10498 | (0,2) +(2 rows) + +MogDB=# insert into tb values (0, 'asdf'); +INSERT 0 1 +MogDB=# select lp, t_xmin, t_xmax, t_infomask2, t_infomask, t_ctid from heap_page_items(get_raw_page('tb', 0)); + lp | t_xmin | t_xmax | t_infomask2 | t_infomask | t_ctid +----+--------+--------+-------------+------------+-------- + 1 | | | | | + 2 | 16720 | 0 | 32770 | 10498 | (0,2) + 3 | 16722 | 0 | 2 | 2050 | (0,3) +(3 rows) +``` + +- 示例1中,update的xid是16702,update的xid是16703,update之后进行vacuum,然后进行了第二次insert,第二次的insert的xid是16704,也就是vacuum操作没有推进xid + +#### 表重建VACUUM FULL + +```sql +-- 1. update后直接vacuum full +MogDB=# create table tb(id int, name text); +CREATE TABLE +MogDB=# insert into tb values(0, 'asdf'); +INSERT 0 1 +MogDB=# select lp, t_xmin, t_xmax, t_infomask2, t_infomask, t_ctid from heap_page_items(get_raw_page('tb', 0)); + lp | t_xmin | t_xmax | t_infomask2 | t_infomask | t_ctid +----+--------+--------+-------------+------------+-------- + 1 | 16707 | 0 | 2 | 2050 | (0,1) +(1 row) + +MogDB=# update tb set id = 1; +UPDATE 1 +MogDB=# select lp, t_xmin, t_xmax, t_infomask2, t_infomask, t_ctid from heap_page_items(get_raw_page('tb', 0)); + lp | t_xmin | t_xmax | t_infomask2 | t_infomask | t_ctid +----+--------+--------+-------------+------------+-------- + 1 | 16707 | 16708 | 16386 | 258 | (0,2) + 2 | 16708 | 0 | 32770 | 10242 | (0,2) +(2 rows) + +MogDB=# select relname, n_tup_ins, n_tup_del, n_live_tup, n_dead_tup, last_autovacuum, autovacuum_count from pg_stat_user_tables where relname = 'tb'; + relname | n_tup_ins | n_tup_del | n_live_tup | n_dead_tup | last_autovacuum | autovacuum_count +---------+-----------+-----------+------------+------------+-----------------+------------------ + tb | 1 | 0 | 1 | 1 | | 0 +(1 row) +MogDB=# vacuum full tb; +VACUUM +MogDB=# select lp, t_xmin, t_xmax, t_infomask2, t_infomask, t_ctid from heap_page_items(get_raw_page('tb', 0)); + lp | t_xmin | t_xmax | t_infomask2 | t_infomask | t_ctid +----+--------+--------+-------------+------------+-------- + 1 | 16708 | 0 | 2 | 10498 | (0,1) + 2 | 2 | 16708 | 2 | 1282 | (0,1) +(2 rows) + +MogDB=# select relname, n_tup_ins, n_tup_del, n_live_tup, n_dead_tup, last_autovacuum, autovacuum_count from pg_stat_user_tables where relname = 'tb'; + relname | n_tup_ins | n_tup_del | n_live_tup | n_dead_tup | last_autovacuum | autovacuum_count +---------+-----------+-----------+------------+------------+-----------------+------------------ + tb | 1 | 0 | 1 | 1 | | 0 +(1 row) + +MogDB=# vacuum full tb; +VACUUM +MogDB=# select lp, t_xmin, t_xmax, t_infomask2, t_infomask, t_ctid from heap_page_items(get_raw_page('tb', 0)); + lp | t_xmin | t_xmax | t_infomask2 | t_infomask | t_ctid +----+--------+--------+-------------+------------+-------- + 1 | 2 | 0 | 2 | 10498 | (0,1) +(1 row) + +MogDB=# select relname, n_tup_ins, n_tup_del, n_live_tup, n_dead_tup, last_autovacuum, autovacuum_count from pg_stat_user_tables where relname = 'tb'; + relname | n_tup_ins | n_tup_del | n_live_tup | n_dead_tup | last_autovacuum | autovacuum_count +---------+-----------+-----------+------------+------------+-----------------+------------------ + tb | 1 | 0 | 1 | 0 | | 0 +(1 row) + +-- 2. update后先执行一次insert,再vacuum full +MogDB=# create table tb(id int, name text); +CREATE TABLE +MogDB=# insert into tb values(0, 'asdf'); +INSERT 0 1 +MogDB=# select lp, t_xmin, t_xmax, t_infomask2, t_infomask, t_ctid from heap_page_items(get_raw_page('tb', 0)); + lp | t_xmin | t_xmax | t_infomask2 | t_infomask | t_ctid +----+--------+--------+-------------+------------+-------- + 1 | 16713 | 0 | 2 | 2050 | (0,1) +(1 row) + +MogDB=# update tb set id = 1; +UPDATE 1 +MogDB=# select lp, t_xmin, t_xmax, t_infomask2, t_infomask, t_ctid from heap_page_items(get_raw_page('tb', 0)); + lp | t_xmin | t_xmax | t_infomask2 | t_infomask | t_ctid +----+--------+--------+-------------+------------+-------- + 1 | 16713 | 16714 | 16386 | 258 | (0,2) + 2 | 16714 | 0 | 32770 | 10242 | (0,2) +(2 rows) + +MogDB=# insert into tb values(0, 'asdf'); +INSERT 0 1 +MogDB=# select lp, t_xmin, t_xmax, t_infomask2, t_infomask, t_ctid from heap_page_items(get_raw_page('tb', 0)); + lp | t_xmin | t_xmax | t_infomask2 | t_infomask | t_ctid +----+--------+--------+-------------+------------+-------- + 1 | 16713 | 16714 | 16386 | 258 | (0,2) + 2 | 16714 | 0 | 32770 | 10242 | (0,2) + 3 | 16715 | 0 | 2 | 2050 | (0,3) +(3 rows) + +MogDB=# vacuum full tb; +VACUUM +MogDB=# select lp, t_xmin, t_xmax, t_infomask2, t_infomask, t_ctid from heap_page_items(get_raw_page('tb', 0)); + lp | t_xmin | t_xmax | t_infomask2 | t_infomask | t_ctid +----+--------+--------+-------------+------------+-------- + 1 | 2 | 0 | 2 | 10498 | (0,1) + 2 | 16715 | 0 | 2 | 2306 | (0,2) +(2 rows) + +-- 3. 测试vacuum full是否会推进xid +MogDB=# insert into tb values(0, 'asef'); +INSERT 0 1 +MogDB=# select lp, t_xmin, t_xmax, t_infomask2, t_infomask, t_ctid from heap_page_items(get_raw_page('tb', 0)); + lp | t_xmin | t_xmax | t_infomask2 | t_infomask | t_ctid +----+--------+--------+-------------+------------+-------- + 1 | | | | | + 2 | 17096 | 0 | 32770 | 10498 | (0,2) + 3 | 17100 | 0 | 2 | 2050 | (0,3) +(3 rows) + +MogDB=# vacuum full tb; +VACUUM +MogDB=# insert into tb values(0, 'asef'); +INSERT 0 1 +MogDB=# select lp, t_xmin, t_xmax, t_infomask2, t_infomask, t_ctid from heap_page_items(get_raw_page('tb', 0)); + lp | t_xmin | t_xmax | t_infomask2 | t_infomask | t_ctid +----+--------+--------+-------------+------------+-------- + 1 | 2 | 0 | 2 | 10498 | (0,1) + 2 | 17100 | 0 | 2 | 2306 | (0,2) + 3 | 17102 | 0 | 2 | 2050 | (0,3) +(3 rows) +``` + +- 示例1中,第一次vacuum full将过期元组的xmax设置为无效的xmax,将更新后的xmin设置为2,xmax设置为更新的xid,并推进xid,第二次vacuum full的时候将过期的元组清理掉,将更新后的元组xmin设置为2 +- 示例2中,update后通过insert将xid推进,然后进行vacuum full,所有过期元组均被清理掉 +- 示例3连续的两次insert之间进行了一次vacuum full,可以看到vacuum full将xid进行了推进 + +### 相关日志 + +#### autovacuum日志 + +````shell +-- 第一次autovacuum +2023-12-24 10:57:45.633 sxb postgres localhost 140347577464576 0[0:0#0] 0 [VACUUM] LOG: normally vacuum rel "public.tb" freeze 2000000000 OldestXmin 15540, FreezeLimit 3, freezeTableLimit 3 +2023-12-24 10:57:47.952 sxb postgres localhost 140347577464576 0[0:0#0] 0 [VACUUM] LOG: "tb": found 0 removable, 100000 nonremovable row versions in 1031 out of 1031 pages +2023-12-24 10:57:47.952 sxb postgres localhost 140347577464576 0[0:0#0] 0 [VACUUM] DETAIL: 50000 dead row versions cannot be removed yet. There were 0 unused item pointers. 0 pages are entirely empty. CPU 0.00s/0.04u sec elapsed 2.31 sec. + +-- 第二次autovacuum +2023-12-24 10:58:15.634 sxb postgres localhost 140347577464576 0[0:0#0] 0 [VACUUM] LOG: normally vacuum rel "public.tb" freeze 2000000000 OldestXmin 15541, FreezeLimit 3, freezeTableLimit 3 +2023-12-24 10:58:15.756 sxb postgres localhost 140347521890048 0[0:0#0] 0 [BACKEND] LOG: clean statement thread start +2023-12-24 10:58:17.950 sxb postgres localhost 140347577464576 0[0:0#0] 0 [VACUUM] LOG: "tb": found 50000 removable, 50000 nonremovable row versions in 1031 out of 1031 pages +2023-12-24 10:58:17.950 sxb postgres localhost 140347577464576 0[0:0#0] 0 [VACUUM] DETAIL: 0 dead row versions cannot be removed yet. There were 0 unused item pointers. 0 pages are entirely empty. CPU 0.00s/0.04u sec elapsed 2.31 sec. +```` + +#### 手动vacuum日志 + +```shell +-- 第一次vacuum +2023-12-24 10:50:12.308 sxb postgres [local] 139638516152064 0[0:0#0] 1125899906842767 [VACUUM] LOG: normally vacuum rel "public.tb" freeze -1 OldestXmin 15178, FreezeLimit 3, freezeTableLimit 3 +2023-12-24 10:50:12.349 sxb postgres [local] 139638516152064 0[0:0#0] 1125899906842767 [VACUUM] LOG: "tb": found 0 removable, 100000 nonremovable row versions in 741 out of 741 pages +2023-12-24 10:50:12.349 sxb postgres [local] 139638516152064 0[0:0#0] 1125899906842767 [VACUUM] DETAIL: 50000 dead row versions cannot be removed yet. There were 0 unused item pointers. 0 pages are entirely empty. CPU 0.00s/0.04u sec elapsed 0.04 sec. + +-- 第二次vacuum +2023-12-24 10:52:12.909 sxb postgres [local] 139638516152064 0[0:0#0] 1125899906842783 [VACUUM] LOG: normally vacuum rel "public.tb" freeze -1 OldestXmin 15178, FreezeLimit 3, freezeTableLimit 3 +2023-12-24 10:52:12.932 sxb postgres [local] 139638516152064 0[0:0#0] 1125899906842783 [VACUUM] LOG: "tb": found 0 removable, 100000 nonremovable row versions in 741 out of 741 pages +2023-12-24 10:52:12.932 sxb postgres [local] 139638516152064 0[0:0#0] 1125899906842783 [VACUUM] DETAIL: 50000 dead row versions cannot be removed yet. There were 0 unused item pointers. 0 pages are entirely empty. CPU 0.00s/0.02u sec elapsed 0.02 sec. +``` + +#### vacuum full日志 + +```shell +-- 第一次vacuum full +2023-12-24 10:35:36.294 sxb postgres [local] 139638516152064 0[0:0#0] 1125899906842659 [BACKEND] LOG: vacuum test, OldestXmin: 15172 +2023-12-24 10:35:36.294 sxb postgres [local] 139638516152064 0[0:0#0] 1125899906842659 [BACKEND] LOG: Relation tb(24642) [0/16245/24642] Swap files with Relation 24648 [0/16245/24648] xid 15173 + +-- 第二次vacuum full +2023-12-24 10:35:42.499 sxb postgres [local] 139638516152064 0[0:0#0] 1125899906842661 [BACKEND] LOG: vacuum test, OldestXmin: 15173 +2023-12-24 10:35:42.499 sxb postgres [local] 139638516152064 0[0:0#0] 1125899906842661 [BACKEND] LOG: Relation tb(24642) [0/16245/24648] Swap files with Relation 24654 [0/16245/24654] xid 15174 +``` + +### 相关结论 + +- autovacuum和手动vacuum的区别 + + - 手动vacuum清理表和表的toast表是连续处理的,而autovacuum处理表和表的toast表之间有间隔。**MogDB 3.0.8新增handle_toast_in_autovac参数,用于控制是否在autovacuum中清理表的同时清理该表对应的toast表** + - DDL操作会中断autovacuum对表的清理,而手动vacuum则会阻塞对正在进行清理的表进行的DDL操作 + - autovacuum执行后会推进OldestXmin,但是手动执行的vacuum不会推进OldestXmin + +- 什么情况下会清理页面中的过期元组,并更新pg_stat_user_tables中的n_dead_tup? + + - 页面中的过期元组**足够老**时,autovacuum、vacuum和vacuum full操作都会将这些过期元组清理掉 + - 由于autovacuum和vacuum full会推进xid,对于刚update/delete的老版本的元组,第一次autovacuum/vacuum full不会直接清理掉老版本的元组,但是会将老版本元组的informask相关位进行标记,第二次autovacuum/vacuum full时会将老版本元组清理掉 + +- 如何理解**足够老**? + + - MogDB中,根据可见性判断将元组分为`HEAPTUPLE_DEAD、HEAPTUPLE_LIVE、HEAPTUPLE_RECENTLY_DEAD、HEAPTUPLE_INSERT_IN_PROGRESS、HEAPTUPLE_DELETE_IN_PROGRESS`几种类型,其中,判断为`HEAPTUPLE_RECENTLY_DEAD`的元组,删除/更新老版本的事务已提交,但是在当前这个触发vacuum的事务中暂时还不能被删除,比如某一条元组,执行插入的xid=16000,xid=16001的事务将其更新到版本1,xid=16002的事务发起vacuum操作,此时,对老版本执行更新的事务16001虽然已经提交,但是对于当前这个vacuum来说,老版本属于`HEAPTUPLE_RECENTLY_DEAD`,当前这个vacuum操作不能直接对其进行清理。对于被判断为`HEAPTUPLE_DEAD`的元组,vacuum操作可直接将其进行清理 + +> **说明**:本章节所有测试基于MogDB 5.0.5,日志中部分内容为修改源码后输出,正式版本中不包含。 diff --git a/product/zh/docs-mogdb/v5.0/characteristic-description/characteristic-description-overview.md b/product/zh/docs-mogdb/v5.0/characteristic-description/characteristic-description-overview.md index 25ae5442bb75b5ec753fbee35904f9cbbe2367ac..c1f6a0e9dff8172b0ada28bc5021c01ca28a957d 100644 --- a/product/zh/docs-mogdb/v5.0/characteristic-description/characteristic-description-overview.md +++ b/product/zh/docs-mogdb/v5.0/characteristic-description/characteristic-description-overview.md @@ -1,151 +1,152 @@ ---- -title: 特性描述 -summary: 特性描述 -author: Guo Huan -date: 2022-09-01 ---- - -# 特性描述 - -MogDB 5.0版本具有以下特性: - -+ 高性能 - + [CBO优化器](./high-performance/1-cbo-optimizer.md) - + [支持LLVM](./high-performance/2-llvm.md) - + [向量化引擎](./high-performance/3-vectorized-engine.md) - + [行列混合存储](./high-performance/4-hybrid-row-column-store.md) - + [自适应压缩](./high-performance/5-adaptive-compression.md) - + [SQL Bypass](./high-performance/sql-bypass.md) - + [鲲鹏NUMA架构优化](./high-performance/7-kunpeng-numa-architecture-optimization.md) - + [支持线程池高并发](./high-performance/8-high-concurrency-of-thread-pools.md) - + [SMP并行执行](./high-performance/9-smp-for-parallel-execution.md) - + [Xlog no Lock Flush](./high-performance/10-xlog-no-lock-flush.md) - + [Parallel Page-based Redo For Ustore](./high-performance/11-parallel-page-based-redo-for-ustore.md) - + [行存转向量化](./high-performance/12-row-store-execution-to-vectorized-execution.md) - + [Astore行级压缩性能增强](./high-performance/astore-row-level-compression.md) - + [BTree索引压缩](./high-performance/btree-index-compression.md) - + [SQL trace观测功能](./high-performance/tracing-SQL-function.md) - + [并行索引扫描](./high-performance/parallel-index-scan.md) - + [后台关键线程trace观测增强](./high-performance/enhancement-of-tracing-backend-key-thread.md) - + [排序算子优化](./high-performance/ordering-operator-optimization.md) - + [OCK加速数据传输](./high-performance/ock-accelerated-data-transmission.md) - + [OCK SCRLock加速分布式锁](./high-performance/ock-scrlock-accelerate-distributed-lock.md) -+ 高可用 - + [主备机](./high-availability/1-primary-standby.md) - + [逻辑复制](./high-availability/2-logical-replication.md) - + [逻辑备份](./high-availability/4-logical-backup.md) - + [物理备份](./high-availability/5-physical-backup.md) - + [作业失败自动重试](./high-availability/6-automatic-job-retry-upon-failure.md) - + [极致RTO](./high-availability/7-ultimate-rto.md) - + [基于Paxos协议的高可用](./high-availability/high-availability-based-on-the-paxos-protocol.md) - + [级联备机](./high-availability/8-cascaded-standby-server.md) - + [延时回放](./high-availability/9-delayed-replay.md) - + [备机增加删除](./high-availability/10-adding-or-deleting-a-standby-server.md) - + [延迟进入最大可用模式](./high-availability/11-delaying-entering-the-maximum-availability-mode.md) - + [并行逻辑解码](./high-availability/12-parallel-logical-decoding.md) - + [DCF](./high-availability/13-dcf.md) - + [CM](./high-availability/14-cm.md) - + [支持global syscache](./high-availability/15-global-syscache.md) - + [支持备机build备机](./high-availability/16-using-a-standby-node-to-build-a-standby-node.md) - + [两地三中心跨Region容灾](./high-availability/17-two-city-three-dc-dr.md) - + [CM集群支持两节点部署](./high-availability/cm-cluster-management-component-supporting-two-node-deployment.md) -+ 维护性 - + [灰度升级](./maintainability/1-gray-upgrade.md) - + [支持WDR诊断报告](./maintainability/2-workload-diagnosis-report.md) - + [慢SQL诊断](./maintainability/3-slow-sql-diagnosis.md) - + [Session性能诊断](./maintainability/4-session-performance-diagnosis.md) - + [系统KPI辅助诊断](./maintainability/5-system-kpi-aided-diagnosis.md) - + [故障诊断](./maintainability/fault-diagnosis.md) - + [插件拆分](./maintainability/extension-splitting.md) - + [内置stack工具](./maintainability/built-in-stack-tool.md) - + [支持SQL PATCH](./maintainability/sql-patch.md) -+ 兼容性 - + [视图增加%rowtype属性](./compatibility/add-rowtype-attribute-to-the-view.md) - + [聚合函数distinct性能优化](./compatibility/aggregate-functions-distinct-performance-optimization.md) - + [聚合函数支持KEEP子句](./compatibility/aggregate-functions-support-keep-clause.md) - + [聚合函数支持场景扩展](./compatibility/aggregate-functions-support-scenario-extensions.md) - + [兼容支持MySQL别名支持单引号](./compatibility/compatible-with-mysql-alias-support-for-single-quotes.md) - + [支持current_date/current_time关键字作为字段名](./compatibility/current_date-current_time-keywords-as-field-name.md) - + [自定义type数组](./compatibility/custom-type-array.md) - + [For Update支持外连接](./compatibility/for-update-supports-outer-join.md) - + [MogDB支持Insert All特性](./compatibility/mogdb-supports-insert-all.md) - + [Oracle DBLink语法兼容](./compatibility/oracle-dblink-syntax-compatibility.md) - + [创建PACKAGE/FUNCTION/PROCEDURE时去除TYPE类型转换提示](./compatibility/remove-type-conversion-hint-when-creating-package-function-procedure.md) - + [支持MERGE INTO命中索引时使用Bypass方法](./compatibility/support-bypass-method-when-merge-into-hit-index.md) - + [支持增加存储过程及函数参数的nocopy属性](./compatibility/support-for-adding-nocopy-attributes-to-procedure-and-function-parameters.md) - + [支持在数组extend的参数中传入数组的count属性](./compatibility/support-passing-the-count-attribute.md) - + [支持q quote转义字符](./compatibility/support-q-quote-escape-character.md) - + [支持两个date类型的数据相减返回numeric类型](./compatibility/support-subtracting-two-date-types-to-return-numeric-type.md) - + [支持表函数table()](./compatibility/support-table-function.md) - + [支持PROCEDURE/FUNCTION/PACKAGE的end后的name和Oracle保持一致](./compatibility/support-to-keep-the-same-name-after-the-end-with-oracle.md) - + [支持WHERE CURRENT OF写法](./compatibility/support-where-current-of.md) - + [支持包内常量作为函数或者过程入参的默认值](./compatibility/support-for-constants-in-package-as-default-values.md) - + [支持PLPGSQL subtype](./compatibility/support-plpgsql-subtype.md) - + [支持无参数FUNCTION的同义词调用不加括号](./compatibility/support-synonym-calls-without-parentheses-for-function-without-parameters.md) - + [支持dbms_utility.format_error_backtrace](./compatibility/format-error-backtrace.md) -+ 数据库安全 - + [访问控制模型](./database-security/1-access-control-model.md) - + [控制权和访问权分离](./database-security/2-separation-of-control-and-access-permissions.md) - + [数据库认证机制](./database-security/3-database-encryption-authentication.md) - + [数据加密存储](./database-security/4-data-encryption-and-storage.md) - + [数据库审计](./database-security/5-database-audit.md) - + [网络通信安全](./database-security/6-network-communication-security.md) - + [资源标签机制](./database-security/7-resource-label.md) - + [统一审计机制](./database-security/8-unified-audit.md) - + [动态数据脱敏机制](./database-security/9-dynamic-data-anonymization.md) - + [行级访问控制](./database-security/10-row-level-access-control.md) - + [用户口令强度校验机制](./database-security/11-password-strength-verification.md) - + [全密态数据库等值查询](./database-security/12-equality-query-in-a-fully-encrypted-database.md) - + [账本数据库机制](./database-security/13-ledger-database-mechanism.md) - + [透明数据加密](./database-security/14-transparent-data-encryption.md) -+ 企业级特性 - + [函数及存储过程支持](./enterprise-level-features/1-support-for-functions-and-stored-procedures.md) - + [支持SQL hint](./enterprise-level-features/2-sql-hints.md) - + [全文索引](./enterprise-level-features/3-full-text-indexing.md) - + [Copy接口支持容错机制](./enterprise-level-features/4-copy-interface-for-error-tolerance.md) - + [分区](./enterprise-level-features/5-partitioning.md) - + [高级分析函数支持](./enterprise-level-features/6-support-for-advanced-analysis-functions.md) - + [物化视图](./enterprise-level-features/7-materialized-view.md) - + [支持HyperLogLog](./enterprise-level-features/8-hyperloglog.md) - + [在线添加索引](./enterprise-level-features/9-creating-an-index-online.md) - + [自治事务](./enterprise-level-features/10-autonomous-transaction.md) - + [全局临时表](./enterprise-level-features/11-global-temporary-table.md) - + [伪列ROWNUM](./enterprise-level-features/12-pseudocolumn-rownum.md) - + [支持存储过程调试](./enterprise-level-features/13-stored-procedure-debugging.md) - + [JDBC客户端负载均衡与读写分离](./enterprise-level-features/14-jdbc-client-load-balancing-and-readwrite-isolation.md) - + [In-place Update存储引擎](./enterprise-level-features/15-in-place-update-storage-engine.md) - + [发布订阅](./enterprise-level-features/16-publication-subscription.md) - + [外键锁增强](./enterprise-level-features/17-foreign-key-lock-enhancement.md) - + [支持OLTP场景数据压缩](./enterprise-level-features/18-data-compression-in-oltp-scenarios.md) - + [事务异步提交](./enterprise-level-features/19-transaction-async-submit.md) - + [索引创建并行控制](./enterprise-level-features/23-index-creation-parallel-control.md) - + [动态分区裁剪](./enterprise-level-features/21-dynamic-partition-pruning.md) - + [COPY导入优化](./enterprise-level-features/20-copy-import-optimization.md) - + [SQL运行时状态观测](./enterprise-level-features/22-sql-running-status-observation.md) - + [BRIN索引](./enterprise-level-features/24-brin-index.md) - + [BLOOM索引](./enterprise-level-features/25-bloom-index.md) - + [事件触发器](./enterprise-level-features/event-trigger.md) -+ 应用开发接口 - + [支持标准SQL](./application-development-interfaces/1-standard-sql.md) - + [支持标准开发接口](./application-development-interfaces/2-standard-development-interfaces.md) - + [PG接口兼容](./application-development-interfaces/3-postgresql-api-compatibility.md) - + [Oracle兼容增强](./application-development-interfaces/MogDB-Oracle-compatibility.md) - + [MySQL兼容增强](./application-development-interfaces/MogDB-MySQL-compatibility.md) - + [支持嵌入式SQL预处理器(ECPG)](./application-development-interfaces/ECPG.md) -+ AI能力 - + AI4DB:数据库自治运维 - + [数据库指标采集、预测与异常监控](./ai-capabilities/ai4db-autonomous-database-o-m/1-database-metric-collection-forecast-and-exception-detection.md) - + [慢SQL根因分析](./ai-capabilities/ai4db-autonomous-database-o-m/2-root-cause-analysis-for-slow-sql-statements.md) - + [索引推荐](./ai-capabilities/ai4db-autonomous-database-o-m/3-index-recommendation.md) - + [参数调优与诊断](./ai-capabilities/ai4db-autonomous-database-o-m/4-parameter-tuning-and-diagnosis.md) - + [慢SQL发现](./ai-capabilities/ai4db-autonomous-database-o-m/5-slow-sql-statement-discovery.md) - + [DB4AI:数据库驱动AI](./ai-capabilities/db4ai-database-driven-ai.md) - + ABO 优化器 - + [智能基数估计](./ai-capabilities/abo-optimizer/intelligent-cardinality-estimation.md) - + [自适应计划选择](./ai-capabilities/abo-optimizer/adaptive-plan-selection.md) -+ 中间件 - + [分布式数据库能力](./middleware/distributed-database-capability.md) - + [使用kubernetes部署分布式数据库](./middleware/deploying-a-distributed-database-using-kubernetes.md) - + [分布式分析能力](./middleware/distributed-analysis-capabilities.md) -+ 负载管理 +--- +title: 特性描述 +summary: 特性描述 +author: Guo Huan +date: 2022-09-01 +--- + +# 特性描述 + +MogDB 5.0版本具有以下特性: + ++ 高性能 + + [CBO优化器](./high-performance/1-cbo-optimizer.md) + + [支持LLVM](./high-performance/2-llvm.md) + + [向量化引擎](./high-performance/3-vectorized-engine.md) + + [行列混合存储](./high-performance/4-hybrid-row-column-store.md) + + [自适应压缩](./high-performance/5-adaptive-compression.md) + + [SQL Bypass](./high-performance/sql-bypass.md) + + [鲲鹏NUMA架构优化](./high-performance/7-kunpeng-numa-architecture-optimization.md) + + [支持线程池高并发](./high-performance/8-high-concurrency-of-thread-pools.md) + + [SMP并行执行](./high-performance/9-smp-for-parallel-execution.md) + + [Xlog no Lock Flush](./high-performance/10-xlog-no-lock-flush.md) + + [Parallel Page-based Redo For Ustore](./high-performance/11-parallel-page-based-redo-for-ustore.md) + + [行存转向量化](./high-performance/12-row-store-execution-to-vectorized-execution.md) + + [Astore行级压缩性能增强](./high-performance/astore-row-level-compression.md) + + [BTree索引压缩](./high-performance/btree-index-compression.md) + + [SQL trace观测功能](./high-performance/tracing-SQL-function.md) + + [并行索引扫描](./high-performance/parallel-index-scan.md) + + [后台关键线程trace观测增强](./high-performance/enhancement-of-tracing-backend-key-thread.md) + + [排序算子优化](./high-performance/ordering-operator-optimization.md) + + [OCK加速数据传输](./high-performance/ock-accelerated-data-transmission.md) + + [OCK SCRLock加速分布式锁](./high-performance/ock-scrlock-accelerate-distributed-lock.md) ++ 高可用 + + [主备机](./high-availability/1-primary-standby.md) + + [逻辑复制](./high-availability/2-logical-replication.md) + + [逻辑备份](./high-availability/4-logical-backup.md) + + [物理备份](./high-availability/5-physical-backup.md) + + [作业失败自动重试](./high-availability/6-automatic-job-retry-upon-failure.md) + + [极致RTO](./high-availability/7-ultimate-rto.md) + + [基于Paxos协议的高可用](./high-availability/high-availability-based-on-the-paxos-protocol.md) + + [级联备机](./high-availability/8-cascaded-standby-server.md) + + [延时回放](./high-availability/9-delayed-replay.md) + + [备机增加删除](./high-availability/10-adding-or-deleting-a-standby-server.md) + + [延迟进入最大可用模式](./high-availability/11-delaying-entering-the-maximum-availability-mode.md) + + [并行逻辑解码](./high-availability/12-parallel-logical-decoding.md) + + [DCF](./high-availability/13-dcf.md) + + [CM](./high-availability/14-cm.md) + + [支持global syscache](./high-availability/15-global-syscache.md) + + [支持备机build备机](./high-availability/16-using-a-standby-node-to-build-a-standby-node.md) + + [两地三中心跨Region容灾](./high-availability/17-two-city-three-dc-dr.md) + + [CM集群支持两节点部署](./high-availability/cm-cluster-management-component-supporting-two-node-deployment.md) ++ 维护性 + + [灰度升级](./maintainability/1-gray-upgrade.md) + + [支持WDR诊断报告](./maintainability/2-workload-diagnosis-report.md) + + [慢SQL诊断](./maintainability/3-slow-sql-diagnosis.md) + + [Session性能诊断](./maintainability/4-session-performance-diagnosis.md) + + [系统KPI辅助诊断](./maintainability/5-system-kpi-aided-diagnosis.md) + + [故障诊断](./maintainability/fault-diagnosis.md) + + [插件拆分](./maintainability/extension-splitting.md) + + [内置stack工具](./maintainability/built-in-stack-tool.md) + + [支持SQL PATCH](./maintainability/sql-patch.md) ++ 兼容性 + + [视图增加%rowtype属性](./compatibility/add-rowtype-attribute-to-the-view.md) + + [聚合函数distinct性能优化](./compatibility/aggregate-functions-distinct-performance-optimization.md) + + [聚合函数支持KEEP子句](./compatibility/aggregate-functions-support-keep-clause.md) + + [聚合函数支持场景扩展](./compatibility/aggregate-functions-support-scenario-extensions.md) + + [兼容支持MySQL别名支持单引号](./compatibility/compatible-with-mysql-alias-support-for-single-quotes.md) + + [支持current_date/current_time关键字作为字段名](./compatibility/current_date-current_time-keywords-as-field-name.md) + + [自定义type数组](./compatibility/custom-type-array.md) + + [For Update支持外连接](./compatibility/for-update-supports-outer-join.md) + + [MogDB支持Insert All特性](./compatibility/mogdb-supports-insert-all.md) + + [Oracle DBLink语法兼容](./compatibility/oracle-dblink-syntax-compatibility.md) + + [创建PACKAGE/FUNCTION/PROCEDURE时去除TYPE类型转换提示](./compatibility/remove-type-conversion-hint-when-creating-package-function-procedure.md) + + [支持MERGE INTO命中索引时使用Bypass方法](./compatibility/support-bypass-method-when-merge-into-hit-index.md) + + [支持增加存储过程及函数参数的nocopy属性](./compatibility/support-for-adding-nocopy-attributes-to-procedure-and-function-parameters.md) + + [支持在数组extend的参数中传入数组的count属性](./compatibility/support-passing-the-count-attribute.md) + + [支持q quote转义字符](./compatibility/support-q-quote-escape-character.md) + + [支持两个date类型的数据相减返回numeric类型](./compatibility/support-subtracting-two-date-types-to-return-numeric-type.md) + + [支持表函数table()](./compatibility/support-table-function.md) + + [支持PROCEDURE/FUNCTION/PACKAGE的end后的name和Oracle保持一致](./compatibility/support-to-keep-the-same-name-after-the-end-with-oracle.md) + + [支持WHERE CURRENT OF写法](./compatibility/support-where-current-of.md) + + [支持包内常量作为函数或者过程入参的默认值](./compatibility/support-for-constants-in-package-as-default-values.md) + + [支持PLPGSQL subtype](./compatibility/support-plpgsql-subtype.md) + + [支持无参数FUNCTION的同义词调用不加括号](./compatibility/support-synonym-calls-without-parentheses-for-function-without-parameters.md) + + [支持dbms_utility.format_error_backtrace](./compatibility/format-error-backtrace.md) + + [支持PIVOT和UNPIVOT语法](pivot-and-unpivot.md) ++ 数据库安全 + + [访问控制模型](./database-security/1-access-control-model.md) + + [控制权和访问权分离](./database-security/2-separation-of-control-and-access-permissions.md) + + [数据库认证机制](./database-security/3-database-encryption-authentication.md) + + [数据加密存储](./database-security/4-data-encryption-and-storage.md) + + [数据库审计](./database-security/5-database-audit.md) + + [网络通信安全](./database-security/6-network-communication-security.md) + + [资源标签机制](./database-security/7-resource-label.md) + + [统一审计机制](./database-security/8-unified-audit.md) + + [动态数据脱敏机制](./database-security/9-dynamic-data-anonymization.md) + + [行级访问控制](./database-security/10-row-level-access-control.md) + + [用户口令强度校验机制](./database-security/11-password-strength-verification.md) + + [全密态数据库等值查询](./database-security/12-equality-query-in-a-fully-encrypted-database.md) + + [账本数据库机制](./database-security/13-ledger-database-mechanism.md) + + [透明数据加密](./database-security/14-transparent-data-encryption.md) ++ 企业级特性 + + [函数及存储过程支持](./enterprise-level-features/1-support-for-functions-and-stored-procedures.md) + + [支持SQL hint](./enterprise-level-features/2-sql-hints.md) + + [全文索引](./enterprise-level-features/3-full-text-indexing.md) + + [Copy接口支持容错机制](./enterprise-level-features/4-copy-interface-for-error-tolerance.md) + + [分区](./enterprise-level-features/5-partitioning.md) + + [高级分析函数支持](./enterprise-level-features/6-support-for-advanced-analysis-functions.md) + + [物化视图](./enterprise-level-features/7-materialized-view.md) + + [支持HyperLogLog](./enterprise-level-features/8-hyperloglog.md) + + [在线添加索引](./enterprise-level-features/9-creating-an-index-online.md) + + [自治事务](./enterprise-level-features/10-autonomous-transaction.md) + + [全局临时表](./enterprise-level-features/11-global-temporary-table.md) + + [伪列ROWNUM](./enterprise-level-features/12-pseudocolumn-rownum.md) + + [支持存储过程调试](./enterprise-level-features/13-stored-procedure-debugging.md) + + [JDBC客户端负载均衡与读写分离](./enterprise-level-features/14-jdbc-client-load-balancing-and-readwrite-isolation.md) + + [In-place Update存储引擎](./enterprise-level-features/15-in-place-update-storage-engine.md) + + [发布订阅](./enterprise-level-features/16-publication-subscription.md) + + [外键锁增强](./enterprise-level-features/17-foreign-key-lock-enhancement.md) + + [支持OLTP场景数据压缩](./enterprise-level-features/18-data-compression-in-oltp-scenarios.md) + + [事务异步提交](./enterprise-level-features/19-transaction-async-submit.md) + + [索引创建并行控制](./enterprise-level-features/23-index-creation-parallel-control.md) + + [动态分区裁剪](./enterprise-level-features/21-dynamic-partition-pruning.md) + + [COPY导入优化](./enterprise-level-features/20-copy-import-optimization.md) + + [SQL运行时状态观测](./enterprise-level-features/22-sql-running-status-observation.md) + + [BRIN索引](./enterprise-level-features/24-brin-index.md) + + [BLOOM索引](./enterprise-level-features/25-bloom-index.md) + + [事件触发器](./enterprise-level-features/event-trigger.md) ++ 应用开发接口 + + [支持标准SQL](./application-development-interfaces/1-standard-sql.md) + + [支持标准开发接口](./application-development-interfaces/2-standard-development-interfaces.md) + + [PG接口兼容](./application-development-interfaces/3-postgresql-api-compatibility.md) + + [Oracle兼容增强](./application-development-interfaces/MogDB-Oracle-compatibility.md) + + [MySQL兼容增强](./application-development-interfaces/MogDB-MySQL-compatibility.md) + + [支持嵌入式SQL预处理器(ECPG)](./application-development-interfaces/ECPG.md) ++ AI能力 + + AI4DB:数据库自治运维 + + [数据库指标采集、预测与异常监控](./ai-capabilities/ai4db-autonomous-database-o-m/1-database-metric-collection-forecast-and-exception-detection.md) + + [慢SQL根因分析](./ai-capabilities/ai4db-autonomous-database-o-m/2-root-cause-analysis-for-slow-sql-statements.md) + + [索引推荐](./ai-capabilities/ai4db-autonomous-database-o-m/3-index-recommendation.md) + + [参数调优与诊断](./ai-capabilities/ai4db-autonomous-database-o-m/4-parameter-tuning-and-diagnosis.md) + + [慢SQL发现](./ai-capabilities/ai4db-autonomous-database-o-m/5-slow-sql-statement-discovery.md) + + [DB4AI:数据库驱动AI](./ai-capabilities/db4ai-database-driven-ai.md) + + ABO 优化器 + + [智能基数估计](./ai-capabilities/abo-optimizer/intelligent-cardinality-estimation.md) + + [自适应计划选择](./ai-capabilities/abo-optimizer/adaptive-plan-selection.md) ++ 中间件 + + [分布式数据库能力](./middleware/distributed-database-capability.md) + + [使用kubernetes部署分布式数据库](./middleware/deploying-a-distributed-database-using-kubernetes.md) + + [分布式分析能力](./middleware/distributed-analysis-capabilities.md) ++ 负载管理 + [支持I层高时延逃生能力](./workload-management/high-latency-escape-at-the-infrastructure-layer.md) \ No newline at end of file diff --git a/product/zh/docs-mogdb/v5.0/characteristic-description/compatibility/compatibility.md b/product/zh/docs-mogdb/v5.0/characteristic-description/compatibility/compatibility.md index b2c1f191e30b3b00aea73bbec679941562506e4a..a890b769196f230dd59915aab9dddf3cbf644bfb 100644 --- a/product/zh/docs-mogdb/v5.0/characteristic-description/compatibility/compatibility.md +++ b/product/zh/docs-mogdb/v5.0/characteristic-description/compatibility/compatibility.md @@ -29,4 +29,5 @@ date: 2023-06-20 - **[支持包内常量作为函数或者过程入参的默认值](support-for-constants-in-package-as-default-values.md)** - **[支持PLPGSQL subtype](support-plpgsql-subtype.md)** - **[支持无参数FUNCTION的同义词调用不加括号](support-synonym-calls-without-parentheses-for-function-without-parameters.md)** -- **[支持dbms_utility.format_error_backtrace](format-error-backtrace.md)** \ No newline at end of file +- **[支持dbms_utility.format_error_backtrace](format-error-backtrace.md)** +- **[支持PIVOT和UNPIVOT语法](pivot-and-unpivot.md)** \ No newline at end of file diff --git a/product/zh/docs-mogdb/v5.0/characteristic-description/compatibility/pivot-and-unpivot.md b/product/zh/docs-mogdb/v5.0/characteristic-description/compatibility/pivot-and-unpivot.md new file mode 100644 index 0000000000000000000000000000000000000000..3d4d7afe6399fc70eb6659c2d3be52aeb0014aa3 --- /dev/null +++ b/product/zh/docs-mogdb/v5.0/characteristic-description/compatibility/pivot-and-unpivot.md @@ -0,0 +1,669 @@ +--- +title: 支持PIVOT和UNPIVOT语法 +summary: 支持PIVOT和UNPIVOT语法 +author: Guo Huan +date: 2023-12-18 +--- + +# 支持PIVOT和UNPIVOT语法 + +## 可获得性 + +本特性自MogDB 5.0.4版本开始引入。 + +## 特性简介 + +本特性兼容Oracle PIVOT和UNPIVOT的语法和功能。 + +## 客户价值 + +增强MogDB与Oracle的兼容性,减少应用程序的迁移代价。 + +## 特性描述 + +PIVOT子句用于将指定字段的字段值由行转换为列,UNPIVOT子句用于将指定字段的字段值由列转换为行。 + +## 语法描述 + +### PIVOT + +``` +pivot_clause::= PIVOT ( aggregate_function ( expr ) [[AS] alias ][, ...] + pivot_for_clause + pivot_in_clause + ) +``` + +``` +pivot_for_clause::= FOR (column [, ...]) +``` + +``` +pivot_in_clause::= IN ({{{ expr | (expr [, ...])} [[AS] alias] [, ...]} | subquery [, ...]}) +``` + +### UNPIVOT + +``` +unpivot_clause::= UNPIVOT [ {INCLUDE | EXCLUDE} NULLS ] +({column | (column [, ...])} + pivot_for_clause + unpivot_in_clause +) +``` + +``` +pivot_for_clause::= FOR (column [, ...]) +``` + +``` +unpivot_in_clause::= IN ({column | (column [, ...])} [AS {literal | (literal [, ...])}] [ {column | (column [, ...])} [AS {literal | (literal [, ...])}]]) +``` + +## 特性约束 + +- pivot和unpivot只支持查询语句 +- pivot和unpivot支持普通表、临时表、列存表、分区表、subquery、with子句等,支持多pivot、多unpivot,支持join,支持并行 +- pivot和unpivot支持create view、create table as、select into语句 +- pivot支持hashAgg、sortAgg +- pivot子句不支持XML +- pivot_in子句不支持subquery和ANY +- pivot和unpivot暂不支持向量化 +- pivot和unpivot不支持嵌套 + +## 示例 + +### PIVOT + +```sql +# PIVOT普通表使用示例 +MogDB=# create table emp_phone(name varchar2(50), type char, phone varchar2(50)); +CREATE TABLE +MogDB=# insert into emp_phone values('aaa', '1', '1234-5678'); +INSERT 0 1 +MogDB=# insert into emp_phone values('aaa', '2', '3219-6066'); +INSERT 0 1 +MogDB=# insert into emp_phone values('aaa', '3', '5365-9583'); +INSERT 0 1 +MogDB=# insert into emp_phone values('bbb', '1', '6837-2745'); +INSERT 0 1 +MogDB=# insert into emp_phone values('bbb', '3', '2649-5820'); +INSERT 0 1 +MogDB=# insert into emp_phone values('ccc', '1', '5838-9002'); +INSERT 0 1 +MogDB=# insert into emp_phone values('ccc', '2', '2749-5580'); +INSERT 0 1 +MogDB=# insert into emp_phone values('ddd', '2', '9876-3453'); +INSERT 0 1 +MogDB=# insert into emp_phone values('aaa', '3', '5365-9599'); +INSERT 0 1 +MogDB=# insert into emp_phone values('aaa', '3', '1111-9599'); +INSERT 0 1 +MogDB=# select * from emp_phone pivot(max(phone) for type in (1 home, 2 office, 3 mobile)) order by 1; + name | home | office | mobile +------+-----------+-----------+----------- + aaa | 1234-5678 | 3219-6066 | 5365-9599 + bbb | 6837-2745 | | 2649-5820 + ccc | 5838-9002 | 2749-5580 | + ddd | | 9876-3453 | +(4 rows) + +# in子句中如果没有alias,则只用值作为列名 +MogDB=# select * from emp_phone pivot(max(phone) for type in (1, 2, 3)); + name | 1 | 2 | 3 +------+-----------+-----------+----------- + aaa | 1234-5678 | 3219-6066 | 5365-9599 + bbb | 6837-2745 | | 2649-5820 + ccc | 5838-9002 | 2749-5580 | + ddd | | 9876-3453 | +(4 rows) + +# 删除表 +MogDB=# drop table emp_phone; +DROP TABLE + +# PIVOT分区表使用示例 +MogDB=# create table emp_phone(name varchar2(50), type char, phone varchar2(50)) +partition by list(type) +( + PARTITION p1 VALUES ('1', '2'), + PARTITION p2 VALUES ('3') +); +CREATE TABLE +MogDB=# insert into emp_phone values('aaa', '1', '1234-5678'); +INSERT 0 1 +MogDB=# insert into emp_phone values('aaa', '2', '3219-6066'); +INSERT 0 1 +MogDB=# insert into emp_phone values('aaa', '3', '5365-9583'); +INSERT 0 1 +MogDB=# insert into emp_phone values('bbb', '1', '6837-2745'); +INSERT 0 1 +MogDB=# insert into emp_phone values('bbb', '3', '2649-5820'); +INSERT 0 1 +MogDB=# insert into emp_phone values('ccc', '1', '5838-9002'); +INSERT 0 1 +MogDB=# insert into emp_phone values('ccc', '2', '2749-5580'); +INSERT 0 1 +MogDB=# insert into emp_phone values('ddd', '2', '9876-3453'); +INSERT 0 1 +MogDB=# insert into emp_phone values('aaa', '3', '5365-9599'); +INSERT 0 1 +MogDB=# insert into emp_phone values('aaa', '3', '1111-9599'); +INSERT 0 1 +MogDB=# select * from emp_phone pivot(max(phone) for type in (1 home, 2 office, 3 mobile)) order by 1; + name | home | office | mobile +------+-----------+-----------+----------- + aaa | 2234-5678 | 3219-6066 | 5365-9599 + bbb | 6837-2745 | | 2649-5820 + ccc | 5838-9002 | 2749-5580 | + ddd | | 9876-3453 | +(4 rows) + +MogDB=# explain(verbose, costs off) select * from emp_phone partition(p1) pivot(max(phone) for type in (1 home, 2 office, 3 mobile)) order by 1; + QUERY PLAN + +---------------------------------------------------------------------------------------------------------------------------- + Sort + Output: emp_phone.name, (max((CASE WHEN ((emp_phone.type)::bigint = 1) THEN emp_phone.phone ELSE NULL::character varying END)::text)), (max((CASE WHEN ((emp_phone.type)::bigint = 2) THEN + emp_phone.phone ELSE NULL::character varying END)::text)), (max((CASE WHEN ((emp_phone.type)::bigint = 3) THEN emp_phone.phone ELSE NULL::character varying END)::text)) + Sort Key: emp_phone.name + -> HashAggregate + Output: emp_phone.name, max((CASE WHEN ((emp_phone.type)::bigint = 1) THEN emp_phone.phone ELSE NULL::character varying END)::text), max((CASE WHEN ((emp_phone.type)::bigint = 2) T +HEN emp_phone.phone ELSE NULL::character varying END)::text), max((CASE WHEN ((emp_phone.type)::bigint = 3) THEN emp_phone.phone ELSE NULL::character varying END)::text) + Group By Key: emp_phone.name + -> Partition Iterator + Output: emp_phone.name, emp_phone.type, emp_phone.phone + Iterations: 1 + Selected Partitions: 1 + -> Partitioned Seq Scan on public.emp_phone + Output: emp_phone.name, emp_phone.type, emp_phone.phone +(12 rows) + +# PIVOT支持join +MogDB=# explain (verbose) select * from emp_phone pivot(max(phone) for type in (1 as home, 2 as office, 3 as mobile)) as p1, emp_phone pivot(max(phone) for type in (1 as home, 2 as office, 3 as mobile)) as p2 where p1.name=p2.name; + + QUERY PLAN + +---------------------------------------------------------------------------------------------------------------------------- + + Hash Join (cost=47.36..54.11 rows=200 distinct=[200, 200] width=428) + Output: public.emp_phone.name, (max((CASE WHEN ((public.emp_phone.type)::bigint = 1) THEN public.emp_phone.phone ELSE NULL::character varying END)::text)), (max((CASE WHEN ((public.emp_p +hone.type)::bigint = 2) THEN public.emp_phone.phone ELSE NULL::character varying END)::text)), (max((CASE WHEN ((public.emp_phone.type)::bigint = 3) THEN public.emp_phone.phone ELSE NULL::c +haracter varying END)::text)), public.emp_phone.name, (max((CASE WHEN ((public.emp_phone.type)::bigint = 1) THEN public.emp_phone.phone ELSE NULL::character varying END)::text)), (max((CASE + WHEN ((public.emp_phone.type)::bigint = 2) THEN public.emp_phone.phone ELSE NULL::character varying END)::text)), (max((CASE WHEN ((public.emp_phone.type)::bigint = 3) THEN public.emp_phon +e.phone ELSE NULL::character varying END)::text)) + Hash Cond: ((public.emp_phone.name)::text = (public.emp_phone.name)::text) + -> HashAggregate (cost=20.43..22.43 rows=200 width=340) + Output: public.emp_phone.name, max((CASE WHEN ((public.emp_phone.type)::bigint = 1) THEN public.emp_phone.phone ELSE NULL::character varying END)::text), max((CASE WHEN ((public.em +p_phone.type)::bigint = 2) THEN public.emp_phone.phone ELSE NULL::character varying END)::text), max((CASE WHEN ((public.emp_phone.type)::bigint = 3) THEN public.emp_phone.phone ELSE NULL:: +character varying END)::text) + Group By Key: public.emp_phone.name + -> Partition Iterator (cost=0.00..12.98 rows=298 width=244) + Output: public.emp_phone.name, public.emp_phone.type, public.emp_phone.phone + Iterations: 2 + Selected Partitions: 1..2 + -> Partitioned Seq Scan on public.emp_phone (cost=0.00..12.98 rows=298 width=244) + Output: public.emp_phone.name, public.emp_phone.type, public.emp_phone.phone + -> Hash (cost=24.43..24.43 rows=200 width=214) + Output: public.emp_phone.name, (max((CASE WHEN ((public.emp_phone.type)::bigint = 1) THEN public.emp_phone.phone ELSE NULL::character varying END)::text)), (max((CASE WHEN ((public +.emp_phone.type)::bigint = 2) THEN public.emp_phone.phone ELSE NULL::character varying END)::text)), (max((CASE WHEN ((public.emp_phone.type)::bigint = 3) THEN public.emp_phone.phone ELSE N +ULL::character varying END)::text)) + -> HashAggregate (cost=20.43..22.43 rows=200 width=340) + Output: public.emp_phone.name, max((CASE WHEN ((public.emp_phone.type)::bigint = 1) THEN public.emp_phone.phone ELSE NULL::character varying END)::text), max((CASE WHEN ((pub +lic.emp_phone.type)::bigint = 2) THEN public.emp_phone.phone ELSE NULL::character varying END)::text), max((CASE WHEN ((public.emp_phone.type)::bigint = 3) THEN public.emp_phone.phone ELSE +NULL::character varying END)::text) + Group By Key: public.emp_phone.name + -> Partition Iterator (cost=0.00..12.98 rows=298 width=244) + Output: public.emp_phone.name, public.emp_phone.type, public.emp_phone.phone + Iterations: 2 + Selected Partitions: 1..2 + -> Partitioned Seq Scan on public.emp_phone (cost=0.00..12.98 rows=298 width=244) + Output: public.emp_phone.name, public.emp_phone.type, public.emp_phone.phone +(23 rows) + +# pivot_for子句支持多个column +MogDB=# create table cust_sales_category(location varchar(20),prod_category varchar(50),customer_id int,sale_amount int); +CREATE TABLE +MogDB=# insert into cust_sales_category (location,prod_category,customer_id,sale_amount) values +MogDB-# ('north','furniture',2,875), +MogDB-# ('south','electronics',2,378), +MogDB-# ('east','gardening',4,136), +MogDB-# ('west','electronics',3,236), +MogDB-# ('central','furniture',3,174), +MogDB-# ('north','electronics',1,729), +MogDB-# ('east','gardening',2,147), +MogDB-# ('west','electronics',3,200), +MogDB-# ('north','furniture',4,987), +MogDB-# ('central','gardening',4,584), +MogDB-# ('south','electronics',3,714), +MogDB-# ('east','furniture',1,192), +MogDB-# ('west','gardening',3,946), +MogDB-# ('east','electronics',4,649), +MogDB-# ('south','furniture',2,503), +MogDB-# ('north','electronics',1,399), +MogDB-# ('central','gardening',3,259), +MogDB-# ('east','electronics',3,407), +MogDB-# ('west','furniture',1,545); +INSERT 0 19 +MogDB=# SELECT * FROM (SELECT location, prod_category, customer_id, sale_amount FROM cust_sales_category) PIVOT (SUM(sale_amount) FOR (customer_id, prod_category)IN ((1, 'furniture') AS furn1, (2, 'furniture') AS furn2, (1, 'electronics') AS elec1, (2, 'electronics') AS elec2)) order by 1; + location | furn1 | furn2 | elec1 | elec2 +----------+-------+-------+-------+------- + central | | | | + east | 192 | | | + north | | 875 | 1128 | + south | | 503 | | 378 + west | 545 | | | +(5 rows) + +MogDB=# explain(verbose, analyze) SELECT * FROM (SELECT location, prod_category, customer_id, sale_amount FROM cust_sales_category) PIVOT (SUM(sale_amount) FOR (customer_id, prod_category)IN ((1, 'furniture') AS furn1, (2, 'furniture') AS furn2, (1, 'electronics') AS elec1, (2, 'electronics') AS elec2)) order by 1; + QUERY PLAN + +---------------------------------------------------------------------------------------------------------------------------- + Sort (cost=37.88..38.38 rows=200 width=90) (actual time=0.075..0.076 rows=5 loops=1) + Output: cust_sales_category.location, (sum(CASE WHEN ((cust_sales_category.customer_id = 1) AND ((cust_sales_category.prod_category)::text = 'furniture'::text)) THEN cust_sales_category.sale_amount ELSE NULL +::integer END)), (sum(CASE WHEN ((cust_sales_category.customer_id = 2) AND ((cust_sales_category.prod_category)::text = 'furniture'::text)) THEN cust_sales_category.sale_amount ELSE NULL::integer END)), (sum(CA +SE WHEN ((cust_sales_category.customer_id = 1) AND ((cust_sales_category.prod_category)::text = 'electronics'::text)) THEN cust_sales_category.sale_amount ELSE NULL::integer END)), (sum(CASE WHEN ((cust_sales_c +ategory.customer_id = 2) AND ((cust_sales_category.prod_category)::text = 'electronics'::text)) THEN cust_sales_category.sale_amount ELSE NULL::integer END)) + Sort Key: cust_sales_category.location + Sort Method: quicksort Memory: 25kB + -> HashAggregate (cost=26.23..28.23 rows=200 width=216) (actual time=0.060..0.060 rows=5 loops=1) + Output: cust_sales_category.location, sum(CASE WHEN ((cust_sales_category.customer_id = 1) AND ((cust_sales_category.prod_category)::text = 'furniture'::text)) THEN cust_sales_category.sale_amount ELSE + NULL::integer END), sum(CASE WHEN ((cust_sales_category.customer_id = 2) AND ((cust_sales_category.prod_category)::text = 'furniture'::text)) THEN cust_sales_category.sale_amount ELSE NULL::integer END), sum(C +ASE WHEN ((cust_sales_category.customer_id = 1) AND ((cust_sales_category.prod_category)::text = 'electronics'::text)) THEN cust_sales_category.sale_amount ELSE NULL::integer END), sum(CASE WHEN ((cust_sales_ca +tegory.customer_id = 2) AND ((cust_sales_category.prod_category)::text = 'electronics'::text)) THEN cust_sales_category.sale_amount ELSE NULL::integer END) + Group By Key: cust_sales_category.location + -> Seq Scan on public.cust_sales_category (cost=0.00..13.82 rows=382 width=184) (actual time=0.019..0.022 rows=19 loops=1) + Output: cust_sales_category.location, cust_sales_category.customer_id, cust_sales_category.prod_category, cust_sales_category.sale_amount + Total runtime: 0.179 ms +(10 rows) + +# pivot_for支持with子句 +MogDB=# with a as ( +MogDB(# select 'Jack' Name ,'sex' Key,'male' Value union all +MogDB(# select 'Jack' ,'country','USA' union all +MogDB(# select 'Jack' ,'hobby','sing' union all +MogDB(# select 'Jack' ,'age','19' union all +MogDB(# select 'Bob' ,'country','UK' union all +MogDB(# select 'Bob' ,'age','20' union all +MogDB(# select 'Bob' ,'weight','70' union all +MogDB(# select 'Maria' ,'sex','female' union all +MogDB(# select 'Maria' ,'weight','50') +MogDB-# select * from a pivot (max(value) for key in ('sex' sex,'country' country,'hobby' hobby,'age' age,'weight' weight)) order by 1,2; + name | sex | country | hobby | age | weight +-------+--------+---------+-------+-----+-------- + Bob | | UK | | 20 | 70 + Jack | male | USA | sing | 19 | + Maria | female | | | | 50 +(3 rows) + +# PIVOT支持多个聚合函数 +MogDB=# create table t_demo(id int, name text, nums int); +CREATE TABLE +MogDB=# insert into t_demo values(1,'aa',1000),(2,'aa',2000),(3,'aa',4000),(4,'bb',5000),(5,'bb',3000),(6,'cc',3500),(7,'dd',4200),(8,'dd',5500); +INSERT 0 8 +MogDB=# select * from (select name, nums from t_demo) pivot (sum(nums) total,min(nums) min for name in ('aa' as apple, 'bb' as orange, 'cc' as grape, 'dd' as mango)); + apple_total | apple_min | orange_total | orange_min | grape_total | grape_min | mango_total | mango_min +-------------+-----------+--------------+------------+-------------+-----------+-------------+----------- + 7000 | 1000 | 8000 | 3000 | 3500 | 3500 | 9700 | 4200 +(1 row) + +# PIVOT支持多列多聚合函数 +MogDB=# create table tab1(type varchar2(50), weight int, height int); +CREATE TABLE +MogDB=# insert into tab1 values('A',50,10),('A',60,12),('B',40,8),('C',30,15); +INSERT 0 4 +MogDB=# select * from tab1 pivot (count(type) as ct, sum(weight) as wt, sum(height) as ht for type in ('A' as A, 'B' as B, 'C' as C)); + a_ct | a_wt | a_ht | b_ct | b_wt | b_ht | c_ct | c_wt | c_ht +------+------+------+------+------+------+------+------+------ + 2 | 110 | 22 | 1 | 40 | 8 | 1 | 30 | 15 +(1 row) + +# PIVOT聚合函数支持expr +MogDB=# select * from emp_phone pivot(max(phone||'xxx') for type in (1 home, 2 office, 3 mobile)) order by 1; + name | home | office | mobile +------+--------------+--------------+-------------- + aaa | 2234-5678xxx | 3219-6066xxx | 5365-9599xxx + bbb | 6837-2745xxx | | 2649-5820xxx + ccc | 5838-9002xxx | 2749-5580xxx | + ddd | | 9876-3453xxx | +(4 rows) + +MogDB=# explain(verbose, analyze) select * from emp_phone pivot(max(phone||'xxx') for type in (1 home, 2 office, 3 mobile)) order by 1; + QUERY PLAN + +---------------------------------------------------------------------------------------------------------------------------- + Sort (cost=34.31..34.81 rows=200 width=214) (actual time=0.088..0.088 rows=4 loops=1) + Output: emp_phone.name, (max(CASE WHEN ((emp_phone.type)::bigint = 1) THEN ((emp_phone.phone)::text || 'xxx'::text) ELSE NULL::text END)), (max(CASE WHEN ((emp_phone.type)::bigint = 2) THEN ((emp_phone.phone +)::text || 'xxx'::text) ELSE NULL::text END)), (max(CASE WHEN ((emp_phone.type)::bigint = 3) THEN ((emp_phone.phone)::text || 'xxx'::text) ELSE NULL::text END)) + Sort Key: emp_phone.name + Sort Method: quicksort Memory: 25kB + -> HashAggregate (cost=22.67..24.67 rows=200 width=340) (actual time=0.073..0.075 rows=4 loops=1) + Output: emp_phone.name, max(CASE WHEN ((emp_phone.type)::bigint = 1) THEN ((emp_phone.phone)::text || 'xxx'::text) ELSE NULL::text END), max(CASE WHEN ((emp_phone.type)::bigint = 2) THEN ((emp_phone.ph +one)::text || 'xxx'::text) ELSE NULL::text END), max(CASE WHEN ((emp_phone.type)::bigint = 3) THEN ((emp_phone.phone)::text || 'xxx'::text) ELSE NULL::text END) + Group By Key: emp_phone.name + -> Partition Iterator (cost=0.00..12.98 rows=298 width=244) (actual time=0.012..0.022 rows=11 loops=1) + Output: emp_phone.name, emp_phone.type, emp_phone.phone + Iterations: 2 + Selected Partitions: 1..2 + -> Partitioned Seq Scan on public.emp_phone (cost=0.00..12.98 rows=298 width=244) (actual time=0.007..0.010 rows=11 loops=2) + Output: emp_phone.name, emp_phone.type, emp_phone.phone + Total runtime: 0.201 ms +(14 rows) + +# PIVOT支持create table as +MogDB=# create table test1 as select * from emp_phone pivot(max(phone) for type in (1 home, 2 office, 3 mobile)) order by 1; +INSERT 0 4 +MogDB=# select * from test1; + name | home | office | mobile +------+-----------+-----------+----------- + aaa | 2234-5678 | 3219-6066 | 5365-9599 + bbb | 6837-2745 | | 2649-5820 + ccc | 5838-9002 | 2749-5580 | + ddd | | 9876-3453 | +(4 rows) + +# PIVOT支持select into +MogDB=# select * into test2 from emp_phone pivot(max(phone) for type in (1 home, 2 office, 3 mobile)) order by 1; +INSERT 0 4 +MogDB=# select * from test2; + name | home | office | mobile +------+-----------+-----------+----------- + aaa | 2234-5678 | 3219-6066 | 5365-9599 + bbb | 6837-2745 | | 2649-5820 + ccc | 5838-9002 | 2749-5580 | + ddd | | 9876-3453 | +(4 rows) + +# PIVOT支持view +MogDB=# create view tv1 as select * from emp_phone pivot(max(phone) for type in (1 home, 2 office, 3 mobile)); +CREATE VIEW +MogDB=# \d+ tv1; + View "public.tv1" + Column | Type | Modifiers | Storage | Description +--------+-----------------------+-----------+----------+------------- + name | character varying(50) | | extended | + home | text | | extended | + office | text | | extended | + mobile | text | | extended | +View definition: + SELECT * + FROM ( SELECT emp_phone.name, + max( + CASE + WHEN emp_phone.type::bigint = 1 THEN emp_phone.phone + ELSE NULL::character varying + END::text) AS home, + max( + CASE + WHEN emp_phone.type::bigint = 2 THEN emp_phone.phone + ELSE NULL::character varying + END::text) AS office, + max( + CASE + WHEN emp_phone.type::bigint = 3 THEN emp_phone.phone + ELSE NULL::character varying + END::text) AS mobile + FROM emp_phone + GROUP BY emp_phone.name) unnamed_pivot; + +MogDB=# select * from tv1; + name | home | office | mobile +------+-----------+-----------+----------- + aaa | 2234-5678 | 3219-6066 | 5365-9599 + bbb | 6837-2745 | | 2649-5820 + ccc | 5838-9002 | 2749-5580 | + ddd | | 9876-3453 | +(4 rows) +``` + +### UNPIVOT + +```SQL +# UNPIVOT使用示例 +MogDB=# create table emp_phone1(name varchar2(50), home varchar2(50), office varchar2(50), mobile varchar2(50)); +CREATE TABLE +MogDB=# insert into emp_phone1 values('aaa','1234-5678','3219-6066','5365-9583'); +INSERT 0 1 +MogDB=# insert into emp_phone1 values('bbb','5838-9002','2749-5580',''); +INSERT 0 1 +MogDB=# insert into emp_phone1 values('ccc','','9876-3453',''); +INSERT 0 1 +MogDB=# insert into emp_phone1 values('ddd','6837-2745','','2649-5820'); +INSERT 0 1 +MogDB=# insert into emp_phone1 values('eee','','','2649-5820'); +INSERT 0 1 +# pivot_in中,in类型的隐私转换使用默认list的隐私类型转换 +MogDB=# select * from emp_phone1 unpivot(phone for type in (home as 1, office as 2, mobile as 3)); + name | type | phone +------+------+----------- + aaa | 1 | 1234-5678 + aaa | 2 | 3219-6066 + aaa | 3 | 5365-9583 + bbb | 1 | 5838-9002 + bbb | 2 | 2749-5580 + ccc | 2 | 9876-3453 + ddd | 1 | 6837-2745 + ddd | 3 | 2649-5820 + eee | 3 | 2649-5820 +(9 rows) + +MogDB=# explain(verbose, analyze) select * from emp_phone1 unpivot(phone for type in (home as 1, office as 2, mobile as 3)); + QUERY PLAN +---------------------------------------------------------------------------------------------------------------------- + Unpivot (cost=0.00..12.85 rows=487 width=154) (actual time=0.010..0.012 rows=9 loops=1) + Output: unnamed_unpivot.name, unnamed_unpivot.type, unnamed_unpivot.phone + Project 1: emp_phone1.name, 1, emp_phone1.home + Project 2: emp_phone1.name, 2, emp_phone1.office + Project 3: emp_phone1.name, 3, emp_phone1.mobile + Filter 1: (emp_phone1.home IS NOT NULL) + Filter 2: (emp_phone1.office IS NOT NULL) + Filter 3: (emp_phone1.mobile IS NOT NULL) + -> Seq Scan on public.emp_phone1 (cost=0.00..11.63 rows=163 width=472) (actual time=0.007..0.007 rows=5 loops=1) + Output: emp_phone1.name, emp_phone1.home, emp_phone1.office, emp_phone1.mobile + Total runtime: 0.067 ms +(11 rows) + +MogDB=# select * from emp_phone1 unpivot include nulls (phone for type in (home as 1, office as 2, mobile as 3)); + name | type | phone +------+------+----------- + aaa | 1 | 1234-5678 + aaa | 2 | 3219-6066 + aaa | 3 | 5365-9583 + bbb | 1 | 5838-9002 + bbb | 2 | 2749-5580 + bbb | 3 | + ccc | 1 | + ccc | 2 | 9876-3453 + ccc | 3 | + ddd | 1 | 6837-2745 + ddd | 2 | + ddd | 3 | 2649-5820 + eee | 1 | + eee | 2 | + eee | 3 | 2649-5820 +(15 rows) + +# UNPIVOT支持并行 +MogDB=# set query_dop = 4; +SET +MogDB=# set smp_thread_cost = 0; +SET +MogDB=# explain(verbose,analyze) select * from emp_phone1 unpivot include nulls (phone for type in (home as 1, office as 2, mobile as 3)); + QUERY PLAN +--------------------------------------------------------------------------------------------------------------------------------------- + Streaming(type: LOCAL GATHER dop: 1/4) (cost=0.00..23.04 rows=489 width=154) (actual time=[18.733,32.127]..[18.733,32.127], rows=15) + Output: unnamed_unpivot.name, unnamed_unpivot.type, unnamed_unpivot.phone + -> Unpivot (cost=0.00..3.21 rows=489 width=154) (actual time=[0.001,0.001]..[0.008,0.015], rows=15) + Output: unnamed_unpivot.name, unnamed_unpivot.type, unnamed_unpivot.phone + Project 1: emp_phone1.name, 1, emp_phone1.home + Project 2: emp_phone1.name, 2, emp_phone1.office + Project 3: emp_phone1.name, 3, emp_phone1.mobile + -> Seq Scan on public.emp_phone1 (cost=0.00..2.91 rows=163 width=472) (actual time=[0.000,0.000]..[0.005,0.006], rows=5) + Output: emp_phone1.name, emp_phone1.home, emp_phone1.office, emp_phone1.mobile + Total runtime: 33.168 ms +(10 rows) + +# UNPIVOT支持join +MogDB=# explain(verbose,analyze) select * from emp_phone1 unpivot(phone for type in (home as 1, office as 2, mobile as 3)) as p1, emp_phone1 unpivot(phone for type in (home as 1, office as 2, mobile as 3)) as p2 where p1.name=p2.name; + QUERY PLAN +---------------------------------------------------------------------------------------------------------------------------------- + Hash Join (cost=18.94..46.08 rows=1186 distinct=[200, 200] width=308) (actual time=0.162..0.170 rows=19 loops=1) + Output: p1.name, p1.type, p1.phone, p2.name, p2.type, p2.phone + Hash Cond: ((p1.name)::text = (p2.name)::text) + -> Unpivot (cost=0.00..12.85 rows=487 width=154) (actual time=0.009..0.013 rows=9 loops=1) + Output: p1.name, p1.type, p1.phone + Project 1: public.emp_phone1.name, 1, public.emp_phone1.home + Project 2: public.emp_phone1.name, 2, public.emp_phone1.office + Project 3: public.emp_phone1.name, 3, public.emp_phone1.mobile + Filter 1: (public.emp_phone1.home IS NOT NULL) + Filter 2: (public.emp_phone1.office IS NOT NULL) + Filter 3: (public.emp_phone1.mobile IS NOT NULL) + -> Seq Scan on public.emp_phone1 (cost=0.00..11.63 rows=163 width=472) (actual time=0.006..0.006 rows=5 loops=1) + Output: public.emp_phone1.name, public.emp_phone1.home, public.emp_phone1.office, public.emp_phone1.mobile + -> Hash (cost=17.72..17.72 rows=487 width=154) (actual time=0.024..0.024 rows=9 loops=1) + Output: p2.name, p2.type, p2.phone + Buckets: 32768 Batches: 1 Memory Usage: 257kB + -> Unpivot (cost=0.00..12.85 rows=487 width=154) (actual time=0.001..0.014 rows=9 loops=1) + Output: p2.name, p2.type, p2.phone + Project 1: public.emp_phone1.name, 1, public.emp_phone1.home + Project 2: public.emp_phone1.name, 2, public.emp_phone1.office + Project 3: public.emp_phone1.name, 3, public.emp_phone1.mobile + Filter 1: (public.emp_phone1.home IS NOT NULL) + Filter 2: (public.emp_phone1.office IS NOT NULL) + Filter 3: (public.emp_phone1.mobile IS NOT NULL) + -> Seq Scan on public.emp_phone1 (cost=0.00..11.63 rows=163 width=472) (actual time=0.001..0.013 rows=5 loops=1) + Output: public.emp_phone1.name, public.emp_phone1.home, public.emp_phone1.office, public.emp_phone1.mobile + Total runtime: 0.290 ms +(27 rows) + +MogDB=# explain(verbose,analyze) select * from emp_phone1 unpivot(phone for type in (home as 1, office as 2, mobile as 3)) as p1, emp_phone as p2 where p1.name=p2.name; + QUERY PLAN +------------------------------------------------------------------------------------------------------------------------------------------------- + Hash Join (cost=16.71..38.64 rows=726 distinct=[200, 200] width=398) (actual time=0.187..0.194 rows=26 loops=1) + Output: p1.name, p1.type, p1.phone, p2.name, p2.type, p2.phone + Hash Cond: ((p1.name)::text = (p2.name)::text) + -> Unpivot (cost=0.00..12.85 rows=487 width=154) (actual time=0.009..0.011 rows=9 loops=1) + Output: p1.name, p1.type, p1.phone + Project 1: emp_phone1.name, 1, emp_phone1.home + Project 2: emp_phone1.name, 2, emp_phone1.office + Project 3: emp_phone1.name, 3, emp_phone1.mobile + Filter 1: (emp_phone1.home IS NOT NULL) + Filter 2: (emp_phone1.office IS NOT NULL) + Filter 3: (emp_phone1.mobile IS NOT NULL) + -> Seq Scan on public.emp_phone1 (cost=0.00..11.63 rows=163 width=472) (actual time=0.005..0.005 rows=5 loops=1) + Output: emp_phone1.name, emp_phone1.home, emp_phone1.office, emp_phone1.mobile + -> Hash (cost=12.98..12.98 rows=298 width=244) (actual time=0.040..0.040 rows=11 loops=1) + Output: p2.name, p2.type, p2.phone + Buckets: 32768 Batches: 1 Memory Usage: 257kB + -> Partition Iterator (cost=0.00..12.98 rows=298 width=244) (actual time=0.025..0.033 rows=11 loops=1) + Output: p2.name, p2.type, p2.phone + Iterations: 2 + Selected Partitions: 1..2 + -> Partitioned Seq Scan on public.emp_phone p2 (cost=0.00..12.98 rows=298 width=244) (actual time=0.005..0.005 rows=11 loops=2) + Output: p2.name, p2.type, p2.phone + Total runtime: 0.299 ms +(23 rows) + +# UNPIVOT支持多个column +MogDB=# create table emp_phone2(name varchar2(50), home varchar2(50), office varchar2(50), mobile varchar2(50), extra varchar2(50)); +CREATE TABLE +MogDB=# insert into emp_phone2 values('aaa','1234-5678','3219-6066','5365-9583','11111'); +INSERT 0 1 +MogDB=# insert into emp_phone2 values('bbb','5838-9002','2749-5580','','22222'); +INSERT 0 1 +MogDB=# insert into emp_phone2 values('ccc','','9876-3453','','333333'); +INSERT 0 1 +MogDB=# insert into emp_phone2 values('ddd','6837-2745','','2649-5820','44444'); +INSERT 0 1 +MogDB=# insert into emp_phone2 values('eee','','','2649-5820','44444'); +INSERT 0 1 +MogDB=# select * from emp_phone2 unpivot((phone,phone1) for (type1,type2) in ((home,office) as (1,11), (mobile,extra) as (3,33))); + name | type1 | type2 | phone | phone1 +------+-------+-------+-----------+----------- + aaa | 1 | 11 | 1234-5678 | 3219-6066 + aaa | 3 | 33 | 5365-9583 | 11111 + bbb | 1 | 11 | 5838-9002 | 2749-5580 + bbb | 3 | 33 | | 22222 + ccc | 1 | 11 | | 9876-3453 + ccc | 3 | 33 | | 333333 + ddd | 1 | 11 | 6837-2745 | + ddd | 3 | 33 | 2649-5820 | 44444 + eee | 3 | 33 | 2649-5820 | 44444 +(9 rows) + +MogDB=# explain(verbose,analyze) select * from emp_phone2 unpivot((phone,phone1) for (type1,type2) in ((home,office) as (1,11), (mobile,extra) as (3,33))); + QUERY PLAN +----------------------------------------------------------------------------------------------------------------------------- + Unpivot (cost=0.00..11.98 rows=264 width=190) (actual time=0.009..0.012 rows=9 loops=1) + Output: unnamed_unpivot.name, unnamed_unpivot.type1, unnamed_unpivot.type2, unnamed_unpivot.phone, unnamed_unpivot.phone1 + Project 1: emp_phone2.name, 1, 11, emp_phone2.home, emp_phone2.office + Project 2: emp_phone2.name, 3, 33, emp_phone2.mobile, emp_phone2.extra + Filter 1: ((emp_phone2.home IS NOT NULL) OR (emp_phone2.office IS NOT NULL)) + Filter 2: ((emp_phone2.mobile IS NOT NULL) OR (emp_phone2.extra IS NOT NULL)) + -> Seq Scan on public.emp_phone2 (cost=0.00..11.32 rows=132 width=590) (actual time=0.006..0.007 rows=5 loops=1) + Output: emp_phone2.name, emp_phone2.home, emp_phone2.office, emp_phone2.mobile, emp_phone2.extra + Total runtime: 0.078 ms +(9 rows) + +# UNPIVOT支持with子句 +MogDB=# with t as (select 0 a,1 b,2 c,3 d) select * from t unpivot (val for col in (A,B,C,D)); + col | val +-----+----- + a | 0 + b | 1 + c | 2 + d | 3 +(4 rows) + +MogDB=# explain(verbose,analyze) with t as (select 0 a,1 b,2 c,3 d) select * from t unpivot (val for col in (A,B,C,D)); + QUERY PLAN +------------------------------------------------------------------------------------------ + Unpivot (cost=0.00..0.02 rows=1 width=36) (actual time=0.004..0.005 rows=4 loops=1) + Output: unnamed_unpivot.col, unnamed_unpivot.val + Project 1: 'a'::text, (0) + Project 2: 'b'::text, (1) + Project 3: 'c'::text, (2) + Project 4: 'd'::text, (3) + Filter 1: ((0) IS NOT NULL) + Filter 2: ((1) IS NOT NULL) + Filter 3: ((2) IS NOT NULL) + Filter 4: ((3) IS NOT NULL) + -> Result (cost=0.00..0.01 rows=1 width=0) (actual time=0.002..0.002 rows=1 loops=1) + Output: 0, 1, 2, 3 + Total runtime: 0.047 ms +(13 rows) + +# UNPIVOT支持view +MogDB=# create view tv2 as select * from emp_phone2 unpivot include nulls((phone,phone1) for (type1,type2) in ((home,office) as (1,11), (mobile,extra) as (3,33))); +CREATE VIEW +MogDB=# \d+ tv2; + View "public.tv2" + Column | Type | Modifiers | Storage | Description +--------+-----------------------+-----------+----------+------------- + name | character varying(50) | | extended | + type1 | integer | | plain | + type2 | integer | | plain | + phone | character varying | | extended | + phone1 | character varying | | extended | +View definition: + SELECT * + FROM emp_phone2 UNPIVOT INCLUDE NULLS ((phone,phone1) FOR (type1,type2) IN ((home,office) AS (1,11),(mobile,extra) AS (3,33))); +MogDB=# select * from tv2; + name | type1 | type2 | phone | phone1 +------+-------+-------+-----------+----------- + aaa | 1 | 11 | 1234-5678 | 3219-6066 + aaa | 3 | 33 | 5365-9583 | 11111 + bbb | 1 | 11 | 5838-9002 | 2749-5580 + bbb | 3 | 33 | | 22222 + ccc | 1 | 11 | | 9876-3453 + ccc | 3 | 33 | | 333333 + ddd | 1 | 11 | 6837-2745 | + ddd | 3 | 33 | 2649-5820 | 44444 + eee | 1 | 11 | | + eee | 3 | 33 | 2649-5820 | 44444 +(10 rows) +``` + +## 相关页面 + +[SELECT](../../reference-guide/sql-syntax/SELECT.md) diff --git a/product/zh/docs-mogdb/v5.0/performance-tuning/TPCC-performance-tuning-guide.md b/product/zh/docs-mogdb/v5.0/performance-tuning/TPCC-performance-tuning-guide.md index df4369775fcccdac3e883e99acc97b3504fca574..a7740e35a42b441b66fa6505004de94d00549313 100644 --- a/product/zh/docs-mogdb/v5.0/performance-tuning/TPCC-performance-tuning-guide.md +++ b/product/zh/docs-mogdb/v5.0/performance-tuning/TPCC-performance-tuning-guide.md @@ -387,10 +387,12 @@ date: 2021-08-03 yum install numa* -y ``` - 网卡驱动安装(包括数据库主机和客户端主机),参考上文**网络配置**部分。 + 网卡驱动安装(包括数据库主机和客户端主机),参考上文[网络配置](#4-网络配置)部分。 * 数据库主机 + [bind_net_irq.sh脚本](https://gitee.com/opengauss/openGauss-server/blob/master/src/bin/scripts/bind_net_irq.sh) + ```bash cp `find /opt -name "bind*.sh"|head -1 ` /root sh /root/bind_net_irq.sh 12 @@ -404,6 +406,7 @@ date: 2021-08-03 ``` 关闭数据库 + 启动数据库命令替换成: ```bash @@ -411,6 +414,7 @@ date: 2021-08-03 ``` * 客户端 + 拷贝/root/bind_net_irq.sh 到客户端 ```bash @@ -431,10 +435,12 @@ date: 2021-08-03 yum install numa* -y ``` - 网卡驱动安装(包括数据库主机和客户端主机),参考上文**网络配置**部分。 + 网卡驱动安装(包括数据库主机和客户端主机),参考上文[网络配置](#4-网络配置)部分。 * 数据库主机 + [bind_net_irq.sh脚本](https://gitee.com/opengauss/openGauss-server/blob/master/src/bin/scripts/bind_net_irq.sh) + ```bash cp `find /opt -name "bind*.sh"|head -1 ` /root sh /root/bind_net_irq.sh 24 @@ -448,6 +454,7 @@ date: 2021-08-03 ``` 关闭数据库 + 启动数据库命令替换成: ```bash @@ -455,6 +462,7 @@ date: 2021-08-03 ``` * 客户端 + 拷贝/root/bind_net_irq.sh 到客户端 ```bash diff --git a/product/zh/docs-mogdb/v5.0/reference-guide/functions-and-operators/sequence-functions.md b/product/zh/docs-mogdb/v5.0/reference-guide/functions-and-operators/sequence-functions.md index 0f7b3d29f17e304c4803e93c37b306033f952936..e7eb9770ba6ac607bfffcfab7e40c79fc6f1bfc1 100644 --- a/product/zh/docs-mogdb/v5.0/reference-guide/functions-and-operators/sequence-functions.md +++ b/product/zh/docs-mogdb/v5.0/reference-guide/functions-and-operators/sequence-functions.md @@ -124,7 +124,7 @@ date: 2021-04-20 > 因为序列是非事务的,setval造成的改变不会由于事务的回滚而撤销。 > > ![img](https://cdn-mogdb.enmotech.com/docs-media/icon/icon-notice.gif) **须知**: - > nextval函数只能在主机上执行,备机不支持执行此函数。 + > setval函数只能在主机上执行,备机不支持执行此函数。 - pg_sequence_last_value(sequence_oid oid, OUT cache_value int16, OUT last_value int16) diff --git a/product/zh/docs-mogdb/v5.0/reference-guide/functions-and-operators/system-management-functions/logical-replication-functions.md b/product/zh/docs-mogdb/v5.0/reference-guide/functions-and-operators/system-management-functions/logical-replication-functions.md index 9438397c662577769d5342f88d8eeb18078f917d..75981b2ceca03b87941b19ae1a215f3aea4c65bd 100644 --- a/product/zh/docs-mogdb/v5.0/reference-guide/functions-and-operators/system-management-functions/logical-replication-functions.md +++ b/product/zh/docs-mogdb/v5.0/reference-guide/functions-and-operators/system-management-functions/logical-replication-functions.md @@ -163,7 +163,7 @@ date: 2021-04-20 - pg_logical_slot_peek_binary_changes('slot_name', 'LSN', upto_nchanges, 'options_name', 'options_value') - 描述:以二进制格解码且不推进流复制槽(下次解码可以再次获取本次解出的数据)。 + 描述:以二进制格式解码且不推进流复制槽(下次解码可以再次获取本次解出的数据)。 参数说明: diff --git a/product/zh/docs-mogdb/v5.0/reference-guide/guc-parameters/file-location.md b/product/zh/docs-mogdb/v5.0/reference-guide/guc-parameters/file-location.md index 7ff18741a4eb8fe3503365a8bdf4c1a2fe18fe55..1ace6126b5ddcf653e903d0ca57efb56811380d3 100644 --- a/product/zh/docs-mogdb/v5.0/reference-guide/guc-parameters/file-location.md +++ b/product/zh/docs-mogdb/v5.0/reference-guide/guc-parameters/file-location.md @@ -66,3 +66,21 @@ date: 2021-04-20 **取值范围**: 字符串 **默认值**: 空 + +## enable_default_cfunc_libpath + +**参数说明**:设置MogDB创建C函数时的so文件是否使用默认路径。 + +该参数属于POSTMASTER类型参数,请参考[GUC参数分类](appendix.md)中对应设置方法进行设置。 + +**取值范围**:布尔型 + +on:代表创建C函数时,so文件必须放在指定的目录($libdir/proc_srclib)下。 + +off:代表创建C函数时,so文件可以放在任意可访问的目录下。 + +**默认值**:on + +> ![img](https://cdn-mogdb.enmotech.com/docs-media/icon/icon-notice.gif) **须知**: +> +> 参数设置成off时,.so文件可以放在任意可访问的目录下或使用系统自带的.so,存在安全风险,不建议使用。 diff --git a/product/zh/docs-mogdb/v5.0/reference-guide/guc-parameters/guc-parameter-list.md b/product/zh/docs-mogdb/v5.0/reference-guide/guc-parameters/guc-parameter-list.md index 4681eb07d9de28c8f8edf36084e19ae0755731ee..7b1a9a311587a115764309076f5d02ebc8e4c793 100644 --- a/product/zh/docs-mogdb/v5.0/reference-guide/guc-parameters/guc-parameter-list.md +++ b/product/zh/docs-mogdb/v5.0/reference-guide/guc-parameters/guc-parameter-list.md @@ -11,60 +11,60 @@ date: 2023-04-07 | ------------------------------------------------------------ | | [acce_min_datasize_per_thread](reserved-parameters.md) | | [advance_xlog_file_num](developer-options.md#advance_xlog_file_num) | -| [agent_backup_open](../../reference-guide/guc-parameters/cm-parameters/cm_agent.md#agent_backup_open) | -| [agent_check_interval](../../reference-guide/guc-parameters/cm-parameters/cm_agent.md#agent_check_interval) | -| [agent_connect_retries](../../reference-guide/guc-parameters/cm-parameters/cm_agent.md#agent_connect_retries) | -| [agent_connect_timeout](../../reference-guide/guc-parameters/cm-parameters/cm_agent.md#agent_connect_timeout) | -| [agent_heartbeat_timeout](../../reference-guide/guc-parameters/cm-parameters/cm_agent.md#agent_heartbeat_timeout) | -| [agent_kill_instance_timeout](../../reference-guide/guc-parameters/cm-parameters/cm_agent.md#agent_kill_instance_timeout) | -| [agent_phony_dead_check_interval](../../reference-guide/guc-parameters/cm-parameters/cm_agent.md#agent_phony_dead_check_interval) | -| [agent_report_interval](../../reference-guide/guc-parameters/cm-parameters/cm_agent.md#agent_report_interval) | -| [alarm_component](../../reference-guide/guc-parameters/cm-parameters/cm_agent.md#alarm_component) | +| [agent_backup_open](cm-parameters/cm_agent.md#agent_backup_open) | +| [agent_check_interval](cm-parameters/cm_agent.md#agent_check_interval) | +| [agent_connect_retries](cm-parameters/cm_agent.md#agent_connect_retries) | +| [agent_connect_timeout](cm-parameters/cm_agent.md#agent_connect_timeout) | +| [agent_heartbeat_timeout](cm-parameters/cm_agent.md#agent_heartbeat_timeout) | +| [agent_kill_instance_timeout](cm-parameters/cm_agent.md#agent_kill_instance_timeout) | +| [agent_phony_dead_check_interval](cm-parameters/cm_agent.md#agent_phony_dead_check_interval) | +| [agent_report_interval](cm-parameters/cm_agent.md#agent_report_interval) | +| [alarm_component](cm-parameters/cm_agent.md#alarm_component) | | [alarm_report_interval](alarm-detection.md#alarm_report_interval) | -| [alarm_report_max_count](../../reference-guide/guc-parameters/cm-parameters/cm_agent.md#alarm_report_max_count) | -| [allocate_mem_cost](../../reference-guide/guc-parameters/query-planning/optimizer-cost-constants.md#allocate_mem_cost) | +| [alarm_report_max_count](cm-parameters/cm_agent.md#alarm_report_max_count) | +| [allocate_mem_cost](query-planning/optimizer-cost-constants.md#allocate_mem_cost) | | [allow_concurrent_tuple_update](MogDB-transaction.md#allow_concurrent_tuple_update) | | [allow_system_table_mods](developer-options.md#allow_system_table_mods) | -| [analysis_options](../../reference-guide/guc-parameters/query-planning/other-optimizer-options.md#analysis_options) | -| [application_name](../../reference-guide/guc-parameters/connection-and-authentication/connection-settings.md#application_name) | -| [archive_command](../../reference-guide/guc-parameters/write-ahead-log/archiving.md#archive_command) | -| [archive_dest](../../reference-guide/guc-parameters/write-ahead-log/archiving.md#archive_dest) | -| [archive_interval](../../reference-guide/guc-parameters/write-ahead-log/archiving.md#archive_interval) | -| [archive_mode](../../reference-guide/guc-parameters/write-ahead-log/archiving.md#archive_mode) | -| [archive_timeout](../../reference-guide/guc-parameters/write-ahead-log/archiving.md#archive_timeout) | -| [array_nulls](../../reference-guide/guc-parameters/version-and-platform-compatibility/compatibility-with-earlier-versions.md#array_nulls) | +| [analysis_options](query-planning/other-optimizer-options.md#analysis_options) | +| [application_name](connection-and-authentication/connection-settings.md#application_name) | +| [archive_command](write-ahead-log/archiving.md#archive_command) | +| [archive_dest](write-ahead-log/archiving.md#archive_dest) | +| [archive_interval](write-ahead-log/archiving.md#archive_interval) | +| [archive_mode](write-ahead-log/archiving.md#archive_mode) | +| [archive_timeout](write-ahead-log/archiving.md#archive_timeout) | +| [array_nulls](version-and-platform-compatibility/compatibility-with-earlier-versions.md#array_nulls) | | [asp_flush_mode](system-performance-snapshot.md#asp_flush_mode) | | [asp_flush_rate](system-performance-snapshot.md#asp_flush_rate) | | [asp_log_filename](system-performance-snapshot.md#asp_log_filename) | | [asp_retention_days](system-performance-snapshot.md#asp_retention_days) | | [asp_sample_interval](system-performance-snapshot.md#asp_sample_interval) | | [asp_sample_num](system-performance-snapshot.md#asp_sample_num) | -| [audit_copy_exec](../../reference-guide/guc-parameters/auditing/operation-audit.md#audit_copy_exec) | -| [audit_data_format](../../reference-guide/guc-parameters/auditing/audit-switch.md#audit_data_format) | -| [audit_database_process](../../reference-guide/guc-parameters/auditing/user-and-permission-audit.md#audit_database_process) | -| [audit_directory](../../reference-guide/guc-parameters/auditing/audit-switch.md#audit_directory) | -| [audit_dml_state](../../reference-guide/guc-parameters/auditing/operation-audit.md#audit_dml_state) | -| [audit_dml_state_select](../../reference-guide/guc-parameters/auditing/operation-audit.md#audit_dml_state_select) | -| [audit_enabled](../../reference-guide/guc-parameters/auditing/audit-switch.md#audit_enabled) | -| [audit_file_remain_threshold](../../reference-guide/guc-parameters/auditing/audit-switch.md#audit_file_remain_threshold) | -| [audit_file_remain_time](../../reference-guide/guc-parameters/auditing/audit-switch.md#audit_file_remain_time) | -| [audit_function_exec](../../reference-guide/guc-parameters/auditing/operation-audit.md#audit_function_exec) | -| [audit_grant_revoke](../../reference-guide/guc-parameters/auditing/user-and-permission-audit.md#audit_grant_revoke) | -| [audit_login_logout](../../reference-guide/guc-parameters/auditing/user-and-permission-audit.md#audit_login_logout) | -| [audit_resource_policy](../../reference-guide/guc-parameters/auditing/audit-switch.md#audit_resource_policy) | -| [audit_rotation_interval](../../reference-guide/guc-parameters/auditing/audit-switch.md#audit_rotation_interval) | -| [audit_rotation_size](../../reference-guide/guc-parameters/auditing/audit-switch.md#audit_rotation_size) | -| [audit_set_parameter](../../reference-guide/guc-parameters/auditing/operation-audit.md#audit_set_parameter) | -| [audit_space_limit](../../reference-guide/guc-parameters/auditing/audit-switch.md#audit_space_limit) | -| [audit_system_object](../../reference-guide/guc-parameters/auditing/operation-audit.md#audit_system_object) | -| [audit_thread_num](../../reference-guide/guc-parameters/auditing/audit-switch.md#audit_thread_num) | -| [audit_user_locked](../../reference-guide/guc-parameters/auditing/user-and-permission-audit.md#audit_user_locked) | -| [audit_user_violation](../../reference-guide/guc-parameters/auditing/user-and-permission-audit.md#audit_user_violation) | -| [audit_xid_info](../../reference-guide/guc-parameters/auditing/operation-audit.md#audit_xid_info) | -| [auth_iteration_count](../../reference-guide/guc-parameters/connection-and-authentication/security-and-authentication.md#auth_iteration_count) | -| [authentication_timeout](../../reference-guide/guc-parameters/connection-and-authentication/security-and-authentication.md#authentication_timeout) | -| [auto_explain_level](../../reference-guide/guc-parameters/query-planning/other-optimizer-options.md#auto_explain_level) | -| [autoanalyze](../../reference-guide/guc-parameters/query-planning/other-optimizer-options.md#autoanalyze) | +| [audit_copy_exec](auditing/operation-audit.md#audit_copy_exec) | +| [audit_data_format](auditing/audit-switch.md#audit_data_format) | +| [audit_database_process](auditing/user-and-permission-audit.md#audit_database_process) | +| [audit_directory](auditing/audit-switch.md#audit_directory) | +| [audit_dml_state](auditing/operation-audit.md#audit_dml_state) | +| [audit_dml_state_select](auditing/operation-audit.md#audit_dml_state_select) | +| [audit_enabled](auditing/audit-switch.md#audit_enabled) | +| [audit_file_remain_threshold](auditing/audit-switch.md#audit_file_remain_threshold) | +| [audit_file_remain_time](auditing/audit-switch.md#audit_file_remain_time) | +| [audit_function_exec](auditing/operation-audit.md#audit_function_exec) | +| [audit_grant_revoke](auditing/user-and-permission-audit.md#audit_grant_revoke) | +| [audit_login_logout](auditing/user-and-permission-audit.md#audit_login_logout) | +| [audit_resource_policy](auditing/audit-switch.md#audit_resource_policy) | +| [audit_rotation_interval](auditing/audit-switch.md#audit_rotation_interval) | +| [audit_rotation_size](auditing/audit-switch.md#audit_rotation_size) | +| [audit_set_parameter](auditing/operation-audit.md#audit_set_parameter) | +| [audit_space_limit](auditing/audit-switch.md#audit_space_limit) | +| [audit_system_object](auditing/operation-audit.md#audit_system_object) | +| [audit_thread_num](auditing/audit-switch.md#audit_thread_num) | +| [audit_user_locked](auditing/user-and-permission-audit.md#audit_user_locked) | +| [audit_user_violation](auditing/user-and-permission-audit.md#audit_user_violation) | +| [audit_xid_info](auditing/operation-audit.md#audit_xid_info) | +| [auth_iteration_count](connection-and-authentication/security-and-authentication.md#auth_iteration_count) | +| [authentication_timeout](connection-and-authentication/security-and-authentication.md#authentication_timeout) | +| [auto_explain_level](query-planning/other-optimizer-options.md#auto_explain_level) | +| [autoanalyze](query-planning/other-optimizer-options.md#autoanalyze) | | [autoanalyze_timeout](automatic-vacuuming.md#autoanalyze_timeout) | | [autovacuum](automatic-vacuuming.md#autovacuum) | | [autovacuum_analyze_scale_factor](automatic-vacuuming.md#autovacuum_analyze_scale_factor) | @@ -78,88 +78,88 @@ date: 2023-04-07 | [autovacuum_vacuum_cost_limit](automatic-vacuuming.md#autovacuum_vacuum_cost_limit) | | [autovacuum_vacuum_scale_factor](automatic-vacuuming.md#autovacuum_vacuum_scale_factor) | | [autovacuum_vacuum_threshold](automatic-vacuuming.md#autovacuum_vacuum_threshold) | -| [available_zone](../../reference-guide/guc-parameters/ha-replication/sending-server.md#available_zone) | -| [az_check_and_arbitrate_interval](../../reference-guide/guc-parameters/cm-parameters/cm_server.md#az_check_and_arbitrate_interval) | -| [az_connect_check_delay_time](../../reference-guide/guc-parameters/cm-parameters/cm_server.md#az_connect_check_delay_time) | -| [az_connect_check_interval](../../reference-guide/guc-parameters/cm-parameters/cm_server.md#az_connect_check_interval) | -| [az_switchover_threshold](../../reference-guide/guc-parameters/cm-parameters/cm_server.md#az_switchover_threshold) | -| [backend_flush_after](../../reference-guide/guc-parameters/resource-consumption/asynchronous-io-operations.md#backend_flush_after) | +| [available_zone](ha-replication/sending-server.md#available_zone) | +| [az_check_and_arbitrate_interval](cm-parameters/cm_server.md#az_check_and_arbitrate_interval) | +| [az_connect_check_delay_time](cm-parameters/cm_server.md#az_connect_check_delay_time) | +| [az_connect_check_interval](cm-parameters/cm_server.md#az_connect_check_interval) | +| [az_switchover_threshold](cm-parameters/cm_server.md#az_switchover_threshold) | +| [backend_flush_after](resource-consumption/asynchronous-io-operations.md#backend_flush_after) | | [backend_version](reserved-parameters.md) | -| [backslash_quote](../../reference-guide/guc-parameters/version-and-platform-compatibility/compatibility-with-earlier-versions.md#backslash_quote) | -| [backtrace_min_messages](../../reference-guide/guc-parameters/error-reporting-and-logging/logging-time.md#backtrace_min_messages) | -| [backup_open](../../reference-guide/guc-parameters/cm-parameters/cm_server.md#backup_open) | -| [backwrite_quantity](../../reference-guide/guc-parameters/resource-consumption/asynchronous-io-operations.md#backwrite_quantity) | +| [backslash_quote](version-and-platform-compatibility/compatibility-with-earlier-versions.md#backslash_quote) | +| [backtrace_min_messages](error-reporting-and-logging/logging-time.md#backtrace_min_messages) | +| [backup_open](cm-parameters/cm_server.md#backup_open) | +| [backwrite_quantity](resource-consumption/asynchronous-io-operations.md#backwrite_quantity) | | [basebackup_timeout](miscellaneous-parameters.md#basebackup_timeout) | | [bbox_blanklist_items](load-management.md#bbox_blanklist_items) | | [bbox_dump_count](load-management.md#bbox_dump_count) | | [bbox_dump_path](load-management.md#bbox_dump_path) | -| [behavior_compat_options](../../reference-guide/guc-parameters/version-and-platform-compatibility/platform-and-client-compatibility.md#behavior_compat_options) | -| [bgwriter_delay](../../reference-guide/guc-parameters/resource-consumption/background-writer.md#bgwriter_delay) | -| [bgwriter_flush_after](../../reference-guide/guc-parameters/resource-consumption/asynchronous-io-operations.md#bgwriter_flush_after) | -| [bgwriter_lru_maxpages](../../reference-guide/guc-parameters/resource-consumption/background-writer.md#bgwriter_lru_maxpages) | -| [bgwriter_lru_multiplier](../../reference-guide/guc-parameters/resource-consumption/background-writer.md#bgwriter_lru_multiplier) | -| [bgwriter_thread_num](../../reference-guide/guc-parameters/resource-consumption/background-writer.md#bgwriter_thread_num) | -| [block_encryption_mode](../../reference-guide/guc-parameters/security-configuration.md#block_encryption_mode) | +| [behavior_compat_options](version-and-platform-compatibility/platform-and-client-compatibility.md#behavior_compat_options) | +| [bgwriter_delay](resource-consumption/background-writer.md#bgwriter_delay) | +| [bgwriter_flush_after](resource-consumption/asynchronous-io-operations.md#bgwriter_flush_after) | +| [bgwriter_lru_maxpages](resource-consumption/background-writer.md#bgwriter_lru_maxpages) | +| [bgwriter_lru_multiplier](resource-consumption/background-writer.md#bgwriter_lru_multiplier) | +| [bgwriter_thread_num](resource-consumption/background-writer.md#bgwriter_thread_num) | +| [block_encryption_mode](security-configuration.md#block_encryption_mode) | | [block_size](miscellaneous-parameters.md#block_size) | -| [bulk_read_ring_size](../../reference-guide/guc-parameters/resource-consumption/memory.md#bulk_read_ring_size) | -| [bulk_write_ring_size](../../reference-guide/guc-parameters/resource-consumption/memory.md#bulk_write_ring_size) | -| [bytea_output](../../reference-guide/guc-parameters/default-settings-of-client-connection/statement-behavior.md#bytea_output) | +| [bulk_read_ring_size](resource-consumption/memory.md#bulk_read_ring_size) | +| [bulk_write_ring_size](resource-consumption/memory.md#bulk_write_ring_size) | +| [bytea_output](default-settings-of-client-connection/statement-behavior.md#bytea_output) | | [cache_connection](connection-pool-parameters.md#cache_connection) | -| [candidate_buf_percent_target](../../reference-guide/guc-parameters/resource-consumption/background-writer.md#candidate_buf_percent_target) | -| [catchup2normal_wait_time](../../reference-guide/guc-parameters/ha-replication/primary-server.md#catchup2normal_wait_time) | +| [candidate_buf_percent_target](resource-consumption/background-writer.md#candidate_buf_percent_target) | +| [catchup2normal_wait_time](ha-replication/primary-server.md#catchup2normal_wait_time) | | [cgroup_name](load-management.md#cgroup_name) | -| [check_function_bodies](../../reference-guide/guc-parameters/default-settings-of-client-connection/statement-behavior.md#check_function_bodies) | -| [check_implicit_conversions](../../reference-guide/guc-parameters/query-planning/optimizer-method-configuration.md#check_implicit_conversions) | -| [checkpoint_completion_target](../../reference-guide/guc-parameters/write-ahead-log/checkpoints.md#checkpoint_completion_target) | -| [checkpoint_flush_after](../../reference-guide/guc-parameters/resource-consumption/asynchronous-io-operations.md#checkpoint_flush_after) | -| [checkpoint_segments](../../reference-guide/guc-parameters/write-ahead-log/checkpoints.md#checkpoint_segments) | -| [checkpoint_timeout](../../reference-guide/guc-parameters/write-ahead-log/checkpoints.md#checkpoint_timeout) | -| [checkpoint_wait_timeout](../../reference-guide/guc-parameters/write-ahead-log/checkpoints.md#checkpoint_wait_timeout) | -| [checkpoint_warning](../../reference-guide/guc-parameters/write-ahead-log/checkpoints.md#checkpoint_warning) | -| [client_encoding](../../reference-guide/guc-parameters/default-settings-of-client-connection/zone-and-formatting.md#client_encoding) | -| [client_min_messages](../../reference-guide/guc-parameters/error-reporting-and-logging/logging-time.md#client_min_messages) | -| [cm_auth_method](../../reference-guide/guc-parameters/cm-parameters/cm_server.md#cm_auth_method) | -| [cm_krb_server_keyfile](../../reference-guide/guc-parameters/cm-parameters/cm_server.md#cm_krb_server_keyfile) | -| [cm_server_arbitrate_delay_base_time_out](../../reference-guide/guc-parameters/cm-parameters/cm_server.md#cm_server_arbitrate_delay_base_time_out) | -| [cm_server_arbitrate_delay_incrememtal_time_out](../../reference-guide/guc-parameters/cm-parameters/cm_server.md#cm_server_arbitrate_delay_incrememtal_time_out) | -| [cmserver_demote_delay_on_etcd_fault](../../reference-guide/guc-parameters/cm-parameters/cm_server.md#cmserver_demote_delay_on_etcd_fault) | -| [cmserver_ha_connect_timeout](../../reference-guide/guc-parameters/cm-parameters/cm_server.md#cmserver_ha_connect_timeout) | -| [cmserver_ha_heartbeat_timeout](../../reference-guide/guc-parameters/cm-parameters/cm_server.md#cmserver_ha_heartbeat_timeout) | -| [cmserver_ha_status_interval](../../reference-guide/guc-parameters/cm-parameters/cm_server.md#cmserver_ha_status_interval) | -| [cmserver_self_vote_timeout](../../reference-guide/guc-parameters/cm-parameters/cm_server.md#cmserver_self_vote_timeout) | +| [check_function_bodies](default-settings-of-client-connection/statement-behavior.md#check_function_bodies) | +| [check_implicit_conversions](query-planning/optimizer-method-configuration.md#check_implicit_conversions) | +| [checkpoint_completion_target](write-ahead-log/checkpoints.md#checkpoint_completion_target) | +| [checkpoint_flush_after](resource-consumption/asynchronous-io-operations.md#checkpoint_flush_after) | +| [checkpoint_segments](write-ahead-log/checkpoints.md#checkpoint_segments) | +| [checkpoint_timeout](write-ahead-log/checkpoints.md#checkpoint_timeout) | +| [checkpoint_wait_timeout](write-ahead-log/checkpoints.md#checkpoint_wait_timeout) | +| [checkpoint_warning](write-ahead-log/checkpoints.md#checkpoint_warning) | +| [client_encoding](default-settings-of-client-connection/zone-and-formatting.md#client_encoding) | +| [client_min_messages](error-reporting-and-logging/logging-time.md#client_min_messages) | +| [cm_auth_method](cm-parameters/cm_server.md#cm_auth_method) | +| [cm_krb_server_keyfile](cm-parameters/cm_server.md#cm_krb_server_keyfile) | +| [cm_server_arbitrate_delay_base_time_out](cm-parameters/cm_server.md#cm_server_arbitrate_delay_base_time_out) | +| [cm_server_arbitrate_delay_incrememtal_time_out](cm-parameters/cm_server.md#cm_server_arbitrate_delay_incrememtal_time_out) | +| [cmserver_demote_delay_on_etcd_fault](cm-parameters/cm_server.md#cmserver_demote_delay_on_etcd_fault) | +| [cmserver_ha_connect_timeout](cm-parameters/cm_server.md#cmserver_ha_connect_timeout) | +| [cmserver_ha_heartbeat_timeout](cm-parameters/cm_server.md#cmserver_ha_heartbeat_timeout) | +| [cmserver_ha_status_interval](cm-parameters/cm_server.md#cmserver_ha_status_interval) | +| [cmserver_self_vote_timeout](cm-parameters/cm_server.md#cmserver_self_vote_timeout) | | [cn_send_buffer_size](fault-tolerance.md#cn_send_buffer_size) | -| [codegen_cost_threshold](../../reference-guide/guc-parameters/query-planning/other-optimizer-options.md#codegen_cost_threshold) | +| [codegen_cost_threshold](query-planning/other-optimizer-options.md#codegen_cost_threshold) | | [codegen_mot_limit](mot.md#codegen_mot_limit) | -| [codegen_strategy](../../reference-guide/guc-parameters/query-planning/other-optimizer-options.md#codegen_strategy) | -| [comm_proxy_attr](../../reference-guide/guc-parameters/connection-and-authentication/communication-library-parameters.md#comm_proxy_attr) | -| [commit_delay](../../reference-guide/guc-parameters/write-ahead-log/settings.md#commit_delay) | -| [commit_siblings](../../reference-guide/guc-parameters/write-ahead-log/settings.md#commit_siblings) | +| [codegen_strategy](query-planning/other-optimizer-options.md#codegen_strategy) | +| [comm_proxy_attr](connection-and-authentication/communication-library-parameters.md#comm_proxy_attr) | +| [commit_delay](write-ahead-log/settings.md#commit_delay) | +| [commit_siblings](write-ahead-log/settings.md#commit_siblings) | | [config_file](file-location.md#config_file) | | [connection_alarm_rate](alarm-detection.md#connection_alarm_rate) | -| [connection_info](../../reference-guide/guc-parameters/connection-and-authentication/connection-settings.md#connection_info) | -| [constraint_exclusion](../../reference-guide/guc-parameters/query-planning/other-optimizer-options.md#constraint_exclusion) | -| [convert_string_to_digit](../../reference-guide/guc-parameters/version-and-platform-compatibility/platform-and-client-compatibility.md#convert_string_to_digit) | -| [cost_param](../../reference-guide/guc-parameters/query-planning/other-optimizer-options.md#cost_param) | -| [cost_weight_index](../../reference-guide/guc-parameters/query-planning/optimizer-method-configuration.md#cost_weight_index) | +| [connection_info](connection-and-authentication/connection-settings.md#connection_info) | +| [constraint_exclusion](query-planning/other-optimizer-options.md#constraint_exclusion) | +| [convert_string_to_digit](version-and-platform-compatibility/platform-and-client-compatibility.md#convert_string_to_digit) | +| [cost_param](query-planning/other-optimizer-options.md#cost_param) | +| [cost_weight_index](query-planning/optimizer-method-configuration.md#cost_weight_index) | | [cpu_collect_timer](load-management.md#cpu_collect_timer) | -| [cpu_index_tuple_cost](../../reference-guide/guc-parameters/query-planning/optimizer-cost-constants.md#cpu_index_tuple_cost) | -| [cpu_operator_cost](../../reference-guide/guc-parameters/query-planning/optimizer-cost-constants.md#cpu_operator_cost) | -| [cpu_tuple_cost](../../reference-guide/guc-parameters/query-planning/optimizer-cost-constants.md#cpu_tuple_cost) | -| [cross_cluster_replconninfoN](../../reference-guide/guc-parameters/ha-replication/sending-server.md#cross_cluster_replconninfon) | -| [cstore_backwrite_max_threshold](../../reference-guide/guc-parameters/resource-consumption/asynchronous-io-operations.md#cstore_backwrite_max_threshold) | -| [cstore_backwrite_quantity](../../reference-guide/guc-parameters/resource-consumption/asynchronous-io-operations.md#cstore_backwrite_quantity) | -| [cstore_buffers](../../reference-guide/guc-parameters/resource-consumption/memory.md#cstore_buffers) | +| [cpu_index_tuple_cost](query-planning/optimizer-cost-constants.md#cpu_index_tuple_cost) | +| [cpu_operator_cost](query-planning/optimizer-cost-constants.md#cpu_operator_cost) | +| [cpu_tuple_cost](query-planning/optimizer-cost-constants.md#cpu_tuple_cost) | +| [cross_cluster_replconninfoN](ha-replication/sending-server.md#cross_cluster_replconninfon) | +| [cstore_backwrite_max_threshold](resource-consumption/asynchronous-io-operations.md#cstore_backwrite_max_threshold) | +| [cstore_backwrite_quantity](resource-consumption/asynchronous-io-operations.md#cstore_backwrite_quantity) | +| [cstore_buffers](resource-consumption/memory.md#cstore_buffers) | | [cstore_insert_mode](reserved-parameters.md) | -| [cstore_prefetch_quantity](../../reference-guide/guc-parameters/resource-consumption/asynchronous-io-operations.md#cstore_prefetch_quantity) | -| [current_schema](../../reference-guide/guc-parameters/default-settings-of-client-connection/statement-behavior.md#current_schema) | -| [cursor_tuple_fraction](../../reference-guide/guc-parameters/query-planning/other-optimizer-options.md#cursor_tuple_fraction) | +| [cstore_prefetch_quantity](resource-consumption/asynchronous-io-operations.md#cstore_prefetch_quantity) | +| [current_schema](default-settings-of-client-connection/statement-behavior.md#current_schema) | +| [cursor_tuple_fraction](query-planning/other-optimizer-options.md#cursor_tuple_fraction) | | [data_directory](file-location.md#data_directory) | -| [data_replicate_buffer_size](../../reference-guide/guc-parameters/ha-replication/primary-server.md#data_replicate_buffer_size) | +| [data_replicate_buffer_size](ha-replication/primary-server.md#data_replicate_buffer_size) | | [data_sync_retry](fault-tolerance.md#data_sync_retry) | | [datanode_heartbeat_interval](miscellaneous-parameters.md#datanode_heartbeat_interval) | -| [datastorage_threshold_check_interval](../../reference-guide/guc-parameters/cm-parameters/cm_server.md#datastorage_threshold_check_interval) | -| [datastorage_threshold_value_check](../../reference-guide/guc-parameters/cm-parameters/cm_server.md#datastorage_threshold_value_check) | -| [DateStyle](../../reference-guide/guc-parameters/default-settings-of-client-connection/zone-and-formatting.md#datestyle) | +| [datastorage_threshold_check_interval](cm-parameters/cm_server.md#datastorage_threshold_check_interval) | +| [datastorage_threshold_value_check](cm-parameters/cm_server.md#datastorage_threshold_value_check) | +| [DateStyle](default-settings-of-client-connection/zone-and-formatting.md#datestyle) | | [db4ai_snapshot_mode](AI-features.md#db4ai_snapshot_mode) | | [db4ai_snapshot_version_delimiter](AI-features.md#db4ai_snapshot_version_delimiter) | | [db4ai_snapshot_version_separator](AI-features.md#db4ai_snapshot_version_separator) | @@ -179,7 +179,7 @@ date: 2023-04-07 | [dcf_log_level](DCF-parameters-settings.md#dcf_log_level) | | [dcf_log_path](DCF-parameters-settings.md#dcf_log_path) | | [dcf_log_path_permission](DCF-parameters-settings.md#dcf_log_path_permission) | -| [dcf_majority_groups](../../reference-guide/guc-parameters/DCF-parameters-settings.md#dcf_majority_groups) | +| [dcf_majority_groups](DCF-parameters-settings.md#dcf_majority_groups) | | [dcf_max_log_file_size](DCF-parameters-settings.md#dcf_max_log_file_size) | | [dcf_max_workers](DCF-parameters-settings.md#dcf_max_workers) | | [dcf_mec_agent_thread_num](DCF-parameters-settings.md#dcf_mec_agent_thread_num) | @@ -198,378 +198,379 @@ date: 2023-04-07 | [dcf_stg_pool_init_size](DCF-parameters-settings.md#dcf_stg_pool_init_size) | | [dcf_stg_pool_max_size](DCF-parameters-settings.md#dcf_stg_pool_max_size) | | [dcf_truncate_threshold](DCF-parameters-settings.md#dcf_truncate_threshold) | -| [ddb_election_timeout](../../reference-guide/guc-parameters/cm-parameters/cm_server.md#ddb_election_timeout) | -| [ddb_log_backup_file_count](../../reference-guide/guc-parameters/cm-parameters/cm_server.md#ddb_log_backup_file_count) | -| [ddb_log_level](../../reference-guide/guc-parameters/cm-parameters/cm_server.md#ddb_log_level) | -| [ddb_log_suppress_enable](../../reference-guide/guc-parameters/cm-parameters/cm_server.md#ddb_log_suppress_enable) | -| [ddb_max_log_file_size](../../reference-guide/guc-parameters/cm-parameters/cm_server.md#ddb_max_log_file_size) | -| [ddb_type](../../reference-guide/guc-parameters/cm-parameters/cm_server.md#ddb_type) | +| [ddb_election_timeout](cm-parameters/cm_server.md#ddb_election_timeout) | +| [ddb_log_backup_file_count](cm-parameters/cm_server.md#ddb_log_backup_file_count) | +| [ddb_log_level](cm-parameters/cm_server.md#ddb_log_level) | +| [ddb_log_suppress_enable](cm-parameters/cm_server.md#ddb_log_suppress_enable) | +| [ddb_max_log_file_size](cm-parameters/cm_server.md#ddb_max_log_file_size) | +| [ddb_type](cm-parameters/cm_server.md#ddb_type) | | [deadlock_timeout](lock-management.md#deadlock_timeout) | | [debug_assertions](developer-options.md#debug_assertions) | -| [debug_pretty_print](../../reference-guide/guc-parameters/error-reporting-and-logging/logging-content.md#debug_pretty_print) | -| [debug_print_parse](../../reference-guide/guc-parameters/error-reporting-and-logging/logging-content.md#debug_print_parse) | -| [debug_print_plan](../../reference-guide/guc-parameters/error-reporting-and-logging/logging-content.md#debug_print_plan) | -| [debug_print_rewritten](../../reference-guide/guc-parameters/error-reporting-and-logging/logging-content.md#debug_print_rewritten) | -| [default_limit_rows](../../reference-guide/guc-parameters/query-planning/optimizer-method-configuration.md#default_limit_rows) | -| [default_statistics_target](../../reference-guide/guc-parameters/query-planning/other-optimizer-options.md#default_statistics_target) | -| [default_tablespace](../../reference-guide/guc-parameters/default-settings-of-client-connection/statement-behavior.md#default_tablespace) | -| [default_text_search_config](../../reference-guide/guc-parameters/default-settings-of-client-connection/zone-and-formatting.md#default_text_search_config) | -| [default_transaction_deferrable](../../reference-guide/guc-parameters/default-settings-of-client-connection/statement-behavior.md#default_transaction_deferrable) | -| [default_transaction_isolation](../../reference-guide/guc-parameters/default-settings-of-client-connection/statement-behavior.md#default_transaction_isolation) | -| [default_transaction_read_only](../../reference-guide/guc-parameters/default-settings-of-client-connection/statement-behavior.md#default_transaction_read_only) | +| [debug_pretty_print](error-reporting-and-logging/logging-content.md#debug_pretty_print) | +| [debug_print_parse](error-reporting-and-logging/logging-content.md#debug_print_parse) | +| [debug_print_plan](error-reporting-and-logging/logging-content.md#debug_print_plan) | +| [debug_print_rewritten](error-reporting-and-logging/logging-content.md#debug_print_rewritten) | +| [default_limit_rows](query-planning/optimizer-method-configuration.md#default_limit_rows) | +| [default_statistics_target](query-planning/other-optimizer-options.md#default_statistics_target) | +| [default_tablespace](default-settings-of-client-connection/statement-behavior.md#default_tablespace) | +| [default_text_search_config](default-settings-of-client-connection/zone-and-formatting.md#default_text_search_config) | +| [default_transaction_deferrable](default-settings-of-client-connection/statement-behavior.md#default_transaction_deferrable) | +| [default_transaction_isolation](default-settings-of-client-connection/statement-behavior.md#default_transaction_isolation) | +| [default_transaction_read_only](default-settings-of-client-connection/statement-behavior.md#default_transaction_read_only) | | [defer_csn_cleanup_time](automatic-vacuuming.md#defer_csn_cleanup_time) | -| [delay_arbitrate_timeout](../../reference-guide/guc-parameters/cm-parameters/cm_server.md#delay_arbitrate_timeout) | -| [dilatation_shard_count_for_disk_capacity_alarm](../../reference-guide/guc-parameters/cm-parameters/cm_agent.md#dilatation_shard_count_for_disk_capacity_alarm) | -| [dirty_page_percent_max](../../reference-guide/guc-parameters/resource-consumption/background-writer.md#dirty_page_percent_max) | +| [delay_arbitrate_timeout](cm-parameters/cm_server.md#delay_arbitrate_timeout) | +| [dilatation_shard_count_for_disk_capacity_alarm](cm-parameters/cm_agent.md#dilatation_shard_count_for_disk_capacity_alarm) | +| [dirty_page_percent_max](resource-consumption/background-writer.md#dirty_page_percent_max) | | [disable_memory_protect](load-management.md#disable_memory_protect) | -| [disaster_recovery_type](../../reference-guide/guc-parameters/cm-parameters/cm_agent.md#disaster_recovery_type) | -| [dw_file_num](../../reference-guide/guc-parameters/resource-consumption/background-writer.md#dw_file_num) | -| [dw_file_size](../../reference-guide/guc-parameters/resource-consumption/background-writer.md#dw_file_size) | -| [dynamic_library_path](../../reference-guide/guc-parameters/default-settings-of-client-connection/other-default-parameters.md#dynamic_library_path) | -| [effective_cache_size](../../reference-guide/guc-parameters/query-planning/optimizer-cost-constants.md#effective_cache_size) | -| [effective_io_concurrency](../../reference-guide/guc-parameters/resource-consumption/asynchronous-io-operations.md#effective_io_concurrency) | +| [disaster_recovery_type](cm-parameters/cm_agent.md#disaster_recovery_type) | +| [dw_file_num](resource-consumption/background-writer.md#dw_file_num) | +| [dw_file_size](resource-consumption/background-writer.md#dw_file_size) | +| [dynamic_library_path](default-settings-of-client-connection/other-default-parameters.md#dynamic_library_path) | +| [effective_cache_size](query-planning/optimizer-cost-constants.md#effective_cache_size) | +| [effective_io_concurrency](resource-consumption/asynchronous-io-operations.md#effective_io_concurrency) | | [elastic_search_ip_addr](security-configuration.md#elastic_search_ip_addr) | | [emit_illegal_bind_chars](miscellaneous-parameters.md#emit_illegal_bind_chars) | -| [enable_absolute_tablespace](../../reference-guide/guc-parameters/query-planning/optimizer-method-configuration.md#enable_absolute_tablespace) | -| [enable_access_server_directory](../../reference-guide/guc-parameters/auditing/operation-audit.md#enable_access_server_directory) | -| [enable_adio_debug](../../reference-guide/guc-parameters/resource-consumption/asynchronous-io-operations.md#enable_adio_debug) | -| [enable_adio_function](../../reference-guide/guc-parameters/resource-consumption/asynchronous-io-operations.md#enable_adio_function) | +| [enable_absolute_tablespace](query-planning/optimizer-method-configuration.md#enable_absolute_tablespace) | +| [enable_access_server_directory](auditing/operation-audit.md#enable_access_server_directory) | +| [enable_adio_debug](resource-consumption/asynchronous-io-operations.md#enable_adio_debug) | +| [enable_adio_function](resource-consumption/asynchronous-io-operations.md#enable_adio_function) | | [enable_alarm](alarm-detection.md#enable_alarm) | -| [enable_analyze_check](../../reference-guide/guc-parameters/query-planning/other-optimizer-options.md#enable_analyze_check) | +| [enable_analyze_check](query-planning/other-optimizer-options.md#enable_analyze_check) | | [enable_asp](system-performance-snapshot.md#enable_asp) | | [enable_auto_clean_unique_sql](query.md#enable_auto_clean_unique_sql) | -| [enable_auto_explain](../../reference-guide/guc-parameters/query-planning/other-optimizer-options.md#enable_auto_explain) | -| [enable_az_auto_switchover](../../reference-guide/guc-parameters/cm-parameters/cm_server.md#enable_az_auto_switchover) | -| [enable_batch_dispatch](../../reference-guide/guc-parameters/write-ahead-log/log-replay.md#enable_batch_dispatch) | +| [enable_auto_explain](query-planning/other-optimizer-options.md#enable_auto_explain) | +| [enable_az_auto_switchover](cm-parameters/cm_server.md#enable_az_auto_switchover) | +| [enable_batch_dispatch](write-ahead-log/log-replay.md#enable_batch_dispatch) | | [enable_bbox_dump](load-management.md#enable_bbox_dump) | -| [enable_beta_features](../../reference-guide/guc-parameters/version-and-platform-compatibility/compatibility-with-earlier-versions.md#enable_beta_features) | +| [enable_beta_features](version-and-platform-compatibility/compatibility-with-earlier-versions.md#enable_beta_features) | | [enable_beta_opfusion](developer-options.md#enable_beta_opfusion) | -| [enable_bitmapscan](../../reference-guide/guc-parameters/query-planning/optimizer-method-configuration.md#enable_bitmapscan) | -| [enable_bloom_filter](../../reference-guide/guc-parameters/query-planning/other-optimizer-options.md#enable_bloom_filter) | +| [enable_bitmapscan](query-planning/optimizer-method-configuration.md#enable_bitmapscan) | +| [enable_bloom_filter](query-planning/other-optimizer-options.md#enable_bloom_filter) | | [enable_cbm_tracking](backup-and-restoration-parameter.md#enable_cbm_tracking) | -| [enable_change_hjcost](../../reference-guide/guc-parameters/query-planning/optimizer-method-configuration.md#enable_change_hjcost) | -| [enable_codegen](../../reference-guide/guc-parameters/query-planning/other-optimizer-options.md#enable_codegen) | +| [enable_change_hjcost](query-planning/optimizer-method-configuration.md#enable_change_hjcost) | +| [enable_codegen](query-planning/other-optimizer-options.md#enable_codegen) | | [enable_codegen_mot](mot.md#enable_codegen_mot) | | [enable_codegen_mot_print](mot.md#enable_codegen_mot_print) | -| [enable_codegen_print](../../reference-guide/guc-parameters/query-planning/other-optimizer-options.md#enable_codegen_print) | +| [enable_codegen_print](query-planning/other-optimizer-options.md#enable_codegen_print) | | [enable_compress_spill](developer-options.md#enable_compress_spill) | -| [enable_consider_usecount](../../reference-guide/guc-parameters/resource-consumption/background-writer.md#enable_consider_usecount) | +| [enable_consider_usecount](resource-consumption/background-writer.md#enable_consider_usecount) | | [enable_constraint_optimization](reserved-parameters.md) | -| [enable_data_replicate](../../reference-guide/guc-parameters/ha-replication/primary-server.md#enable_data_replicate) | -| [enable_dcf](../../reference-guide/guc-parameters/cm-parameters/cm_agent.md#enable_dcf) | -| [enable_debug_vacuum](../../reference-guide/guc-parameters/error-reporting-and-logging/logging-content.md#enable_debug_vacuum) | +| [enable_data_replicate](ha-replication/primary-server.md#enable_data_replicate) | +| [enable_dcf](cm-parameters/cm_agent.md#enable_dcf) | +| [enable_debug_vacuum](error-reporting-and-logging/logging-content.md#enable_debug_vacuum) | +| [enable_default_cfunc_libpath](file-location.md#enable_default_cfunc_libpath) | | [enable_default_ustore_table](miscellaneous-parameters.md#enable_default_ustore_table) | | [enable_defer_calculate_snapshot](MogDB-transaction.md#enable_defer_calculate_snapshot) | -| [enable_double_write](../../reference-guide/guc-parameters/write-ahead-log/checkpoints.md#enable_double_write) | -| [enable_early_free](../../reference-guide/guc-parameters/resource-consumption/memory.md#enable_early_free) | -| [enable_extrapolation_stats](../../reference-guide/guc-parameters/query-planning/other-optimizer-options.md#enable_extrapolation_stats) | -| [enable_fast_allocate](../../reference-guide/guc-parameters/resource-consumption/asynchronous-io-operations.md#enable_fast_allocate) | +| [enable_double_write](write-ahead-log/checkpoints.md#enable_double_write) | +| [enable_early_free](resource-consumption/memory.md#enable_early_free) | +| [enable_extrapolation_stats](query-planning/other-optimizer-options.md#enable_extrapolation_stats) | +| [enable_fast_allocate](resource-consumption/asynchronous-io-operations.md#enable_fast_allocate) | | [enable_fast_numeric](developer-options.md#enable_fast_numeric) | | [enable_ffic_log](load-management.md#enable_ffic_log) | -| [enable_force_vector_engine](../../reference-guide/guc-parameters/query-planning/other-optimizer-options.md#enable_force_vector_engine) | -| [enable_functional_dependency](../../reference-guide/guc-parameters/query-planning/other-optimizer-options.md#enable_functional_dependency) | -| [enable_global_plancache](../../reference-guide/guc-parameters/query-planning/other-optimizer-options.md#enable_global_plancache) | -| [enable_global_stats](../../reference-guide/guc-parameters/query-planning/other-optimizer-options.md#enable_global_stats) | +| [enable_force_vector_engine](query-planning/other-optimizer-options.md#enable_force_vector_engine) | +| [enable_functional_dependency](query-planning/other-optimizer-options.md#enable_functional_dependency) | +| [enable_global_plancache](query-planning/other-optimizer-options.md#enable_global_plancache) | +| [enable_global_stats](query-planning/other-optimizer-options.md#enable_global_stats) | | [enable_global_syscache](global-syscache-parameters.md#enable_global_syscache) | | [enable_hadoop_env](reserved-parameters.md) | -| [enable_hashagg](../../reference-guide/guc-parameters/query-planning/optimizer-method-configuration.md#enable_hashagg) | -| [enable_hashjoin](../../reference-guide/guc-parameters/query-planning/optimizer-method-configuration.md#enable_hashjoin) | +| [enable_hashagg](query-planning/optimizer-method-configuration.md#enable_hashagg) | +| [enable_hashjoin](query-planning/optimizer-method-configuration.md#enable_hashjoin) | | [enable_hdfs_predicate_pushdown](reserved-parameters.md) | -| [enable_hypo_index](../../reference-guide/guc-parameters/query-planning/other-optimizer-options.md#enable_hypo_index) | -| [enable_incremental_catchup](../../reference-guide/guc-parameters/ha-replication/primary-server.md#enable_incremental_catchup) | -| [enable_incremental_checkpoint](../../reference-guide/guc-parameters/write-ahead-log/checkpoints.md#enable_incremental_checkpoint) | -| [enable_index_nestloop](../../reference-guide/guc-parameters/query-planning/optimizer-method-configuration.md#enable_index_nestloop) | -| [enable_indexonlyscan](../../reference-guide/guc-parameters/query-planning/optimizer-method-configuration.md#enable_indexonlyscan) | -| [enable_indexscan](../../reference-guide/guc-parameters/query-planning/optimizer-method-configuration.md#enable_indexscan) | +| [enable_hypo_index](query-planning/other-optimizer-options.md#enable_hypo_index) | +| [enable_incremental_catchup](ha-replication/primary-server.md#enable_incremental_catchup) | +| [enable_incremental_checkpoint](write-ahead-log/checkpoints.md#enable_incremental_checkpoint) | +| [enable_index_nestloop](query-planning/optimizer-method-configuration.md#enable_index_nestloop) | +| [enable_indexonlyscan](query-planning/optimizer-method-configuration.md#enable_indexonlyscan) | +| [enable_indexscan](query-planning/optimizer-method-configuration.md#enable_indexscan) | | [enable_instance_metric_persistent](load-management.md#enable_instance_metric_persistent) | | [enable_instr_cpu_timer](query.md#enable_instr_cpu_timer) | | [enable_instr_rt_percentile](query.md#enable_instr_rt_percentile) | | [enable_instr_track_wait](wait-events.md#enable_instr_track_wait) | -| [enable_kill_query](../../reference-guide/guc-parameters/query-planning/optimizer-method-configuration.md#enable_kill_query) | +| [enable_kill_query](query-planning/optimizer-method-configuration.md#enable_kill_query) | | [enable_logical_io_statistics](load-management.md#enable_logical_io_statistics) | -| [enable_log_compress](../../reference-guide/guc-parameters/cm-parameters/cm_agent.md#enable_log_compress) | -| [enable_material](../../reference-guide/guc-parameters/query-planning/optimizer-method-configuration.md#enable_material) | -| [enable_memory_context_contro](../../reference-guide/guc-parameters/resource-consumption/memory.md#enable_memory_context_control) | -| [enable_memory_limit](../../reference-guide/guc-parameters/resource-consumption/memory.md#enable_memory_limit) | -| [enable_mergejoin](../../reference-guide/guc-parameters/query-planning/optimizer-method-configuration.md#enable_mergejoin) | -| [enable_mix_replication](../../reference-guide/guc-parameters/ha-replication/primary-server.md#enable_mix_replication) | -| [enable_nestloop](../../reference-guide/guc-parameters/query-planning/optimizer-method-configuration.md#enable_nestloop) | -| [enable_nodegroup_debug](../../reference-guide/guc-parameters/query-planning/optimizer-method-configuration.md#enable_nodegroup_debug) | -| [enable_nonsysadmin_execute_direct](../../reference-guide/guc-parameters/auditing/operation-audit.md#enable_nonsysadmin_execute_direct) | +| [enable_log_compress](cm-parameters/cm_agent.md#enable_log_compress) | +| [enable_material](query-planning/optimizer-method-configuration.md#enable_material) | +| [enable_memory_context_contro](resource-consumption/memory.md#enable_memory_context_control) | +| [enable_memory_limit](resource-consumption/memory.md#enable_memory_limit) | +| [enable_mergejoin](query-planning/optimizer-method-configuration.md#enable_mergejoin) | +| [enable_mix_replication](ha-replication/primary-server.md#enable_mix_replication) | +| [enable_nestloop](query-planning/optimizer-method-configuration.md#enable_nestloop) | +| [enable_nodegroup_debug](query-planning/optimizer-method-configuration.md#enable_nodegroup_debug) | +| [enable_nonsysadmin_execute_direct](auditing/operation-audit.md#enable_nonsysadmin_execute_direct) | | [enable_online_ddl_waitlock](lock-management.md#enable_online_ddl_waitlock) | -| [enable_opfusion](../../reference-guide/guc-parameters/query-planning/other-optimizer-options.md#enable_opfusion) | +| [enable_opfusion](query-planning/other-optimizer-options.md#enable_opfusion) | | [enable_orc_cache](reserved-parameters.md) | -| [enable_page_lsn_check](../../reference-guide/guc-parameters/write-ahead-log/log-replay.md#enable_page_lsn_check) | -| [enable_partition_opfusion](../../reference-guide/guc-parameters/query-planning/other-optimizer-options.md#enable_partition_opfusion) | -| [enable_partitionwise](../../reference-guide/guc-parameters/query-planning/other-optimizer-options.md#enable_partitionwise) | -| [enable_pbe_optimization](../../reference-guide/guc-parameters/query-planning/other-optimizer-options.md#enable_pbe_optimization) | +| [enable_page_lsn_check](write-ahead-log/log-replay.md#enable_page_lsn_check) | +| [enable_partition_opfusion](query-planning/other-optimizer-options.md#enable_partition_opfusion) | +| [enable_partitionwise](query-planning/other-optimizer-options.md#enable_partitionwise) | +| [enable_pbe_optimization](query-planning/other-optimizer-options.md#enable_pbe_optimization) | | [enable_prevent_job_task_startup](scheduled-task.md#enable_prevent_job_task_startup) | | [enable_recyclebin](flashback.md#enable_recyclebin) | | [enable_remote_excute](writer-statement-parameters-supported-by-standby-server.md#enable_remote_excute) | | [enable_resource_record](load-management.md#enable_resource_record) | | [enable_resource_track](load-management.md#enable_resource_track) | -| [enable_save_datachanged_timestamp](../../reference-guide/guc-parameters/statistics-during-the-database-running/query-and-index-statistics-collector.md#enable_save_datachanged_timestamp) | +| [enable_save_datachanged_timestamp](statistics-during-the-database-running/query-and-index-statistics-collector.md#enable_save_datachanged_timestamp) | | [enable_security_policy](security-configuration.md#enable_security_policy) | -| [enable_seqscan](../../reference-guide/guc-parameters/query-planning/optimizer-method-configuration.md#enable_seqscan) | -| [enable_set_variables_b_format](../../reference-guide/guc-parameters/version-and-platform-compatibility/platform-and-client-compatibility.md#enable_set_variables_b_format) | +| [enable_seqscan](query-planning/optimizer-method-configuration.md#enable_seqscan) | +| [enable_set_variables_b_format](version-and-platform-compatibility/platform-and-client-compatibility.md#enable_set_variables_b_format) | | [enable_show_any_tuples](MogDB-transaction.md#enable_show_any_tuples) | -| [enable_slot_log](../../reference-guide/guc-parameters/ha-replication/sending-server.md#enable_slot_log) | -| [enable_sonic_hashagg](../../reference-guide/guc-parameters/query-planning/other-optimizer-options.md#enable_sonic_hashagg) | -| [enable_sonic_hashjoin](../../reference-guide/guc-parameters/query-planning/other-optimizer-options.md#enable_sonic_hashjoin) | -| [enable_sonic_optspill](../../reference-guide/guc-parameters/query-planning/other-optimizer-options.md#enable_sonic_optspill) | -| [enable_sort](../../reference-guide/guc-parameters/query-planning/optimizer-method-configuration.md#enable_sort) | -| [enable_ssl](../../reference-guide/guc-parameters/cm-parameters/cm_server.md#enable_ssl) | -| [enable_startwith_debug](../../reference-guide/guc-parameters/query-planning/other-optimizer-options.md#enable_startwith_debug) | +| [enable_slot_log](ha-replication/sending-server.md#enable_slot_log) | +| [enable_sonic_hashagg](query-planning/other-optimizer-options.md#enable_sonic_hashagg) | +| [enable_sonic_hashjoin](query-planning/other-optimizer-options.md#enable_sonic_hashjoin) | +| [enable_sonic_optspill](query-planning/other-optimizer-options.md#enable_sonic_optspill) | +| [enable_sort](query-planning/optimizer-method-configuration.md#enable_sort) | +| [enable_ssl](cm-parameters/cm_server.md#enable_ssl) | +| [enable_startwith_debug](query-planning/other-optimizer-options.md#enable_startwith_debug) | | [enable_stmt_track](query.md#enable_stmt_track) | -| [enable_stream_replication](../../reference-guide/guc-parameters/ha-replication/primary-server.md#enable_stream_replication) | +| [enable_stream_replication](ha-replication/primary-server.md#enable_stream_replication) | | [enable_tde](security-configuration.md#enable_tde) | -| [enable_time_report](../../reference-guide/guc-parameters/write-ahead-log/log-replay.md#enable_time_report) | -| [enable_transaction_read_only](../../reference-guide/guc-parameters/cm-parameters/cm_server.md#enable_transaction_read_only) | +| [enable_time_report](write-ahead-log/log-replay.md#enable_time_report) | +| [enable_transaction_read_only](cm-parameters/cm_server.md#enable_transaction_read_only) | | [enable_thread_pool](thread-pool.md#enable_thread_pool) | -| [enable_tidscan](../../reference-guide/guc-parameters/query-planning/optimizer-method-configuration.md#enable_tidscan) | +| [enable_tidscan](query-planning/optimizer-method-configuration.md#enable_tidscan) | | [enable_upgrade_merge_lock_mode](miscellaneous-parameters.md#enable_upgrade_merge_lock_mode) | | [enable_user_metric_persisten](load-management.md#enable_user_metric_persistent) | | [enable_ustore](miscellaneous-parameters.md#enable_ustore) | -| [enable_valuepartition_pruning](../../reference-guide/guc-parameters/query-planning/optimizer-method-configuration.md#enable_valuepartition_prunin) | -| [enable_vector_engine](../../reference-guide/guc-parameters/query-planning/optimizer-method-configuration.md#enable_vector_engine) | -| [enable_wal_shipping_compression](../../reference-guide/guc-parameters/ha-replication/sending-server.md#enable_wal_shipping_compression) | +| [enable_valuepartition_pruning](query-planning/optimizer-method-configuration.md#enable_valuepartition_prunin) | +| [enable_vector_engine](query-planning/optimizer-method-configuration.md#enable_vector_engine) | +| [enable_wal_shipping_compression](ha-replication/sending-server.md#enable_wal_shipping_compression) | | [enable_wdr_snapshot](system-performance-snapshot.md#enable_wdr_snapshot) | -| [enable_xc_maintenance_mode](../../reference-guide/guc-parameters/cm-parameters/cm_agent.md#enable_xc_maintenance_mode) | -| [enable_xlog_prune](../../reference-guide/guc-parameters/write-ahead-log/checkpoints.md#enable_xlog_prune) | -| [enableSeparationOfDuty](../../reference-guide/guc-parameters/auditing/operation-audit.md#enableseparationofduty) | -| [enforce_a_behavior](../../reference-guide/guc-parameters/query-planning/optimizer-method-configuration.md#enforce_a_behavior) | -| [escape_string_warning](../../reference-guide/guc-parameters/version-and-platform-compatibility/compatibility-with-earlier-versions.md#escape_string_warning) | -| [event_source](../../reference-guide/guc-parameters/error-reporting-and-logging/logging-destination.md#event_source) | +| [enable_xc_maintenance_mode](cm-parameters/cm_agent.md#enable_xc_maintenance_mode) | +| [enable_xlog_prune](write-ahead-log/checkpoints.md#enable_xlog_prune) | +| [enableSeparationOfDuty](auditing/operation-audit.md#enableseparationofduty) | +| [enforce_a_behavior](query-planning/optimizer-method-configuration.md#enforce_a_behavior) | +| [escape_string_warning](version-and-platform-compatibility/compatibility-with-earlier-versions.md#escape_string_warning) | +| [event_source](error-reporting-and-logging/logging-destination.md#event_source) | | [exit_on_error](fault-tolerance.md#exit_on_error) | -| [expected_computing_nodegroup](../../reference-guide/guc-parameters/query-planning/optimizer-method-configuration.md#expected_computing_nodegroup) | -| [explain_dna_file](../../reference-guide/guc-parameters/query-planning/other-optimizer-options.md#explain_dna_file) | -| [explain_perf_mode](../../reference-guide/guc-parameters/query-planning/other-optimizer-options.md#explain_perf_mode) | +| [expected_computing_nodegroup](query-planning/optimizer-method-configuration.md#expected_computing_nodegroup) | +| [explain_dna_file](query-planning/other-optimizer-options.md#explain_dna_file) | +| [explain_perf_mode](query-planning/other-optimizer-options.md#explain_perf_mode) | | [external_pid_file](file-location.md#external_pid_file) | -| [extra_float_digits](../../reference-guide/guc-parameters/default-settings-of-client-connection/zone-and-formatting.md#extra_float_digits) | -| [failed_login_attempts](../../reference-guide/guc-parameters/connection-and-authentication/security-and-authentication.md#failed_login_attempts) | -| [fast_extend_file_size](../../reference-guide/guc-parameters/resource-consumption/asynchronous-io-operations.md#fast_extend_file_size) | +| [extra_float_digits](default-settings-of-client-connection/zone-and-formatting.md#extra_float_digits) | +| [failed_login_attempts](connection-and-authentication/security-and-authentication.md#failed_login_attempts) | +| [fast_extend_file_size](resource-consumption/asynchronous-io-operations.md#fast_extend_file_size) | | [fault_mon_timeout](lock-management.md#fault_mon_timeout) | -| [FencedUDFMemoryLimit](user-defined-functions.md#fencedudfmemorylimit) | -| [force_bitmapand](../../reference-guide/guc-parameters/query-planning/optimizer-method-configuration.md#force_bitmapand) | +| [FencedUDFMemoryLimit](guc-user-defined-functions.md#fencedudfmemorylimit) | +| [force_bitmapand](query-planning/optimizer-method-configuration.md#force_bitmapand) | | [force_pseudo_codegen_mot](mot.md#force_pseudo_codegen_mot) | -| [force_promote](../../reference-guide/guc-parameters/write-ahead-log/settings.md#force_promote) | -| [from_collapse_limit](../../reference-guide/guc-parameters/query-planning/other-optimizer-options.md#from_collapse_limit) | -| [fsync](../../reference-guide/guc-parameters/write-ahead-log/settings.md#fsync) | -| [full_page_writes](../../reference-guide/guc-parameters/write-ahead-log/settings.md#full_page_writes) | -| [geqo](../../reference-guide/guc-parameters/query-planning/genetic-query-optimizer.md#geqo) | -| [geqo_effort](../../reference-guide/guc-parameters/query-planning/genetic-query-optimizer.md#geqo_effort) | -| [geqo_generations](../../reference-guide/guc-parameters/query-planning/genetic-query-optimizer.md#geqo_generations) | -| [geqo_pool_size](../../reference-guide/guc-parameters/query-planning/genetic-query-optimizer.md#geqo_pool_size) | -| [geqo_seed](../../reference-guide/guc-parameters/query-planning/genetic-query-optimizer.md#geqo_seed) | -| [geqo_selection_bias](../../reference-guide/guc-parameters/query-planning/genetic-query-optimizer.md#geqo_selection_bias) | -| [geqo_threshold](../../reference-guide/guc-parameters/query-planning/genetic-query-optimizer.md#geqo_threshold) | -| [gin_fuzzy_search_limit](../../reference-guide/guc-parameters/default-settings-of-client-connection/other-default-parameters.md#gin_fuzzy_search_limit) | -| [gin_pending_list_limit](../../reference-guide/guc-parameters/default-settings-of-client-connection/statement-behavior.md#gin_pending_list_limit) | +| [force_promote](write-ahead-log/settings.md#force_promote) | +| [from_collapse_limit](query-planning/other-optimizer-options.md#from_collapse_limit) | +| [fsync](write-ahead-log/settings.md#fsync) | +| [full_page_writes](write-ahead-log/settings.md#full_page_writes) | +| [geqo](query-planning/genetic-query-optimizer.md#geqo) | +| [geqo_effort](query-planning/genetic-query-optimizer.md#geqo_effort) | +| [geqo_generations](query-planning/genetic-query-optimizer.md#geqo_generations) | +| [geqo_pool_size](query-planning/genetic-query-optimizer.md#geqo_pool_size) | +| [geqo_seed](query-planning/genetic-query-optimizer.md#geqo_seed) | +| [geqo_selection_bias](query-planning/genetic-query-optimizer.md#geqo_selection_bias) | +| [geqo_threshold](query-planning/genetic-query-optimizer.md#geqo_threshold) | +| [gin_fuzzy_search_limit](default-settings-of-client-connection/other-default-parameters.md#gin_fuzzy_search_limit) | +| [gin_pending_list_limit](default-settings-of-client-connection/statement-behavior.md#gin_pending_list_limit) | | [global_syscache_threshold](global-syscache-parameters.md#global_syscache_threshold) | -| [gpc_clean_timeout](../../reference-guide/guc-parameters/query-planning/other-optimizer-options.md#gpc_clean_timeout) | -| [group_concat_max_len](../../reference-guide/guc-parameters/miscellaneous-parameters.md#group_concat_max_len) | +| [gpc_clean_timeout](query-planning/other-optimizer-options.md#gpc_clean_timeout) | +| [group_concat_max_len](miscellaneous-parameters.md#group_concat_max_len) | | [gs_clean_timeout](lock-management.md#gs_clean_timeout) | -| [ha_module_debug](../../reference-guide/guc-parameters/ha-replication/primary-server.md#ha_module_debug) | +| [ha_module_debug](ha-replication/primary-server.md#ha_module_debug) | | [hadr_max_size_for_xlog_receiver](backup-and-restoration-parameter.md#hadr_max_size_for_xlog_receiver) | -| [hashagg_table_size](../../reference-guide/guc-parameters/query-planning/other-optimizer-options.md#hashagg_table_size) | +| [hashagg_table_size](query-planning/other-optimizer-options.md#hashagg_table_size) | | [hba_file](file-location.md#hba_file) | | [hll_default_log2explicit](HyperLogLog.md#hll_default_log2explicit) | | [hll_default_log2m](HyperLogLog.md#hll_default_log2m) | | [hll_default_log2sparse](HyperLogLog.md#hll_default_log2sparse) | | [hll_duplicate_check](HyperLogLog.md#hll_duplicate_check) | -| [hot_standby](../../reference-guide/guc-parameters/ha-replication/standby-server.md#hot_standby) | -| [hot_standby_feedback](../../reference-guide/guc-parameters/ha-replication/standby-server.md#hot_standby_feedback) | +| [hot_standby](ha-replication/standby-server.md#hot_standby) | +| [hot_standby_feedback](ha-replication/standby-server.md#hot_standby_feedback) | | [ident_file](file-location.md#ident_file) | -| [idle_in_transaction_session_timeout](../../reference-guide/guc-parameters/connection-and-authentication/security-and-authentication.md#idle_in_transaction_session_timeout) | +| [idle_in_transaction_session_timeout](connection-and-authentication/security-and-authentication.md#idle_in_transaction_session_timeout) | | [ignore_checksum_failure](developer-options.md#ignore_checksum_failure) | | [ignore_system_indexes](developer-options.md#ignore_system_indexes) | -| [incremental_build](../../reference-guide/guc-parameters/cm-parameters/cm_agent.md#incremental_build) | -| [incremental_checkpoint_timeout](../../reference-guide/guc-parameters/write-ahead-log/checkpoints.md#incremental_checkpoint_timeout) | +| [incremental_build](cm-parameters/cm_agent.md#incremental_build) | +| [incremental_checkpoint_timeout](write-ahead-log/checkpoints.md#incremental_checkpoint_timeout) | | [inplace_upgrade_next_system_object_oids](upgrade-parameters.md#inplace_upgrade_next_system_object_oids) | -| [install_type](../../reference-guide/guc-parameters/cm-parameters/cm_server.md#install_type) | -| [instance_failover_delay_timeout](../../reference-guide/guc-parameters/cm-parameters/cm_server.md#instance_failover_delay_timeout) | -| [instance_heartbeat_timeout](../../reference-guide/guc-parameters/cm-parameters/cm_server.md#instance_heartbeat_timeout) | -| [instance_keep_heartbeat_timeout](../../reference-guide/guc-parameters/cm-parameters/cm_server.md#instance_keep_heartbeat_timeout) | +| [install_type](cm-parameters/cm_server.md#install_type) | +| [instance_failover_delay_timeout](cm-parameters/cm_server.md#instance_failover_delay_timeout) | +| [instance_heartbeat_timeout](cm-parameters/cm_server.md#instance_heartbeat_timeout) | +| [instance_keep_heartbeat_timeout](cm-parameters/cm_server.md#instance_keep_heartbeat_timeout) | | [instance_metric_retention_time](load-management.md#instance_metric_retention_time) | -| [instance_phony_dead_restart_interval](../../reference-guide/guc-parameters/cm-parameters/cm_server.md#instance_phony_dead_restart_interval) | +| [instance_phony_dead_restart_interval](cm-parameters/cm_server.md#instance_phony_dead_restart_interval) | | [instr_rt_percentile_interval](query.md#instr_rt_percentile_interval) | | [instr_unique_sql_count](query.md#instr_unique_sql_count) | | [instr_unique_sql_track_type](query.md#instr_unique_sql_track_type) | | [integer_datetimes](miscellaneous-parameters.md#integer_datetimes) | -| [IntervalStyle](../../reference-guide/guc-parameters/default-settings-of-client-connection/zone-and-formatting.md#intervalstyle) | +| [IntervalStyle](default-settings-of-client-connection/zone-and-formatting.md#intervalstyle) | | [io_control_unit](load-management.md#io_control_unit) | | [io_limits](load-management.md#io_limits) | | [io_priority](load-management.md#io_priority) | | [isinplaceupgrade](upgrade-parameters.md#isinplaceupgrade) | | [is_sysadmin](security-configuration.md#is_sysadmin) | | [job_queue_processes](scheduled-task.md#job_queue_processes) | -| [join_collapse_limit](../../reference-guide/guc-parameters/query-planning/other-optimizer-options.md#join_collapse_limit) | -| [keep_sync_window](../../reference-guide/guc-parameters/ha-replication/primary-server.md#keep_sync_window) | -| [krb_caseins_users](../../reference-guide/guc-parameters/connection-and-authentication/security-and-authentication.md#krb_caseins_users) | -| [krb_server_keyfile](../../reference-guide/guc-parameters/connection-and-authentication/security-and-authentication.md#krb_server_keyfile) | -| [krb_srvname](../../reference-guide/guc-parameters/connection-and-authentication/security-and-authentication.md#krb_srvname) | -| [lastval_supported](../../reference-guide/guc-parameters/version-and-platform-compatibility/platform-and-client-compatibility.md#lastval_supported) | +| [join_collapse_limit](query-planning/other-optimizer-options.md#join_collapse_limit) | +| [keep_sync_window](ha-replication/primary-server.md#keep_sync_window) | +| [krb_caseins_users](connection-and-authentication/security-and-authentication.md#krb_caseins_users) | +| [krb_server_keyfile](connection-and-authentication/security-and-authentication.md#krb_server_keyfile) | +| [krb_srvname](connection-and-authentication/security-and-authentication.md#krb_srvname) | +| [lastval_supported](version-and-platform-compatibility/platform-and-client-compatibility.md#lastval_supported) | | [lc_collate](miscellaneous-parameters.md#lc_collate) | | [lc_ctype](miscellaneous-parameters.md#lc_ctype) | -| [lc_messages](../../reference-guide/guc-parameters/default-settings-of-client-connection/zone-and-formatting.md#lc_messages) | -| [lc_monetary](../../reference-guide/guc-parameters/default-settings-of-client-connection/zone-and-formatting.md#lc_monetary) | -| [lc_numeric](../../reference-guide/guc-parameters/default-settings-of-client-connection/zone-and-formatting.md#lc_numeric) | -| [lc_time](../../reference-guide/guc-parameters/default-settings-of-client-connection/zone-and-formatting.md#lc_time) | -| [listen_addresses](../../reference-guide/guc-parameters/connection-and-authentication/connection-settings.md#listen_addresses) | -| [lo_compat_privileges](../../reference-guide/guc-parameters/version-and-platform-compatibility/compatibility-with-earlier-versions.md#lo_compat_privileges) | -| [local_bind_address](../../reference-guide/guc-parameters/connection-and-authentication/connection-settings.md#local_bind_address) | -| [local_preload_libraries](../../reference-guide/guc-parameters/default-settings-of-client-connection/other-default-parameters.md#local_preload_libraries) | -| [local_syscache_threshold](../../reference-guide/guc-parameters/resource-consumption/memory.md#local_syscache_threshold) | +| [lc_messages](default-settings-of-client-connection/zone-and-formatting.md#lc_messages) | +| [lc_monetary](default-settings-of-client-connection/zone-and-formatting.md#lc_monetary) | +| [lc_numeric](default-settings-of-client-connection/zone-and-formatting.md#lc_numeric) | +| [lc_time](default-settings-of-client-connection/zone-and-formatting.md#lc_time) | +| [listen_addresses](connection-and-authentication/connection-settings.md#listen_addresses) | +| [lo_compat_privileges](version-and-platform-compatibility/compatibility-with-earlier-versions.md#lo_compat_privileges) | +| [local_bind_address](connection-and-authentication/connection-settings.md#local_bind_address) | +| [local_preload_libraries](default-settings-of-client-connection/other-default-parameters.md#local_preload_libraries) | +| [local_syscache_threshold](resource-consumption/memory.md#local_syscache_threshold) | | [lockwait_timeout](lock-management.md#lockwait_timeout) | | [log_autovacuum_min_duration](automatic-vacuuming.md#log_autovacuum_min_duration) | -| [log_checkpoints](../../reference-guide/guc-parameters/error-reporting-and-logging/logging-content.md#log_checkpoints) | -| [log_connections](../../reference-guide/guc-parameters/error-reporting-and-logging/logging-content.md#log_connections) | -| [log_destination](../../reference-guide/guc-parameters/error-reporting-and-logging/logging-destination.md#log_destination) | -| [log_dir](../../reference-guide/guc-parameters/cm-parameters/cm_agent.md#log_dir) | -| [log_directory](../../reference-guide/guc-parameters/error-reporting-and-logging/logging-destination.md#log_directory) | -| [log_disconnections](../../reference-guide/guc-parameters/error-reporting-and-logging/logging-content.md#log_disconnections) | -| [log_duration](../../reference-guide/guc-parameters/error-reporting-and-logging/logging-content.md#log_duration) | -| [log_error_verbosity](../../reference-guide/guc-parameters/error-reporting-and-logging/logging-content.md#log_error_verbosity) | -| [log_executor_stats](../../reference-guide/guc-parameters/query-planning/other-optimizer-options.md#log_executor_stats) | -| [log_file_mode](../../reference-guide/guc-parameters/error-reporting-and-logging/logging-destination.md#log_file_mode) | -| [log_file_size](../../reference-guide/guc-parameters/cm-parameters/cm_agent.md#log_file_size) | -| [log_filename](../../reference-guide/guc-parameters/error-reporting-and-logging/logging-destination.md#log_filename) | -| [log_hostname](../../reference-guide/guc-parameters/error-reporting-and-logging/logging-content.md#log_hostname) | -| [log_line_prefix](../../reference-guide/guc-parameters/error-reporting-and-logging/logging-content.md#log_line_prefix) | -| [log_lock_waits](../../reference-guide/guc-parameters/error-reporting-and-logging/logging-content.md#log_lock_waits) | -| [log_max_count](../../reference-guide/guc-parameters/cm-parameters/cm_agent.md#log_max_count) | -| [log_max_size](../../reference-guide/guc-parameters/cm-parameters/cm_agent.md#log_max_size) | -| [log_min_duration_statement](../../reference-guide/guc-parameters/error-reporting-and-logging/logging-time.md#log_min_duration_statement) | -| [log_min_error_statement](../../reference-guide/guc-parameters/error-reporting-and-logging/logging-time.md#log_min_error_statement) | -| [log_min_messages](../../reference-guide/guc-parameters/error-reporting-and-logging/logging-time.md#log_min_messages) | +| [log_checkpoints](error-reporting-and-logging/logging-content.md#log_checkpoints) | +| [log_connections](error-reporting-and-logging/logging-content.md#log_connections) | +| [log_destination](error-reporting-and-logging/logging-destination.md#log_destination) | +| [log_dir](cm-parameters/cm_agent.md#log_dir) | +| [log_directory](error-reporting-and-logging/logging-destination.md#log_directory) | +| [log_disconnections](error-reporting-and-logging/logging-content.md#log_disconnections) | +| [log_duration](error-reporting-and-logging/logging-content.md#log_duration) | +| [log_error_verbosity](error-reporting-and-logging/logging-content.md#log_error_verbosity) | +| [log_executor_stats](query-planning/other-optimizer-options.md#log_executor_stats) | +| [log_file_mode](error-reporting-and-logging/logging-destination.md#log_file_mode) | +| [log_file_size](cm-parameters/cm_agent.md#log_file_size) | +| [log_filename](error-reporting-and-logging/logging-destination.md#log_filename) | +| [log_hostname](error-reporting-and-logging/logging-content.md#log_hostname) | +| [log_line_prefix](error-reporting-and-logging/logging-content.md#log_line_prefix) | +| [log_lock_waits](error-reporting-and-logging/logging-content.md#log_lock_waits) | +| [log_max_count](cm-parameters/cm_agent.md#log_max_count) | +| [log_max_size](cm-parameters/cm_agent.md#log_max_size) | +| [log_min_duration_statement](error-reporting-and-logging/logging-time.md#log_min_duration_statement) | +| [log_min_error_statement](error-reporting-and-logging/logging-time.md#log_min_error_statement) | +| [log_min_messages](error-reporting-and-logging/logging-time.md#log_min_messages) | | [log_pagewriter](developer-options.md#log_pagewriter) | -| [log_parser_stats](../../reference-guide/guc-parameters/query-planning/other-optimizer-options.md#log_parser_stats) | -| [log_pattern_%s](../../reference-guide/guc-parameters/cm-parameters/cm_agent.md#log_pattern_s) | -| [log_planner_stats](../../reference-guide/guc-parameters/query-planning/other-optimizer-options.md#log_planner_stats) | -| [log_rotation_age](../../reference-guide/guc-parameters/error-reporting-and-logging/logging-destination.md#log_rotation_age) | -| [log_rotation_size](../../reference-guide/guc-parameters/error-reporting-and-logging/logging-destination.md#log_rotation_size) | -| [log_saved_days](../../reference-guide/guc-parameters/cm-parameters/cm_agent.md#log_saved_days) | -| [log_statement](../../reference-guide/guc-parameters/error-reporting-and-logging/logging-content.md#log_statement) | -| [log_statement_stats](../../reference-guide/guc-parameters/query-planning/other-optimizer-options.md#log_statement_stats) | -| [log_temp_files](../../reference-guide/guc-parameters/error-reporting-and-logging/logging-content.md#log_temp_files) | -| [log_threshold_check_interval](../../reference-guide/guc-parameters/cm-parameters/cm_agent.md#log_threshold_check_interval) | -| [log_timezone](../../reference-guide/guc-parameters/error-reporting-and-logging/logging-content.md#log_timezone) | -| [log_truncate_on_rotation](../../reference-guide/guc-parameters/error-reporting-and-logging/logging-destination.md#log_truncate_on_rotation) | -| [logging_collector](../../reference-guide/guc-parameters/error-reporting-and-logging/logging-destination.md#logging_collector) | -| [logging_module](../../reference-guide/guc-parameters/error-reporting-and-logging/logging-content.md#logging_module) | -| [maintenance_work_mem](../../reference-guide/guc-parameters/resource-consumption/memory.md#maintenance_work_mem) | +| [log_parser_stats](query-planning/other-optimizer-options.md#log_parser_stats) | +| [log_pattern_%s](cm-parameters/cm_agent.md#log_pattern_s) | +| [log_planner_stats](query-planning/other-optimizer-options.md#log_planner_stats) | +| [log_rotation_age](error-reporting-and-logging/logging-destination.md#log_rotation_age) | +| [log_rotation_size](error-reporting-and-logging/logging-destination.md#log_rotation_size) | +| [log_saved_days](cm-parameters/cm_agent.md#log_saved_days) | +| [log_statement](error-reporting-and-logging/logging-content.md#log_statement) | +| [log_statement_stats](query-planning/other-optimizer-options.md#log_statement_stats) | +| [log_temp_files](error-reporting-and-logging/logging-content.md#log_temp_files) | +| [log_threshold_check_interval](cm-parameters/cm_agent.md#log_threshold_check_interval) | +| [log_timezone](error-reporting-and-logging/logging-content.md#log_timezone) | +| [log_truncate_on_rotation](error-reporting-and-logging/logging-destination.md#log_truncate_on_rotation) | +| [logging_collector](error-reporting-and-logging/logging-destination.md#logging_collector) | +| [logging_module](error-reporting-and-logging/logging-content.md#logging_module) | +| [maintenance_work_mem](resource-consumption/memory.md#maintenance_work_mem) | | [max_active_global_temporary_table](global-temporary-table.md#max_active_global_temporary_table) | -| [max_cached_tuplebufs](../../reference-guide/guc-parameters/ha-replication/sending-server.md#max_cached_tuplebufs) | -| [max_changes_in_memory](../../reference-guide/guc-parameters/ha-replication/sending-server.md#max_changes_in_memory) | +| [max_cached_tuplebufs](ha-replication/sending-server.md#max_cached_tuplebufs) | +| [max_changes_in_memory](ha-replication/sending-server.md#max_changes_in_memory) | | [max_cn_temp_file_size](fault-tolerance.md#max_cn_temp_file_size) | -| [max_compile_functions](../../reference-guide/guc-parameters/default-settings-of-client-connection/statement-behavior.md#max_compile_functions) | +| [max_compile_functions](default-settings-of-client-connection/statement-behavior.md#max_compile_functions) | | [max_concurrent_autonomous_transactions](miscellaneous-parameters.md#max_concurrent_autonomous_transactions) | -| [max_connections](../../reference-guide/guc-parameters/connection-and-authentication/connection-settings.md#max_connections) | -| [max_datastorage_threshold_check](../../reference-guide/guc-parameters/cm-parameters/cm_server.md#max_datastorage_threshold_check) | -| [max_files_per_process](../../reference-guide/guc-parameters/resource-consumption/kernel-resource-usage.md#max_files_per_process) | -| [max_function_args](../../reference-guide/guc-parameters/version-and-platform-compatibility/platform-and-client-compatibility.md#max_function_args) | +| [max_connections](connection-and-authentication/connection-settings.md#max_connections) | +| [max_datastorage_threshold_check](cm-parameters/cm_server.md#max_datastorage_threshold_check) | +| [max_files_per_process](resource-consumption/kernel-resource-usage.md#max_files_per_process) | +| [max_function_args](version-and-platform-compatibility/platform-and-client-compatibility.md#max_function_args) | | [max_identifier_length](miscellaneous-parameters.md#max_identifier_length) | | [max_index_keys](miscellaneous-parameters.md#max_index_keys) | -| [max_inner_tool_connections](../../reference-guide/guc-parameters/connection-and-authentication/connection-settings.md#max_inner_tool_connections) | -| [max_io_capacity](../../reference-guide/guc-parameters/resource-consumption/background-writer.md#max_io_capacity) | -| [max_loaded_cudesc](../../reference-guide/guc-parameters/resource-consumption/memory.md#max_loaded_cudesc) | +| [max_inner_tool_connections](connection-and-authentication/connection-settings.md#max_inner_tool_connections) | +| [max_io_capacity](resource-consumption/background-writer.md#max_io_capacity) | +| [max_loaded_cudesc](resource-consumption/memory.md#max_loaded_cudesc) | | [max_locks_per_transaction](lock-management.md#max_locks_per_transaction) | -| [max_logical_replication_workers](../../reference-guide/guc-parameters/ha-replication/standby-server.md#max_logical_replication_workers) | +| [max_logical_replication_workers](ha-replication/standby-server.md#max_logical_replication_workers) | | [max_pred_locks_per_transaction](lock-management.md#max_pred_locks_per_transaction) | -| [max_prepared_transactions](../../reference-guide/guc-parameters/resource-consumption/memory.md#max_prepared_transactions) | -| [max_process_memory](../../reference-guide/guc-parameters/resource-consumption/memory.md#max_process_memory) | +| [max_prepared_transactions](resource-consumption/memory.md#max_prepared_transactions) | +| [max_process_memory](resource-consumption/memory.md#max_process_memory) | | [max_query_retry_times](fault-tolerance.md#max_query_retry_times) | -| [max_recursive_times](../../reference-guide/guc-parameters/query-planning/optimizer-method-configuration.md#max_recursive_times) | -| [max_redo_log_size](../../reference-guide/guc-parameters/write-ahead-log/checkpoints.md#max_redo_log_size) | -| [max_replication_slots](../../reference-guide/guc-parameters/ha-replication/sending-server.md#max_replication_slots) | -| [max_size_for_xlog_prune](../../reference-guide/guc-parameters/write-ahead-log/checkpoints.md#max_size_for_xlog_prune) | -| [max_stack_depth](../../reference-guide/guc-parameters/resource-consumption/memory.md#max_stack_depth) | -| [max_standby_archive_delay](../../reference-guide/guc-parameters/ha-replication/standby-server.md#max_standby_archive_delay) | -| [max_standby_streaming_delay](../../reference-guide/guc-parameters/ha-replication/standby-server.md#max_standby_streaming_delay) | -| [max_sync_workers_per_subscription](../../reference-guide/guc-parameters/ha-replication/standby-server.md#max_sync_workers_per_subscription) | +| [max_recursive_times](query-planning/optimizer-method-configuration.md#max_recursive_times) | +| [max_redo_log_size](write-ahead-log/checkpoints.md#max_redo_log_size) | +| [max_replication_slots](ha-replication/sending-server.md#max_replication_slots) | +| [max_size_for_xlog_prune](write-ahead-log/checkpoints.md#max_size_for_xlog_prune) | +| [max_stack_depth](resource-consumption/memory.md#max_stack_depth) | +| [max_standby_archive_delay](ha-replication/standby-server.md#max_standby_archive_delay) | +| [max_standby_streaming_delay](ha-replication/standby-server.md#max_standby_streaming_delay) | +| [max_sync_workers_per_subscription](ha-replication/standby-server.md#max_sync_workers_per_subscription) | | [max_undo_workers](rollback-parameters.md#max_undo_workers) | | [max_user_defined_exception](developer-options.md#max_user_defined_exception) | -| [max_wal_senders](../../reference-guide/guc-parameters/ha-replication/sending-server.md#max_wal_senders) | +| [max_wal_senders](ha-replication/sending-server.md#max_wal_senders) | | [memory_detail_tracking](load-management.md#memory_detail_tracking) | | [memory_fault_percent](load-management.md#memory_fault_percent) | | [memory_tracking_mode](load-management.md#memory_tracking_mode) | -| [memorypool_enable](../../reference-guide/guc-parameters/resource-consumption/memory.md#memorypool_enable) | -| [memorypool_size](../../reference-guide/guc-parameters/resource-consumption/memory.md#memorypool_size) | +| [memorypool_enable](resource-consumption/memory.md#memorypool_enable) | +| [memorypool_size](resource-consumption/memory.md#memorypool_size) | | [minimum_pool_size](connection-pool-parameters.md#minimum_pool_size) | -| [modify_initial_password](../../reference-guide/guc-parameters/connection-and-authentication/security-and-authentication.md#modify_initial_password) | -| [most_available_sync](../../reference-guide/guc-parameters/ha-replication/primary-server.md#most_available_sync) | +| [modify_initial_password](connection-and-authentication/security-and-authentication.md#modify_initial_password) | +| [most_available_sync](ha-replication/primary-server.md#most_available_sync) | | [mot_allow_index_on_nullable_column](mot.md#mot_allow_index_on_nullable_column) | | [mot_config_file](mot.md#mot_config_file) | -| [ngram_gram_size](../../reference-guide/guc-parameters/query-planning/other-optimizer-options.md#ngram_gram_size) | -| [ngram_grapsymbol_ignore](../../reference-guide/guc-parameters/query-planning/other-optimizer-options.md#ngram_grapsymbol_ignore) | -| [ngram_punctuation_ignore](../../reference-guide/guc-parameters/query-planning/other-optimizer-options.md#ngram_punctuation_ignore) | -| [nls_timestamp_format](../../reference-guide/guc-parameters/version-and-platform-compatibility/platform-and-client-compatibility.md#nls_timestamp_format) | +| [ngram_gram_size](query-planning/other-optimizer-options.md#ngram_gram_size) | +| [ngram_grapsymbol_ignore](query-planning/other-optimizer-options.md#ngram_grapsymbol_ignore) | +| [ngram_punctuation_ignore](query-planning/other-optimizer-options.md#ngram_punctuation_ignore) | +| [nls_timestamp_format](version-and-platform-compatibility/platform-and-client-compatibility.md#nls_timestamp_format) | | [num_internal_lock_partitions](lock-management.md#num_internal_lock_partitions) | | [numa_distribute_mode](developer-options.md#numa_distribute_mode) | | [omit_encoding_error](fault-tolerance.md#omit_encoding_error) | | [operation_mode](backup-and-restoration-parameter.md#operation_mode) | -| [opfusion_debug_mode](../../reference-guide/guc-parameters/error-reporting-and-logging/logging-content.md#opfusion_debug_mode) | -| [pagewriter_sleep](../../reference-guide/guc-parameters/resource-consumption/background-writer.md#pagewriter_sleep) | -| [pagewriter_thread_num](../../reference-guide/guc-parameters/resource-consumption/background-writer.md#pagewriter_thread_num) | -| [parallel_recovery_batch](../../reference-guide/guc-parameters/write-ahead-log/log-replay.md#parallel_recovery_batch) | -| [parallel_recovery_dispatch_algorithm](../../reference-guide/guc-parameters/write-ahead-log/log-replay.md#parallel_recovery_dispatch_algorithm) | -| [parallel_recovery_timeout](../../reference-guide/guc-parameters/write-ahead-log/log-replay.md#parallel_recovery_timeout) | -| [partition_iterator_elimination](../../reference-guide/guc-parameters/query-planning/other-optimizer-options.md#partition_iterator_elimination) | +| [opfusion_debug_mode](error-reporting-and-logging/logging-content.md#opfusion_debug_mode) | +| [pagewriter_sleep](resource-consumption/background-writer.md#pagewriter_sleep) | +| [pagewriter_thread_num](resource-consumption/background-writer.md#pagewriter_thread_num) | +| [parallel_recovery_batch](write-ahead-log/log-replay.md#parallel_recovery_batch) | +| [parallel_recovery_dispatch_algorithm](write-ahead-log/log-replay.md#parallel_recovery_dispatch_algorithm) | +| [parallel_recovery_timeout](write-ahead-log/log-replay.md#parallel_recovery_timeout) | +| [partition_iterator_elimination](query-planning/other-optimizer-options.md#partition_iterator_elimination) | | [partition_lock_upgrade_timeout](lock-management.md#partition_lock_upgrade_timeout) | -| [partition_page_estimation](../../reference-guide/guc-parameters/query-planning/other-optimizer-options.md#partition_page_estimation) | -| [password_effect_time](../../reference-guide/guc-parameters/connection-and-authentication/security-and-authentication.md#password_effect_time) | -| [password_encryption_type](../../reference-guide/guc-parameters/connection-and-authentication/security-and-authentication.md#password_encryption_type) | -| [password_lock_time](../../reference-guide/guc-parameters/connection-and-authentication/security-and-authentication.md#password_lock_time) | -| [password_max_length](../../reference-guide/guc-parameters/connection-and-authentication/security-and-authentication.md#password_max_length) | -| [password_min_digital](../../reference-guide/guc-parameters/connection-and-authentication/security-and-authentication.md#password_min_digital) | -| [password_min_length](../../reference-guide/guc-parameters/connection-and-authentication/security-and-authentication.md#password_min_length) | -| [password_min_lowercase](../../reference-guide/guc-parameters/connection-and-authentication/security-and-authentication.md#password_min_lowercase) | -| [password_min_special](../../reference-guide/guc-parameters/connection-and-authentication/security-and-authentication.md#password_min_special) | -| [password_min_uppercase](../../reference-guide/guc-parameters/connection-and-authentication/security-and-authentication.md#password_min_uppercase) | -| [password_notify_time](../../reference-guide/guc-parameters/connection-and-authentication/security-and-authentication.md#password_notify_time) | -| [password_policy](../../reference-guide/guc-parameters/connection-and-authentication/security-and-authentication.md#password_policy) | -| [password_reuse_max](../../reference-guide/guc-parameters/connection-and-authentication/security-and-authentication.md#password_reuse_max) | -| [password_reuse_time](../../reference-guide/guc-parameters/connection-and-authentication/security-and-authentication.md#password_reuse_time) | -| [pca_shared_buffer](../../reference-guide/guc-parameters/parameters-related-to-efficient-data-compression-algorithms.md#pca_shared_buffer) | +| [partition_page_estimation](query-planning/other-optimizer-options.md#partition_page_estimation) | +| [password_effect_time](connection-and-authentication/security-and-authentication.md#password_effect_time) | +| [password_encryption_type](connection-and-authentication/security-and-authentication.md#password_encryption_type) | +| [password_lock_time](connection-and-authentication/security-and-authentication.md#password_lock_time) | +| [password_max_length](connection-and-authentication/security-and-authentication.md#password_max_length) | +| [password_min_digital](connection-and-authentication/security-and-authentication.md#password_min_digital) | +| [password_min_length](connection-and-authentication/security-and-authentication.md#password_min_length) | +| [password_min_lowercase](connection-and-authentication/security-and-authentication.md#password_min_lowercase) | +| [password_min_special](connection-and-authentication/security-and-authentication.md#password_min_special) | +| [password_min_uppercase](connection-and-authentication/security-and-authentication.md#password_min_uppercase) | +| [password_notify_time](connection-and-authentication/security-and-authentication.md#password_notify_time) | +| [password_policy](connection-and-authentication/security-and-authentication.md#password_policy) | +| [password_reuse_max](connection-and-authentication/security-and-authentication.md#password_reuse_max) | +| [password_reuse_time](connection-and-authentication/security-and-authentication.md#password_reuse_time) | +| [pca_shared_buffer](parameters-related-to-efficient-data-compression-algorithms.md#pca_shared_buffer) | | [percentile](query.md#percentile) | | [pgxc_node_name](MogDB-transaction.md#pgxc_node_name) | -| [phony_dead_effective_time](../../reference-guide/guc-parameters/cm-parameters/cm_server.md#phony_dead_effective_time) | -| [plan_cache_mode](../../reference-guide/guc-parameters/query-planning/other-optimizer-options.md#plan_cache_mode) | -| [plan_mode_seed](../../reference-guide/guc-parameters/query-planning/other-optimizer-options.md#plan_mode_seed) | +| [phony_dead_effective_time](cm-parameters/cm_server.md#phony_dead_effective_time) | +| [plan_cache_mode](query-planning/other-optimizer-options.md#plan_cache_mode) | +| [plan_mode_seed](query-planning/other-optimizer-options.md#plan_mode_seed) | | [pldebugger_timeout](developer-options.md#pldebugger_timeout) | -| [pljava_vmoptions](user-defined-functions.md#pljava_vmoptions) | -| [plog_merge_age](../../reference-guide/guc-parameters/error-reporting-and-logging/logging-time.md#plog_merge_age) | -| [plpgsql.variable_conflict](../../reference-guide/guc-parameters/version-and-platform-compatibility/platform-and-client-compatibility.md#plpgsqlvariable_conflict) | +| [pljava_vmoptions](guc-user-defined-functions.md#pljava_vmoptions) | +| [plog_merge_age](error-reporting-and-logging/logging-time.md#plog_merge_age) | +| [plpgsql.variable_conflict](version-and-platform-compatibility/platform-and-client-compatibility.md#plpgsqlvariable_conflict) | | [plsql_show_all_error](developer-options.md#plsql_show_all_error) | | [pooler_maximum_idle_time](connection-pool-parameters.md#pooler_maximum_idle_time) | -| [port](../../reference-guide/guc-parameters/connection-and-authentication/connection-settings.md#port) | +| [port](connection-and-authentication/connection-settings.md#port) | | [post_auth_delay](developer-options.md#post_auth_delay) | | [pre_auth_delay](developer-options.md#pre_auth_delay) | -| [prefetch_quantity](../../reference-guide/guc-parameters/resource-consumption/asynchronous-io-operations.md#prefetch_quantity) | -| [primary_slotname](../../reference-guide/guc-parameters/ha-replication/standby-server.md#primary_slotname) | -| [process_cpu_affinity](../../reference-guide/guc-parameters/cm-parameters/cm_agent.md#process_cpu_affinity) | -| [psort_work_mem](../../reference-guide/guc-parameters/resource-consumption/memory.md#psort_work_mem) | -| [qrw_inlist2join_optmode](../../reference-guide/guc-parameters/query-planning/optimizer-method-configuration.md#qrw_inlist2join_optmode) | +| [prefetch_quantity](resource-consumption/asynchronous-io-operations.md#prefetch_quantity) | +| [primary_slotname](ha-replication/standby-server.md#primary_slotname) | +| [process_cpu_affinity](cm-parameters/cm_agent.md#process_cpu_affinity) | +| [psort_work_mem](resource-consumption/memory.md#psort_work_mem) | +| [qrw_inlist2join_optmode](query-planning/optimizer-method-configuration.md#qrw_inlist2join_optmode) | | [query_band](load-management.md#query_band) | -| [query_dop](../../reference-guide/guc-parameters/query-planning/other-optimizer-options.md#query_dop) | -| [query_max_mem](../../reference-guide/guc-parameters/resource-consumption/memory.md#query_max_mem) | -| [query_mem](../../reference-guide/guc-parameters/resource-consumption/memory.md#query_mem) | -| [quote_all_identifiers](../../reference-guide/guc-parameters/version-and-platform-compatibility/compatibility-with-earlier-versions.md#quote_all_identifiers) | -| [random_page_cost](../../reference-guide/guc-parameters/query-planning/optimizer-cost-constants.md#random_page_cost) | -| [recovery_max_workers](../../reference-guide/guc-parameters/write-ahead-log/log-replay.md#recovery_max_workers) | -| [recovery_min_apply_delay](../../reference-guide/guc-parameters/write-ahead-log/log-replay.md#recovery_min_apply_delay) | -| [recovery_parallelism](../../reference-guide/guc-parameters/write-ahead-log/log-replay.md#recovery_parallelism) | -| [recovery_parse_workers](../../reference-guide/guc-parameters/write-ahead-log/log-replay.md#recovery_parse_workers) | -| [recovery_redo_workers](../../reference-guide/guc-parameters/write-ahead-log/log-replay.md#recovery_redo_workers) | -| [recovery_time_target](../../reference-guide/guc-parameters/write-ahead-log/log-replay.md#recovery_time_target) | +| [query_dop](query-planning/other-optimizer-options.md#query_dop) | +| [query_max_mem](resource-consumption/memory.md#query_max_mem) | +| [query_mem](resource-consumption/memory.md#query_mem) | +| [quote_all_identifiers](version-and-platform-compatibility/compatibility-with-earlier-versions.md#quote_all_identifiers) | +| [random_page_cost](query-planning/optimizer-cost-constants.md#random_page_cost) | +| [recovery_max_workers](write-ahead-log/log-replay.md#recovery_max_workers) | +| [recovery_min_apply_delay](write-ahead-log/log-replay.md#recovery_min_apply_delay) | +| [recovery_parallelism](write-ahead-log/log-replay.md#recovery_parallelism) | +| [recovery_parse_workers](write-ahead-log/log-replay.md#recovery_parse_workers) | +| [recovery_redo_workers](write-ahead-log/log-replay.md#recovery_redo_workers) | +| [recovery_time_target](write-ahead-log/log-replay.md#recovery_time_target) | | [recyclebin_retention_time](flashback.md#recyclebin_retention_time) | -| [redo_bind_cpu_attr](../../reference-guide/guc-parameters/write-ahead-log/log-replay.md#redo_bind_cpu_attr) | +| [redo_bind_cpu_attr](write-ahead-log/log-replay.md#redo_bind_cpu_attr) | | [remote_read_mode](fault-tolerance.md#remote_read_mode) | | [remotetype](developer-options.md#remotetype) | -| [replconninfoN](../../reference-guide/guc-parameters/ha-replication/sending-server.md#replconninfon) | +| [replconninfoN](ha-replication/sending-server.md#replconninfon) | | [replication_type](MogDB-transaction.md#replication_type) | -| [RepOriginId](../../reference-guide/guc-parameters/replication-parameters-of-two-database-instances.md#RepOriginId) | -| [require_ssl](../../reference-guide/guc-parameters/connection-and-authentication/security-and-authentication.md#require_ssl) | +| [RepOriginId](replication-parameters-of-two-database-instances.md#RepOriginId) | +| [require_ssl](connection-and-authentication/security-and-authentication.md#require_ssl) | | [reserve_space_for_nullable_atts](miscellaneous-parameters.md#reserve_space_for_nullable_atts) | | [resource_track_cost](load-management.md#resource_track_cost) | | [resource_track_duration](load-management.md#resource_track_duration) | @@ -577,150 +578,150 @@ date: 2023-04-07 | [resource_track_log](developer-options.md#resource_track_log) | | [restart_after_crash](fault-tolerance.md#restart_after_crash) | | [retry_ecode_list](fault-tolerance.md#retry_ecode_list) | -| [rewrite_rule](../../reference-guide/guc-parameters/query-planning/other-optimizer-options.md#rewrite_rule) | +| [rewrite_rule](query-planning/other-optimizer-options.md#rewrite_rule) | | [schedule_splits_threshold](reserved-parameters.md) | -| [search_path](../../reference-guide/guc-parameters/default-settings-of-client-connection/statement-behavior.md#search_path) | -| [security_mode](../../reference-guide/guc-parameters/cm-parameters/cm_agent.md#security_mode) | -| [segment_buffers](../../reference-guide/guc-parameters/resource-consumption/memory.md#segment_buffers) | +| [search_path](default-settings-of-client-connection/statement-behavior.md#search_path) | +| [security_mode](cm-parameters/cm_agent.md#security_mode) | +| [segment_buffers](resource-consumption/memory.md#segment_buffers) | | [segment_size](miscellaneous-parameters.md#segment_size) | -| [seq_page_cost](../../reference-guide/guc-parameters/query-planning/optimizer-cost-constants.md#seq_page_cost) | +| [seq_page_cost](query-planning/optimizer-cost-constants.md#seq_page_cost) | | [server_encoding](miscellaneous-parameters.md#server_encoding) | | [server_version](miscellaneous-parameters.md#server_version) | | [server_version_num](miscellaneous-parameters.md#server_version_num) | -| [session_authorization](../../reference-guide/guc-parameters/connection-and-authentication/security-and-authentication.md#session_authorization) | +| [session_authorization](connection-and-authentication/security-and-authentication.md#session_authorization) | | [session_history_memory](load-management.md#session_history_memory) | -| [session_replication_role](../../reference-guide/guc-parameters/default-settings-of-client-connection/statement-behavior.md#session_replication_role) | +| [session_replication_role](default-settings-of-client-connection/statement-behavior.md#session_replication_role) | | [session_respool](load-management.md#session_respool) | | [session_statistics_memory](load-management.md#session_statistics_memory) | -| [session_timeout](../../reference-guide/guc-parameters/connection-and-authentication/security-and-authentication.md#session_timeout) | -| [shared_buffers](../../reference-guide/guc-parameters/resource-consumption/memory.md#shared_buffers) | -| [shared_preload_libraries](../../reference-guide/guc-parameters/resource-consumption/kernel-resource-usage.md#shared_preload_libraries) | +| [session_timeout](connection-and-authentication/security-and-authentication.md#session_timeout) | +| [shared_buffers](resource-consumption/memory.md#shared_buffers) | +| [shared_preload_libraries](resource-consumption/kernel-resource-usage.md#shared_preload_libraries) | | [show_acce_estimate_detail](developer-options.md#show_acce_estimate_detail) | -| [skew_option](../../reference-guide/guc-parameters/query-planning/optimizer-method-configuration.md#skew_option) | -| [sql_beta_feature](../../reference-guide/guc-parameters/query-planning/other-optimizer-options.md#sql_beta_feature) | -| [sql_compatibility](../../reference-guide/guc-parameters/version-and-platform-compatibility/platform-and-client-compatibility.md#sql_compatibility) | -| [sql_ignore_strategy](../../reference-guide/guc-parameters/miscellaneous-parameters.md#sql_ignore_strategy) | -| [sql_inheritance](../../reference-guide/guc-parameters/version-and-platform-compatibility/compatibility-with-earlier-versions.md#sql_inheritance) | -| [sql_use_spacelimit](../../reference-guide/guc-parameters/resource-consumption/disk-space.md#sql_use_spacelimit) | -| [ssl](../../reference-guide/guc-parameters/connection-and-authentication/security-and-authentication.md#ssl) | -| [ssl_ca_file](../../reference-guide/guc-parameters/connection-and-authentication/security-and-authentication.md#ssl_ca_file) | -| [ssl_cert_expire_alert_threshold](../../reference-guide/guc-parameters/cm-parameters/cm_server.md#ssl_cert_expire_alert_threshold) | -| [ssl_cert_expire_check_interval](../../reference-guide/guc-parameters/cm-parameters/cm_server.md#ssl_cert_expire_check_interval) | -| [ssl_cert_file](../../reference-guide/guc-parameters/connection-and-authentication/security-and-authentication.md#ssl_cert_file) | -| [ssl_ciphers](../../reference-guide/guc-parameters/connection-and-authentication/security-and-authentication.md#ssl_ciphers) | -| [ssl_crl_file](../../reference-guide/guc-parameters/connection-and-authentication/security-and-authentication.md#ssl_crl_file) | -| [ssl_key_file](../../reference-guide/guc-parameters/connection-and-authentication/security-and-authentication.md#ssl_key_file) | -| [standard_conforming_strings](../../reference-guide/guc-parameters/version-and-platform-compatibility/compatibility-with-earlier-versions.md#standard_conforming_strings) | -| [standby_shared_buffers_fract](../../reference-guide/guc-parameters/resource-consumption/memory.md#standby_shared_buffers_fraction) | -| [statement_timeout](../../reference-guide/guc-parameters/default-settings-of-client-connection/statement-behavior.md#statement_timeout) | -| [stats_temp_directory](../../reference-guide/guc-parameters/statistics-during-the-database-running/query-and-index-statistics-collector.md#stats_temp_directory) | +| [skew_option](query-planning/optimizer-method-configuration.md#skew_option) | +| [sql_beta_feature](query-planning/other-optimizer-options.md#sql_beta_feature) | +| [sql_compatibility](version-and-platform-compatibility/platform-and-client-compatibility.md#sql_compatibility) | +| [sql_ignore_strategy](miscellaneous-parameters.md#sql_ignore_strategy) | +| [sql_inheritance](version-and-platform-compatibility/compatibility-with-earlier-versions.md#sql_inheritance) | +| [sql_use_spacelimit](resource-consumption/disk-space.md#sql_use_spacelimit) | +| [ssl](connection-and-authentication/security-and-authentication.md#ssl) | +| [ssl_ca_file](connection-and-authentication/security-and-authentication.md#ssl_ca_file) | +| [ssl_cert_expire_alert_threshold](cm-parameters/cm_server.md#ssl_cert_expire_alert_threshold) | +| [ssl_cert_expire_check_interval](cm-parameters/cm_server.md#ssl_cert_expire_check_interval) | +| [ssl_cert_file](connection-and-authentication/security-and-authentication.md#ssl_cert_file) | +| [ssl_ciphers](connection-and-authentication/security-and-authentication.md#ssl_ciphers) | +| [ssl_crl_file](connection-and-authentication/security-and-authentication.md#ssl_crl_file) | +| [ssl_key_file](connection-and-authentication/security-and-authentication.md#ssl_key_file) | +| [standard_conforming_strings](version-and-platform-compatibility/compatibility-with-earlier-versions.md#standard_conforming_strings) | +| [standby_shared_buffers_fract](resource-consumption/memory.md#standby_shared_buffers_fraction) | +| [statement_timeout](default-settings-of-client-connection/statement-behavior.md#statement_timeout) | +| [stats_temp_directory](statistics-during-the-database-running/query-and-index-statistics-collector.md#stats_temp_directory) | | [string_hash_compatible](developer-options.md#string_hash_compatible) | | [support_batch_bind](developer-options.md#support_batch_bind) | -| [support_extended_features](../../reference-guide/guc-parameters/version-and-platform-compatibility/platform-and-client-compatibility.md#support_extended_features) | -| [switch_rto](../../reference-guide/guc-parameters/cm-parameters/cm_server.md#switch_rto) | -| [sync_config_strategy](../../reference-guide/guc-parameters/ha-replication/primary-server.md#sync_config_strategy) | -| [synchronize_seqscans](../../reference-guide/guc-parameters/version-and-platform-compatibility/compatibility-with-earlier-versions.md#synchronize_seqscans) | -| [synchronous_commit](../../reference-guide/guc-parameters/write-ahead-log/settings.md#synchronous_commit) | -| [synchronous_standby_names](../../reference-guide/guc-parameters/ha-replication/primary-server.md#synchronous_standby_names) | -| [sysadmin_reserved_connection](../../reference-guide/guc-parameters/connection-and-authentication/connection-settings.md#sysadmin_reserved_connections) | -| [syslog_facility](../../reference-guide/guc-parameters/error-reporting-and-logging/logging-destination.md#syslog_facility) | -| [syslog_ident](../../reference-guide/guc-parameters/error-reporting-and-logging/logging-destination.md#syslog_ident) | +| [support_extended_features](version-and-platform-compatibility/platform-and-client-compatibility.md#support_extended_features) | +| [switch_rto](cm-parameters/cm_server.md#switch_rto) | +| [sync_config_strategy](ha-replication/primary-server.md#sync_config_strategy) | +| [synchronize_seqscans](version-and-platform-compatibility/compatibility-with-earlier-versions.md#synchronize_seqscans) | +| [synchronous_commit](write-ahead-log/settings.md#synchronous_commit) | +| [synchronous_standby_names](ha-replication/primary-server.md#synchronous_standby_names) | +| [sysadmin_reserved_connection](connection-and-authentication/connection-settings.md#sysadmin_reserved_connections) | +| [syslog_facility](error-reporting-and-logging/logging-destination.md#syslog_facility) | +| [syslog_ident](error-reporting-and-logging/logging-destination.md#syslog_ident) | | [table_skewness_warning_rows](alarm-detection.md#table_skewness_warning_rows) | | [table_skewness_warning_threshold](alarm-detection.md#table_skewness_warning_threshold) | -| [tcp_keepalives_count](../../reference-guide/guc-parameters/connection-and-authentication/communication-library-parameters.md#tcp_keepalives_count) | -| [tcp_keepalives_idle](../../reference-guide/guc-parameters/connection-and-authentication/communication-library-parameters.md#tcp_keepalives_idle) | -| [tcp_keepalives_interval](../../reference-guide/guc-parameters/connection-and-authentication/communication-library-parameters.md#tcp_keepalives_interval) | -| [td_compatible_truncation](../../reference-guide/guc-parameters/version-and-platform-compatibility/platform-and-client-compatibility.md#td_compatible_truncation) | +| [tcp_keepalives_count](connection-and-authentication/communication-library-parameters.md#tcp_keepalives_count) | +| [tcp_keepalives_idle](connection-and-authentication/communication-library-parameters.md#tcp_keepalives_idle) | +| [tcp_keepalives_interval](connection-and-authentication/communication-library-parameters.md#tcp_keepalives_interval) | +| [td_compatible_truncation](version-and-platform-compatibility/platform-and-client-compatibility.md#td_compatible_truncation) | | [tde_cmk_id](security-configuration.md#tde_cmk_id) | -| [temp_buffers](../../reference-guide/guc-parameters/resource-consumption/memory.md#temp_buffers) | -| [temp_file_limit](../../reference-guide/guc-parameters/resource-consumption/disk-space.md#temp_file_limit) | -| [temp_tablespaces](../../reference-guide/guc-parameters/default-settings-of-client-connection/statement-behavior.md#temp_tablespaces) | -| [thread_count](../../reference-guide/guc-parameters/cm-parameters/cm_server.md#thread_count) | +| [temp_buffers](resource-consumption/memory.md#temp_buffers) | +| [temp_file_limit](resource-consumption/disk-space.md#temp_file_limit) | +| [temp_tablespaces](default-settings-of-client-connection/statement-behavior.md#temp_tablespaces) | +| [thread_count](cm-parameters/cm_server.md#thread_count) | | [thread_pool_attr](thread-pool.md#thread_pool_attr) | -| [TimeZone](../../reference-guide/guc-parameters/default-settings-of-client-connection/zone-and-formatting.md#timezone) | -| [timezone_abbreviations](../../reference-guide/guc-parameters/default-settings-of-client-connection/zone-and-formatting.md#timezone_abbreviations) | +| [TimeZone](default-settings-of-client-connection/zone-and-formatting.md#timezone) | +| [timezone_abbreviations](default-settings-of-client-connection/zone-and-formatting.md#timezone_abbreviations) | | [topsql_retention_time](load-management.md#topsql_retention_time) | | [trace_notify](developer-options.md#trace_notify) | | [trace_recovery_messages](developer-options.md#trace_recovery_messages) | | [trace_sort](developer-options.md#trace_sort) | -| [track_activities](../../reference-guide/guc-parameters/statistics-during-the-database-running/query-and-index-statistics-collector.md#track_activities) | -| [track_activity_query_size](../../reference-guide/guc-parameters/statistics-during-the-database-running/query-and-index-statistics-collector.md#track_activity_query_size) | -| [track_counts](../../reference-guide/guc-parameters/statistics-during-the-database-running/query-and-index-statistics-collector.md#track_counts) | -| [track_functions](../../reference-guide/guc-parameters/statistics-during-the-database-running/query-and-index-statistics-collector.md#track_functions) | -| [track_io_timing](../../reference-guide/guc-parameters/statistics-during-the-database-running/query-and-index-statistics-collector.md#track_io_timing) | -| [track_sql_count](../../reference-guide/guc-parameters/statistics-during-the-database-running/query-and-index-statistics-collector.md#track_sql_count) | +| [track_activities](statistics-during-the-database-running/query-and-index-statistics-collector.md#track_activities) | +| [track_activity_query_size](statistics-during-the-database-running/query-and-index-statistics-collector.md#track_activity_query_size) | +| [track_counts](statistics-during-the-database-running/query-and-index-statistics-collector.md#track_counts) | +| [track_functions](statistics-during-the-database-running/query-and-index-statistics-collector.md#track_functions) | +| [track_io_timing](statistics-during-the-database-running/query-and-index-statistics-collector.md#track_io_timing) | +| [track_sql_count](statistics-during-the-database-running/query-and-index-statistics-collector.md#track_sql_count) | | [track_stmt_details_size](query.md#track_stmt_details_size) | | [track_stmt_retention_time](query.md#track_stmt_retention_time) | | [track_stmt_session_slot](query.md#track_stmt_session_slot) | -| [track_stmt_standby_chain_size](../../reference-guide/guc-parameters/query.md#track_stmt_standby_chain_size) | +| [track_stmt_standby_chain_size](query.md#track_stmt_standby_chain_size) | | [track_stmt_stat_level](query.md#track_stmt_stat_level) | -| [track_thread_wait_status_interval](../../reference-guide/guc-parameters/statistics-during-the-database-running/query-and-index-statistics-collector.md#track_thread_wait_status_interval) | +| [track_thread_wait_status_interval](statistics-during-the-database-running/query-and-index-statistics-collector.md#track_thread_wait_status_interval) | | [transaction_deferrable](MogDB-transaction.md#transaction_deferrable) | | [transaction_isolation](MogDB-transaction.md#transaction_isolation) | | [transaction_pending_time](load-management.md#transaction_pending_time) | | [transaction_read_only](MogDB-transaction.md#transaction_read_only) | -| [transform_null_equals](../../reference-guide/guc-parameters/version-and-platform-compatibility/platform-and-client-compatibility.md#transform_null_equals) | +| [transform_null_equals](version-and-platform-compatibility/platform-and-client-compatibility.md#transform_null_equals) | | [transparent_encrypt_kms_region](miscellaneous-parameters.md#transparent_encrypt_kms_region) | | [transparent_encrypt_kms_url](miscellaneous-parameters.md#transparent_encrypt_kms_url) | | [transparent_encrypted_string](miscellaneous-parameters.md#transparent_encrypted_string) | -| [try_vector_engine_strategy](../../reference-guide/guc-parameters/query-planning/optimizer-method-configuration.md#try_vector_engine_strategy) | -| [udf_memory_limit](user-defined-functions.md#udf_memory_limit) | -| [UDFWorkerMemHardLimit](user-defined-functions.md#udfworkermemhardlimit) | -| [uncontrolled_memory_context](../../reference-guide/guc-parameters/resource-consumption/memory.md#uncontrolled_memory_context) | -| [undo_limit_size_per_transaction](undo.md#undo_limit_size_per_transaction) | +| [try_vector_engine_strategy](query-planning/optimizer-method-configuration.md#try_vector_engine_strategy) | +| [udf_memory_limit](guc-user-defined-functions.md#udf_memory_limit) | +| [UDFWorkerMemHardLimit](guc-user-defined-functions.md#udfworkermemhardlimit) | +| [uncontrolled_memory_context](resource-consumption/memory.md#uncontrolled_memory_context) | +| [undo_limit_size_per_transaction](rollback-parameters.md#undo_limit_size_per_transaction) | | [undo_retention_time](flashback.md#undo_retention_time) | -| [undo_space_limit_size](undo.md#undo_space_limit_size) | +| [undo_space_limit_size](rollback-parameters.md#undo_space_limit_size) | | [undo_zone_count](reserved-parameters.md) | -| [unix_socket_directory](../../reference-guide/guc-parameters/connection-and-authentication/connection-settings.md#unix_socket_directory) | -| [unix_socket_group](../../reference-guide/guc-parameters/connection-and-authentication/connection-settings.md#unix_socket_group) | -| [unix_socket_permissions](../../reference-guide/guc-parameters/connection-and-authentication/connection-settings.md#unix_socket_permissions) | +| [unix_socket_directory](connection-and-authentication/connection-settings.md#unix_socket_directory) | +| [unix_socket_group](connection-and-authentication/connection-settings.md#unix_socket_group) | +| [unix_socket_permissions](connection-and-authentication/connection-settings.md#unix_socket_permissions) | | [update_lockwait_timeout](lock-management.md#update_lockwait_timeout) | -| [upgrade_from](../../reference-guide/guc-parameters/cm-parameters/cm_agent.md#upgrade_from) | +| [upgrade_from](cm-parameters/cm_agent.md#upgrade_from) | | [upgrade_mode](upgrade-parameters.md#upgrade_mode) | | [uppercase_attribute_name](./version-and-platform-compatibility/platform-and-client-compatibility.md#uppercase_attribute_name) | | [use_elastic_search](security-configuration.md#use_elastic_search) | | [use_workload_manager](load-management.md#use_workload_manager) | | [user_metric_retention_time](load-management.md#user_metric_retention_time) | | [ustore_attr](miscellaneous-parameters.md#ustore_attr) | -| [vacuum_cost_delay](../../reference-guide/guc-parameters/resource-consumption/cost-based-vacuum-delay.md#vacuum_cost_delay) | -| [vacuum_cost_limit](../../reference-guide/guc-parameters/resource-consumption/cost-based-vacuum-delay.md#vacuum_cost_limit) | -| [vacuum_cost_page_dirty](../../reference-guide/guc-parameters/resource-consumption/cost-based-vacuum-delay.md#vacuum_cost_page_dirty) | -| [vacuum_cost_page_hit](../../reference-guide/guc-parameters/resource-consumption/cost-based-vacuum-delay.md#vacuum_cost_page_hit) | -| [vacuum_cost_page_miss](../../reference-guide/guc-parameters/resource-consumption/cost-based-vacuum-delay.md#vacuum_cost_page_miss) | -| [vacuum_defer_cleanup_age](../../reference-guide/guc-parameters/ha-replication/primary-server.md#vacuum_defer_cleanup_age) | -| [vacuum_freeze_min_age](../../reference-guide/guc-parameters/default-settings-of-client-connection/statement-behavior.md#vacuum_freeze_min_age) | -| [vacuum_freeze_table_age](../../reference-guide/guc-parameters/default-settings-of-client-connection/statement-behavior.md#vacuum_freeze_table_age) | +| [vacuum_cost_delay](resource-consumption/cost-based-vacuum-delay.md#vacuum_cost_delay) | +| [vacuum_cost_limit](resource-consumption/cost-based-vacuum-delay.md#vacuum_cost_limit) | +| [vacuum_cost_page_dirty](resource-consumption/cost-based-vacuum-delay.md#vacuum_cost_page_dirty) | +| [vacuum_cost_page_hit](resource-consumption/cost-based-vacuum-delay.md#vacuum_cost_page_hit) | +| [vacuum_cost_page_miss](resource-consumption/cost-based-vacuum-delay.md#vacuum_cost_page_miss) | +| [vacuum_defer_cleanup_age](ha-replication/primary-server.md#vacuum_defer_cleanup_age) | +| [vacuum_freeze_min_age](default-settings-of-client-connection/statement-behavior.md#vacuum_freeze_min_age) | +| [vacuum_freeze_table_age](default-settings-of-client-connection/statement-behavior.md#vacuum_freeze_table_age) | | [vacuum_gtt_defer_check_age](global-temporary-table.md#vacuum_gtt_defer_check_age) | -| [var_eq_const_selectivity](../../reference-guide/guc-parameters/query-planning/other-optimizer-options.md#var_eq_const_selectivity) | +| [var_eq_const_selectivity](query-planning/other-optimizer-options.md#var_eq_const_selectivity) | | [version_retention_age](flashback.md#version_retention_age) | | [view_independent](miscellaneous-parameters.md#view_independent) | -| [wait_dummy_time](../../reference-guide/guc-parameters/ha-replication/primary-server.md#wait_dummy_time) | -| [wal_block_size](../../reference-guide/guc-parameters/write-ahead-log/settings.md#wal_block_size) | -| [wal_buffers](../../reference-guide/guc-parameters/write-ahead-log/settings.md#wal_buffers) | -| [wal_file_init_num](../../reference-guide/guc-parameters/write-ahead-log/settings.md#wal_file_init_num) | -| [wal_flush_delay](../../reference-guide/guc-parameters/write-ahead-log/settings.md#wal_flush_delay) | -| [wal_flush_timeout](../../reference-guide/guc-parameters/write-ahead-log/settings.md#wal_flush_timeout) | -| [wal_keep_segments](../../reference-guide/guc-parameters/ha-replication/sending-server.md#wal_keep_segments) | -| [wal_level](../../reference-guide/guc-parameters/write-ahead-log/settings.md#wal_level) | -| [wal_log_hints](../../reference-guide/guc-parameters/write-ahead-log/settings.md#wal_log_hints) | -| [wal_receiver_buffer_size](../../reference-guide/guc-parameters/ha-replication/standby-server.md#wal_receiver_buffer_size) | -| [wal_receiver_connect_retries](../../reference-guide/guc-parameters/ha-replication/standby-server.md#wal_receiver_connect_retries) | -| [wal_receiver_connect_timeout](../../reference-guide/guc-parameters/ha-replication/standby-server.md#wal_receiver_connect_timeout) | -| [wal_receiver_status_interval](../../reference-guide/guc-parameters/ha-replication/standby-server.md#wal_receiver_status_interval) | -| [wal_receiver_timeout](../../reference-guide/guc-parameters/ha-replication/standby-server.md#wal_receiver_timeout) | -| [wal_segment_size](../../reference-guide/guc-parameters/write-ahead-log/settings.md#wal_segment_size) | -| [wal_sender_timeout](../../reference-guide/guc-parameters/ha-replication/sending-server.md#wal_sender_timeout) | -| [wal_sync_method](../../reference-guide/guc-parameters/write-ahead-log/settings.md#wal_sync_method) | -| [wal_writer_delay](../../reference-guide/guc-parameters/write-ahead-log/settings.md#wal_writer_delay) | -| [walsender_max_send_size](../../reference-guide/guc-parameters/ha-replication/primary-server.md#walsender_max_send_size) | -| [walwriter_cpu_bind](../../reference-guide/guc-parameters/write-ahead-log/settings.md#walwriter_cpu_bind) | -| [walwriter_sleep_threshold](../../reference-guide/guc-parameters/write-ahead-log/settings.md#walwriter_sleep_threshold) | +| [wait_dummy_time](ha-replication/primary-server.md#wait_dummy_time) | +| [wal_block_size](write-ahead-log/settings.md#wal_block_size) | +| [wal_buffers](write-ahead-log/settings.md#wal_buffers) | +| [wal_file_init_num](write-ahead-log/settings.md#wal_file_init_num) | +| [wal_flush_delay](write-ahead-log/settings.md#wal_flush_delay) | +| [wal_flush_timeout](write-ahead-log/settings.md#wal_flush_timeout) | +| [wal_keep_segments](ha-replication/sending-server.md#wal_keep_segments) | +| [wal_level](write-ahead-log/settings.md#wal_level) | +| [wal_log_hints](write-ahead-log/settings.md#wal_log_hints) | +| [wal_receiver_buffer_size](ha-replication/standby-server.md#wal_receiver_buffer_size) | +| [wal_receiver_connect_retries](ha-replication/standby-server.md#wal_receiver_connect_retries) | +| [wal_receiver_connect_timeout](ha-replication/standby-server.md#wal_receiver_connect_timeout) | +| [wal_receiver_status_interval](ha-replication/standby-server.md#wal_receiver_status_interval) | +| [wal_receiver_timeout](ha-replication/standby-server.md#wal_receiver_timeout) | +| [wal_segment_size](write-ahead-log/settings.md#wal_segment_size) | +| [wal_sender_timeout](ha-replication/sending-server.md#wal_sender_timeout) | +| [wal_sync_method](write-ahead-log/settings.md#wal_sync_method) | +| [wal_writer_delay](write-ahead-log/settings.md#wal_writer_delay) | +| [walsender_max_send_size](ha-replication/primary-server.md#walsender_max_send_size) | +| [walwriter_cpu_bind](write-ahead-log/settings.md#walwriter_cpu_bind) | +| [walwriter_sleep_threshold](write-ahead-log/settings.md#walwriter_sleep_threshold) | | [wdr_snapshot_interval](system-performance-snapshot.md#wdr_snapshot_interval) | | [wdr_snapshot_query_timeout](system-performance-snapshot.md#wdr_snapshot_query_timeout) | | [wdr_snapshot_retention_days](system-performance-snapshot.md#wdr_snapshot_retention_days) | -| [work_mem](../../reference-guide/guc-parameters/resource-consumption/memory.md#work_mem) | +| [work_mem](resource-consumption/memory.md#work_mem) | | [xc_maintenance_mode](MogDB-transaction.md#xc_maintenance_mode) | | [xloginsert_locks](lock-management.md#xloginsert_locks) | -| [xmlbinary](../../reference-guide/guc-parameters/default-settings-of-client-connection/statement-behavior.md#xmlbinary) | -| [xmloption](../../reference-guide/guc-parameters/default-settings-of-client-connection/statement-behavior.md#xmloption) | +| [xmlbinary](default-settings-of-client-connection/statement-behavior.md#xmlbinary) | +| [xmloption](default-settings-of-client-connection/statement-behavior.md#xmloption) | | [zero_damaged_pages](developer-options.md#zero_damaged_pages) | diff --git a/product/zh/docs-mogdb/v5.0/reference-guide/guc-parameters/user-defined-functions.md b/product/zh/docs-mogdb/v5.0/reference-guide/guc-parameters/guc-user-defined-functions.md similarity index 100% rename from product/zh/docs-mogdb/v5.0/reference-guide/guc-parameters/user-defined-functions.md rename to product/zh/docs-mogdb/v5.0/reference-guide/guc-parameters/guc-user-defined-functions.md diff --git a/product/zh/docs-mogdb/v5.0/reference-guide/guc-parameters/ha-replication/ha-replication.md b/product/zh/docs-mogdb/v5.0/reference-guide/guc-parameters/ha-replication/ha-replication.md index 6144dac7bbb1a0a441524811432dd0ac22dc7d49..a9b1fc44f0214c3a6cf4045a1afc31a75140fd93 100644 --- a/product/zh/docs-mogdb/v5.0/reference-guide/guc-parameters/ha-replication/ha-replication.md +++ b/product/zh/docs-mogdb/v5.0/reference-guide/guc-parameters/ha-replication/ha-replication.md @@ -1,11 +1,11 @@ --- -title: 双机复制 -summary: 双机复制 +title: 主备复制 +summary: 主备复制 author: zhang cuiping date: 2023-04-07 --- -# 双机复制 +# 主备复制 - **[发送端服务器](sending-server.md)** - **[主服务器](primary-server.md)** diff --git a/product/zh/docs-mogdb/v5.0/reference-guide/guc-parameters/ha-replication/primary-server.md b/product/zh/docs-mogdb/v5.0/reference-guide/guc-parameters/ha-replication/primary-server.md index 5b7b450414021641f98fb856213b92a682e86b65..43e0f978c867daabeb7d32741b4cfc920cc7dcd2 100644 --- a/product/zh/docs-mogdb/v5.0/reference-guide/guc-parameters/ha-replication/primary-server.md +++ b/product/zh/docs-mogdb/v5.0/reference-guide/guc-parameters/ha-replication/primary-server.md @@ -309,4 +309,18 @@ date: 2021-04-20 > - 在一个包含了主机、备机和级联备的数据库实例中,主机相对于备机是发送端,备机相对于主机是接收端,备机相对于级联备是发送端,级联备相对于备机是接收端。 > - 发送端主动向接收端同步配置文件、接收端请求发送端同步配置文件是两个独立的事件,均会使得配置文件同步。若不希望配置文件同步,则需要在接收端配置为none_node,发送端若为备机只能配置为none_node,发送端若为主机,配置为none_node时主机与所有备机都不同步,为only_sync_node时仅与同步备同步,不与异步备同步。 > - 配置参数同步的具体表现为,发送端发送配置文件,对接收端配置文件中的对应参数直接覆盖。若设置了配置文件需要同步的策略,则修改接收端配置参数后,发送端会立刻覆盖接收端的配置参数,使得接收端修改不生效。 -> - 即使设置了配置文件需要同步的策略,仍有部分配置参数不会被同步。包括:“application_name”, “archive_command”, “audit_directory”, “available_zone”, “comm_control_port”, “comm_sctp_port”, “listen_addresses”, “log_directory”, “port”, “replconninfo1”, “replconninfo2”, “replconninfo3”, “replconninfo4”, “replconninfo5”, “replconninfo6”, “replconninfo7”, “replconninfo8”, “replconninfo9”, “replconninfo10”, “replconninfo11”, “replconninfo12”, “replconninfo13”, “replconninfo14”, “replconninfo15”, “replconninfo16”, “replconninfo17”, “replconninfo18”, “ssl”, “ssl_ca_file”, “ssl_cert_file”, “ssl_ciphers”, “ssl_crl_file”, “ssl_key_file”, “ssl_renegotiation_limit”, “ssl_cert_notify_time”, “synchronous_standby_names”, “local_bind_address”, “perf_directory”, “query_log_directory”, “asp_log_directory”, “streaming_router_port”, “enable_upsert_to_merge”, “archive_dest”, “recovery_min_apply_delay”, “sync_config_strategy”。 \ No newline at end of file +> - 即使设置了配置文件需要同步的策略,仍有部分配置参数不会被同步。包括:“application_name”, “archive_command”, “audit_directory”, “available_zone”, “comm_control_port”, “comm_sctp_port”, “listen_addresses”, “log_directory”, “port”, “replconninfo1”, “replconninfo2”, “replconninfo3”, “replconninfo4”, “replconninfo5”, “replconninfo6”, “replconninfo7”, “replconninfo8”, “replconninfo9”, “replconninfo10”, “replconninfo11”, “replconninfo12”, “replconninfo13”, “replconninfo14”, “replconninfo15”, “replconninfo16”, “replconninfo17”, “replconninfo18”, “ssl”, “ssl_ca_file”, “ssl_cert_file”, “ssl_ciphers”, “ssl_crl_file”, “ssl_key_file”, “ssl_renegotiation_limit”, “ssl_cert_notify_time”, “synchronous_standby_names”, “local_bind_address”, “perf_directory”, “query_log_directory”, “asp_log_directory”, “streaming_router_port”, “enable_upsert_to_merge”, “archive_dest”, “recovery_min_apply_delay”, “sync_config_strategy”。 + +## pgxc_node_name + +**参数说明**: 指定节点名称。 + +该参数属于POSTMASTER类型参数,请参考表[GUC参数分类](../appendix.md)中对应设置方法进行设置。 + +在备机请求主机进行日志复制时,如果application_name参数没有设置,那么该参数会被用来作为备机在主机上的流复制槽名字。该流复制槽的命名方式为 “该参数值\_备机ip\_备机port”。其中,备机ip和备机port取自replconninfo参数中指定的备机ip和端口号。该流复制槽最大长度为61个字符,如果拼接后的字符串超过该长度,则会使用截断后的pgxc_node_name进行拼接,以保证流复制槽名字长度小于等于61个字符。 + +> ![img](https://cdn-mogdb.enmotech.com/docs-media/icon/icon-note.gif) **注意:** 此参数修改后会导致连接数据库实例失败,不建议进行修改。 + +**取值范围**: 字符串 + +**默认值**: 当前节点名称 \ No newline at end of file diff --git a/product/zh/docs-mogdb/v5.0/reference-guide/guc-parameters/ha-replication/sending-server.md b/product/zh/docs-mogdb/v5.0/reference-guide/guc-parameters/ha-replication/sending-server.md index 535a30f54794313f9380799e84297cb8c49f3cca..ba139110bf006c8e442c6779b9306d42844ed5a5 100644 --- a/product/zh/docs-mogdb/v5.0/reference-guide/guc-parameters/ha-replication/sending-server.md +++ b/product/zh/docs-mogdb/v5.0/reference-guide/guc-parameters/ha-replication/sending-server.md @@ -78,7 +78,7 @@ date: 2021-04-20 **设置建议**: -当使用双机复制、逻辑解码时,该参数值建议设为:当前物理流复制槽数+所需的逻辑复制槽数。如果实际设置值比上述建议值要小,那么可能造成这些功能不可用或异常。 +当使用主备复制、逻辑解码时,该参数值建议设为:当前物理流复制槽数+所需的逻辑复制槽数。如果实际设置值比上述建议值要小,那么可能造成这些功能不可用或异常。 - 物理流复制槽提供了一种自动化的方法来确保主节点在所有备节点或从备节点收到xlog之前,xlog不会被移除。也就是说物理流复制槽用于支撑主备HA。数据库所需要的物理流复制槽数为备节点加从备的和与主节点之间的比例。例如,假设数据库高可用方案为1主、1备、1从备,则所需物理流复制槽数为2。假设数据库的高可用方案为1主3备,则所需物理流复制槽数为3。 - 目前默认不支持主备从部署方式。 @@ -163,3 +163,17 @@ date: 2021-04-20 **取值范围**: 字符串。其中空字符串表示没有配置节点信息。 **默认值**: 空字符串 + +## pgxc_node_name + +**参数说明**: 指定节点名称。 + +该参数属于POSTMASTER类型参数,请参考表[GUC参数分类](../appendix.md)中对应设置方法进行设置。 + +在备机请求主机进行日志复制时,如果application_name参数没有设置,那么该参数会被用来作为备机在主机上的流复制槽名字。该流复制槽的命名方式为 “该参数值\_备机ip\_备机port”。其中,备机ip和备机port取自replconninfo参数中指定的备机ip和端口号。该流复制槽最大长度为61个字符,如果拼接后的字符串超过该长度,则会使用截断后的pgxc_node_name进行拼接,以保证流复制槽名字长度小于等于61个字符。 + +> ![img](https://cdn-mogdb.enmotech.com/docs-media/icon/icon-note.gif) **注意:** 此参数修改后会导致连接数据库实例失败,不建议进行修改。 + +**取值范围**: 字符串 + +**默认值**: 当前节点名称 diff --git a/product/zh/docs-mogdb/v5.0/reference-guide/guc-parameters/ha-replication/standby-server.md b/product/zh/docs-mogdb/v5.0/reference-guide/guc-parameters/ha-replication/standby-server.md index b20395399fe3eadfb237d71d693f905a69b72acf..d7d927bf135e43c2085ff91cff427bae9a39dce8 100644 --- a/product/zh/docs-mogdb/v5.0/reference-guide/guc-parameters/ha-replication/standby-server.md +++ b/product/zh/docs-mogdb/v5.0/reference-guide/guc-parameters/ha-replication/standby-server.md @@ -155,4 +155,18 @@ date: 2021-04-20 **取值范围**:整型,0~262143 -**默认值**:2 \ No newline at end of file +**默认值**:2 + +## pgxc_node_name + +**参数说明**: 指定节点名称。 + +该参数属于POSTMASTER类型参数,请参考表[GUC参数分类](../appendix.md)中对应设置方法进行设置。 + +在备机请求主机进行日志复制时,如果application_name参数没有设置,那么该参数会被用来作为备机在主机上的流复制槽名字。该流复制槽的命名方式为 “该参数值\_备机ip\_备机port”。其中,备机ip和备机port取自replconninfo参数中指定的备机ip和端口号。该流复制槽最大长度为61个字符,如果拼接后的字符串超过该长度,则会使用截断后的pgxc_node_name进行拼接,以保证流复制槽名字长度小于等于61个字符。 + +> ![img](https://cdn-mogdb.enmotech.com/docs-media/icon/icon-note.gif) **注意:** 此参数修改后会导致连接数据库实例失败,不建议进行修改。 + +**取值范围**: 字符串 + +**默认值**: 当前节点名称 \ No newline at end of file diff --git a/product/zh/docs-mogdb/v5.0/reference-guide/guc-parameters/reference-guide-guc-parameters.md b/product/zh/docs-mogdb/v5.0/reference-guide/guc-parameters/reference-guide-guc-parameters.md index 6a0e6206dbea1d3d84fe340b48c38f9da6cd2c6b..b99c833018a044813bf2adcbf646800286e2de14 100644 --- a/product/zh/docs-mogdb/v5.0/reference-guide/guc-parameters/reference-guide-guc-parameters.md +++ b/product/zh/docs-mogdb/v5.0/reference-guide/guc-parameters/reference-guide-guc-parameters.md @@ -13,7 +13,7 @@ date: 2023-04-07 - **[连接和认证](./connection-and-authentication/connection-and-authentication.md)** - **[资源消耗](./resource-consumption/resource-consumption.md)** - **[预写式日志](./write-ahead-log/write-ahead-log.md)** -- **[双机复制](./ha-replication/ha-replication.md)** +- **[主备复制](./ha-replication/ha-replication.md)** - **[内存表](mot.md)** - **[查询规划](./query-planning/query-planning.md)** - **[错误报告和日志](./error-reporting-and-logging/error-reporting-and-logging.md)** @@ -39,11 +39,10 @@ date: 2023-04-07 - **[安全配置](security-configuration.md)** - **[全局临时表](global-temporary-table.md)** - **[HyperLogLog](HyperLogLog.md)** -- **[用户自定义函数](user-defined-functions.md)** +- **[用户自定义函数](guc-user-defined-functions.md)** - **[定时任务](scheduled-task.md)** - **[线程池](thread-pool.md)** - **[备份恢复](backup-and-restoration-parameter.md)** -- **[Undo](undo.md)** - **[DCF参数设置](DCF-parameters-settings.md)** - **[闪回相关参数](flashback.md)** - **[回滚相关参数](rollback-parameters.md)** diff --git a/product/zh/docs-mogdb/v5.0/reference-guide/guc-parameters/rollback-parameters.md b/product/zh/docs-mogdb/v5.0/reference-guide/guc-parameters/rollback-parameters.md index 61281f7f0ae7d0c49f3f1d6f8cd9c84a965087fc..e6bd07c3b79f072fcaad14b7a156fcc04ec1df20 100644 --- a/product/zh/docs-mogdb/v5.0/reference-guide/guc-parameters/rollback-parameters.md +++ b/product/zh/docs-mogdb/v5.0/reference-guide/guc-parameters/rollback-parameters.md @@ -16,3 +16,23 @@ date: 2021-11-08 **取值范围**: 整型,1~100 **默认值**: 5 + +## undo_space_limit_size + +**参数说明**: 用于控制undo强制回收阈值,达到阈值的80%启动强制回收,用户需要根据自己的业务情况,设置该值,可以通过先设置一个较大值,然后观察实际业务运行占用undo空间,再将该值调整为合理值。 + +该参数属于POSTMASTER类型参数,请参考表[GUC参数分类](appendix.md)中对应设置方法进行设置。 + +**取值范围**: 整型,800M~16TB + +**默认值**: 256GB + +## undo_limit_size_per_transaction + +**参数说明**: 用于控制单事务undo分配空间阈值,达到阈值时事务报错回滚。 + +该参数属于POSTMASTER类型参数,请参考表[GUC参数分类](appendix.md)中对应设置方法进行设置。 + +**取值范围**: 整型,2M~16TB + +**默认值**: 32GB diff --git a/product/zh/docs-mogdb/v5.0/reference-guide/guc-parameters/undo.md b/product/zh/docs-mogdb/v5.0/reference-guide/guc-parameters/undo.md deleted file mode 100644 index c1f3a9c08be69c3bcc3313e6b859690cea776548..0000000000000000000000000000000000000000 --- a/product/zh/docs-mogdb/v5.0/reference-guide/guc-parameters/undo.md +++ /dev/null @@ -1,28 +0,0 @@ ---- -title: Undo -summary: Undo -author: Zhang Cuiping -date: 2021-11-08 ---- - -# Undo - -## undo_space_limit_size - -**参数说明**: 用于控制undo强制回收阈值,达到阈值的80%启动强制回收,用户需要根据自己的业务情况,设置该值,可以通过先设置一个较大值,然后观察实际业务运行占用undo空间,再将该值调整为合理值。 - -该参数属于POSTMASTER类型参数,请参考表[GUC参数分类](appendix.md)中对应设置方法进行设置。 - -**取值范围**: 整型,800M~16TB - -**默认值**: 256GB - -## undo_limit_size_per_transaction - -**参数说明**: 用于控制单事务undo分配空间阈值,达到阈值时事务报错回滚。 - -该参数属于POSTMASTER类型参数,请参考表[GUC参数分类](appendix.md)中对应设置方法进行设置。 - -**取值范围**: 整型,2M~16TB - -**默认值**: 32GB diff --git a/product/zh/docs-mogdb/v5.0/reference-guide/sql-syntax/CLUSTER.md b/product/zh/docs-mogdb/v5.0/reference-guide/sql-syntax/CLUSTER.md index 97070fc1a9aeb2451401cc4030274220964592e6..1de8130bee12a407e733432c51fd3e4c3f64fcc6 100644 --- a/product/zh/docs-mogdb/v5.0/reference-guide/sql-syntax/CLUSTER.md +++ b/product/zh/docs-mogdb/v5.0/reference-guide/sql-syntax/CLUSTER.md @@ -119,10 +119,4 @@ MogDB=# DROP INDEX ds_inventory_p1_index1; --删除分区表。 MogDB=# DROP TABLE inventory_p1; -``` - -## 优化建议 - -- cluster - - 建议在新近聚簇的表上运行ANALYZE。否则,优化器可能会选择很差劲的查询规划。 - - 不允许在事务中执行CLUSTER。 +``` \ No newline at end of file diff --git a/product/zh/docs-mogdb/v5.0/reference-guide/sql-syntax/CREATE-DATABASE.md b/product/zh/docs-mogdb/v5.0/reference-guide/sql-syntax/CREATE-DATABASE.md index 16fcc5263467db05ab7bb6b62c247c0ec47719b0..a99318394b2bb8c597742ef447f287ebc078169f 100644 --- a/product/zh/docs-mogdb/v5.0/reference-guide/sql-syntax/CREATE-DATABASE.md +++ b/product/zh/docs-mogdb/v5.0/reference-guide/sql-syntax/CREATE-DATABASE.md @@ -231,14 +231,4 @@ MogDB=# DROP DATABASE ora_compatible_db; ## 相关链接 -[ALTER DATABASE](ALTER-DATABASE.md),[DROP DATABASE](DROP-DATABASE.md) - -## 优化建议 - -- **create database** - - 事务中不支持创建database。 - -- **ENCODING LC_COLLATE LC_CTYPE** - - 当新建数据库Encoding与模板数据库(SQL\_ASCII)不匹配(为'GBK' /'UTF8'/'LATIN1'/'GB18030')时,必须指定template \[=\] template0。 +[ALTER DATABASE](ALTER-DATABASE.md),[DROP DATABASE](DROP-DATABASE.md) \ No newline at end of file diff --git a/product/zh/docs-mogdb/v5.0/reference-guide/sql-syntax/CREATE-INDEX.md b/product/zh/docs-mogdb/v5.0/reference-guide/sql-syntax/CREATE-INDEX.md index b679e186e623a985b0550b7fe874957af899ce30..d0a27c4362629fc056e2fe480a75004730bec16c 100644 --- a/product/zh/docs-mogdb/v5.0/reference-guide/sql-syntax/CREATE-INDEX.md +++ b/product/zh/docs-mogdb/v5.0/reference-guide/sql-syntax/CREATE-INDEX.md @@ -549,27 +549,4 @@ Time: 11146.399 ms ## 相关链接 -[ALTER INDEX](ALTER-INDEX.md),[DROP INDEX](DROP-INDEX.md) - -## 优化建议 - -### create index - -建议仅在匹配如下条件之一时创建索引: - -- 经常执行查询的字段。 -- 在连接条件上创建索引,对于存在多字段连接的查询,建议在这些字段上建立组合索引。例如,select * from t1 join t2 on t1.a=t2.a and t1.b=t2.b,可以在t1表上的a,b字段上建立组合索引。 -- where子句的过滤条件字段上(尤其是范围条件)。 -- 在经常出现在order by、group by和distinct后的字段。 - -约束限制: - -- 分区表上不支持创建部分索引。 -- 分区表创建GLOBAL索引时,存在以下约束条件: - - 不支持表达式索引、部分索引 - - 不支持列存表 - - 仅支持B-tree索引 -- 在相同属性列上,分区LOCAL索引与GLOBAL索引不能共存。 -- GLOBAL索引,最大支持31列。 -- 如果alter语句不带有UPDATE GLOBAL INDEX,那么原有的GLOBAL索引将失效,查询时将使用其他索引进行查询;如果alter语句带有UPDATE GLOBAL INDEX,原有的GLOBAL索引仍然有效,并且索引功能正确。 -- 对于分区表的local unique索引,索引键必须包含所有的分区键。 \ No newline at end of file +[ALTER INDEX](ALTER-INDEX.md),[DROP INDEX](DROP-INDEX.md) \ No newline at end of file diff --git a/product/zh/docs-mogdb/v5.0/reference-guide/sql-syntax/CREATE-PROCEDURE.md b/product/zh/docs-mogdb/v5.0/reference-guide/sql-syntax/CREATE-PROCEDURE.md index 38e6fb8d56331c38160057f02a9d914af50a4596..4622971fdfbfac5cafadb100500c8d11aeb795f4 100644 --- a/product/zh/docs-mogdb/v5.0/reference-guide/sql-syntax/CREATE-PROCEDURE.md +++ b/product/zh/docs-mogdb/v5.0/reference-guide/sql-syntax/CREATE-PROCEDURE.md @@ -148,10 +148,4 @@ plsql_body ## 相关链接 -[DROP PROCEDURE](DROP-PROCEDURE.md) - -## 优化建议 - -- analyse | analyze - - 不支持在事务或匿名块中执行analyze 。 - - 不支持在函数或存储过程中执行analyze操作。 +[DROP PROCEDURE](DROP-PROCEDURE.md) \ No newline at end of file diff --git a/product/zh/docs-mogdb/v5.0/reference-guide/sql-syntax/CREATE-TABLE.md b/product/zh/docs-mogdb/v5.0/reference-guide/sql-syntax/CREATE-TABLE.md index 142941d1b01ca166fb6bbf6fe5c1e663d1e4590c..c76a1ecf51ac7cdc60db71b0cd73df2e7dea2f4f 100644 --- a/product/zh/docs-mogdb/v5.0/reference-guide/sql-syntax/CREATE-TABLE.md +++ b/product/zh/docs-mogdb/v5.0/reference-guide/sql-syntax/CREATE-TABLE.md @@ -1187,61 +1187,4 @@ MogDB=# DROP SCHEMA IF EXISTS joe CASCADE; ## 相关链接 -[ALTER TABLE](ALTER-TABLE.md), [DROP TABLE](DROP-TABLE.md), [CREATE TABLESPACE](CREATE-TABLESPACE.md) - -## 优化建议 - -- UNLOGGED - - - UNLOGGED表和表上的索引因为数据写入时不通过WAL日志机制,写入速度远高于普通表。因此,可以用于缓冲存储复杂查询的中间结果集,增强复杂查询的性能。 - - UNLOGGED表无主备机制,在系统故障或异常断点等情况下,会有数据丢失风险,因此,不可用来存储基础数据。 - -- TEMPORARY | TEMP - -- 临时表只在当前会话可见,会话结束后会自动删除。 - -- LIKE - -- 新表自动从这个表中继承所有字段名及其数据类型和非空约束,新表与源表之间在创建动作完毕之后是完全无关的。 - -- LIKE INCLUDING DEFAULTS - -- 源表上的字段缺省表达式只有在指定INCLUDING DEFAULTS时,才会复制到新表中。缺省是包含缺省表达式的,即新表中的所有字段的缺省值,如果在原表中是表达式,则新表中也是表达式。 - -- LIKE INCLUDING CONSTRAINTS - -- 源表上的CHECK约束仅在指定INCLUDING CONSTRAINTS时,会复制到新表中,而其他类型的约束永远不会复制到新表中。非空约束总是复制到新表中。此规则同时适用于表约束和列约束。 - -- LIKE INCLUDING INDEXES - -- 如果指定了INCLUDING INDEXES,则源表上的索引也将在新表上创建,默认不建立索引。 - -- LIKE INCLUDING STORAGE - -- 如果指定了INCLUDING STORAGE,则复制列的STORAGE设置会复制到新表中,默认情况下不包含STORAGE设置。 - -- LIKE INCLUDING COMMENTS - -- 如果指定了INCLUDING COMMENTS,则源表列、约束和索引的注释会复制到新表中。默认情况下,不复制源表的注释。 - -- LIKE INCLUDING PARTITION - - - 如果指定了INCLUDING PARTITION,则源表的分区定义会复制到新表中,同时新表将不能再使用PARTITION BY子句。默认情况下,不拷贝源表的分区定义。 - - > ![img](https://cdn-mogdb.enmotech.com/docs-media/icon/icon-notice.gif) **须知**:列表/哈希分区表暂不支持LIKE INCLUDING PARTITION。 - -- LIKE INCLUDING RELOPTIONS - -- 如果指定了INCLUDING RELOPTIONS,则源表的存储参数(即源表的WITH子句)会复制到新表中。默认情况下,不复制源表的存储参数。 - -- LIKE INCLUDING ALL - -- INCLUDING ALL包含了INCLUDING DEFAULTS、INCLUDING CONSTRAINTS、INCLUDING INDEXES、INCLUDING STORAGE、INCLUDING COMMENTS、INCLUDING PARTITION、INCLUDING RELOPTIONS的内容。 - -- ORIENTATION ROW - -- 创建行存表,行存储适合于OLTP业务,此类型的表上交互事务比较多,一次交互会涉及表中的多个列,用行存查询效率较高。 - -- ORIENTATION COLUMN - - - 创建列存表,列存储适合于数据仓库业务,此类型的表上会做大量的汇聚计算,且涉及的列操作较少。 +[ALTER TABLE](ALTER-TABLE.md), [DROP TABLE](DROP-TABLE.md), [CREATE TABLESPACE](CREATE-TABLESPACE.md) \ No newline at end of file diff --git a/product/zh/docs-mogdb/v5.0/reference-guide/sql-syntax/CREATE-TABLESPACE.md b/product/zh/docs-mogdb/v5.0/reference-guide/sql-syntax/CREATE-TABLESPACE.md index c45749dbf49985ebb00099c2cae700abdf84262f..1c84109cbae54eaaeb1ddabed227db5624e53e81 100644 --- a/product/zh/docs-mogdb/v5.0/reference-guide/sql-syntax/CREATE-TABLESPACE.md +++ b/product/zh/docs-mogdb/v5.0/reference-guide/sql-syntax/CREATE-TABLESPACE.md @@ -130,10 +130,4 @@ MogDB=# DROP ROLE jay; ## 相关链接 -[CREATE DATABASE](CREATE-DATABASE.md),[CREATE TABLE](CREATE-TABLE.md),[CREATE INDEX](CREATE-INDEX.md),[DROP TABLESPACE](DROP-TABLESPACE.md),[ALTER TABLESPACE](ALTER-TABLESPACE.md) - -## 优化建议 - -- create tablespace - - 不建议在事务内部创建表空间。 +[CREATE DATABASE](CREATE-DATABASE.md),[CREATE TABLE](CREATE-TABLE.md),[CREATE INDEX](CREATE-INDEX.md),[DROP TABLESPACE](DROP-TABLESPACE.md),[ALTER TABLESPACE](ALTER-TABLESPACE.md) \ No newline at end of file diff --git a/product/zh/docs-mogdb/v5.0/reference-guide/sql-syntax/DELETE.md b/product/zh/docs-mogdb/v5.0/reference-guide/sql-syntax/DELETE.md index 1e0002da20a58cc24693452f139c6217403e30b7..2594675994c91ee0555bafb3edd2fcfe7f651354 100644 --- a/product/zh/docs-mogdb/v5.0/reference-guide/sql-syntax/DELETE.md +++ b/product/zh/docs-mogdb/v5.0/reference-guide/sql-syntax/DELETE.md @@ -167,10 +167,4 @@ MogDB=# DROP TABLE customer_address_bak; MogDB=# DELETE FROM a,b USING tpcds.customer_address a,tpcds.customer_address_bak b where a.ca_address_sk = b.ca_address_sk and a.ca_address_sk < 50; 或者 MogDB=# DELETE a,b FROM tpcds.customer_address a,tpcds.customer_address_bak b where a.ca_address_sk = b.ca_address_sk and a.ca_address_sk < 50; -``` - -## 优化建议 - -- delete - - 如果要删除表中的所有记录,建议使用truncate语法。 +``` \ No newline at end of file diff --git a/product/zh/docs-mogdb/v5.0/reference-guide/sql-syntax/DROP-DATABASE.md b/product/zh/docs-mogdb/v5.0/reference-guide/sql-syntax/DROP-DATABASE.md index 4794cc76c750eae0168ab5854c8046adabb1da9b..04b92ddcf961a6b659b3484802d1841b41275620 100644 --- a/product/zh/docs-mogdb/v5.0/reference-guide/sql-syntax/DROP-DATABASE.md +++ b/product/zh/docs-mogdb/v5.0/reference-guide/sql-syntax/DROP-DATABASE.md @@ -45,10 +45,4 @@ DropDatabase ::= DROP DATABASE [ IF EXISTS ] database_name ; ## 相关链接 -[CREATE DATABASE](CREATE-DATABASE.md) - -## 优化建议 - -- drop database - - 不支持在事务中删除database。 +[CREATE DATABASE](CREATE-DATABASE.md) \ No newline at end of file diff --git a/product/zh/docs-mogdb/v5.0/reference-guide/sql-syntax/DROP-TABLESPACE.md b/product/zh/docs-mogdb/v5.0/reference-guide/sql-syntax/DROP-TABLESPACE.md index 1338806702aebfde7f2387862ebd11c4557f2911..0cb051d1e0e8d4298ad11e55e5a6a80607264fde 100644 --- a/product/zh/docs-mogdb/v5.0/reference-guide/sql-syntax/DROP-TABLESPACE.md +++ b/product/zh/docs-mogdb/v5.0/reference-guide/sql-syntax/DROP-TABLESPACE.md @@ -43,10 +43,4 @@ DropTablespace ::= DROP TABLESPACE [ IF EXISTS ] tablespace_name; ## 相关链接 -[ALTER TABLESPACE](ALTER-TABLESPACE.md), [CREATE TABLESPACE](CREATE-TABLESPACE.md) - -## 优化建议 - -- drop database - - 不支持在事务中删除database。 +[ALTER TABLESPACE](ALTER-TABLESPACE.md), [CREATE TABLESPACE](CREATE-TABLESPACE.md) \ No newline at end of file diff --git a/product/zh/docs-mogdb/v5.0/reference-guide/sql-syntax/INSERT.md b/product/zh/docs-mogdb/v5.0/reference-guide/sql-syntax/INSERT.md index c78a97b2be5052d4227b63d1b20d98595ff5c904..7ff672e38e3ec3dc5788c981e3b678639b9db0a5 100644 --- a/product/zh/docs-mogdb/v5.0/reference-guide/sql-syntax/INSERT.md +++ b/product/zh/docs-mogdb/v5.0/reference-guide/sql-syntax/INSERT.md @@ -222,10 +222,4 @@ INSERT INTO upser VALUES (5, c1 + 100, 100), (6, c1 + 100, 100), (7, c1 + 100, 1 (13, c1 + 100, 100), (14, c1 + 100, 100), (15, c1 + 100, c1 + c2) ON DUPLICATE KEY UPDATE c2 = c1 + c2, c3 = c2 + c3; SELECT * FROM upser ORDER BY c1; -``` - -## 优化建议 - -- VALUES - - 通过insert语句批量插入数据时,建议将多条记录合并入一条语句中执行插入,以提高数据加载性能。例如,INSERT INTO sections VALUES (30, 'Administration', 31, 1900),(40, 'Development', 35, 2000), (50, 'Development' , 60 , 2001); +``` \ No newline at end of file diff --git a/product/zh/docs-mogdb/v5.0/reference-guide/sql-syntax/REINDEX.md b/product/zh/docs-mogdb/v5.0/reference-guide/sql-syntax/REINDEX.md index 6cfcde245a29d1e05d5e471635f7c577ac34f5f7..980922e45d4f396901f12c2e28b21cae214572f3 100644 --- a/product/zh/docs-mogdb/v5.0/reference-guide/sql-syntax/REINDEX.md +++ b/product/zh/docs-mogdb/v5.0/reference-guide/sql-syntax/REINDEX.md @@ -161,18 +161,4 @@ MogDB=# REINDEX TABLE CONCURRENTLY customer_t1; --删除customer_t1表。 MogDB=# DROP TABLE customer_t1; -``` - -## 优化建议 - -- INTERNAL TABLE - - 此种情况大多用于故障恢复,不建议进行并发操作。 - -- DATABASE - - 不能在事务中reindex database。 - -- SYSTEM - - 不能在事务中reindex系统表。 +``` \ No newline at end of file diff --git a/product/zh/docs-mogdb/v5.0/reference-guide/sql-syntax/SELECT-INTO.md b/product/zh/docs-mogdb/v5.0/reference-guide/sql-syntax/SELECT-INTO.md index 9f3ff932c0f36a026577e3318721aa16587d3f05..399cdf69429ba8dfd3545338ecb7a55dfeb67311 100644 --- a/product/zh/docs-mogdb/v5.0/reference-guide/sql-syntax/SELECT-INTO.md +++ b/product/zh/docs-mogdb/v5.0/reference-guide/sql-syntax/SELECT-INTO.md @@ -87,14 +87,4 @@ MogDB=# DROP TABLE reason_t1; ## 相关链接 -[SELECT](SELECT.md) - -## 优化建议 - -- **DATABASE** - - 不建议在事务中reindex database。 - -- **SYSTEM** - - 不建议在事务中reindex系统表。 +[SELECT](SELECT.md) \ No newline at end of file diff --git a/product/zh/docs-mogdb/v5.0/reference-guide/sql-syntax/SELECT.md b/product/zh/docs-mogdb/v5.0/reference-guide/sql-syntax/SELECT.md index 9395b41d0903b8d786e2ddcb92a39ef1ab1af3c9..50872478f3db8dc016eac4323cd92f490d849406 100644 --- a/product/zh/docs-mogdb/v5.0/reference-guide/sql-syntax/SELECT.md +++ b/product/zh/docs-mogdb/v5.0/reference-guide/sql-syntax/SELECT.md @@ -28,6 +28,9 @@ SELECT语句就像叠加在数据库表上的过滤器,利用SQL关键字从 { * | {expression [ [ AS ] output_name ]} [, ...] } [ into_option ] [ FROM from_item [, ...] ] + [ PIVOT (aggregate_function( expr ) [[AS] alias] [, ...] FOR (column [, ...]) IN ({{{ expr | (expr [, ...])} [[AS] alias] [,...]} | subquery [,...]}))] + [ UNPVOT [ {INCLUDE | EXCLUDE} NULLS] ({column | (cloumn [, ...])} FOR (column [, ...]) IN ({column | (column [, ...])} [AS {literal | (literal[, ...])}] [{column | (column [, ...])} [AS {literal | ( literal [, ...]) }]]))] + [ index_hints ] [ WHERE condition ] [ [ START WITH condition ] CONNECT BY [NOCYCLE] condition [ ORDER SIBLINGS BY expression ] ] [ GROUP BY grouping_element [, ...] ] @@ -691,6 +694,10 @@ SELECT语句就像叠加在数据库表上的过滤器,利用SQL关键字从 - **PARTITION子句** 查询某个分区表中相应分区的数据。 + +- **PIVOT/UNPIVOT** + + PIVOT子句用于将指定字段的字段值由行转换为列,UNPIVOT子句用于将指定字段的字段值由列转换为行。 ## 示例 diff --git a/product/zh/docs-mogdb/v5.0/reference-guide/sql-syntax/VACUUM.md b/product/zh/docs-mogdb/v5.0/reference-guide/sql-syntax/VACUUM.md index 55159f405ecbee741b4f28b877795f9c9ca53524..cca56be7a894acd48618429ab17be202864c6d61 100644 --- a/product/zh/docs-mogdb/v5.0/reference-guide/sql-syntax/VACUUM.md +++ b/product/zh/docs-mogdb/v5.0/reference-guide/sql-syntax/VACUUM.md @@ -114,12 +114,4 @@ MogDB=# VACUUM (VERBOSE, ANALYZE) reason; --删除索引。 MogDB=# DROP INDEX ds_reason_index1 CASCADE; MogDB=# DROP TABLE reason; -``` - -## 优化建议 - -- vacuum - - VACUUM不能在事务块内执行。 - - 建议生产数据库经常清理(至少每晚一次),以保证不断地删除失效的行。尤其是在增删了大量记录后,对相关表执行VACUUM ANALYZE命令。 - - 不建议日常使用FULL选项,但是可以在特殊情况下使用。例如,一个例子就是在用户删除了一个表的大部分行之后,希望从物理上缩小该表以减少磁盘空间占用。 - - 执行VACUUM FULL操作时,建议首先删除相关表上的所有索引,再运行VACUUM FULL命令,最后重建索引。 +``` \ No newline at end of file diff --git a/product/zh/docs-mogdb/v5.0/toc.md b/product/zh/docs-mogdb/v5.0/toc.md index 3f457cec3cff22360179bc63920d4f751ffae71e..4462fd2781074abe52da7a563228e23238696db5 100644 --- a/product/zh/docs-mogdb/v5.0/toc.md +++ b/product/zh/docs-mogdb/v5.0/toc.md @@ -129,6 +129,7 @@ + [支持PLPGSQL subtype](/characteristic-description/compatibility/support-plpgsql-subtype.md) + [支持无参数FUNCTION的同义词调用不加括号](/characteristic-description/compatibility/support-synonym-calls-without-parentheses-for-function-without-parameters.md) + [支持dbms_utility.format_error_backtrace](/characteristic-description/compatibility/format-error-backtrace.md) + + [支持PIVOT和UNPIVOT语法](/characteristic-description/compatibility/pivot-and-unpivot.md) + [数据库安全](/characteristic-description/database-security/database-security.md) + [访问控制模型](/characteristic-description/database-security/1-access-control-model.md) + [控制权和访问权分离](/characteristic-description/database-security/2-separation-of-control-and-access-permissions.md) @@ -1369,7 +1370,7 @@ + [检查点](./reference-guide/guc-parameters/write-ahead-log/checkpoints.md) + [日志回放](./reference-guide/guc-parameters/write-ahead-log/log-replay.md) + [归档](./reference-guide/guc-parameters/write-ahead-log/archiving.md) - + [双机复制](./reference-guide/guc-parameters/ha-replication/ha-replication.md) + + [主备复制](./reference-guide/guc-parameters/ha-replication/ha-replication.md) + [发送端服务器](./reference-guide/guc-parameters/ha-replication/sending-server.md) + [主服务器](./reference-guide/guc-parameters/ha-replication/primary-server.md) + [备服务器](./reference-guide/guc-parameters/ha-replication/standby-server.md) @@ -1421,9 +1422,8 @@ + [HyperLogLog](./reference-guide/guc-parameters/HyperLogLog.md) + [定时任务](./reference-guide/guc-parameters/scheduled-task.md) + [线程池](./reference-guide/guc-parameters/thread-pool.md) - + [用户自定义函数](./reference-guide/guc-parameters/user-defined-functions.md) + + [用户自定义函数](./reference-guide/guc-parameters/guc-user-defined-functions.md) + [备份恢复](./reference-guide/guc-parameters/backup-and-restoration-parameter.md) - + [Undo](./reference-guide/guc-parameters/undo.md) + [DCF参数设置](./reference-guide/guc-parameters/DCF-parameters-settings.md) + [闪回相关参数](./reference-guide/guc-parameters/flashback.md) + [回滚相关参数](./reference-guide/guc-parameters/rollback-parameters.md) diff --git a/product/zh/docs-mogdb/v5.0/toc_characteristic_description.md b/product/zh/docs-mogdb/v5.0/toc_characteristic_description.md index bf93f06177bf1bf7b4e5e23767645ea306ca1d43..66afd1f566d9a63aaea7ad232a8a86cd935dac63 100644 --- a/product/zh/docs-mogdb/v5.0/toc_characteristic_description.md +++ b/product/zh/docs-mogdb/v5.0/toc_characteristic_description.md @@ -87,6 +87,7 @@ + [支持PLPGSQL subtype](/characteristic-description/compatibility/support-plpgsql-subtype.md) + [支持无参数FUNCTION的同义词调用不加括号](/characteristic-description/compatibility/support-synonym-calls-without-parentheses-for-function-without-parameters.md) + [支持dbms_utility.format_error_backtrace](/characteristic-description/compatibility/format-error-backtrace.md) + + [支持PIVOT和UNPIVOT语法](/characteristic-description/compatibility/pivot-and-unpivot.md) + [数据库安全](/characteristic-description/database-security/database-security.md) + [访问控制模型](/characteristic-description/database-security/1-access-control-model.md) + [控制权和访问权分离](/characteristic-description/database-security/2-separation-of-control-and-access-permissions.md) diff --git a/product/zh/docs-mogdb/v5.0/toc_parameters-and-tools.md b/product/zh/docs-mogdb/v5.0/toc_parameters-and-tools.md index 52e6125216bf7cec7778ecf697d90a953c33a972..1ee180bc6d5bee7f16f3f1490e79092db6c9fcb6 100644 --- a/product/zh/docs-mogdb/v5.0/toc_parameters-and-tools.md +++ b/product/zh/docs-mogdb/v5.0/toc_parameters-and-tools.md @@ -25,7 +25,7 @@ + [检查点](./reference-guide/guc-parameters/write-ahead-log/checkpoints.md) + [日志回放](./reference-guide/guc-parameters/write-ahead-log/log-replay.md) + [归档](./reference-guide/guc-parameters/write-ahead-log/archiving.md) - + [双机复制](./reference-guide/guc-parameters/ha-replication/ha-replication.md) + + [主备复制](./reference-guide/guc-parameters/ha-replication/ha-replication.md) + [发送端服务器](./reference-guide/guc-parameters/ha-replication/sending-server.md) + [主服务器](./reference-guide/guc-parameters/ha-replication/primary-server.md) + [备服务器](./reference-guide/guc-parameters/ha-replication/standby-server.md) @@ -77,9 +77,8 @@ + [HyperLogLog](./reference-guide/guc-parameters/HyperLogLog.md) + [定时任务](./reference-guide/guc-parameters/scheduled-task.md) + [线程池](./reference-guide/guc-parameters/thread-pool.md) - + [用户自定义函数](./reference-guide/guc-parameters/user-defined-functions.md) + + [用户自定义函数](./reference-guide/guc-parameters/guc-user-defined-functions.md) + [备份恢复](./reference-guide/guc-parameters/backup-and-restoration-parameter.md) - + [Undo](./reference-guide/guc-parameters/undo.md) + [DCF参数设置](./reference-guide/guc-parameters/DCF-parameters-settings.md) + [闪回相关参数](./reference-guide/guc-parameters/flashback.md) + [回滚相关参数](./reference-guide/guc-parameters/rollback-parameters.md) diff --git a/product/zh/docs-mogdb/v5.1/administrator-guide/routine-maintenance/8-routinely-maintaining-tables.md b/product/zh/docs-mogdb/v5.1/administrator-guide/routine-maintenance/8-routinely-maintaining-tables.md index 79fbb0368fad381b46179becb9dbec24f9081a7e..579d6e12f3439a66f2c561d003841d49ed951a67 100644 --- a/product/zh/docs-mogdb/v5.1/administrator-guide/routine-maintenance/8-routinely-maintaining-tables.md +++ b/product/zh/docs-mogdb/v5.1/administrator-guide/routine-maintenance/8-routinely-maintaining-tables.md @@ -88,7 +88,7 @@ date: 2021-03-04 VACUUM ``` - > ![img](https://cdn-mogdb.enmotech.com/docs-media/icon/icon-note.gif) **说明:** VACUUM和ANALYZE会导致I/O流量的大幅增加,这可能会影响其他活动会话的性能。因此,建议通过"vacuum_cost_delay"参数设置《开发者指南》中"GUC参数说明 > 资源消耗 > 基于开销的清理延迟"。 + > ![img](https://cdn-mogdb.enmotech.com/docs-media/icon/icon-note.gif) **说明:** VACUUM和ANALYZE会导致I/O流量的大幅增加,这可能会影响其他活动会话的性能。因此,建议通过"[vacuum_cost_delay](../../reference-guide/guc-parameters/resource-consumption/cost-based-vacuum-delay.md#vacuum_cost_delay)"参数设置。 3. 删除表。 @@ -109,3 +109,443 @@ date: 2021-03-04 - 定期对部分大表做VACUUM FULL,在性能下降后为全库做VACUUM FULL,目前暂定每月做一次VACUUM FULL。 - 定期对系统表做VACUUM FULL,主要是PG_ATTRIBUTE。 - 启用系统自动清理线程(AUTOVACUUM)自动执行VACUUM和ANALYZE,回收被标识为删除状态的记录空间,并更新表的统计数据。 + +
+ +## MogDB空闲空间回收机制简介 + +### VACUUM的作用 + +#### 空闲空间回收 + +由于MogDB的MVCC机制,表中会同时存放一行记录的多个历史版本,对于经常更新的表来说,会造成表空间的膨胀。为了解决这个问题,引入了空闲空间回收机制,并提供三种不同力度的空闲空间回收方式,用于不同场景下的空闲空间回收。根据触发时机和清理方式的不同,空闲空间回收分为三类: + +- 轻量级:轻量级空间回收在访问数据页时顺带清理页面中的过期元组,不清理索引,磁盘上的物理空间不会回收 +- 中量级:中量级空间回收有两种触发场景,一是后台线程自动发起的autovacuum,另一种是用户手动执行的VACUUM操作,会对索引和数据页面进行清理,特殊场景下会回收磁盘上的物理空间 +- 重量级:重量级空间回收主要由VACUUM FULL操作触发,会对指定的表进行彻底重建,回收磁盘上的物理空间 + +#### 更新统计信息 + +中量级的空间回收会更新系统的统计信息,使planner能够计算出更准确的执行计划。 + +#### 更新vm + +在MogDB中,通过visibility map来标记数据页面的可见性,被vm标记的数据页面中没有过期元组,下一次VACUUM时会跳过该页面。此外,在进行索引扫描时,会首先检查页面的vm标记,以判断是否可进行indexonlyscan。 + +### VACUUM的分类 + +#### 轻量级 + +当查询扫描到某个数据页面时,会顺带清理页面中的过期元组。由于是顺带清理页面内容,因此只会删除过期元组本身,在页面内释放过期元组占用的空间,行指针则不做处理,避免在索引侧造成空指针或空引用。一个特殊情况是HOT场景,HOT场景是指对于表上的所有的索引,更新前后的索引键值均没有发生变化,因此对于更新后的元组只需要在数据页面中插入一条新记录,而不需要插入一条新的索引记录,通过HOT链来维护数据元组的新老版本。在轻量级空间回收时,只保留第一个版本的行指针,并将其重定向到第一个需要保留的元组版本的行指针。 + +![img](https://cdn-mogdb.enmotech.com/docs-media/mogdb/administrator-guide/routinely-maintaining-tables-1.png) + +#### 中量级 + +MogDB提供VACUUM语句来让用户主动执行对某个astore表及其表上的索引进行空间回收,在astore中,新老版本的数据混合存储,进行VACUUM时会会首先对数据页面进行顺序扫描,判断哪些元组需要被清理,对于需要被清理的元组,会首先清理其对应的索引,然后再清理数据页面中的元组,从而避免索侧的空指针/空引用问题。 + +除了用户手动执行VACUUM操作外,MogDB还提供了自动的空闲空间回收功能,通过autovacuum周期性对表中的过期元组进行清理。与手动的VACUUM不同的是,autovacuum清理表和表的toast表是分开处理的,而手动vacuum是连续处理(该差异在MogDB 3.0.8最新补丁版本提供参数handle_toast_in_autovac供用户选择)。此外,autovacuum会被DDL操作中断,而手动的VACUUM操作则会阻塞DDL操作。 + +![img](https://cdn-mogdb.enmotech.com/docs-media/mogdb/administrator-guide/routinely-maintaining-tables-2.png) + +#### 重量级 + +轻量级和中量级的空间回收都无法彻底释放磁盘上的物理空间,只能将数据页内的过期元组回收,释放其占用的空间,但是这些空间只能被当前表复用,无法将磁盘空间归还给操作系统。因此,MogDB提供了重量级的空闲空间回收VACUUM FULL操作。VACUUM FULL操作会将一个表中所有未过期元组从原数据页面中读取出来,然后重新紧密地插入到新的数据文件中,对于有索引的表,会在新的数据文件上重建索引,以彻底回收表中过期元组占用的空间。重量级空间回收操作的主体流程中只允许执行查询操作,而在提交流程,只读查询也会被阻塞。 + +![img](https://cdn-mogdb.enmotech.com/docs-media/mogdb/administrator-guide/routinely-maintaining-tables-3.png) + +### 示例及说明 + +#### 自动空闲空间回收autovacuum + +```sql +-- 1. update后等待连续的两次autovacuum +MogDB=# create table tb(id int, name text); +CREATE TABLE +MogDB=# insert into tb values(0, 'asdf'); +INSERT 0 1 +MogDB=# update tb set id = 1 ; +UPDATE 1 +MogDB=# select relname, n_tup_ins, n_tup_del, n_live_tup, n_dead_tup, last_autovacuum, autovacuum_count from pg_stat_user_tables where relname = 'tb'; + relname | n_tup_ins | n_tup_del | n_live_tup | n_dead_tup | last_autovacuum | autovacuum_count +---------+-----------+-----------+------------+------------+-----------------+------------------ + tb | 1 | 0 | 1 | 1 | | 0 +(1 row) + +MogDB=# select lp, t_xmin, t_xmax, t_infomask2, t_infomask, t_ctid from heap_page_items(get_raw_page('tb', 0)); + lp | t_xmin | t_xmax | t_infomask2 | t_infomask | t_ctid +----+--------+--------+-------------+------------+-------- + 1 | 17095 | 17096 | 16386 | 258 | (0,2) + 2 | 17096 | 0 | 32770 | 10242 | (0,2) +(2 rows) + +MogDB=# select relname, n_tup_ins, n_tup_del, n_live_tup, n_dead_tup, last_autovacuum, autovacuum_count from pg_stat_user_tables where relname = 'tb'; + relname | n_tup_ins | n_tup_del | n_live_tup | n_dead_tup | last_autovacuum | autovacuum_count +---------+-----------+-----------+------------+------------+-------------------------------+------------------ + tb | 1 | 0 | 1 | 1 | 2023-12-24 15:36:23.018133+08 | 1 +(1 row) + +MogDB=# select relname, n_tup_ins, n_tup_del, n_live_tup, n_dead_tup, last_autovacuum, autovacuum_count from pg_stat_user_tables where relname = 'tb'; + relname | n_tup_ins | n_tup_del | n_live_tup | n_dead_tup | last_autovacuum | autovacuum_count +---------+-----------+-----------+------------+------------+-------------------------------+------------------ + tb | 1 | 0 | 1 | 0 | 2023-12-24 15:37:23.079814+08 | 2 +(1 row) + + +-- 2. update后等待一次autovacuum,然后insert一条记录,查看xid是否被推进 +MogDB=# create table tb(id int, name text); +CREATE TABLE +MogDB=# insert into tb values(0, 'asdf'); +INSERT 0 1 +MogDB=# update tb set id = 1 ; +UPDATE 1 +MogDB=# select relname, n_tup_ins, n_tup_del, n_live_tup, n_dead_tup, last_autovacuum, autovacuum_count from pg_stat_user_tables where relname = 'tb'; + relname | n_tup_ins | n_tup_del | n_live_tup | n_dead_tup | last_autovacuum | autovacuum_count +---------+-----------+-----------+------------+------------+-----------------+------------------ + tb | 1 | 0 | 1 | 1 | | 0 +(1 row) + +MogDB=# select lp, t_xmin, t_xmax, t_infomask2, t_infomask, t_ctid from heap_page_items(get_raw_page('tb', 0)); + lp | t_xmin | t_xmax | t_infomask2 | t_infomask | t_ctid +----+--------+--------+-------------+------------+-------- + 1 | 17088 | 17089 | 16386 | 258 | (0,2) + 2 | 17089 | 0 | 32770 | 10242 | (0,2) +(2 rows) + +MogDB=# select lp, t_xmin, t_xmax, t_infomask2, t_infomask, t_ctid from heap_page_items(get_raw_page('tb', 0)); + lp | t_xmin | t_xmax | t_infomask2 | t_infomask | t_ctid +----+--------+--------+-------------+------------+-------- + 1 | 17088 | 17089 | 16386 | 1282 | (0,2) + 2 | 17089 | 0 | 32770 | 10498 | (0,2) +(2 rows) + +MogDB=# select relname, n_tup_ins, n_tup_del, n_live_tup, n_dead_tup, last_autovacuum, autovacuum_count from pg_stat_user_tables where relname = 'tb'; + relname | n_tup_ins | n_tup_del | n_live_tup | n_dead_tup | last_autovacuum | autovacuum_count +---------+-----------+-----------+------------+------------+-------------------------------+------------------ + tb | 1 | 0 | 1 | 1 | 2023-12-24 15:33:22.873957+08 | 1 +(1 row) + +MogDB=# insert into tb values(0, 'asdf'); +INSERT 0 1 +MogDB=# select lp, t_xmin, t_xmax, t_infomask2, t_infomask, t_ctid from heap_page_items(get_raw_page('tb', 0)); + lp | t_xmin | t_xmax | t_infomask2 | t_infomask | t_ctid +----+--------+--------+-------------+------------+-------- + 1 | 17088 | 17089 | 16386 | 1282 | (0,2) + 2 | 17089 | 0 | 32770 | 10498 | (0,2) + 3 | 17091 | 0 | 2 | 2050 | (0,3) +(3 rows) + +MogDB=# select relname, n_tup_ins, n_tup_del, n_live_tup, n_dead_tup, last_autovacuum, autovacuum_count from pg_stat_user_tables where relname = 'tb'; + relname | n_tup_ins | n_tup_del | n_live_tup | n_dead_tup | last_autovacuum | autovacuum_count +---------+-----------+-----------+------------+------------+-------------------------------+------------------ + tb | 2 | 0 | 2 | 0 | 2023-12-24 15:34:22.897349+08 | 2 +(1 row) + +MogDB=# select lp, t_xmin, t_xmax, t_infomask2, t_infomask, t_ctid from heap_page_items(get_raw_page('tb', 0)); + lp | t_xmin | t_xmax | t_infomask2 | t_infomask | t_ctid +----+--------+--------+-------------+------------+-------- + 1 | | | | | + 2 | 17089 | 0 | 32770 | 10498 | (0,2) + 3 | 17091 | 0 | 2 | 2306 | (0,3) +(3 rows) +``` + +- 从第一个示例可以看到,update后,第二次对表执行autovacuum,表中的过期元组将被清理掉 + +- 在第二个示例中,第一次insert的xid是17088,update的xid是17089,等待一次autovacuum之后再次进行insert的xid是17091,也就是autovacuum将xid从17089推进到了17090 + +#### 手动空闲空间回收VACUUM + +```sql +-- 1. update后直接vacuum +MogDB=# create table tb(id int, name text); +CREATE TABLE +MogDB=# insert into tb values(0, 'asdf'); +INSERT 0 1 +MogDB=# select lp, t_xmin, t_xmax, t_infomask2, t_infomask, t_ctid from heap_page_items(get_raw_page('tb', 0)); + lp | t_xmin | t_xmax | t_infomask2 | t_infomask | t_ctid +----+--------+--------+-------------+------------+-------- + 1 | 16702 | 0 | 2 | 2050 | (0,1) +(1 row) +MogDB=# select relname, n_tup_ins, n_tup_del, n_live_tup, n_dead_tup, last_autovacuum, autovacuum_count from pg_stat_user_tables where relname = 'tb'; + relname | n_tup_ins | n_tup_del | n_live_tup | n_dead_tup | last_autovacuum | autovacuum_count +---------+-----------+-----------+------------+------------+-----------------+------------------ + tb | 1 | 0 | 1 | 0 | | 0 +(1 row) + +MogDB=# update tb set id = 1; +UPDATE 1 +MogDB=# select relname, n_tup_ins, n_tup_del, n_live_tup, n_dead_tup, last_autovacuum, autovacuum_count from pg_stat_user_tables where relname = 'tb'; + relname | n_tup_ins | n_tup_del | n_live_tup | n_dead_tup | last_autovacuum | autovacuum_count +---------+-----------+-----------+------------+------------+-----------------+------------------ + tb | 1 | 0 | 1 | 1 | | 0 +(1 row) +MogDB=# select lp, t_xmin, t_xmax, t_infomask2, t_infomask, t_ctid from heap_page_items(get_raw_page('tb', 0)); + lp | t_xmin | t_xmax | t_infomask2 | t_infomask | t_ctid +----+--------+--------+-------------+------------+-------- + 1 | 16702 | 16703 | 16386 | 258 | (0,2) + 2 | 16703 | 0 | 32770 | 10242 | (0,2) +(2 rows) + +MogDB=# vacuum tb; +VACUUM +MogDB=# select lp, t_xmin, t_xmax, t_infomask2, t_infomask, t_ctid from heap_page_items(get_raw_page('tb', 0)); + lp | t_xmin | t_xmax | t_infomask2 | t_infomask | t_ctid +----+--------+--------+-------------+------------+-------- + 1 | 16702 | 16703 | 16386 | 1282 | (0,2) + 2 | 16703 | 0 | 32770 | 10498 | (0,2) +(2 rows) +MogDB=# select relname, n_tup_ins, n_tup_del, n_live_tup, n_dead_tup, last_autovacuum, autovacuum_count from pg_stat_user_tables where relname = 'tb'; + relname | n_tup_ins | n_tup_del | n_live_tup | n_dead_tup | last_autovacuum | autovacuum_count +---------+-----------+-----------+------------+------------+-----------------+------------------ + tb | 1 | 0 | 1 | 1 | | 0 +(1 row) + +MogDB=# insert into tb values(0, 'asdf'); +INSERT 0 1 +MogDB=# select lp, t_xmin, t_xmax, t_infomask2, t_infomask, t_ctid from heap_page_items(get_raw_page('tb', 0)); + lp | t_xmin | t_xmax | t_infomask2 | t_infomask | t_ctid +----+--------+--------+-------------+------------+-------- + 1 | 16702 | 16703 | 16386 | 1282 | (0,2) + 2 | 16703 | 0 | 32770 | 10498 | (0,2) + 3 | 16704 | 0 | 2 | 2050 | (0,3) +(3 rows) + +MogDB=# vacuum tb; +VACUUM +MogDB=# select lp, t_xmin, t_xmax, t_infomask2, t_infomask, t_ctid from heap_page_items(get_raw_page('tb', 0)); + lp | t_xmin | t_xmax | t_infomask2 | t_infomask | t_ctid +----+--------+--------+-------------+------------+-------- + 1 | | | | | + 2 | 16703 | 0 | 32770 | 10498 | (0,2) + 3 | 16704 | 0 | 2 | 2306 | (0,3) +(3 rows) +MogDB=# select relname, n_tup_ins, n_tup_del, n_live_tup, n_dead_tup, last_autovacuum, autovacuum_count from pg_stat_user_tables where relname = 'tb'; + relname | n_tup_ins | n_tup_del | n_live_tup | n_dead_tup | last_autovacuum | autovacuum_count +---------+-----------+-----------+------------+------------+-----------------+------------------ + tb | 2 | 0 | 2 | 0 | | 0 +(1 row) + +-- 2. update后执行其他操作推进一下xid,然后再vacuum +MogDB=# create table tb(id int, name text); +CREATE TABLE +MogDB=# insert into tb values(0, 'asdf'); +INSERT 0 1 +MogDB=# update tb set id = 1; +UPDATE 1 +MogDB=# select lp, t_xmin, t_xmax, t_infomask2, t_infomask, t_ctid from heap_page_items(get_raw_page('tb', 0)); + lp | t_xmin | t_xmax | t_infomask2 | t_infomask | t_ctid +----+--------+--------+-------------+------------+-------- + 1 | 16719 | 16720 | 16386 | 258 | (0,2) + 2 | 16720 | 0 | 32770 | 10242 | (0,2) +(2 rows) + +MogDB=# create table tbb(id int); +CREATE TABLE +MogDB=# vacuum tb; +VACUUM +MogDB=# select lp, t_xmin, t_xmax, t_infomask2, t_infomask, t_ctid from heap_page_items(get_raw_page('tb', 0)); + lp | t_xmin | t_xmax | t_infomask2 | t_infomask | t_ctid +----+--------+--------+-------------+------------+-------- + 1 | | | | | + 2 | 16720 | 0 | 32770 | 10498 | (0,2) +(2 rows) + +MogDB=# insert into tb values (0, 'asdf'); +INSERT 0 1 +MogDB=# select lp, t_xmin, t_xmax, t_infomask2, t_infomask, t_ctid from heap_page_items(get_raw_page('tb', 0)); + lp | t_xmin | t_xmax | t_infomask2 | t_infomask | t_ctid +----+--------+--------+-------------+------------+-------- + 1 | | | | | + 2 | 16720 | 0 | 32770 | 10498 | (0,2) + 3 | 16722 | 0 | 2 | 2050 | (0,3) +(3 rows) +``` + +- 示例1中,update的xid是16702,update的xid是16703,update之后进行vacuum,然后进行了第二次insert,第二次的insert的xid是16704,也就是vacuum操作没有推进xid + +#### 表重建VACUUM FULL + +```sql +-- 1. update后直接vacuum full +MogDB=# create table tb(id int, name text); +CREATE TABLE +MogDB=# insert into tb values(0, 'asdf'); +INSERT 0 1 +MogDB=# select lp, t_xmin, t_xmax, t_infomask2, t_infomask, t_ctid from heap_page_items(get_raw_page('tb', 0)); + lp | t_xmin | t_xmax | t_infomask2 | t_infomask | t_ctid +----+--------+--------+-------------+------------+-------- + 1 | 16707 | 0 | 2 | 2050 | (0,1) +(1 row) + +MogDB=# update tb set id = 1; +UPDATE 1 +MogDB=# select lp, t_xmin, t_xmax, t_infomask2, t_infomask, t_ctid from heap_page_items(get_raw_page('tb', 0)); + lp | t_xmin | t_xmax | t_infomask2 | t_infomask | t_ctid +----+--------+--------+-------------+------------+-------- + 1 | 16707 | 16708 | 16386 | 258 | (0,2) + 2 | 16708 | 0 | 32770 | 10242 | (0,2) +(2 rows) + +MogDB=# select relname, n_tup_ins, n_tup_del, n_live_tup, n_dead_tup, last_autovacuum, autovacuum_count from pg_stat_user_tables where relname = 'tb'; + relname | n_tup_ins | n_tup_del | n_live_tup | n_dead_tup | last_autovacuum | autovacuum_count +---------+-----------+-----------+------------+------------+-----------------+------------------ + tb | 1 | 0 | 1 | 1 | | 0 +(1 row) +MogDB=# vacuum full tb; +VACUUM +MogDB=# select lp, t_xmin, t_xmax, t_infomask2, t_infomask, t_ctid from heap_page_items(get_raw_page('tb', 0)); + lp | t_xmin | t_xmax | t_infomask2 | t_infomask | t_ctid +----+--------+--------+-------------+------------+-------- + 1 | 16708 | 0 | 2 | 10498 | (0,1) + 2 | 2 | 16708 | 2 | 1282 | (0,1) +(2 rows) + +MogDB=# select relname, n_tup_ins, n_tup_del, n_live_tup, n_dead_tup, last_autovacuum, autovacuum_count from pg_stat_user_tables where relname = 'tb'; + relname | n_tup_ins | n_tup_del | n_live_tup | n_dead_tup | last_autovacuum | autovacuum_count +---------+-----------+-----------+------------+------------+-----------------+------------------ + tb | 1 | 0 | 1 | 1 | | 0 +(1 row) + +MogDB=# vacuum full tb; +VACUUM +MogDB=# select lp, t_xmin, t_xmax, t_infomask2, t_infomask, t_ctid from heap_page_items(get_raw_page('tb', 0)); + lp | t_xmin | t_xmax | t_infomask2 | t_infomask | t_ctid +----+--------+--------+-------------+------------+-------- + 1 | 2 | 0 | 2 | 10498 | (0,1) +(1 row) + +MogDB=# select relname, n_tup_ins, n_tup_del, n_live_tup, n_dead_tup, last_autovacuum, autovacuum_count from pg_stat_user_tables where relname = 'tb'; + relname | n_tup_ins | n_tup_del | n_live_tup | n_dead_tup | last_autovacuum | autovacuum_count +---------+-----------+-----------+------------+------------+-----------------+------------------ + tb | 1 | 0 | 1 | 0 | | 0 +(1 row) + +-- 2. update后先执行一次insert,再vacuum full +MogDB=# create table tb(id int, name text); +CREATE TABLE +MogDB=# insert into tb values(0, 'asdf'); +INSERT 0 1 +MogDB=# select lp, t_xmin, t_xmax, t_infomask2, t_infomask, t_ctid from heap_page_items(get_raw_page('tb', 0)); + lp | t_xmin | t_xmax | t_infomask2 | t_infomask | t_ctid +----+--------+--------+-------------+------------+-------- + 1 | 16713 | 0 | 2 | 2050 | (0,1) +(1 row) + +MogDB=# update tb set id = 1; +UPDATE 1 +MogDB=# select lp, t_xmin, t_xmax, t_infomask2, t_infomask, t_ctid from heap_page_items(get_raw_page('tb', 0)); + lp | t_xmin | t_xmax | t_infomask2 | t_infomask | t_ctid +----+--------+--------+-------------+------------+-------- + 1 | 16713 | 16714 | 16386 | 258 | (0,2) + 2 | 16714 | 0 | 32770 | 10242 | (0,2) +(2 rows) + +MogDB=# insert into tb values(0, 'asdf'); +INSERT 0 1 +MogDB=# select lp, t_xmin, t_xmax, t_infomask2, t_infomask, t_ctid from heap_page_items(get_raw_page('tb', 0)); + lp | t_xmin | t_xmax | t_infomask2 | t_infomask | t_ctid +----+--------+--------+-------------+------------+-------- + 1 | 16713 | 16714 | 16386 | 258 | (0,2) + 2 | 16714 | 0 | 32770 | 10242 | (0,2) + 3 | 16715 | 0 | 2 | 2050 | (0,3) +(3 rows) + +MogDB=# vacuum full tb; +VACUUM +MogDB=# select lp, t_xmin, t_xmax, t_infomask2, t_infomask, t_ctid from heap_page_items(get_raw_page('tb', 0)); + lp | t_xmin | t_xmax | t_infomask2 | t_infomask | t_ctid +----+--------+--------+-------------+------------+-------- + 1 | 2 | 0 | 2 | 10498 | (0,1) + 2 | 16715 | 0 | 2 | 2306 | (0,2) +(2 rows) + +-- 3. 测试vacuum full是否会推进xid +MogDB=# insert into tb values(0, 'asef'); +INSERT 0 1 +MogDB=# select lp, t_xmin, t_xmax, t_infomask2, t_infomask, t_ctid from heap_page_items(get_raw_page('tb', 0)); + lp | t_xmin | t_xmax | t_infomask2 | t_infomask | t_ctid +----+--------+--------+-------------+------------+-------- + 1 | | | | | + 2 | 17096 | 0 | 32770 | 10498 | (0,2) + 3 | 17100 | 0 | 2 | 2050 | (0,3) +(3 rows) + +MogDB=# vacuum full tb; +VACUUM +MogDB=# insert into tb values(0, 'asef'); +INSERT 0 1 +MogDB=# select lp, t_xmin, t_xmax, t_infomask2, t_infomask, t_ctid from heap_page_items(get_raw_page('tb', 0)); + lp | t_xmin | t_xmax | t_infomask2 | t_infomask | t_ctid +----+--------+--------+-------------+------------+-------- + 1 | 2 | 0 | 2 | 10498 | (0,1) + 2 | 17100 | 0 | 2 | 2306 | (0,2) + 3 | 17102 | 0 | 2 | 2050 | (0,3) +(3 rows) +``` + +- 示例1中,第一次vacuum full将过期元组的xmax设置为无效的xmax,将更新后的xmin设置为2,xmax设置为更新的xid,并推进xid,第二次vacuum full的时候将过期的元组清理掉,将更新后的元组xmin设置为2 +- 示例2中,update后通过insert将xid推进,然后进行vacuum full,所有过期元组均被清理掉 +- 示例3连续的两次insert之间进行了一次vacuum full,可以看到vacuum full将xid进行了推进 + +### 相关日志 + +#### autovacuum日志 + +````shell +-- 第一次autovacuum +2023-12-24 10:57:45.633 sxb postgres localhost 140347577464576 0[0:0#0] 0 [VACUUM] LOG: normally vacuum rel "public.tb" freeze 2000000000 OldestXmin 15540, FreezeLimit 3, freezeTableLimit 3 +2023-12-24 10:57:47.952 sxb postgres localhost 140347577464576 0[0:0#0] 0 [VACUUM] LOG: "tb": found 0 removable, 100000 nonremovable row versions in 1031 out of 1031 pages +2023-12-24 10:57:47.952 sxb postgres localhost 140347577464576 0[0:0#0] 0 [VACUUM] DETAIL: 50000 dead row versions cannot be removed yet. There were 0 unused item pointers. 0 pages are entirely empty. CPU 0.00s/0.04u sec elapsed 2.31 sec. + +-- 第二次autovacuum +2023-12-24 10:58:15.634 sxb postgres localhost 140347577464576 0[0:0#0] 0 [VACUUM] LOG: normally vacuum rel "public.tb" freeze 2000000000 OldestXmin 15541, FreezeLimit 3, freezeTableLimit 3 +2023-12-24 10:58:15.756 sxb postgres localhost 140347521890048 0[0:0#0] 0 [BACKEND] LOG: clean statement thread start +2023-12-24 10:58:17.950 sxb postgres localhost 140347577464576 0[0:0#0] 0 [VACUUM] LOG: "tb": found 50000 removable, 50000 nonremovable row versions in 1031 out of 1031 pages +2023-12-24 10:58:17.950 sxb postgres localhost 140347577464576 0[0:0#0] 0 [VACUUM] DETAIL: 0 dead row versions cannot be removed yet. There were 0 unused item pointers. 0 pages are entirely empty. CPU 0.00s/0.04u sec elapsed 2.31 sec. +```` + +#### 手动vacuum日志 + +```shell +-- 第一次vacuum +2023-12-24 10:50:12.308 sxb postgres [local] 139638516152064 0[0:0#0] 1125899906842767 [VACUUM] LOG: normally vacuum rel "public.tb" freeze -1 OldestXmin 15178, FreezeLimit 3, freezeTableLimit 3 +2023-12-24 10:50:12.349 sxb postgres [local] 139638516152064 0[0:0#0] 1125899906842767 [VACUUM] LOG: "tb": found 0 removable, 100000 nonremovable row versions in 741 out of 741 pages +2023-12-24 10:50:12.349 sxb postgres [local] 139638516152064 0[0:0#0] 1125899906842767 [VACUUM] DETAIL: 50000 dead row versions cannot be removed yet. There were 0 unused item pointers. 0 pages are entirely empty. CPU 0.00s/0.04u sec elapsed 0.04 sec. + +-- 第二次vacuum +2023-12-24 10:52:12.909 sxb postgres [local] 139638516152064 0[0:0#0] 1125899906842783 [VACUUM] LOG: normally vacuum rel "public.tb" freeze -1 OldestXmin 15178, FreezeLimit 3, freezeTableLimit 3 +2023-12-24 10:52:12.932 sxb postgres [local] 139638516152064 0[0:0#0] 1125899906842783 [VACUUM] LOG: "tb": found 0 removable, 100000 nonremovable row versions in 741 out of 741 pages +2023-12-24 10:52:12.932 sxb postgres [local] 139638516152064 0[0:0#0] 1125899906842783 [VACUUM] DETAIL: 50000 dead row versions cannot be removed yet. There were 0 unused item pointers. 0 pages are entirely empty. CPU 0.00s/0.02u sec elapsed 0.02 sec. +``` + +#### vacuum full日志 + +```shell +-- 第一次vacuum full +2023-12-24 10:35:36.294 sxb postgres [local] 139638516152064 0[0:0#0] 1125899906842659 [BACKEND] LOG: vacuum test, OldestXmin: 15172 +2023-12-24 10:35:36.294 sxb postgres [local] 139638516152064 0[0:0#0] 1125899906842659 [BACKEND] LOG: Relation tb(24642) [0/16245/24642] Swap files with Relation 24648 [0/16245/24648] xid 15173 + +-- 第二次vacuum full +2023-12-24 10:35:42.499 sxb postgres [local] 139638516152064 0[0:0#0] 1125899906842661 [BACKEND] LOG: vacuum test, OldestXmin: 15173 +2023-12-24 10:35:42.499 sxb postgres [local] 139638516152064 0[0:0#0] 1125899906842661 [BACKEND] LOG: Relation tb(24642) [0/16245/24648] Swap files with Relation 24654 [0/16245/24654] xid 15174 +``` + +### 相关结论 + +- autovacuum和手动vacuum的区别 + + - 手动vacuum清理表和表的toast表是连续处理的,而autovacuum处理表和表的toast表之间有间隔。**MogDB 3.0.8新增handle_toast_in_autovac参数,用于控制是否在autovacuum中清理表的同时清理该表对应的toast表** + - DDL操作会中断autovacuum对表的清理,而手动vacuum则会阻塞对正在进行清理的表进行的DDL操作 + - autovacuum执行后会推进OldestXmin,但是手动执行的vacuum不会推进OldestXmin + +- 什么情况下会清理页面中的过期元组,并更新pg_stat_user_tables中的n_dead_tup? + + - 页面中的过期元组**足够老**时,autovacuum、vacuum和vacuum full操作都会将这些过期元组清理掉 + - 由于autovacuum和vacuum full会推进xid,对于刚update/delete的老版本的元组,第一次autovacuum/vacuum full不会直接清理掉老版本的元组,但是会将老版本元组的informask相关位进行标记,第二次autovacuum/vacuum full时会将老版本元组清理掉 + +- 如何理解**足够老**? + + - MogDB中,根据可见性判断将元组分为`HEAPTUPLE_DEAD、HEAPTUPLE_LIVE、HEAPTUPLE_RECENTLY_DEAD、HEAPTUPLE_INSERT_IN_PROGRESS、HEAPTUPLE_DELETE_IN_PROGRESS`几种类型,其中,判断为`HEAPTUPLE_RECENTLY_DEAD`的元组,删除/更新老版本的事务已提交,但是在当前这个触发vacuum的事务中暂时还不能被删除,比如某一条元组,执行插入的xid=16000,xid=16001的事务将其更新到版本1,xid=16002的事务发起vacuum操作,此时,对老版本执行更新的事务16001虽然已经提交,但是对于当前这个vacuum来说,老版本属于`HEAPTUPLE_RECENTLY_DEAD`,当前这个vacuum操作不能直接对其进行清理。对于被判断为`HEAPTUPLE_DEAD`的元组,vacuum操作可直接将其进行清理 + +> **说明**:本章节所有测试基于MogDB 5.0.5,日志中部分内容为修改源码后输出,正式版本中不包含。 diff --git a/product/zh/docs-mogdb/v5.1/performance-tuning/TPCC-performance-tuning-guide.md b/product/zh/docs-mogdb/v5.1/performance-tuning/TPCC-performance-tuning-guide.md index df4369775fcccdac3e883e99acc97b3504fca574..a7740e35a42b441b66fa6505004de94d00549313 100644 --- a/product/zh/docs-mogdb/v5.1/performance-tuning/TPCC-performance-tuning-guide.md +++ b/product/zh/docs-mogdb/v5.1/performance-tuning/TPCC-performance-tuning-guide.md @@ -387,10 +387,12 @@ date: 2021-08-03 yum install numa* -y ``` - 网卡驱动安装(包括数据库主机和客户端主机),参考上文**网络配置**部分。 + 网卡驱动安装(包括数据库主机和客户端主机),参考上文[网络配置](#4-网络配置)部分。 * 数据库主机 + [bind_net_irq.sh脚本](https://gitee.com/opengauss/openGauss-server/blob/master/src/bin/scripts/bind_net_irq.sh) + ```bash cp `find /opt -name "bind*.sh"|head -1 ` /root sh /root/bind_net_irq.sh 12 @@ -404,6 +406,7 @@ date: 2021-08-03 ``` 关闭数据库 + 启动数据库命令替换成: ```bash @@ -411,6 +414,7 @@ date: 2021-08-03 ``` * 客户端 + 拷贝/root/bind_net_irq.sh 到客户端 ```bash @@ -431,10 +435,12 @@ date: 2021-08-03 yum install numa* -y ``` - 网卡驱动安装(包括数据库主机和客户端主机),参考上文**网络配置**部分。 + 网卡驱动安装(包括数据库主机和客户端主机),参考上文[网络配置](#4-网络配置)部分。 * 数据库主机 + [bind_net_irq.sh脚本](https://gitee.com/opengauss/openGauss-server/blob/master/src/bin/scripts/bind_net_irq.sh) + ```bash cp `find /opt -name "bind*.sh"|head -1 ` /root sh /root/bind_net_irq.sh 24 @@ -448,6 +454,7 @@ date: 2021-08-03 ``` 关闭数据库 + 启动数据库命令替换成: ```bash @@ -455,6 +462,7 @@ date: 2021-08-03 ``` * 客户端 + 拷贝/root/bind_net_irq.sh 到客户端 ```bash diff --git a/product/zh/docs-mogdb/v5.1/reference-guide/functions-and-operators/sequence-functions.md b/product/zh/docs-mogdb/v5.1/reference-guide/functions-and-operators/sequence-functions.md index 0f7b3d29f17e304c4803e93c37b306033f952936..e7eb9770ba6ac607bfffcfab7e40c79fc6f1bfc1 100644 --- a/product/zh/docs-mogdb/v5.1/reference-guide/functions-and-operators/sequence-functions.md +++ b/product/zh/docs-mogdb/v5.1/reference-guide/functions-and-operators/sequence-functions.md @@ -124,7 +124,7 @@ date: 2021-04-20 > 因为序列是非事务的,setval造成的改变不会由于事务的回滚而撤销。 > > ![img](https://cdn-mogdb.enmotech.com/docs-media/icon/icon-notice.gif) **须知**: - > nextval函数只能在主机上执行,备机不支持执行此函数。 + > setval函数只能在主机上执行,备机不支持执行此函数。 - pg_sequence_last_value(sequence_oid oid, OUT cache_value int16, OUT last_value int16) diff --git a/product/zh/docs-mogdb/v5.1/reference-guide/functions-and-operators/system-management-functions/logical-replication-functions.md b/product/zh/docs-mogdb/v5.1/reference-guide/functions-and-operators/system-management-functions/logical-replication-functions.md index 9438397c662577769d5342f88d8eeb18078f917d..75981b2ceca03b87941b19ae1a215f3aea4c65bd 100644 --- a/product/zh/docs-mogdb/v5.1/reference-guide/functions-and-operators/system-management-functions/logical-replication-functions.md +++ b/product/zh/docs-mogdb/v5.1/reference-guide/functions-and-operators/system-management-functions/logical-replication-functions.md @@ -163,7 +163,7 @@ date: 2021-04-20 - pg_logical_slot_peek_binary_changes('slot_name', 'LSN', upto_nchanges, 'options_name', 'options_value') - 描述:以二进制格解码且不推进流复制槽(下次解码可以再次获取本次解出的数据)。 + 描述:以二进制格式解码且不推进流复制槽(下次解码可以再次获取本次解出的数据)。 参数说明: diff --git a/product/zh/docs-mogdb/v5.1/reference-guide/guc-parameters/guc-parameter-list.md b/product/zh/docs-mogdb/v5.1/reference-guide/guc-parameters/guc-parameter-list.md index c7740a15ffb2611259ebbac687f4e2308ff733b0..5e0af6773510265c09b8a0373cab3baedfef2921 100644 --- a/product/zh/docs-mogdb/v5.1/reference-guide/guc-parameters/guc-parameter-list.md +++ b/product/zh/docs-mogdb/v5.1/reference-guide/guc-parameters/guc-parameter-list.md @@ -713,9 +713,9 @@ date: 2023-04-07 | [udf_memory_limit](guc-user-defined-functions.md#udf_memory_limit) | | [UDFWorkerMemHardLimit](guc-user-defined-functions.md#udfworkermemhardlimit) | | [uncontrolled_memory_context](./resource-consumption/memory.md#uncontrolled_memory_context) | -| [undo_limit_size_per_transaction](undo.md#undo_limit_size_per_transaction) | +| [undo_limit_size_per_transaction](rollback-parameters.md#undo_limit_size_per_transaction) | | [undo_retention_time](flashback.md#undo_retention_time) | -| [undo_space_limit_size](undo.md#undo_space_limit_size) | +| [undo_space_limit_size](rollback-parameters.md#undo_space_limit_size) | | [undo_zone_count](reserved-parameters.md) | | [unix_socket_directory](./connection-and-authentication/connection-settings.md#unix_socket_directory) | | [unix_socket_group](./connection-and-authentication/connection-settings.md#unix_socket_group) | diff --git a/product/zh/docs-mogdb/v5.1/reference-guide/guc-parameters/ha-replication/ha-replication.md b/product/zh/docs-mogdb/v5.1/reference-guide/guc-parameters/ha-replication/ha-replication.md index 6144dac7bbb1a0a441524811432dd0ac22dc7d49..a9b1fc44f0214c3a6cf4045a1afc31a75140fd93 100644 --- a/product/zh/docs-mogdb/v5.1/reference-guide/guc-parameters/ha-replication/ha-replication.md +++ b/product/zh/docs-mogdb/v5.1/reference-guide/guc-parameters/ha-replication/ha-replication.md @@ -1,11 +1,11 @@ --- -title: 双机复制 -summary: 双机复制 +title: 主备复制 +summary: 主备复制 author: zhang cuiping date: 2023-04-07 --- -# 双机复制 +# 主备复制 - **[发送端服务器](sending-server.md)** - **[主服务器](primary-server.md)** diff --git a/product/zh/docs-mogdb/v5.1/reference-guide/guc-parameters/ha-replication/primary-server.md b/product/zh/docs-mogdb/v5.1/reference-guide/guc-parameters/ha-replication/primary-server.md index aee3bad870dfd038177938cf8999a4b1355a5bc2..34d515c930493513121e40437a71ab736e589343 100644 --- a/product/zh/docs-mogdb/v5.1/reference-guide/guc-parameters/ha-replication/primary-server.md +++ b/product/zh/docs-mogdb/v5.1/reference-guide/guc-parameters/ha-replication/primary-server.md @@ -340,4 +340,18 @@ date: 2021-04-20 - 0表示不设置ignore_feedback_xmin_window超时时间窗口, 即无论备机的oldestXmin多久未推进,主机的vacuum都需要考虑该xmin。 - 其余表示ignore_feedback_xmin_window超时时间窗口的大小。 -**默认值**:0 \ No newline at end of file +**默认值**:0 + +## pgxc_node_name + +**参数说明**: 指定节点名称。 + +该参数属于POSTMASTER类型参数,请参考表[GUC参数分类](../appendix.md)中对应设置方法进行设置。 + +在备机请求主机进行日志复制时,如果application_name参数没有设置,那么该参数会被用来作为备机在主机上的流复制槽名字。该流复制槽的命名方式为 “该参数值\_备机ip\_备机port”。其中,备机ip和备机port取自replconninfo参数中指定的备机ip和端口号。该流复制槽最大长度为61个字符,如果拼接后的字符串超过该长度,则会使用截断后的pgxc_node_name进行拼接,以保证流复制槽名字长度小于等于61个字符。 + +> ![img](https://cdn-mogdb.enmotech.com/docs-media/icon/icon-note.gif) **注意:** 此参数修改后会导致连接数据库实例失败,不建议进行修改。 + +**取值范围**: 字符串 + +**默认值**: 当前节点名称 \ No newline at end of file diff --git a/product/zh/docs-mogdb/v5.1/reference-guide/guc-parameters/ha-replication/sending-server.md b/product/zh/docs-mogdb/v5.1/reference-guide/guc-parameters/ha-replication/sending-server.md index 933e6d21d88708633648997a811daa3ecc38c1db..67f9f0425c0847dc4804af8138cd48c06577f9db 100644 --- a/product/zh/docs-mogdb/v5.1/reference-guide/guc-parameters/ha-replication/sending-server.md +++ b/product/zh/docs-mogdb/v5.1/reference-guide/guc-parameters/ha-replication/sending-server.md @@ -78,7 +78,7 @@ date: 2021-04-20 **设置建议**: -当使用双机复制、逻辑解码时,该参数值建议设为:当前物理流复制槽数+所需的逻辑复制槽数。如果实际设置值比上述建议值要小,那么可能造成这些功能不可用或异常。 +当使用主备复制、逻辑解码时,该参数值建议设为:当前物理流复制槽数+所需的逻辑复制槽数。如果实际设置值比上述建议值要小,那么可能造成这些功能不可用或异常。 - 物理流复制槽提供了一种自动化的方法来确保主节点在所有备节点或从备节点收到xlog之前,xlog不会被移除。也就是说物理流复制槽用于支撑主备HA。数据库所需要的物理流复制槽数为备节点加从备的和与主节点之间的比例。例如,假设数据库高可用方案为1主、1备、1从备,则所需物理流复制槽数为2。假设数据库的高可用方案为1主3备,则所需物理流复制槽数为3。 - 目前默认不支持主备从部署方式。 @@ -172,4 +172,18 @@ date: 2021-04-20 **取值范围**:整型,0 ~ 2147483647。 -**默认值**:0 \ No newline at end of file +**默认值**:0 + +## pgxc_node_name + +**参数说明**: 指定节点名称。 + +该参数属于POSTMASTER类型参数,请参考表[GUC参数分类](../appendix.md)中对应设置方法进行设置。 + +在备机请求主机进行日志复制时,如果application_name参数没有设置,那么该参数会被用来作为备机在主机上的流复制槽名字。该流复制槽的命名方式为 “该参数值\_备机ip\_备机port”。其中,备机ip和备机port取自replconninfo参数中指定的备机ip和端口号。该流复制槽最大长度为61个字符,如果拼接后的字符串超过该长度,则会使用截断后的pgxc_node_name进行拼接,以保证流复制槽名字长度小于等于61个字符。 + +> ![img](https://cdn-mogdb.enmotech.com/docs-media/icon/icon-note.gif) **注意:** 此参数修改后会导致连接数据库实例失败,不建议进行修改。 + +**取值范围**: 字符串 + +**默认值**: 当前节点名称 \ No newline at end of file diff --git a/product/zh/docs-mogdb/v5.1/reference-guide/guc-parameters/ha-replication/standby-server.md b/product/zh/docs-mogdb/v5.1/reference-guide/guc-parameters/ha-replication/standby-server.md index a2b84162660cc5f0777e1e603cc9ba7b457552aa..51199474a4ace1a5614455e47390e8d1675af1b7 100644 --- a/product/zh/docs-mogdb/v5.1/reference-guide/guc-parameters/ha-replication/standby-server.md +++ b/product/zh/docs-mogdb/v5.1/reference-guide/guc-parameters/ha-replication/standby-server.md @@ -239,4 +239,18 @@ date: 2021-04-20 - apply_remote 表示冲突时应用发布端版本。 - keep_local 表示冲突时保留本地版本。 -**默认值**:error \ No newline at end of file +**默认值**:error + +## pgxc_node_name + +**参数说明**: 指定节点名称。 + +该参数属于POSTMASTER类型参数,请参考表[GUC参数分类](../appendix.md)中对应设置方法进行设置。 + +在备机请求主机进行日志复制时,如果application_name参数没有设置,那么该参数会被用来作为备机在主机上的流复制槽名字。该流复制槽的命名方式为 “该参数值\_备机ip\_备机port”。其中,备机ip和备机port取自replconninfo参数中指定的备机ip和端口号。该流复制槽最大长度为61个字符,如果拼接后的字符串超过该长度,则会使用截断后的pgxc_node_name进行拼接,以保证流复制槽名字长度小于等于61个字符。 + +> ![img](https://cdn-mogdb.enmotech.com/docs-media/icon/icon-note.gif) **注意:** 此参数修改后会导致连接数据库实例失败,不建议进行修改。 + +**取值范围**: 字符串 + +**默认值**: 当前节点名称 \ No newline at end of file diff --git a/product/zh/docs-mogdb/v5.1/reference-guide/guc-parameters/reference-guide-guc-parameters.md b/product/zh/docs-mogdb/v5.1/reference-guide/guc-parameters/reference-guide-guc-parameters.md index b35938e4780cdc838ceedcf889bd033acc65f511..6663b3b2e4f55c149d0bbb38dba4d4b8a880cd74 100644 --- a/product/zh/docs-mogdb/v5.1/reference-guide/guc-parameters/reference-guide-guc-parameters.md +++ b/product/zh/docs-mogdb/v5.1/reference-guide/guc-parameters/reference-guide-guc-parameters.md @@ -13,7 +13,7 @@ date: 2023-04-07 - **[连接和认证](./connection-and-authentication/connection-and-authentication.md)** - **[资源消耗](./resource-consumption/resource-consumption.md)** - **[预写式日志](./write-ahead-log/write-ahead-log.md)** -- **[双机复制](./ha-replication/ha-replication.md)** +- **[主备复制](./ha-replication/ha-replication.md)** - **[内存表](mot.md)** - **[查询规划](./query-planning/query-planning.md)** - **[错误报告和日志](./error-reporting-and-logging/error-reporting-and-logging.md)** @@ -43,7 +43,6 @@ date: 2023-04-07 - **[定时任务](scheduled-task.md)** - **[线程池](thread-pool.md)** - **[备份恢复](backup-and-restoration-parameter.md)** -- **[Undo](undo.md)** - **[DCF参数设置](DCF-parameters-settings.md)** - **[闪回相关参数](flashback.md)** - **[回滚相关参数](rollback-parameters.md)** diff --git a/product/zh/docs-mogdb/v5.1/reference-guide/guc-parameters/rollback-parameters.md b/product/zh/docs-mogdb/v5.1/reference-guide/guc-parameters/rollback-parameters.md index 61281f7f0ae7d0c49f3f1d6f8cd9c84a965087fc..e6bd07c3b79f072fcaad14b7a156fcc04ec1df20 100644 --- a/product/zh/docs-mogdb/v5.1/reference-guide/guc-parameters/rollback-parameters.md +++ b/product/zh/docs-mogdb/v5.1/reference-guide/guc-parameters/rollback-parameters.md @@ -16,3 +16,23 @@ date: 2021-11-08 **取值范围**: 整型,1~100 **默认值**: 5 + +## undo_space_limit_size + +**参数说明**: 用于控制undo强制回收阈值,达到阈值的80%启动强制回收,用户需要根据自己的业务情况,设置该值,可以通过先设置一个较大值,然后观察实际业务运行占用undo空间,再将该值调整为合理值。 + +该参数属于POSTMASTER类型参数,请参考表[GUC参数分类](appendix.md)中对应设置方法进行设置。 + +**取值范围**: 整型,800M~16TB + +**默认值**: 256GB + +## undo_limit_size_per_transaction + +**参数说明**: 用于控制单事务undo分配空间阈值,达到阈值时事务报错回滚。 + +该参数属于POSTMASTER类型参数,请参考表[GUC参数分类](appendix.md)中对应设置方法进行设置。 + +**取值范围**: 整型,2M~16TB + +**默认值**: 32GB diff --git a/product/zh/docs-mogdb/v5.1/reference-guide/guc-parameters/undo.md b/product/zh/docs-mogdb/v5.1/reference-guide/guc-parameters/undo.md deleted file mode 100644 index c1f3a9c08be69c3bcc3313e6b859690cea776548..0000000000000000000000000000000000000000 --- a/product/zh/docs-mogdb/v5.1/reference-guide/guc-parameters/undo.md +++ /dev/null @@ -1,28 +0,0 @@ ---- -title: Undo -summary: Undo -author: Zhang Cuiping -date: 2021-11-08 ---- - -# Undo - -## undo_space_limit_size - -**参数说明**: 用于控制undo强制回收阈值,达到阈值的80%启动强制回收,用户需要根据自己的业务情况,设置该值,可以通过先设置一个较大值,然后观察实际业务运行占用undo空间,再将该值调整为合理值。 - -该参数属于POSTMASTER类型参数,请参考表[GUC参数分类](appendix.md)中对应设置方法进行设置。 - -**取值范围**: 整型,800M~16TB - -**默认值**: 256GB - -## undo_limit_size_per_transaction - -**参数说明**: 用于控制单事务undo分配空间阈值,达到阈值时事务报错回滚。 - -该参数属于POSTMASTER类型参数,请参考表[GUC参数分类](appendix.md)中对应设置方法进行设置。 - -**取值范围**: 整型,2M~16TB - -**默认值**: 32GB diff --git a/product/zh/docs-mogdb/v5.1/reference-guide/sql-syntax/CLUSTER.md b/product/zh/docs-mogdb/v5.1/reference-guide/sql-syntax/CLUSTER.md index 8cb528df56b386fd74a3a28e16a1c05e89304c55..6dd07006e1eb3dbc5ef7e84bf69ac540fdd4445f 100644 --- a/product/zh/docs-mogdb/v5.1/reference-guide/sql-syntax/CLUSTER.md +++ b/product/zh/docs-mogdb/v5.1/reference-guide/sql-syntax/CLUSTER.md @@ -119,10 +119,4 @@ MogDB=# DROP INDEX ds_inventory_p1_index1; --删除分区表。 MogDB=# DROP TABLE inventory_p1; -``` - -## 优化建议 - -- cluster - - 建议在新近聚簇的表上运行ANALYZE。否则,优化器可能会选择很差劲的查询规划。 - - 不允许在事务中执行CLUSTER。 +``` \ No newline at end of file diff --git a/product/zh/docs-mogdb/v5.1/reference-guide/sql-syntax/CREATE-DATABASE.md b/product/zh/docs-mogdb/v5.1/reference-guide/sql-syntax/CREATE-DATABASE.md index 9f66e90d181fe3463bfca91c854115277e8db121..fb885d601e9cd5c298124261954db90193516187 100644 --- a/product/zh/docs-mogdb/v5.1/reference-guide/sql-syntax/CREATE-DATABASE.md +++ b/product/zh/docs-mogdb/v5.1/reference-guide/sql-syntax/CREATE-DATABASE.md @@ -232,14 +232,4 @@ MogDB=# DROP DATABASE ora_compatible_db; ## 相关链接 -[ALTER DATABASE](ALTER-DATABASE.md),[DROP DATABASE](DROP-DATABASE.md) - -## 优化建议 - -- **create database** - - 事务中不支持创建database。 - -- **ENCODING LC_COLLATE LC_CTYPE** - - 当新建数据库Encoding与模板数据库(SQL\_ASCII)不匹配(为'GBK' /'UTF8'/'LATIN1'/'GB18030')时,必须指定template \[=\] template0。 +[ALTER DATABASE](ALTER-DATABASE.md),[DROP DATABASE](DROP-DATABASE.md) \ No newline at end of file diff --git a/product/zh/docs-mogdb/v5.1/reference-guide/sql-syntax/CREATE-INDEX.md b/product/zh/docs-mogdb/v5.1/reference-guide/sql-syntax/CREATE-INDEX.md index b679e186e623a985b0550b7fe874957af899ce30..d0a27c4362629fc056e2fe480a75004730bec16c 100644 --- a/product/zh/docs-mogdb/v5.1/reference-guide/sql-syntax/CREATE-INDEX.md +++ b/product/zh/docs-mogdb/v5.1/reference-guide/sql-syntax/CREATE-INDEX.md @@ -549,27 +549,4 @@ Time: 11146.399 ms ## 相关链接 -[ALTER INDEX](ALTER-INDEX.md),[DROP INDEX](DROP-INDEX.md) - -## 优化建议 - -### create index - -建议仅在匹配如下条件之一时创建索引: - -- 经常执行查询的字段。 -- 在连接条件上创建索引,对于存在多字段连接的查询,建议在这些字段上建立组合索引。例如,select * from t1 join t2 on t1.a=t2.a and t1.b=t2.b,可以在t1表上的a,b字段上建立组合索引。 -- where子句的过滤条件字段上(尤其是范围条件)。 -- 在经常出现在order by、group by和distinct后的字段。 - -约束限制: - -- 分区表上不支持创建部分索引。 -- 分区表创建GLOBAL索引时,存在以下约束条件: - - 不支持表达式索引、部分索引 - - 不支持列存表 - - 仅支持B-tree索引 -- 在相同属性列上,分区LOCAL索引与GLOBAL索引不能共存。 -- GLOBAL索引,最大支持31列。 -- 如果alter语句不带有UPDATE GLOBAL INDEX,那么原有的GLOBAL索引将失效,查询时将使用其他索引进行查询;如果alter语句带有UPDATE GLOBAL INDEX,原有的GLOBAL索引仍然有效,并且索引功能正确。 -- 对于分区表的local unique索引,索引键必须包含所有的分区键。 \ No newline at end of file +[ALTER INDEX](ALTER-INDEX.md),[DROP INDEX](DROP-INDEX.md) \ No newline at end of file diff --git a/product/zh/docs-mogdb/v5.1/reference-guide/sql-syntax/CREATE-PROCEDURE.md b/product/zh/docs-mogdb/v5.1/reference-guide/sql-syntax/CREATE-PROCEDURE.md index 478a8844e045bf40807b4967b96e750a71abcf45..fbcb3b3136e4b794ee50cb902d564d8cddfb5d3f 100644 --- a/product/zh/docs-mogdb/v5.1/reference-guide/sql-syntax/CREATE-PROCEDURE.md +++ b/product/zh/docs-mogdb/v5.1/reference-guide/sql-syntax/CREATE-PROCEDURE.md @@ -149,10 +149,4 @@ plsql_body ## 相关链接 -[DROP PROCEDURE](DROP-PROCEDURE.md) - -## 优化建议 - -- analyse | analyze - - 不支持在事务或匿名块中执行analyze 。 - - 不支持在函数或存储过程中执行analyze操作。 +[DROP PROCEDURE](DROP-PROCEDURE.md) \ No newline at end of file diff --git a/product/zh/docs-mogdb/v5.1/reference-guide/sql-syntax/CREATE-TABLE.md b/product/zh/docs-mogdb/v5.1/reference-guide/sql-syntax/CREATE-TABLE.md index b90df8c9c4570e7a2858dc7333c15333a7a455be..0a02cc1a78673e54d253feb716fcf8b4a67f1125 100644 --- a/product/zh/docs-mogdb/v5.1/reference-guide/sql-syntax/CREATE-TABLE.md +++ b/product/zh/docs-mogdb/v5.1/reference-guide/sql-syntax/CREATE-TABLE.md @@ -1188,61 +1188,4 @@ MogDB=# DROP SCHEMA IF EXISTS joe CASCADE; ## 相关链接 -[ALTER TABLE](ALTER-TABLE.md), [DROP TABLE](DROP-TABLE.md), [CREATE TABLESPACE](CREATE-TABLESPACE.md) - -## 优化建议 - -- UNLOGGED - - - UNLOGGED表和表上的索引因为数据写入时不通过WAL日志机制,写入速度远高于普通表。因此,可以用于缓冲存储复杂查询的中间结果集,增强复杂查询的性能。 - - UNLOGGED表无主备机制,在系统故障或异常断点等情况下,会有数据丢失风险,因此,不可用来存储基础数据。 - -- TEMPORARY | TEMP - -- 临时表只在当前会话可见,会话结束后会自动删除。 - -- LIKE - -- 新表自动从这个表中继承所有字段名及其数据类型和非空约束,新表与源表之间在创建动作完毕之后是完全无关的。 - -- LIKE INCLUDING DEFAULTS - -- 源表上的字段缺省表达式只有在指定INCLUDING DEFAULTS时,才会复制到新表中。缺省是包含缺省表达式的,即新表中的所有字段的缺省值,如果在原表中是表达式,则新表中也是表达式。 - -- LIKE INCLUDING CONSTRAINTS - -- 源表上的CHECK约束仅在指定INCLUDING CONSTRAINTS时,会复制到新表中,而其他类型的约束永远不会复制到新表中。非空约束总是复制到新表中。此规则同时适用于表约束和列约束。 - -- LIKE INCLUDING INDEXES - -- 如果指定了INCLUDING INDEXES,则源表上的索引也将在新表上创建,默认不建立索引。 - -- LIKE INCLUDING STORAGE - -- 如果指定了INCLUDING STORAGE,则复制列的STORAGE设置会复制到新表中,默认情况下不包含STORAGE设置。 - -- LIKE INCLUDING COMMENTS - -- 如果指定了INCLUDING COMMENTS,则源表列、约束和索引的注释会复制到新表中。默认情况下,不复制源表的注释。 - -- LIKE INCLUDING PARTITION - - - 如果指定了INCLUDING PARTITION,则源表的分区定义会复制到新表中,同时新表将不能再使用PARTITION BY子句。默认情况下,不拷贝源表的分区定义。 - - > ![img](https://cdn-mogdb.enmotech.com/docs-media/icon/icon-notice.gif) **须知**:列表/哈希分区表暂不支持LIKE INCLUDING PARTITION。 - -- LIKE INCLUDING RELOPTIONS - -- 如果指定了INCLUDING RELOPTIONS,则源表的存储参数(即源表的WITH子句)会复制到新表中。默认情况下,不复制源表的存储参数。 - -- LIKE INCLUDING ALL - -- INCLUDING ALL包含了INCLUDING DEFAULTS、INCLUDING CONSTRAINTS、INCLUDING INDEXES、INCLUDING STORAGE、INCLUDING COMMENTS、INCLUDING PARTITION、INCLUDING RELOPTIONS的内容。 - -- ORIENTATION ROW - -- 创建行存表,行存储适合于OLTP业务,此类型的表上交互事务比较多,一次交互会涉及表中的多个列,用行存查询效率较高。 - -- ORIENTATION COLUMN - - - 创建列存表,列存储适合于数据仓库业务,此类型的表上会做大量的汇聚计算,且涉及的列操作较少。 +[ALTER TABLE](ALTER-TABLE.md), [DROP TABLE](DROP-TABLE.md), [CREATE TABLESPACE](CREATE-TABLESPACE.md) \ No newline at end of file diff --git a/product/zh/docs-mogdb/v5.1/reference-guide/sql-syntax/CREATE-TABLESPACE.md b/product/zh/docs-mogdb/v5.1/reference-guide/sql-syntax/CREATE-TABLESPACE.md index c45749dbf49985ebb00099c2cae700abdf84262f..1c84109cbae54eaaeb1ddabed227db5624e53e81 100644 --- a/product/zh/docs-mogdb/v5.1/reference-guide/sql-syntax/CREATE-TABLESPACE.md +++ b/product/zh/docs-mogdb/v5.1/reference-guide/sql-syntax/CREATE-TABLESPACE.md @@ -130,10 +130,4 @@ MogDB=# DROP ROLE jay; ## 相关链接 -[CREATE DATABASE](CREATE-DATABASE.md),[CREATE TABLE](CREATE-TABLE.md),[CREATE INDEX](CREATE-INDEX.md),[DROP TABLESPACE](DROP-TABLESPACE.md),[ALTER TABLESPACE](ALTER-TABLESPACE.md) - -## 优化建议 - -- create tablespace - - 不建议在事务内部创建表空间。 +[CREATE DATABASE](CREATE-DATABASE.md),[CREATE TABLE](CREATE-TABLE.md),[CREATE INDEX](CREATE-INDEX.md),[DROP TABLESPACE](DROP-TABLESPACE.md),[ALTER TABLESPACE](ALTER-TABLESPACE.md) \ No newline at end of file diff --git a/product/zh/docs-mogdb/v5.1/reference-guide/sql-syntax/DELETE.md b/product/zh/docs-mogdb/v5.1/reference-guide/sql-syntax/DELETE.md index 1e0002da20a58cc24693452f139c6217403e30b7..2594675994c91ee0555bafb3edd2fcfe7f651354 100644 --- a/product/zh/docs-mogdb/v5.1/reference-guide/sql-syntax/DELETE.md +++ b/product/zh/docs-mogdb/v5.1/reference-guide/sql-syntax/DELETE.md @@ -167,10 +167,4 @@ MogDB=# DROP TABLE customer_address_bak; MogDB=# DELETE FROM a,b USING tpcds.customer_address a,tpcds.customer_address_bak b where a.ca_address_sk = b.ca_address_sk and a.ca_address_sk < 50; 或者 MogDB=# DELETE a,b FROM tpcds.customer_address a,tpcds.customer_address_bak b where a.ca_address_sk = b.ca_address_sk and a.ca_address_sk < 50; -``` - -## 优化建议 - -- delete - - 如果要删除表中的所有记录,建议使用truncate语法。 +``` \ No newline at end of file diff --git a/product/zh/docs-mogdb/v5.1/reference-guide/sql-syntax/DROP-DATABASE.md b/product/zh/docs-mogdb/v5.1/reference-guide/sql-syntax/DROP-DATABASE.md index 4794cc76c750eae0168ab5854c8046adabb1da9b..04b92ddcf961a6b659b3484802d1841b41275620 100644 --- a/product/zh/docs-mogdb/v5.1/reference-guide/sql-syntax/DROP-DATABASE.md +++ b/product/zh/docs-mogdb/v5.1/reference-guide/sql-syntax/DROP-DATABASE.md @@ -45,10 +45,4 @@ DropDatabase ::= DROP DATABASE [ IF EXISTS ] database_name ; ## 相关链接 -[CREATE DATABASE](CREATE-DATABASE.md) - -## 优化建议 - -- drop database - - 不支持在事务中删除database。 +[CREATE DATABASE](CREATE-DATABASE.md) \ No newline at end of file diff --git a/product/zh/docs-mogdb/v5.1/reference-guide/sql-syntax/DROP-TABLESPACE.md b/product/zh/docs-mogdb/v5.1/reference-guide/sql-syntax/DROP-TABLESPACE.md index 1338806702aebfde7f2387862ebd11c4557f2911..0cb051d1e0e8d4298ad11e55e5a6a80607264fde 100644 --- a/product/zh/docs-mogdb/v5.1/reference-guide/sql-syntax/DROP-TABLESPACE.md +++ b/product/zh/docs-mogdb/v5.1/reference-guide/sql-syntax/DROP-TABLESPACE.md @@ -43,10 +43,4 @@ DropTablespace ::= DROP TABLESPACE [ IF EXISTS ] tablespace_name; ## 相关链接 -[ALTER TABLESPACE](ALTER-TABLESPACE.md), [CREATE TABLESPACE](CREATE-TABLESPACE.md) - -## 优化建议 - -- drop database - - 不支持在事务中删除database。 +[ALTER TABLESPACE](ALTER-TABLESPACE.md), [CREATE TABLESPACE](CREATE-TABLESPACE.md) \ No newline at end of file diff --git a/product/zh/docs-mogdb/v5.1/reference-guide/sql-syntax/INSERT.md b/product/zh/docs-mogdb/v5.1/reference-guide/sql-syntax/INSERT.md index c78a97b2be5052d4227b63d1b20d98595ff5c904..7ff672e38e3ec3dc5788c981e3b678639b9db0a5 100644 --- a/product/zh/docs-mogdb/v5.1/reference-guide/sql-syntax/INSERT.md +++ b/product/zh/docs-mogdb/v5.1/reference-guide/sql-syntax/INSERT.md @@ -222,10 +222,4 @@ INSERT INTO upser VALUES (5, c1 + 100, 100), (6, c1 + 100, 100), (7, c1 + 100, 1 (13, c1 + 100, 100), (14, c1 + 100, 100), (15, c1 + 100, c1 + c2) ON DUPLICATE KEY UPDATE c2 = c1 + c2, c3 = c2 + c3; SELECT * FROM upser ORDER BY c1; -``` - -## 优化建议 - -- VALUES - - 通过insert语句批量插入数据时,建议将多条记录合并入一条语句中执行插入,以提高数据加载性能。例如,INSERT INTO sections VALUES (30, 'Administration', 31, 1900),(40, 'Development', 35, 2000), (50, 'Development' , 60 , 2001); +``` \ No newline at end of file diff --git a/product/zh/docs-mogdb/v5.1/reference-guide/sql-syntax/REINDEX.md b/product/zh/docs-mogdb/v5.1/reference-guide/sql-syntax/REINDEX.md index 6cfcde245a29d1e05d5e471635f7c577ac34f5f7..980922e45d4f396901f12c2e28b21cae214572f3 100644 --- a/product/zh/docs-mogdb/v5.1/reference-guide/sql-syntax/REINDEX.md +++ b/product/zh/docs-mogdb/v5.1/reference-guide/sql-syntax/REINDEX.md @@ -161,18 +161,4 @@ MogDB=# REINDEX TABLE CONCURRENTLY customer_t1; --删除customer_t1表。 MogDB=# DROP TABLE customer_t1; -``` - -## 优化建议 - -- INTERNAL TABLE - - 此种情况大多用于故障恢复,不建议进行并发操作。 - -- DATABASE - - 不能在事务中reindex database。 - -- SYSTEM - - 不能在事务中reindex系统表。 +``` \ No newline at end of file diff --git a/product/zh/docs-mogdb/v5.1/reference-guide/sql-syntax/SELECT-INTO.md b/product/zh/docs-mogdb/v5.1/reference-guide/sql-syntax/SELECT-INTO.md index 9f3ff932c0f36a026577e3318721aa16587d3f05..399cdf69429ba8dfd3545338ecb7a55dfeb67311 100644 --- a/product/zh/docs-mogdb/v5.1/reference-guide/sql-syntax/SELECT-INTO.md +++ b/product/zh/docs-mogdb/v5.1/reference-guide/sql-syntax/SELECT-INTO.md @@ -87,14 +87,4 @@ MogDB=# DROP TABLE reason_t1; ## 相关链接 -[SELECT](SELECT.md) - -## 优化建议 - -- **DATABASE** - - 不建议在事务中reindex database。 - -- **SYSTEM** - - 不建议在事务中reindex系统表。 +[SELECT](SELECT.md) \ No newline at end of file diff --git a/product/zh/docs-mogdb/v5.1/reference-guide/sql-syntax/VACUUM.md b/product/zh/docs-mogdb/v5.1/reference-guide/sql-syntax/VACUUM.md index de6f272680d4fd6c30f027571951845c72902e29..5dd95df6a7417c10d2024e9a9d5857049fc6f257 100644 --- a/product/zh/docs-mogdb/v5.1/reference-guide/sql-syntax/VACUUM.md +++ b/product/zh/docs-mogdb/v5.1/reference-guide/sql-syntax/VACUUM.md @@ -120,12 +120,4 @@ MogDB=# VACUUM (VERBOSE, ANALYZE) reason; --删除索引。 MogDB=# DROP INDEX ds_reason_index1 CASCADE; MogDB=# DROP TABLE reason; -``` - -## 优化建议 - -- vacuum - - VACUUM不能在事务块内执行。 - - 建议生产数据库经常清理(至少每晚一次),以保证不断地删除失效的行。尤其是在增删了大量记录后,对相关表执行VACUUM ANALYZE命令。 - - 不建议日常使用FULL选项,但是可以在特殊情况下使用。例如,一个例子就是在用户删除了一个表的大部分行之后,希望从物理上缩小该表以减少磁盘空间占用。 - - 执行VACUUM FULL操作时,建议首先删除相关表上的所有索引,再运行VACUUM FULL命令,最后重建索引。 +``` \ No newline at end of file diff --git a/product/zh/docs-mogdb/v5.1/toc.md b/product/zh/docs-mogdb/v5.1/toc.md index fc1b6986b5d8e469e37c1a11b002f2edb5a8b588..472c9339cec3e10c50572a90ecca132eda4b5322 100644 --- a/product/zh/docs-mogdb/v5.1/toc.md +++ b/product/zh/docs-mogdb/v5.1/toc.md @@ -1444,7 +1444,7 @@ + [检查点](./reference-guide/guc-parameters/write-ahead-log/checkpoints.md) + [日志回放](./reference-guide/guc-parameters/write-ahead-log/log-replay.md) + [归档](./reference-guide/guc-parameters/write-ahead-log/archiving.md) - + [双机复制](./reference-guide/guc-parameters/ha-replication/ha-replication.md) + + [主备复制](./reference-guide/guc-parameters/ha-replication/ha-replication.md) + [发送端服务器](./reference-guide/guc-parameters/ha-replication/sending-server.md) + [主服务器](./reference-guide/guc-parameters/ha-replication/primary-server.md) + [备服务器](./reference-guide/guc-parameters/ha-replication/standby-server.md) @@ -1498,7 +1498,6 @@ + [线程池](./reference-guide/guc-parameters/thread-pool.md) + [用户自定义函数](./reference-guide/guc-parameters/guc-user-defined-functions.md) + [备份恢复](./reference-guide/guc-parameters/backup-and-restoration-parameter.md) - + [Undo](./reference-guide/guc-parameters/undo.md) + [DCF参数设置](./reference-guide/guc-parameters/DCF-parameters-settings.md) + [闪回相关参数](./reference-guide/guc-parameters/flashback.md) + [回滚相关参数](./reference-guide/guc-parameters/rollback-parameters.md) diff --git a/product/zh/docs-mogdb/v5.1/toc_parameters-and-tools.md b/product/zh/docs-mogdb/v5.1/toc_parameters-and-tools.md index f6be41bf48bafccd994164a468a204e5397d6b44..b80d03a09413db620b21badf2686c8bb0b76ab54 100644 --- a/product/zh/docs-mogdb/v5.1/toc_parameters-and-tools.md +++ b/product/zh/docs-mogdb/v5.1/toc_parameters-and-tools.md @@ -25,7 +25,7 @@ + [检查点](./reference-guide/guc-parameters/write-ahead-log/checkpoints.md) + [日志回放](./reference-guide/guc-parameters/write-ahead-log/log-replay.md) + [归档](./reference-guide/guc-parameters/write-ahead-log/archiving.md) - + [双机复制](./reference-guide/guc-parameters/ha-replication/ha-replication.md) + + [主备复制](./reference-guide/guc-parameters/ha-replication/ha-replication.md) + [发送端服务器](./reference-guide/guc-parameters/ha-replication/sending-server.md) + [主服务器](./reference-guide/guc-parameters/ha-replication/primary-server.md) + [备服务器](./reference-guide/guc-parameters/ha-replication/standby-server.md) @@ -79,7 +79,6 @@ + [线程池](./reference-guide/guc-parameters/thread-pool.md) + [用户自定义函数](./reference-guide/guc-parameters/guc-user-defined-functions.md) + [备份恢复](./reference-guide/guc-parameters/backup-and-restoration-parameter.md) - + [Undo](./reference-guide/guc-parameters/undo.md) + [DCF参数设置](./reference-guide/guc-parameters/DCF-parameters-settings.md) + [闪回相关参数](./reference-guide/guc-parameters/flashback.md) + [回滚相关参数](./reference-guide/guc-parameters/rollback-parameters.md)