diff --git a/product/en/docs-mogdb/v1.1/reference-guide/functions-and-operators/25-statistics-information-functions.md b/product/en/docs-mogdb/v1.1/reference-guide/functions-and-operators/25-statistics-information-functions.md index 968dc19ec8a6f33225b1e0d3f4d63e27fb8b5268..7a0981ee6c25b7a621ef010c5451daf44c75a6bf 100644 --- a/product/en/docs-mogdb/v1.1/reference-guide/functions-and-operators/25-statistics-information-functions.md +++ b/product/en/docs-mogdb/v1.1/reference-guide/functions-and-operators/25-statistics-information-functions.md @@ -418,9 +418,9 @@ Statistics information functions are divided into the following two categories: Return type: bigint -- pg_total_autovac_tuples(bool,bool) +- pg_total_autovac_tuples(bool) - Description: Returns tuple records related to the total autovac, such as **nodename**, **nspname**, **relname**, and tuple IUDs. The input parameters specify whether to query **relation** and **local** information, respectively. + Description: Returns tuple records related to the total autovac, such as **nodename**, **nspname**, **relname**, and tuple IUDs. The input parameters specify whether to query **relation** information. Return type: setofrecord diff --git a/product/en/docs-mogdb/v1.1/reference-guide/system-catalogs-and-system-views/system-catalogs/STATEMENT_HISTORY.md b/product/en/docs-mogdb/v1.1/reference-guide/system-catalogs-and-system-views/system-catalogs/STATEMENT_HISTORY.md index a3225999c0bc76e27a15177940f2f5227186fb4f..77546f5bbd74671a6d023b4c2e68c9aacf68d4b9 100644 --- a/product/en/docs-mogdb/v1.1/reference-guide/system-catalogs-and-system-views/system-catalogs/STATEMENT_HISTORY.md +++ b/product/en/docs-mogdb/v1.1/reference-guide/system-catalogs-and-system-views/system-catalogs/STATEMENT_HISTORY.md @@ -64,3 +64,7 @@ date: 2021-04-19 | lwlock_wait_time | bigint | Time required for lightweight lock waiting. | | details | bytea | List of statement lock events, which are recorded in time sequence. The number of records is affected by the **track_stmt_details_size** parameter.
Events include:
- Start locking.
- Complete locking.
- Start lock waiting.
- Complete lock waiting.
- Start unlocking.
- Complete unlocking.
- Start lightweight lock waiting.
- Complete lightweight lock waiting. | | is_slow_sql | boolean | Whether the SQL statement is a slow SQL statement. | + +> **Note**: +> +> To facilitate cleanup of this table, the [TRUNCATE](../../sql-syntax/TRUNCATE.md) command is allowed to empty the table. \ No newline at end of file diff --git a/product/en/docs-mogdb/v2.0/reference-guide/functions-and-operators/25-statistics-information-functions.md b/product/en/docs-mogdb/v2.0/reference-guide/functions-and-operators/25-statistics-information-functions.md index 58fff38b02c45eec0cfe2c53b47ab6a91178866d..212d5585da3ab443ece4c426ae6adda16764a935 100644 --- a/product/en/docs-mogdb/v2.0/reference-guide/functions-and-operators/25-statistics-information-functions.md +++ b/product/en/docs-mogdb/v2.0/reference-guide/functions-and-operators/25-statistics-information-functions.md @@ -424,9 +424,9 @@ Statistics information functions are divided into the following two categories: Return type: bigint -- pg_total_autovac_tuples(bool,bool) +- pg_total_autovac_tuples(bool) - Description: Returns tuple records related to the total autovac, such as **nodename**, **nspname**, **relname**, and tuple IUDs. The input parameters specify whether to query **relation** and **local** information, respectively. + Description: Returns tuple records related to the total autovac, such as **nodename**, **nspname**, **relname**, and tuple IUDs. The input parameters specify whether to query **relation** information. Return type: setofrecord diff --git a/product/en/docs-mogdb/v2.0/reference-guide/system-catalogs-and-system-views/system-catalogs/STATEMENT_HISTORY.md b/product/en/docs-mogdb/v2.0/reference-guide/system-catalogs-and-system-views/system-catalogs/STATEMENT_HISTORY.md index a3225999c0bc76e27a15177940f2f5227186fb4f..77546f5bbd74671a6d023b4c2e68c9aacf68d4b9 100644 --- a/product/en/docs-mogdb/v2.0/reference-guide/system-catalogs-and-system-views/system-catalogs/STATEMENT_HISTORY.md +++ b/product/en/docs-mogdb/v2.0/reference-guide/system-catalogs-and-system-views/system-catalogs/STATEMENT_HISTORY.md @@ -64,3 +64,7 @@ date: 2021-04-19 | lwlock_wait_time | bigint | Time required for lightweight lock waiting. | | details | bytea | List of statement lock events, which are recorded in time sequence. The number of records is affected by the **track_stmt_details_size** parameter.
Events include:
- Start locking.
- Complete locking.
- Start lock waiting.
- Complete lock waiting.
- Start unlocking.
- Complete unlocking.
- Start lightweight lock waiting.
- Complete lightweight lock waiting. | | is_slow_sql | boolean | Whether the SQL statement is a slow SQL statement. | + +> **Note**: +> +> To facilitate cleanup of this table, the [TRUNCATE](../../sql-syntax/TRUNCATE.md) command is allowed to empty the table. \ No newline at end of file diff --git a/product/en/docs-mogdb/v2.0/reference-guide/tool-reference/server-tools/1-gs_check.md b/product/en/docs-mogdb/v2.0/reference-guide/tool-reference/server-tools/1-gs_check.md index d68c4a904e624850c3a82352a38f53e643c92ea9..531f2f5317318c8e6694f62c3d5f614ec258fabd 100644 --- a/product/en/docs-mogdb/v2.0/reference-guide/tool-reference/server-tools/1-gs_check.md +++ b/product/en/docs-mogdb/v2.0/reference-guide/tool-reference/server-tools/1-gs_check.md @@ -140,7 +140,6 @@ date: 2021-06-07 | CheckKernelVer | Checks the kernel version of each node. If the version information is consistent, this item passes the check. Otherwise, a warning is reported. | No | | | CheckEncoding | Checks the system code of each node in MogDB. If the codes are consistent, this item passes the check. Otherwise, this item fails the check. | No | | | CheckBootItems | Checks whether there are manually added startup items. If no, this item passes the check. Otherwise, this item fails the check. | No | | -| CheckDropCache | Checks whether there is a dropcache process running on each node. If there is, this item passes the check. Otherwise, this item fails the check. | No | | | CheckFilehandle | Checks the following conditions. If both the conditions are met, this item passes the check. Otherwise, this item fails the check.
- The number of processes opened by each gaussdb process does not exceed 800,000.
- The number of handles used by the slave process does not exceed that of handles used by the master process. | No | | | CheckKeyProAdj | Checks all key processes. If the **omm_adj** value for all key processes is **0**, this item passes the check. Otherwise, this item fails the check. | No | | | CheckMaxProcMemory | Checks whether the value of **max_process_memory** on the database nodes is greater than 1 GB. If no, this item passes the check. Otherwise, this item fails the check. | Yes | | @@ -501,7 +500,7 @@ Check result of a scenario: [perfadm@SIA1000131072 Check]$ gs_check -e inspect Skip CheckHdfsForeignTabEncoding because it only applies to V1R5 upgrade V1R6 with cluster. Parsing the check items config file successfully -The below items require root privileges to execute:[CheckBlockdev CheckIOConfigure CheckMTU CheckRXTX CheckMultiQueue CheckFirewall CheckSshdService CheckSshdConfig CheckCrondService CheckNoCheckSum CheckSctpService CheckMaxProcMemory CheckBootItems CheckFilehandle CheckNICModel CheckDropCache] +The below items require root privileges to execute:[CheckBlockdev CheckIOConfigure CheckMTU CheckRXTX CheckMultiQueue CheckFirewall CheckSshdService CheckSshdConfig CheckCrondService CheckNoCheckSum CheckSctpService CheckMaxProcMemory CheckBootItems CheckFilehandle CheckNICModel] Please enter root privileges user[root]: Please enter password for user[root]: Check root password connection successfully diff --git a/product/en/docs-mogdb/v2.1/reference-guide/functions-and-operators/25-statistics-information-functions.md b/product/en/docs-mogdb/v2.1/reference-guide/functions-and-operators/25-statistics-information-functions.md index 29526885ce49ffda73410a3ffe20a1df69af2873..790c3df3363bec9feb7e0fda619fc4929b369c98 100644 --- a/product/en/docs-mogdb/v2.1/reference-guide/functions-and-operators/25-statistics-information-functions.md +++ b/product/en/docs-mogdb/v2.1/reference-guide/functions-and-operators/25-statistics-information-functions.md @@ -473,9 +473,9 @@ Statistics information functions are divided into the following two categories: Return type: bigint -- pg_total_autovac_tuples(bool,bool) +- pg_total_autovac_tuples(bool) - Description: Returns tuple records related to the total autovac, such as **nodename**, **nspname**, **relname**, and tuple IUDs. The input parameters specify whether to query **relation** and **local** information, respectively. + Description: Returns tuple records related to the total autovac, such as **nodename**, **nspname**, **relname**, and tuple IUDs. The input parameters specify whether to query **relation** information. Return type: setofrecord diff --git a/product/en/docs-mogdb/v2.1/reference-guide/system-catalogs-and-system-views/system-catalogs/STATEMENT_HISTORY.md b/product/en/docs-mogdb/v2.1/reference-guide/system-catalogs-and-system-views/system-catalogs/STATEMENT_HISTORY.md index 03d9a3c888a9b3db0148aa8439368cbdb064a9b3..54099a769193007b23f81de2e3b4d30826a71d7e 100644 --- a/product/en/docs-mogdb/v2.1/reference-guide/system-catalogs-and-system-views/system-catalogs/STATEMENT_HISTORY.md +++ b/product/en/docs-mogdb/v2.1/reference-guide/system-catalogs-and-system-views/system-catalogs/STATEMENT_HISTORY.md @@ -70,3 +70,7 @@ The constraints on the query of this system catalog are as follows: | lwlock_wait_time | bigint | Time required for lightweight lock waiting. | L1 | | details | bytea | List of statement lock events, which are recorded in time sequence. The number of records is affected by the **track_stmt_details_size** parameter.
Events include:
- Start locking.
- Complete locking.
- Start lock waiting.
- Complete lock waiting.
- Start unlocking.
- Complete unlocking.
- Start lightweight lock waiting.
- Complete lightweight lock waiting. | L2 | | is_slow_sql | boolean | Whether the SQL statement is a slow SQL statement. | L0 | + +> **Note**: +> +> To facilitate cleanup of this table, the [TRUNCATE](../../sql-syntax/TRUNCATE.md) command is allowed to empty the table. \ No newline at end of file diff --git a/product/en/docs-mogdb/v2.1/reference-guide/tool-reference/server-tools/1-gs_check.md b/product/en/docs-mogdb/v2.1/reference-guide/tool-reference/server-tools/1-gs_check.md index 0f1d9a964b5a9eaba2ff5ded33a888127ac7e007..8c61781c081de1498ef40e1362a0977bf3455917 100644 --- a/product/en/docs-mogdb/v2.1/reference-guide/tool-reference/server-tools/1-gs_check.md +++ b/product/en/docs-mogdb/v2.1/reference-guide/tool-reference/server-tools/1-gs_check.md @@ -348,14 +348,6 @@ date: 2021-06-07 No - - CheckDropCache - - Checks whether there is a dropcache process running on each node. If yes, - this item passes the check. Otherwise, this item fails the check. - - No - CheckFilehandle @@ -1348,7 +1340,7 @@ Check result of a scenario: [perfadm@SIA1000131072 Check]$ gs_check -e inspect Skip CheckHdfsForeignTabEncoding because it only applies to V1R5 upgrade V1R6 with cluster. Parsing the check items config file successfully -The below items require root privileges to execute:[CheckBlockdev CheckIOConfigure CheckMTU CheckRXTX CheckMultiQueue CheckFirewall CheckSshdService CheckSshdConfig CheckCrondService CheckMaxProcMemory CheckBootItems CheckFilehandle CheckNICModel CheckDropCache] +The below items require root privileges to execute:[CheckBlockdev CheckIOConfigure CheckMTU CheckRXTX CheckMultiQueue CheckFirewall CheckSshdService CheckSshdConfig CheckCrondService CheckMaxProcMemory CheckBootItems CheckFilehandle CheckNICModel] Please enter root privileges user[root]: Please enter password for user[root]: Check root password connection successfully diff --git a/product/en/docs-mogdb/v3.0/reference-guide/functions-and-operators/25-statistics-information-functions.md b/product/en/docs-mogdb/v3.0/reference-guide/functions-and-operators/25-statistics-information-functions.md index 969baa20535e81b30caa7368ef39e9d4104b62eb..f8d87d14cd6693cb52dea05f188d74567e0487ed 100644 --- a/product/en/docs-mogdb/v3.0/reference-guide/functions-and-operators/25-statistics-information-functions.md +++ b/product/en/docs-mogdb/v3.0/reference-guide/functions-and-operators/25-statistics-information-functions.md @@ -450,9 +450,9 @@ Statistics information functions are divided into the following two categories: Return type: bigint -- pg_total_autovac_tuples(bool,bool) +- pg_total_autovac_tuples(bool) - Description: Returns tuple records related to the total autovac, such as **nodename**, **nspname**, **relname**, and tuple IUDs. The input parameters specify whether to query **relation** and **local** information, respectively. + Description: Returns tuple records related to the total autovac, such as **nodename**, **nspname**, **relname**, and tuple IUDs. The input parameters specify whether to query **relation** information. Return type: setofrecord diff --git a/product/en/docs-mogdb/v3.0/reference-guide/guc-parameters/32-thread-pool.md b/product/en/docs-mogdb/v3.0/reference-guide/guc-parameters/32-thread-pool.md index 4134736c0b5e3afff0552461d2744cfa6a4a4e09..98d427ad6466adea4adf7400a731b0bcaf3b3b27 100644 --- a/product/en/docs-mogdb/v3.0/reference-guide/guc-parameters/32-thread-pool.md +++ b/product/en/docs-mogdb/v3.0/reference-guide/guc-parameters/32-thread-pool.md @@ -16,6 +16,8 @@ date: 2021-06-15 - **on** indicates that the thread pool function is enabled. - **off** indicates that the thread pool function is disabled. +**Note**:The HA port is required for logical replication to connect to the database when thread pool is enabled. + **Default value**: off ## thread_pool_attr diff --git a/product/en/docs-mogdb/v3.0/reference-guide/system-catalogs-and-system-views/system-catalogs/STATEMENT_HISTORY.md b/product/en/docs-mogdb/v3.0/reference-guide/system-catalogs-and-system-views/system-catalogs/STATEMENT_HISTORY.md index 993a99ca011425ac6148d6ca7a10ba7f95bf32cb..b74aca1ee0f9f480c0c52fd18499547e4a8e07d7 100644 --- a/product/en/docs-mogdb/v3.0/reference-guide/system-catalogs-and-system-views/system-catalogs/STATEMENT_HISTORY.md +++ b/product/en/docs-mogdb/v3.0/reference-guide/system-catalogs-and-system-views/system-catalogs/STATEMENT_HISTORY.md @@ -71,3 +71,7 @@ The constraints on the query of this system catalog are as follows: | details | bytea | List of statement lock events, which are recorded in time sequence. The number of records is affected by the **track_stmt_details_size** parameter. This field is in binary format and needs to be read by using the parsing function **pg_catalog.statement_detail_decode**. For details, see Table 6 in [Other Functions](../../functions-and-operators/24-system-management-functions/9-other-functions.md).
Events include:
- Start locking.
- Complete locking.
- Start lock waiting.
- Complete lock waiting.
- Start unlocking.
- Complete unlocking.
- Start lightweight lock waiting.
- Complete lightweight lock waiting. | L2 | | is_slow_sql | boolean | Whether the SQL statement is a slow SQL statement.
- **t** (true): yes
- **f** (false): no | L0 | | trace_id | text | Driver-specific trace ID, which is associated with an application request. | L0 | + +> **Note**: +> +> To facilitate cleanup of this table, the [TRUNCATE](../../sql-syntax/TRUNCATE.md) command is allowed to empty the table. \ No newline at end of file diff --git a/product/en/docs-mogdb/v3.0/reference-guide/tool-reference/server-tools/1-gs_check.md b/product/en/docs-mogdb/v3.0/reference-guide/tool-reference/server-tools/1-gs_check.md index a6f21947fdee53d07b0fd8a9508475b7c7bfca2d..ce05433dba3e527d37fe213531452d8510151793 100644 --- a/product/en/docs-mogdb/v3.0/reference-guide/tool-reference/server-tools/1-gs_check.md +++ b/product/en/docs-mogdb/v3.0/reference-guide/tool-reference/server-tools/1-gs_check.md @@ -348,14 +348,6 @@ date: 2021-06-07 No - - CheckDropCache - - Checks whether there is a dropcache process running on each node. If yes, - this item passes the check. Otherwise, this item fails the check. - - No - CheckFilehandle @@ -1348,7 +1340,7 @@ Check result of a scenario: [perfadm@SIA1000131072 Check]$ gs_check -e inspect Skip CheckHdfsForeignTabEncoding because it only applies to V1R5 upgrade V1R6 with cluster. Parsing the check items config file successfully -The below items require root privileges to execute:[CheckBlockdev CheckIOConfigure CheckMTU CheckRXTX CheckMultiQueue CheckFirewall CheckSshdService CheckSshdConfig CheckCrondService CheckMaxProcMemory CheckBootItems CheckFilehandle CheckNICModel CheckDropCache] +The below items require root privileges to execute:[CheckBlockdev CheckIOConfigure CheckMTU CheckRXTX CheckMultiQueue CheckFirewall CheckSshdService CheckSshdConfig CheckCrondService CheckMaxProcMemory CheckBootItems CheckFilehandle CheckNICModel] Please enter root privileges user[root]: Please enter password for user[root]: Check root password connection successfully diff --git a/product/en/docs-mogdb/v3.1/reference-guide/functions-and-operators/statistics-information-functions/statistics-information-functions-1.md b/product/en/docs-mogdb/v3.1/reference-guide/functions-and-operators/statistics-information-functions/statistics-information-functions-1.md index b6762770f5490244f12e351ab7a7ac1d107b5ae5..18bfdc5a4ebca0041dc1b7e4b69e6ca69f960f57 100644 --- a/product/en/docs-mogdb/v3.1/reference-guide/functions-and-operators/statistics-information-functions/statistics-information-functions-1.md +++ b/product/en/docs-mogdb/v3.1/reference-guide/functions-and-operators/statistics-information-functions/statistics-information-functions-1.md @@ -450,9 +450,9 @@ Statistics information functions are divided into the following two categories: Return type: bigint -- pg_total_autovac_tuples(bool,bool) +- pg_total_autovac_tuples(bool) - Description: Returns tuple records related to the total autovac, such as **nodename**, **nspname**, **relname**, and tuple IUDs. The input parameters specify whether to query **relation** and **local** information, respectively. + Description: Returns tuple records related to the total autovac, such as **nodename**, **nspname**, **relname**, and tuple IUDs. The input parameters specify whether to query **relation** information. Return type: setofrecord diff --git a/product/en/docs-mogdb/v3.1/reference-guide/system-catalogs-and-system-views/system-catalogs/STATEMENT_HISTORY.md b/product/en/docs-mogdb/v3.1/reference-guide/system-catalogs-and-system-views/system-catalogs/STATEMENT_HISTORY.md index 9dd7df241b3a40432f40f984e8c8052b56f1961d..a923c3af649992894cda524d1db6093490d75bff 100644 --- a/product/en/docs-mogdb/v3.1/reference-guide/system-catalogs-and-system-views/system-catalogs/STATEMENT_HISTORY.md +++ b/product/en/docs-mogdb/v3.1/reference-guide/system-catalogs-and-system-views/system-catalogs/STATEMENT_HISTORY.md @@ -71,3 +71,7 @@ The constraints on the query of this system catalog are as follows: | details | bytea | List of wait events and statement lock events.
When the value of the record level is L0, the wait events starts to be recorded to the list. Statistics about the wait event of the current statement are displayed. For details about events, see [PG_THREAD_WAIT_STATUS](../system-views/PG_THREAD_WAIT_STATUS.md).
When the record level is L2, the statement lock events starts to be recorded to the list. The events are recorded in time sequence. The number of records is affected by the track\_stmt\_details\_size parameter.
Events include:
- Start locking.
- Complete locking.
- Start lock waiting.
- Complete lock waiting.
- Start unlocking.
- Complete unlocking.
- Start lightweight lock waiting.
- Complete lightweight lock waiting. | L2 | | is_slow_sql | boolean | Whether the SQL statement is a slow SQL statement.
- **t** (true): yes
- **f** (false): no | L0 | | trace_id | text | Driver-specific trace ID, which is associated with an application request. | L0 | + +> **Note**: +> +> To facilitate cleanup of this table, the [TRUNCATE](../../sql-syntax/TRUNCATE.md) command is allowed to empty the table. \ No newline at end of file diff --git a/product/en/docs-mogdb/v3.1/reference-guide/tool-reference/server-tools/1-gs_check.md b/product/en/docs-mogdb/v3.1/reference-guide/tool-reference/server-tools/1-gs_check.md index 740a119c278bde19eb4e9b3b724aa31a5850748c..0ce7b5a117f02baa5360fe1c05c3e73ee893ea58 100644 --- a/product/en/docs-mogdb/v3.1/reference-guide/tool-reference/server-tools/1-gs_check.md +++ b/product/en/docs-mogdb/v3.1/reference-guide/tool-reference/server-tools/1-gs_check.md @@ -348,14 +348,6 @@ date: 2021-06-07 No - - CheckDropCache - - Checks whether there is a dropcache process running on each node. If yes, - this item passes the check. Otherwise, this item fails the check. - - No - CheckFilehandle @@ -1347,7 +1339,7 @@ Check result of a scenario: ```bash [perfadm@SIA1000131072 Check]$ gs_check -e inspect Parsing the check items config file successfully -The below items require root privileges to execute:[CheckBlockdev CheckIOConfigure CheckMTU CheckRXTX CheckMultiQueue CheckFirewall CheckSshdService CheckSshdConfig CheckCrondService CheckMaxProcMemory CheckBootItems CheckFilehandle CheckNICModel CheckDropCache] +The below items require root privileges to execute:[CheckBlockdev CheckIOConfigure CheckMTU CheckRXTX CheckMultiQueue CheckFirewall CheckSshdService CheckSshdConfig CheckCrondService CheckMaxProcMemory CheckBootItems CheckFilehandle CheckNICModel] Please enter root privileges user[root]: Please enter password for user[root]: Check root password connection successfully diff --git a/product/en/docs-mogdb/v5.0/developer-guide/mysql-compatibility-description/dolphin-extension/dolphin-syntax/sql-reference/sql-syntax/dolphin-use-db_name.md b/product/en/docs-mogdb/v5.0/developer-guide/mysql-compatibility-description/dolphin-extension/dolphin-syntax/sql-reference/sql-syntax/dolphin-use-db_name.md index 1ab93d29ecefc386c349e587946af7f59dfb8cbc..be7bcdb5108a4d558a1b37320dfeb793d05e91ca 100644 --- a/product/en/docs-mogdb/v5.0/developer-guide/mysql-compatibility-description/dolphin-extension/dolphin-syntax/sql-reference/sql-syntax/dolphin-use-db_name.md +++ b/product/en/docs-mogdb/v5.0/developer-guide/mysql-compatibility-description/dolphin-extension/dolphin-syntax/sql-reference/sql-syntax/dolphin-use-db_name.md @@ -9,7 +9,7 @@ date: 2022-10-24 ## Function -The USE db\_name statement uses the db\_name database as the default (current) database for subsequent statements. The database remains the default database until the end of the paragraph, or until a different USE statement is published. +The USE db_name statement uses the db_name schema as the default (current) schema for subsequent statements. The schema remains the default schema until the end of the paragraph, or until a different USE statement is published. ## Precautions @@ -25,12 +25,12 @@ USE db_name - **db_name** - Database name + Schema name ## Examples ```sql ---Switch to the db1 database. +--Switch to the db1 schema. MogDB=# USE db1; SET MogDB=# CREATE TABLE test(a text); @@ -38,7 +38,7 @@ CREATE TABLE MogDB=# INSERT INTO test VALUES('db1'); INSERT 0 1 ---Switch to the db2 database. +--Switch to the db2 schema. MogDB=# USE db2; SET MogDB=# CREATE TABLE test(a text); @@ -63,7 +63,7 @@ MogDB=# select a from test; db2 (1 row) ---Switch to the db1 database. +--Switch to the db1 schema. MogDB=# USE db1; SET MogDB=# select a from test; diff --git a/product/en/docs-mogdb/v5.0/reference-guide/functions-and-operators/statistics-information-functions/statistics-information-functions-1.md b/product/en/docs-mogdb/v5.0/reference-guide/functions-and-operators/statistics-information-functions/statistics-information-functions-1.md index a4a3bef816250d36ce602b740f9343a301fafe37..dff20a078074bb9dfb3a84087e3d398fc2073600 100644 --- a/product/en/docs-mogdb/v5.0/reference-guide/functions-and-operators/statistics-information-functions/statistics-information-functions-1.md +++ b/product/en/docs-mogdb/v5.0/reference-guide/functions-and-operators/statistics-information-functions/statistics-information-functions-1.md @@ -1,660 +1,660 @@ ---- -title: Statistics Information Functions -summary: Statistics Information Functions -author: Zhang Cuiping -date: 2021-04-20 ---- - -# Statistics Information Functions(1) - -Statistics information functions are divided into the following two categories: functions that access databases, using the OID of each table or index in a database to mark the database for which statistics are generated; functions that access servers, identified by the server process ID, whose value ranges from 1 to the number of currently active servers. - -- pg_stat_get_db_conflict_tablespace(oid) - - Description: Specifies the number of queries canceled due to a conflict between the restored tablespace and the deleted tablespace in the database. - - Return type: bigint - -- pg_control_group_config - - Description: Prints Cgroup configurations on the current node. - - Return type: record - -- pg_stat_get_db_stat_reset_time(oid) - - Description: Specifies the most recent time when database statistics were reset. It is initialized to the system time during the first connection to each database. The reset time is updated when you call **pg_stat_reset** on the database and execute **pg_stat_reset_single_table_counters** against any table or index in it. - - Return type: timestamptz - -- pg_stat_get_function_total_time(oid) - - Description: Specifies the total wall clock time spent in the function, in microseconds. The time spent on this function calling other functions is included. - - Return type: bigint - -- pg_stat_get_xact_tuples_returned(oid) - - Description: Specifies the number of rows read through sequential scans when the parameter is a table in the current transaction or the number of index entries returned when the parameter is an index. - - Return type: bigint - -- pg_lock_status() - - Description: Queries information about locks held by open transactions. All users can execute this function. - - Return type: For details, see **PG_LOCKS** which is obtained by querying this function. - -- pg_stat_get_xact_numscans(oid) - - Description: Specifies the number of sequential scans performed when the parameter is a table in the current transaction or the number of index scans performed when the parameter is an index. - - Return type: bigint - -- pg_stat_get_xact_blocks_fetched(oid) - - Description: Specifies the number of disk block fetch requests for a table or an index in the current transaction. - - Return type: bigint - -- pg_stat_get_xact_blocks_hit(oid) - - Description: Specifies the number of disk block fetch requests for tables or indexes found in cache in the current transaction. - - Return type: bigint - -- pg_stat_get_xact_function_calls(oid) - - Description: Specifies the number of times the function is called in the current transaction. - - Return type: bigint - -- pg_stat_get_xact_function_self_time(oid) - - Description: Specifies the time spent on this function in the current transaction, excluding the time spent on this function internally calling other functions. - - Return type: bigint - -- pg_stat_get_xact_function_total_time(oid) - - Description: Specifies the total wall clock time (in microseconds) spent on the function in the current transaction, including the time spent on this function internally calling other functions. - - Return type: bigint - -- pg_stat_get_wal_senders() - - Description: Queries walsender information on the primary server. - - Return type: setofrecord - - The following table describes return columns. - - **Table 1** Return column description - - | Column | Type | Description | - | :------------------------- | :----------------------- | :------------------------------------------------- | - | pid | bigint | Thread ID of the WAL sender | - | sender_pid | integer | Lightweight thread ID of the WAL sender | - | local_role | text | Type of the primary node | - | peer_role | text | Type of the standby node | - | peer_state | text | Status of the standby node | - | state | text | Status of the WAL sender | - | catchup_start | timestamp with time zone | Startup time of a catchup task | - | catchup_end | timestamp with time zone | End time of a catchup task | - | sender_sent_location | text | Sending position of the primary node | - | sender_write_location | text | Writing position of the primary node | - | sender_flush_location | text | Flushing position of the primary node | - | sender_replay_location | text | Redo position of the primary node | - | receiver_received_location | text | Receiving position of the standby node | - | receiver_write_location | text | Writing position of the standby node | - | receiver_flush_location | text | Flushing position of the standby node | - | receiver_replay_location | text | Redo position of the standby node | - | sync_percent | text | Synchronization percentage | - | sync_state | text | Synchronization status | - | sync_group | text | Group to which the synchronous replication belongs | - | sync_priority | text | Priority of synchronous replication | - | sync_most_available | text | Maximum availability mode | - | channel | text | Channel information of the WAL sender | - -- get_paxos_replication_info() - - Description: Queries the primary/standby replication status in Paxos mode. - - Return type: setofrecord - - The following table describes return columns. - - **Table 2** Return column description - - | Column | Type | Description | - | :-------------------- | :--- | :----------------------------------------------------------- | - | paxos_write_location | text | Location of the Xlog that has been written to the Distribute Consensus Framework (DCF) | - | paxos_commit_location | text | Location of the Xlog agreed in the DCF | - | local_write_location | text | Writing position of a node | - | local_flush_location | text | Flushing position of a node | - | local_replay_location | text | Redo position of a node | - | dcf_replication_info | text | DCF module information of a node | - -- pg_stat_get_stream_replications() - - Description: Queries the primary/standby replication status. - - Return type: setofrecord - - The following table describes return values. - - **Table 3** Return value description - - | Return Parameter | Type | Description | - | :----------------- | :------ | :-------------------- | - | local_role | text | Local role | - | static_connections | integer | Connection statistics | - | db_state | text | Database status | - | detail_information | text | Detailed information | - -- pg_stat_get_db_numbackends(oid) - - Description: Specifies the number of active server processes for a database. - - Return type: integer - -- pg_stat_get_db_xact_commit(oid) - - Description: Specifies the number of transactions committed in a database. - - Return type: bigint - -- pg_stat_get_db_xact_rollback(oid) - - Description: Specifies the number of transactions rolled back in a database. - - Return type: bigint - -- pg_stat_get_db_blocks_fetched(oid) - - Description: Specifies the number of disk blocks fetch requests for a database. - - Return type: bigint - -- pg_stat_get_db_blocks_hit(oid) - - Description: Specifies the number of disk block fetch requests found in cache for a database. - - Return type: bigint - -- pg_stat_get_db_tuples_returned(oid) - - Description: Specifies the number of tuples returned for a database. - - Return type: bigint - -- pg_stat_get_db_tuples_fetched(oid) - - Description: Specifies the number of tuples fetched for a database. - - Return type: bigint - -- pg_stat_get_db_tuples_inserted(oid) - - Description: Specifies the number of tuples inserted in a database. - - Return type: bigint - -- pg_stat_get_db_tuples_updated(oid) - - Description: Specifies the number of tuples updated in a database. - - Return type: bigint - -- pg_stat_get_db_tuples_deleted(oid) - - Description: Specifies the number of tuples deleted in a database. - - Return type: bigint - -- pg_stat_get_db_conflict_lock(oid) - - Description: Specifies the number of lock conflicts in a database. - - Return type: bigint - -- pg_stat_get_db_deadlocks(oid) - - Description: Specifies the number of deadlocks in a database. - - Return type: bigint - -- pg_stat_get_numscans(oid) - - Description: Specifies the number of sequential row scans done if parameters are in a table or the number of index scans done if parameters are in an index. - - Return type: bigint - -- pg_stat_get_role_name(oid) - - Description: Obtains the username based on the user OID. Only users with the **sysadmin** or **monitor admin** permission can access the information. - - Return type: text - - Example: - - ``` - MogDB=# select pg_stat_get_role_name(10); - pg_stat_get_role_name - ----------------------- - aabbcc - (1 row) - ``` - -- pg_stat_get_tuples_returned(oid) - - Description: Specifies the number of sequential row scans done if parameters are in a table or the number of index scans done if parameters are in an index. - - Return type: bigint - -- pg_stat_get_tuples_fetched(oid) - - Description: Specifies the number of table rows fetched by bitmap scans if parameters are in a table or the number of table rows fetched by simple index scans using the index if parameters are in an index. - - Return type: bigint - -- pg_stat_get_tuples_inserted(oid) - - Description: Specifies the number of rows inserted into a table. - - Return type: bigint - -- pg_stat_get_tuples_updated(oid) - - Description: Specifies the number of rows updated in a table. - - Return type: bigint - -- pg_stat_get_tuples_deleted(oid) - - Description: Specifies the number of rows deleted from a table. - - Return type: bigint - -- pg_stat_get_tuples_changed(oid) - - Description: Specifies the total number of inserted, updated, and deleted rows after a table was last analyzed or autoanalyzed. - - Return type: bigint - -- pg_stat_get_tuples_hot_updated(oid) - - Description: Specifies the number of rows hot updated in a table. - - Return type: bigint - -- pg_stat_get_live_tuples(oid) - - Description: Specifies the number of live rows in a table. - - Return type: bigint - -- pg_stat_get_dead_tuples(oid) - - Description: Specifies the number of dead rows in a table. - - Return type: bigint - -- pg_stat_get_blocks_fetched(oid) - - Description: Specifies the number of disk block fetch requests for a table or an index. - - Return type: bigint - -- pg_stat_get_blocks_hit(oid) - - Description: Specifies the number of disk block requests found in cache for a table or an index. - - Return type: bigint - -- pg_stat_get_partition_tuples_inserted(oid) - - Description: Specifies the number of rows in the corresponding table partition. - - Return type: bigint - -- pg_stat_get_partition_tuples_updated(oid) - - Description: Specifies the number of rows that have been updated in the corresponding table partition. - - Return type: bigint - -- pg_stat_get_partition_tuples_deleted(oid) - - Description: Specifies the number of rows deleted from the corresponding table partition. - - Return type: bigint - -- pg_stat_get_partition_tuples_changed(oid) - - Description: Specifies the total number of inserted, updated, and deleted rows after a table partition was last analyzed or autoanalyzed. - - Return type: bigint - -- pg_stat_get_partition_live_tuples(oid) - - Description: Specifies the number of live rows in a partitioned table. - - Return type: bigint - -- pg_stat_get_partition_dead_tuples(oid) - - Description: Specifies the number of dead rows in a partitioned table. - - Return type: bigint - -- pg_stat_get_xact_tuples_fetched(oid) - - Description: Specifies the number of tuple rows scanned in a transaction. - - Return type: bigint - -- pg_stat_get_xact_tuples_inserted(oid) - - Description: Specifies the number of tuple inserted into the active subtransactions related to a table. - - Return type: bigint - -- pg_stat_get_xact_tuples_deleted(oid) - - Description: Specifies the number of deleted tuples in the active subtransactions related to a table. - - Return type: bigint - -- pg_stat_get_xact_tuples_hot_updated(oid) - - Description: Specifies the number of hot updated tuples in the active subtransactions related to a table. - - Return type: bigint - -- pg_stat_get_xact_tuples_updated(oid) - - Description: Specifies the number of updated tuples in the active subtransactions related to a table. - - Return type: bigint - -- pg_stat_get_xact_partition_tuples_inserted(oid) - - Description: Specifies the number of inserted tuples in the active subtransactions related to a table partition. - - Return type: bigint - -- pg_stat_get_xact_partition_tuples_deleted(oid) - - Description: Specifies the number of deleted tuples in the active subtransactions related to a table partition. - - Return type: bigint - -- pg_stat_get_xact_partition_tuples_hot_updated(oid) - - Description: Specifies the number of hot updated tuples in the active subtransactions related to a table partition. - - Return type: bigint - -- pg_stat_get_xact_partition_tuples_updated(oid) - - Description: Specifies the number of updated tuples in the active subtransactions related to a table partition. - - Return type: bigint - -- pg_stat_get_last_vacuum_time(oid) - - Description: Specifies the most recent time when the autovacuum thread is manually started to clear a table. - - Return type: timestamptz - -- pg_stat_get_last_autovacuum_time(oid) - - Description: Specifies the time of the last vacuum initiated by the autovacuum daemon on a table. - - Return type: timestamptz - -- pg_stat_get_vacuum_count(oid) - - Description: Specifies the number of times a table is manually cleared. - - Return type: bigint - -- pg_stat_get_autovacuum_count(oid) - - Description: Specifies the number of times the autovacuum daemon is started to clear a table. - - Return type: bigint - -- pg_stat_get_last_analyze_time(oid) - - Description: Specifies the last time when a table starts to be analyzed manually or by the autovacuum thread. - - Return type: timestamptz - -- pg_stat_get_last_autoanalyze_time(oid) - - Description: Specifies the time when the last analysis initiated by the autovacuum daemon on a table. - - Return type: timestamptz - -- pg_stat_get_analyze_count(oid) - - Description: Specifies the number of times a table is manually analyzed. - - Return type: bigint - -- pg_stat_get_autoanalyze_count(oid) - - Description: Specifies the number of times the autovacuum daemon analyzes a table. - - Return type: bigint - -- pg_total_autovac_tuples(bool,bool) - - Description: Returns tuple records related to the total autovac, such as **nodename**, **nspname**, **relname**, and tuple IUDs. The input parameters specify whether to query **relation** and **local** information, respectively. - - Return type: setofrecord - - The following table describes return parameters. - - **Table 4** Return parameter description - - | Return Parameter | Type | Description | - | :-------------------- | :----- | :------------------------------------------------------ | - | nodename | name | Node name | - | nspname | name | Name of a namespace | - | relname | name | Name of an object, such as a table, an index, or a view | - | partname | name | Partition name | - | n_dead_tuples | bigint | Number of dead rows in a table partition | - | n_live_tuples | bigint | Number of live rows in a table partition | - | changes_since_analyze | bigint | Number of changes generated by ANALYZE | - -- pg_autovac_status(oid) - - Description: Returns autovac information, such as **nodename**, **nspname**, **relname**, **analyze**, **vacuum**, thresholds of **analyze** and **vacuum**, and the number of analyzed or vacuumed tuples. Only users with the **sysadmin** permission can use this function. - - Return type: setofrecord - - The following table describes return parameters. - - **Table 5** Return parameter description - - | Return Parameter | Type | Description | - | :--------------- | :------ | :------------------------------------------------------ | - | nspname | text | Name of a namespace | - | relname | text | Name of an object, such as a table, an index, or a view | - | nodename | text | Node name | - | doanalyze | Boolean | Whether to execute **ANALYZE** | - | anltuples | bigint | Number of ANALYZE tuples | - | anlthresh | bigint | ANALYZE threshold | - | dovacuum | Boolean | Whether to execute **VACUUM** | - | vactuples | bigint | Number of VACUUM tuples | - | vacthresh | bigint | VACUUM threshold | - -- pg_autovac_timeout(oid) - - Description: Returns the number of consecutive timeouts during the autovac operation on a table. If the table information is invalid or the node information is abnormal, **NULL** will be returned. - - Return type: bigint - -- pg_stat_get_last_data_changed_time(oid) - - Description: Returns the time when **INSERT**, **UPDATE**, **DELETE**, or **EXCHANGE**/**TRUNCATE**/**DROP** **PARTITION** was last performed on a table. The data in the **last_data_changed** column of the PG_STAT_ALL_TABLES view is calculated by using this function. The performance of obtaining the last modification time by using the view is poor when the table has a large amount of data. In this case, you are advised to use the function. - - Return type: timestamptz - -- pg_stat_set_last_data_changed_time(oid) - - Description: Manually changes the time when **INSERT**, **UPDATE**, **DELETE**, or **EXCHANGE**/**TRUNCATE**/**DROP** **PARTITION** was last performed. - - Return type: void - -- pg_backend_pid() - - Description: Specifies the thread ID of the server thread attached to the current session. - - Return type: bigint - -- pg_stat_get_activity(integer) - - Description: Returns a record about the backend with the specified PID. A record for each active backend in the system is returned if **NULL** is specified. The returned result does not contain the **connection_info** column. The initial user, system administrators and users with the **monadmin** permission can view all data. Common users can only query their own results. - - Example: - - ``` - MogDB=# select * from pg_stat_get_activity(139881386280704); - datid | pid | sessionid | usesysid | application_name | state | query | waiting | xact_start | query_start | - backend_start | state_change | client_addr | client_hostname | client_port | enqueue | query_id | srespool | global_sessionid | unique_sql_id | trace_id - -------+-----------------+-----------+----------+------------------+--------+------------------------------------------------------+---------+-------------------------------+-------------------------------+----- - --------------------------+------------------------------+-------------+-----------------+-------------+---------+-------------------+--------------+------------------+---------------+---------- - 16545 | 139881386280704 | 69 | 10 | gsql | active | select * from pg_stat_get_activity(139881386280704); | f | 2022-01-18 19:43:05.167718+08 | 2022-01-18 19:43:05.167718+08 | 2022 - -01-18 19:42:33.513507+08 | 2022-01-18 19:43:05.16773+08 | | | -1 | | 72620543991624410 | default_pool | 1938253334#69#0 | 3751941862 | - (1 row) - ``` - - Return type: setofrecord - - The following table describes return parameters. - - **Table 6** Return parameter description - - | Return Parameter | Type | Description | - | :--------------- | :----------------------- | :----------------------------------------------------------- | - | datid | oid | OID of the database that the user session connects to in the backend | - | pid | bigint | Backend thread ID | - | sessionid | bigint | Session ID | - | usesysid | oid | OID of the user logged in to the backend | - | application_name | text | Name of the application connected to the backend | - | state | text | Overall status of the backend | - | query | text | Latest query at the backend. If **state** is **active**, this column shows the ongoing query. In all other states, it shows the last query that was executed. | - | waiting | Boolean | Whether the backend is currently waiting on a lock. If yes, the value is **true**. | - | xact_start | timestamp with time zone | Time when current transaction was started (null if no transaction is active).If the current query is the first of its transaction, the value of this column is the same as that of the **query_start** column. | - | query_start | timestamp with time zone | Time when the currently active query was started, or time when the last query was started if **state** is not **active** | - | backend_start | timestamp with time zone | Time when this process was started, that is, when the client connected to the server | - | state_change | timestamp with time zone | Time when **state** was last modified | - | client_addr | inet | IP address of the client connected to the backend. If this column is **NULL**, it indicates either the client is connected via a Unix socket on the server or this is an internal process, such as **AUTOVACUUM**. | - | client_hostname | text | Host name of the connected client, as reported by a reverse DNS lookup of client_addr. This column will be non-null only for IP connections and only when log_hostname is enabled. | - | client_port | integer | TCP port number that the client uses for communication with this backend (**–1** if a Unix socket is used) | - | enqueue | text | Unsupported currently | - | query_id | bigint | ID of a query | - | srespool | name | Name of the resource pool | - | global_sessionid | text | Global session ID | - | unique_sql_id | bigint | Unique SQL statement ID | - | trace_id | text | Driver-specific trace ID, which is associated with an application request | - -- pg_stat_get_activity_with_conninfo(integer) - - Description: Returns a record about the backend with the specified PID. A record for each active backend in the system is returned if **NULL** is specified. The initial user, system administrators and users with the **monadmin** permission can view all data. Common users can only query their own results. - - Return type: setofrecord - - The following table describes return values. - - **Table 7** Return value description - - | Return Value | Return Type | Description | - | :--------------- | :----------------------- | :----------------------------------------------------------- | - | datid | oid | OID of the database that the user session connects to in the backend | - | pid | bigint | Backend thread ID | - | sessionid | bigint | Session ID | - | usesysid | oid | OID of the user logged in to the backend | - | application_name | text | Name of the application connected to the backend | - | state | text | Overall status of the backend | - | query | text | Latest query at the backend. If **state** is **active**, this column shows the ongoing query. In all other states, it shows the last query that was executed. | - | waiting | Boolean | Whether the backend is currently waiting on a lock. If yes, the value is **true**. | - | xact_start | timestamp with time zone | Time when current transaction was started (null if no transaction is active). If the current query is the first of its transaction, the value of this column is the same as that of the **query_start** column. | - | query_start | timestamp with time zone | Time when the currently active query was started, or time when the last query was started if **state** is not **active** | - | backend_start | timestamp with time zone | Time when this process was started, that is, when the client connected to the server | - | state_change | timestamp with time zone | Time when **state** was last modified | - | client_addr | inet | IP address of the client connected to the backend If this column is **NULL**, it indicates either the client is connected via a Unix socket on the server or this is an internal process, such as **AUTOVACUUM**. | - | client_hostname | text | Host name of the connected client, as reported by a reverse DNS lookup of client_addr. This column will be non-null only for IP connections and only when log_hostname is enabled. | - | client_port | integer | TCP port number that the client uses for communication with this backend (**–1** if a Unix socket is used) | - | enqueue | text | Unsupported currently | - | query_id | bigint | ID of a query | - | connection_info | text | A string in JSON format recording the driver type, driver version, driver deployment path, and process owner of the connected database | - | srespool | name | Name of the resource pool | - | global_sessionid | text | Global session ID | - | unique_sql_id | bigint | Unique SQL statement ID | - | trace_id | text | Driver-specific trace ID, which is associated with an application request | - -- pg_user_iostat(text) - - Description: Displays the I/O load management information about the job currently executed by the user. - - Return type: record - - The following table describes return fields. - - | Name | Type | Description | - | :------------- | :--- | :----------------------------------------------------------- | - | userid | oid | User ID | - | min_curr_iops | int4 | Minimum I/O of the current user across database nodes. The IOPS is counted by ones for column storage and by ten thousands for row storage. | - | max_curr_iops | int4 | Maximum I/O of the current user across database nodes. The IOPS is counted by ones for column storage and by ten thousands for row storage. | - | min_peak_iops | int4 | Minimum peak I/O of the current user across database nodes. The IOPS is counted by ones for column storage and by ten thousands for row storage. | - | max_peak_iops | int4 | Maximum peak I/O of the current user across database nodes. The IOPS is counted by ones for column storage and by ten thousands for row storage. | - | io_limits | int4 | **io_limits** set for the resource pool specified by the user. The IOPS is counted by ones for column storage and by ten thousands for row storage. | - | io_priority | text | **io_priority** set for the user. The IOPS is counted by ones for column storage and by ten thousands for row storage. | - | curr_io_limits | int4 | Real-time **io_limits** value when **io_priority** is used to control I/Os | - -- pg_stat_get_function_calls(oid) - - Description: Specifies the number of times the function has been called. - - Return type: bigint - -- pg_stat_get_function_self_time(oid) - - Description: Specifies the time spent in only this function. The time spent on this function calling other functions is excluded. - - Return type: bigint - -- pg_stat_get_backend_idset() - - Description: Sets the number of currently active server processes (from 1 to the number of active server processes). - - Return type: setofinteger - -- pg_stat_get_backend_pid(integer) - - Description: Specifies the ID of the given server thread. - - Return type: bigint - -- pg_stat_get_backend_dbid(integer) - - Description: Specifies the ID of the database connected to the given server process. - - Return type: oid - -- pg_stat_get_backend_userid(integer) - - Description: Specifies the user ID of the given server process. - - Return type: oid - -- pg_stat_get_backend_activity(integer) - - Description: Active command of the given server process, but only if the current user is a system administrator or the same user as that of the session being queried and **track_activities** is on - +--- +title: Statistics Information Functions +summary: Statistics Information Functions +author: Zhang Cuiping +date: 2021-04-20 +--- + +# Statistics Information Functions(1) + +Statistics information functions are divided into the following two categories: functions that access databases, using the OID of each table or index in a database to mark the database for which statistics are generated; functions that access servers, identified by the server process ID, whose value ranges from 1 to the number of currently active servers. + +- pg_stat_get_db_conflict_tablespace(oid) + + Description: Specifies the number of queries canceled due to a conflict between the restored tablespace and the deleted tablespace in the database. + + Return type: bigint + +- pg_control_group_config + + Description: Prints Cgroup configurations on the current node. + + Return type: record + +- pg_stat_get_db_stat_reset_time(oid) + + Description: Specifies the most recent time when database statistics were reset. It is initialized to the system time during the first connection to each database. The reset time is updated when you call **pg_stat_reset** on the database and execute **pg_stat_reset_single_table_counters** against any table or index in it. + + Return type: timestamptz + +- pg_stat_get_function_total_time(oid) + + Description: Specifies the total wall clock time spent in the function, in microseconds. The time spent on this function calling other functions is included. + + Return type: bigint + +- pg_stat_get_xact_tuples_returned(oid) + + Description: Specifies the number of rows read through sequential scans when the parameter is a table in the current transaction or the number of index entries returned when the parameter is an index. + + Return type: bigint + +- pg_lock_status() + + Description: Queries information about locks held by open transactions. All users can execute this function. + + Return type: For details, see **PG_LOCKS** which is obtained by querying this function. + +- pg_stat_get_xact_numscans(oid) + + Description: Specifies the number of sequential scans performed when the parameter is a table in the current transaction or the number of index scans performed when the parameter is an index. + + Return type: bigint + +- pg_stat_get_xact_blocks_fetched(oid) + + Description: Specifies the number of disk block fetch requests for a table or an index in the current transaction. + + Return type: bigint + +- pg_stat_get_xact_blocks_hit(oid) + + Description: Specifies the number of disk block fetch requests for tables or indexes found in cache in the current transaction. + + Return type: bigint + +- pg_stat_get_xact_function_calls(oid) + + Description: Specifies the number of times the function is called in the current transaction. + + Return type: bigint + +- pg_stat_get_xact_function_self_time(oid) + + Description: Specifies the time spent on this function in the current transaction, excluding the time spent on this function internally calling other functions. + + Return type: bigint + +- pg_stat_get_xact_function_total_time(oid) + + Description: Specifies the total wall clock time (in microseconds) spent on the function in the current transaction, including the time spent on this function internally calling other functions. + + Return type: bigint + +- pg_stat_get_wal_senders() + + Description: Queries walsender information on the primary server. + + Return type: setofrecord + + The following table describes return columns. + + **Table 1** Return column description + + | Column | Type | Description | + | :------------------------- | :----------------------- | :------------------------------------------------- | + | pid | bigint | Thread ID of the WAL sender | + | sender_pid | integer | Lightweight thread ID of the WAL sender | + | local_role | text | Type of the primary node | + | peer_role | text | Type of the standby node | + | peer_state | text | Status of the standby node | + | state | text | Status of the WAL sender | + | catchup_start | timestamp with time zone | Startup time of a catchup task | + | catchup_end | timestamp with time zone | End time of a catchup task | + | sender_sent_location | text | Sending position of the primary node | + | sender_write_location | text | Writing position of the primary node | + | sender_flush_location | text | Flushing position of the primary node | + | sender_replay_location | text | Redo position of the primary node | + | receiver_received_location | text | Receiving position of the standby node | + | receiver_write_location | text | Writing position of the standby node | + | receiver_flush_location | text | Flushing position of the standby node | + | receiver_replay_location | text | Redo position of the standby node | + | sync_percent | text | Synchronization percentage | + | sync_state | text | Synchronization status | + | sync_group | text | Group to which the synchronous replication belongs | + | sync_priority | text | Priority of synchronous replication | + | sync_most_available | text | Maximum availability mode | + | channel | text | Channel information of the WAL sender | + +- get_paxos_replication_info() + + Description: Queries the primary/standby replication status in Paxos mode. + + Return type: setofrecord + + The following table describes return columns. + + **Table 2** Return column description + + | Column | Type | Description | + | :-------------------- | :--- | :----------------------------------------------------------- | + | paxos_write_location | text | Location of the Xlog that has been written to the Distribute Consensus Framework (DCF) | + | paxos_commit_location | text | Location of the Xlog agreed in the DCF | + | local_write_location | text | Writing position of a node | + | local_flush_location | text | Flushing position of a node | + | local_replay_location | text | Redo position of a node | + | dcf_replication_info | text | DCF module information of a node | + +- pg_stat_get_stream_replications() + + Description: Queries the primary/standby replication status. + + Return type: setofrecord + + The following table describes return values. + + **Table 3** Return value description + + | Return Parameter | Type | Description | + | :----------------- | :------ | :-------------------- | + | local_role | text | Local role | + | static_connections | integer | Connection statistics | + | db_state | text | Database status | + | detail_information | text | Detailed information | + +- pg_stat_get_db_numbackends(oid) + + Description: Specifies the number of active server processes for a database. + + Return type: integer + +- pg_stat_get_db_xact_commit(oid) + + Description: Specifies the number of transactions committed in a database. + + Return type: bigint + +- pg_stat_get_db_xact_rollback(oid) + + Description: Specifies the number of transactions rolled back in a database. + + Return type: bigint + +- pg_stat_get_db_blocks_fetched(oid) + + Description: Specifies the number of disk blocks fetch requests for a database. + + Return type: bigint + +- pg_stat_get_db_blocks_hit(oid) + + Description: Specifies the number of disk block fetch requests found in cache for a database. + + Return type: bigint + +- pg_stat_get_db_tuples_returned(oid) + + Description: Specifies the number of tuples returned for a database. + + Return type: bigint + +- pg_stat_get_db_tuples_fetched(oid) + + Description: Specifies the number of tuples fetched for a database. + + Return type: bigint + +- pg_stat_get_db_tuples_inserted(oid) + + Description: Specifies the number of tuples inserted in a database. + + Return type: bigint + +- pg_stat_get_db_tuples_updated(oid) + + Description: Specifies the number of tuples updated in a database. + + Return type: bigint + +- pg_stat_get_db_tuples_deleted(oid) + + Description: Specifies the number of tuples deleted in a database. + + Return type: bigint + +- pg_stat_get_db_conflict_lock(oid) + + Description: Specifies the number of lock conflicts in a database. + + Return type: bigint + +- pg_stat_get_db_deadlocks(oid) + + Description: Specifies the number of deadlocks in a database. + + Return type: bigint + +- pg_stat_get_numscans(oid) + + Description: Specifies the number of sequential row scans done if parameters are in a table or the number of index scans done if parameters are in an index. + + Return type: bigint + +- pg_stat_get_role_name(oid) + + Description: Obtains the username based on the user OID. Only users with the **sysadmin** or **monitor admin** permission can access the information. + + Return type: text + + Example: + + ``` + MogDB=# select pg_stat_get_role_name(10); + pg_stat_get_role_name + ----------------------- + aabbcc + (1 row) + ``` + +- pg_stat_get_tuples_returned(oid) + + Description: Specifies the number of sequential row scans done if parameters are in a table or the number of index scans done if parameters are in an index. + + Return type: bigint + +- pg_stat_get_tuples_fetched(oid) + + Description: Specifies the number of table rows fetched by bitmap scans if parameters are in a table or the number of table rows fetched by simple index scans using the index if parameters are in an index. + + Return type: bigint + +- pg_stat_get_tuples_inserted(oid) + + Description: Specifies the number of rows inserted into a table. + + Return type: bigint + +- pg_stat_get_tuples_updated(oid) + + Description: Specifies the number of rows updated in a table. + + Return type: bigint + +- pg_stat_get_tuples_deleted(oid) + + Description: Specifies the number of rows deleted from a table. + + Return type: bigint + +- pg_stat_get_tuples_changed(oid) + + Description: Specifies the total number of inserted, updated, and deleted rows after a table was last analyzed or autoanalyzed. + + Return type: bigint + +- pg_stat_get_tuples_hot_updated(oid) + + Description: Specifies the number of rows hot updated in a table. + + Return type: bigint + +- pg_stat_get_live_tuples(oid) + + Description: Specifies the number of live rows in a table. + + Return type: bigint + +- pg_stat_get_dead_tuples(oid) + + Description: Specifies the number of dead rows in a table. + + Return type: bigint + +- pg_stat_get_blocks_fetched(oid) + + Description: Specifies the number of disk block fetch requests for a table or an index. + + Return type: bigint + +- pg_stat_get_blocks_hit(oid) + + Description: Specifies the number of disk block requests found in cache for a table or an index. + + Return type: bigint + +- pg_stat_get_partition_tuples_inserted(oid) + + Description: Specifies the number of rows in the corresponding table partition. + + Return type: bigint + +- pg_stat_get_partition_tuples_updated(oid) + + Description: Specifies the number of rows that have been updated in the corresponding table partition. + + Return type: bigint + +- pg_stat_get_partition_tuples_deleted(oid) + + Description: Specifies the number of rows deleted from the corresponding table partition. + + Return type: bigint + +- pg_stat_get_partition_tuples_changed(oid) + + Description: Specifies the total number of inserted, updated, and deleted rows after a table partition was last analyzed or autoanalyzed. + + Return type: bigint + +- pg_stat_get_partition_live_tuples(oid) + + Description: Specifies the number of live rows in a partitioned table. + + Return type: bigint + +- pg_stat_get_partition_dead_tuples(oid) + + Description: Specifies the number of dead rows in a partitioned table. + + Return type: bigint + +- pg_stat_get_xact_tuples_fetched(oid) + + Description: Specifies the number of tuple rows scanned in a transaction. + + Return type: bigint + +- pg_stat_get_xact_tuples_inserted(oid) + + Description: Specifies the number of tuple inserted into the active subtransactions related to a table. + + Return type: bigint + +- pg_stat_get_xact_tuples_deleted(oid) + + Description: Specifies the number of deleted tuples in the active subtransactions related to a table. + + Return type: bigint + +- pg_stat_get_xact_tuples_hot_updated(oid) + + Description: Specifies the number of hot updated tuples in the active subtransactions related to a table. + + Return type: bigint + +- pg_stat_get_xact_tuples_updated(oid) + + Description: Specifies the number of updated tuples in the active subtransactions related to a table. + + Return type: bigint + +- pg_stat_get_xact_partition_tuples_inserted(oid) + + Description: Specifies the number of inserted tuples in the active subtransactions related to a table partition. + + Return type: bigint + +- pg_stat_get_xact_partition_tuples_deleted(oid) + + Description: Specifies the number of deleted tuples in the active subtransactions related to a table partition. + + Return type: bigint + +- pg_stat_get_xact_partition_tuples_hot_updated(oid) + + Description: Specifies the number of hot updated tuples in the active subtransactions related to a table partition. + + Return type: bigint + +- pg_stat_get_xact_partition_tuples_updated(oid) + + Description: Specifies the number of updated tuples in the active subtransactions related to a table partition. + + Return type: bigint + +- pg_stat_get_last_vacuum_time(oid) + + Description: Specifies the most recent time when the autovacuum thread is manually started to clear a table. + + Return type: timestamptz + +- pg_stat_get_last_autovacuum_time(oid) + + Description: Specifies the time of the last vacuum initiated by the autovacuum daemon on a table. + + Return type: timestamptz + +- pg_stat_get_vacuum_count(oid) + + Description: Specifies the number of times a table is manually cleared. + + Return type: bigint + +- pg_stat_get_autovacuum_count(oid) + + Description: Specifies the number of times the autovacuum daemon is started to clear a table. + + Return type: bigint + +- pg_stat_get_last_analyze_time(oid) + + Description: Specifies the last time when a table starts to be analyzed manually or by the autovacuum thread. + + Return type: timestamptz + +- pg_stat_get_last_autoanalyze_time(oid) + + Description: Specifies the time when the last analysis initiated by the autovacuum daemon on a table. + + Return type: timestamptz + +- pg_stat_get_analyze_count(oid) + + Description: Specifies the number of times a table is manually analyzed. + + Return type: bigint + +- pg_stat_get_autoanalyze_count(oid) + + Description: Specifies the number of times the autovacuum daemon analyzes a table. + + Return type: bigint + +- pg_total_autovac_tuples(bool) + + Description: Returns tuple records related to the total autovac, such as **nodename**, **nspname**, **relname**, and tuple IUDs. The input parameters specify whether to query **relation** information. + + Return type: setofrecord + + The following table describes return parameters. + + **Table 4** Return parameter description + + | Return Parameter | Type | Description | + | :-------------------- | :----- | :------------------------------------------------------ | + | nodename | name | Node name | + | nspname | name | Name of a namespace | + | relname | name | Name of an object, such as a table, an index, or a view | + | partname | name | Partition name | + | n_dead_tuples | bigint | Number of dead rows in a table partition | + | n_live_tuples | bigint | Number of live rows in a table partition | + | changes_since_analyze | bigint | Number of changes generated by ANALYZE | + +- pg_autovac_status(oid) + + Description: Returns autovac information, such as **nodename**, **nspname**, **relname**, **analyze**, **vacuum**, thresholds of **analyze** and **vacuum**, and the number of analyzed or vacuumed tuples. Only users with the **sysadmin** permission can use this function. + + Return type: setofrecord + + The following table describes return parameters. + + **Table 5** Return parameter description + + | Return Parameter | Type | Description | + | :--------------- | :------ | :------------------------------------------------------ | + | nspname | text | Name of a namespace | + | relname | text | Name of an object, such as a table, an index, or a view | + | nodename | text | Node name | + | doanalyze | Boolean | Whether to execute **ANALYZE** | + | anltuples | bigint | Number of ANALYZE tuples | + | anlthresh | bigint | ANALYZE threshold | + | dovacuum | Boolean | Whether to execute **VACUUM** | + | vactuples | bigint | Number of VACUUM tuples | + | vacthresh | bigint | VACUUM threshold | + +- pg_autovac_timeout(oid) + + Description: Returns the number of consecutive timeouts during the autovac operation on a table. If the table information is invalid or the node information is abnormal, **NULL** will be returned. + + Return type: bigint + +- pg_stat_get_last_data_changed_time(oid) + + Description: Returns the time when **INSERT**, **UPDATE**, **DELETE**, or **EXCHANGE**/**TRUNCATE**/**DROP** **PARTITION** was last performed on a table. The data in the **last_data_changed** column of the PG_STAT_ALL_TABLES view is calculated by using this function. The performance of obtaining the last modification time by using the view is poor when the table has a large amount of data. In this case, you are advised to use the function. + + Return type: timestamptz + +- pg_stat_set_last_data_changed_time(oid) + + Description: Manually changes the time when **INSERT**, **UPDATE**, **DELETE**, or **EXCHANGE**/**TRUNCATE**/**DROP** **PARTITION** was last performed. + + Return type: void + +- pg_backend_pid() + + Description: Specifies the thread ID of the server thread attached to the current session. + + Return type: bigint + +- pg_stat_get_activity(integer) + + Description: Returns a record about the backend with the specified PID. A record for each active backend in the system is returned if **NULL** is specified. The returned result does not contain the **connection_info** column. The initial user, system administrators and users with the **monadmin** permission can view all data. Common users can only query their own results. + + Example: + + ``` + MogDB=# select * from pg_stat_get_activity(139881386280704); + datid | pid | sessionid | usesysid | application_name | state | query | waiting | xact_start | query_start | + backend_start | state_change | client_addr | client_hostname | client_port | enqueue | query_id | srespool | global_sessionid | unique_sql_id | trace_id + -------+-----------------+-----------+----------+------------------+--------+------------------------------------------------------+---------+-------------------------------+-------------------------------+----- + --------------------------+------------------------------+-------------+-----------------+-------------+---------+-------------------+--------------+------------------+---------------+---------- + 16545 | 139881386280704 | 69 | 10 | gsql | active | select * from pg_stat_get_activity(139881386280704); | f | 2022-01-18 19:43:05.167718+08 | 2022-01-18 19:43:05.167718+08 | 2022 + -01-18 19:42:33.513507+08 | 2022-01-18 19:43:05.16773+08 | | | -1 | | 72620543991624410 | default_pool | 1938253334#69#0 | 3751941862 | + (1 row) + ``` + + Return type: setofrecord + + The following table describes return parameters. + + **Table 6** Return parameter description + + | Return Parameter | Type | Description | + | :--------------- | :----------------------- | :----------------------------------------------------------- | + | datid | oid | OID of the database that the user session connects to in the backend | + | pid | bigint | Backend thread ID | + | sessionid | bigint | Session ID | + | usesysid | oid | OID of the user logged in to the backend | + | application_name | text | Name of the application connected to the backend | + | state | text | Overall status of the backend | + | query | text | Latest query at the backend. If **state** is **active**, this column shows the ongoing query. In all other states, it shows the last query that was executed. | + | waiting | Boolean | Whether the backend is currently waiting on a lock. If yes, the value is **true**. | + | xact_start | timestamp with time zone | Time when current transaction was started (null if no transaction is active).If the current query is the first of its transaction, the value of this column is the same as that of the **query_start** column. | + | query_start | timestamp with time zone | Time when the currently active query was started, or time when the last query was started if **state** is not **active** | + | backend_start | timestamp with time zone | Time when this process was started, that is, when the client connected to the server | + | state_change | timestamp with time zone | Time when **state** was last modified | + | client_addr | inet | IP address of the client connected to the backend. If this column is **NULL**, it indicates either the client is connected via a Unix socket on the server or this is an internal process, such as **AUTOVACUUM**. | + | client_hostname | text | Host name of the connected client, as reported by a reverse DNS lookup of client_addr. This column will be non-null only for IP connections and only when log_hostname is enabled. | + | client_port | integer | TCP port number that the client uses for communication with this backend (**–1** if a Unix socket is used) | + | enqueue | text | Unsupported currently | + | query_id | bigint | ID of a query | + | srespool | name | Name of the resource pool | + | global_sessionid | text | Global session ID | + | unique_sql_id | bigint | Unique SQL statement ID | + | trace_id | text | Driver-specific trace ID, which is associated with an application request | + +- pg_stat_get_activity_with_conninfo(integer) + + Description: Returns a record about the backend with the specified PID. A record for each active backend in the system is returned if **NULL** is specified. The initial user, system administrators and users with the **monadmin** permission can view all data. Common users can only query their own results. + + Return type: setofrecord + + The following table describes return values. + + **Table 7** Return value description + + | Return Value | Return Type | Description | + | :--------------- | :----------------------- | :----------------------------------------------------------- | + | datid | oid | OID of the database that the user session connects to in the backend | + | pid | bigint | Backend thread ID | + | sessionid | bigint | Session ID | + | usesysid | oid | OID of the user logged in to the backend | + | application_name | text | Name of the application connected to the backend | + | state | text | Overall status of the backend | + | query | text | Latest query at the backend. If **state** is **active**, this column shows the ongoing query. In all other states, it shows the last query that was executed. | + | waiting | Boolean | Whether the backend is currently waiting on a lock. If yes, the value is **true**. | + | xact_start | timestamp with time zone | Time when current transaction was started (null if no transaction is active). If the current query is the first of its transaction, the value of this column is the same as that of the **query_start** column. | + | query_start | timestamp with time zone | Time when the currently active query was started, or time when the last query was started if **state** is not **active** | + | backend_start | timestamp with time zone | Time when this process was started, that is, when the client connected to the server | + | state_change | timestamp with time zone | Time when **state** was last modified | + | client_addr | inet | IP address of the client connected to the backend If this column is **NULL**, it indicates either the client is connected via a Unix socket on the server or this is an internal process, such as **AUTOVACUUM**. | + | client_hostname | text | Host name of the connected client, as reported by a reverse DNS lookup of client_addr. This column will be non-null only for IP connections and only when log_hostname is enabled. | + | client_port | integer | TCP port number that the client uses for communication with this backend (**–1** if a Unix socket is used) | + | enqueue | text | Unsupported currently | + | query_id | bigint | ID of a query | + | connection_info | text | A string in JSON format recording the driver type, driver version, driver deployment path, and process owner of the connected database | + | srespool | name | Name of the resource pool | + | global_sessionid | text | Global session ID | + | unique_sql_id | bigint | Unique SQL statement ID | + | trace_id | text | Driver-specific trace ID, which is associated with an application request | + +- pg_user_iostat(text) + + Description: Displays the I/O load management information about the job currently executed by the user. + + Return type: record + + The following table describes return fields. + + | Name | Type | Description | + | :------------- | :--- | :----------------------------------------------------------- | + | userid | oid | User ID | + | min_curr_iops | int4 | Minimum I/O of the current user across database nodes. The IOPS is counted by ones for column storage and by ten thousands for row storage. | + | max_curr_iops | int4 | Maximum I/O of the current user across database nodes. The IOPS is counted by ones for column storage and by ten thousands for row storage. | + | min_peak_iops | int4 | Minimum peak I/O of the current user across database nodes. The IOPS is counted by ones for column storage and by ten thousands for row storage. | + | max_peak_iops | int4 | Maximum peak I/O of the current user across database nodes. The IOPS is counted by ones for column storage and by ten thousands for row storage. | + | io_limits | int4 | **io_limits** set for the resource pool specified by the user. The IOPS is counted by ones for column storage and by ten thousands for row storage. | + | io_priority | text | **io_priority** set for the user. The IOPS is counted by ones for column storage and by ten thousands for row storage. | + | curr_io_limits | int4 | Real-time **io_limits** value when **io_priority** is used to control I/Os | + +- pg_stat_get_function_calls(oid) + + Description: Specifies the number of times the function has been called. + + Return type: bigint + +- pg_stat_get_function_self_time(oid) + + Description: Specifies the time spent in only this function. The time spent on this function calling other functions is excluded. + + Return type: bigint + +- pg_stat_get_backend_idset() + + Description: Sets the number of currently active server processes (from 1 to the number of active server processes). + + Return type: setofinteger + +- pg_stat_get_backend_pid(integer) + + Description: Specifies the ID of the given server thread. + + Return type: bigint + +- pg_stat_get_backend_dbid(integer) + + Description: Specifies the ID of the database connected to the given server process. + + Return type: oid + +- pg_stat_get_backend_userid(integer) + + Description: Specifies the user ID of the given server process. + + Return type: oid + +- pg_stat_get_backend_activity(integer) + + Description: Active command of the given server process, but only if the current user is a system administrator or the same user as that of the session being queried and **track_activities** is on + Return type: text \ No newline at end of file diff --git a/product/en/docs-mogdb/v5.0/reference-guide/functions-and-operators/xml-functions.md b/product/en/docs-mogdb/v5.0/reference-guide/functions-and-operators/xml-functions.md index 5ba92c114a00e67ee104fa6bbb0080022ac1339e..c4300f7e7eb90f361ff316add51b9857f9f22df6 100644 --- a/product/en/docs-mogdb/v5.0/reference-guide/functions-and-operators/xml-functions.md +++ b/product/en/docs-mogdb/v5.0/reference-guide/functions-and-operators/xml-functions.md @@ -1,380 +1,380 @@ ---- -title: XML Types -summary: XML Types -author: zhang cuiping -date: 2023-04-07 ---- - -# XML Types - -The following functions are inherited from the open source PG9.2. - -- xmlparse ( { DOCUMENT | CONTENT } value) - - Description: Use the function xmlparse to generate xml-type values from character data. - - Parameter: data type is text - - Return value type: xml - - Example: - - ```sql - MogDB=# SELECT XMLPARSE (DOCUMENT 'Manual...'); - xmlparse - ---------------------------------------------------------- - Manual... - (1 row) - MogDB=# SELECT XMLPARSE (CONTENT 'abcbarfoo'); - xmlparse - --------------------------------- - abcbarfoo - (1 row) - ``` - -- xmlserialize( { DOCUMENT | CONTENT } value AS type ) - - Description: Use the function xmlserialize to generate a string from xml. - - Parameter: The type can be character, character varying or text or a variant of one of them. - - Return value type: xml - - Example: - - ```sql - MogDB=# SELECT XMLSERIALIZE(CONTENT 'good' AS CHAR(10)); - xmlserialize - -------------- - good - (1 row) - MogDB=# SELECT xmlserialize(DOCUMENT 'bad' as text); - xmlserialize - ------------------ - bad - (1 row) - ``` - - > ![img](https://cdn-mogdb.enmotech.com/docs-media/icon/icon-note.gif) **NOTE:** - > - > - When a string value is converted to an xml type without XMLPARSE or XMLSERIALIZE, the selection of DOCUMENT and CONTENT is determined by the “XML option” session configuration parameter, which can be set by standard commands: - > - > ``` - > SET XML OPTION { DOCUMENT | CONTENT }; - > ``` - > - > Or use a similar syntax to set: - > - > ``` - > SET xmloption TO { DOCUMENT | CONTENT }; - > ``` - -- xmlcomment(text) - - Description: Creates an XML value and contains an XML comment with the specified text as the content. The text does not contain the “–” character and does not exist at the end of the “-” character. It conforms to the format requirements of XML comments. And when the parameter is empty, the result is also empty. - - Parameter: data type is text. - - Return value type: xml - - Example: - - ```sql - MogDB=# SELECT xmlcomment('hello'); - xmlcomment - -------------- - - ``` - -- xmlconcat(xml[, …]) - - Description: concatenates a list consisting of a single XML value into a single value, which contains an XML content fragment. The null value will be ignored, and the result will be null only when all parameters are null. - - Parameter: data type is xml. - - Return value type: xml - - Example: - - ```sql - MogDB=# SELECT xmlconcat('', 'foo'); - xmlconcat - ---------------------- - foo - ``` - -- xmlelement(name name [, xmlattributes(value [AS attname] [, … ])] [, content, …]) - - Description: Generates an XML element with the given name, attribute, and content. - - Return value type: xml - - Example: - - ```sql - MogDB=# SELECT xmlelement(name foo); - xmlelement - ------------ - - ``` - -- xmlforest(content [AS name] [, …]) - - Description: Generates an XML sequence of elements with a given name and content. - - Return value type: xml - - Example: - - ```sql - MogDB=# SELECT xmlforest('abc' AS foo, 123 AS bar); - xmlforest - ------------------------------ - abc123 - ``` - -- xmlpi(name target [, content]) - - Description: Creates an XML processing instruction. If the content is not empty, the content cannot contain character sequences. - - Return value type: xml - - Example: - - ```sql - MogDB=# SELECT xmlpi(name php, 'echo "hello world";'); - xmlpi - ----------------------------- - - ``` - -- xmlroot(xml, version text | no value [, standalone yes|no|no value]) - - Description: Modify the attribute of the root node of an XML value. If a version is specified, it will replace the value in the version declaration of the root node. If an independent setting is specified, it will replace the value in the independent declaration of the root node. - - Example: - - ```sql - MogDB=# SELECT xmlroot('abc',version '1.0', standalone yes); - xmlroot - ---------------------------------------- - - abc - ``` - -- xmlagg(xml) - - Description: This function is an aggregate function. It concatenates the input values of aggregate function calls and supports cross-row concatenation. - - Parameter: xml - - Return value type: xml - - Example: - - ```sql - MogDB=# CREATE TABLE xmltest ( - id int, - data xml - ); - MogDB=# INSERT INTO xmltest VALUES (1, 'one'); - INSERT 0 1 - MogDB=# INSERT INTO xmltest VALUES (2, 'two'); - INSERT 0 1 - MogDB=# SELECT xmlagg(data) FROM xmltest; - xmlagg - -------------------------------------- - onetwo - (1 row) - ``` - -- xmlexists(text passing [BY REF] xml [BY REF]) - - Description: evaluate an XPath 1.0 expression (the first parameter ), and use the passed XML value as its context item. If the evaluation result produces an empty node set, the function returns false. If it produces any other value, it returns true. If any parameter is null, the function returns null. The non-null value passed as a context item must be an XML document, not a content fragment or any non-XML value. - - Parameter: xml - - Return value type: bool - - Example: - - ```sql - MogDB=# SELECT xmlexists('//town[text() = ''Toronto'']' PASSING BY REF 'TorontoOttawa'); - xmlexists - ------------ - t - (1 row) - ``` - -- xml_is_well_formed(text) - - Description: Check whether the text is in the correct XML type format and the return value is of Boolean type. - - Parameter: text - - Return value type: bool - - Example: - - ```sql - MogDB=# SELECT xml_is_well_formed('<>'); - xml_is_well_formed - -------------------- - f - (1 row) - ``` - -- xml_is_well_formed_document(text) - - Description: Check whether the text is in the correct XML type format and the return value is of Boolean type. - - Parameter: text - - Return value type: bool - - Example: - - ```sql - MogDB=# SELECT xml_is_well_formed_document('bar'); - xml_is_well_formed_document - ----------------------------- - t - (1 row) - ``` - -- xml_is_well_formed_content(text) - - Description: Check whether the text is in the correct XML type format and the return value is of Boolean type. - - Parameter: text - - Return value type: bool - - Example: - - ```sql - MogDB=# select xml_is_well_formed_content('k'); - xml_is_well_formed_content - ---------------------------- - t - (1 row) - ``` - -- xpath(xpath, xml [, nsarray]) - - Description: The XPath 1.0 expression xpath (a text value ) is calculated on the XML value xml. It returns an array of XML values, which corresponds to the node collection generated by the XPath expression. If the XPath expression returns a scalar value instead of a node collection, it will return an array of single elements. - - The second parameter must be a well-formed XML document. Specifically, it must have a single root node element. - - The third optional parameter of this function is an array of namespace mappings. This array should be a two-dimensional text array with the length of its second axis equal to 2 (that is, it should be an array of arrays, each of which is composed of exactly 2 elements). The first element of each array item is the name (alias) of the namespace, and the second element is the URI of the namespace. The aliases provided in this array are not required to be the same as those used in the XML document itself (in other words, aliases are local in the XML document and in the xpath function environment). - - Return value type: xml - - Example: - - ```sql - MogDB=# SELECT xpath('/my:a/text()', 'test',ARRAY[ARRAY['my', 'http://example.com']]); - xpath - -------- - {test} - (1 row) - ``` - -- xpath_exists(xpath, xml [, nsarray]) - - Description: This function is a special form of xpath function. This function does not return a single XML value that satisfies the XPath 1.0 expression. It returns a Boolean value indicating whether the query is satisfied (specifically, whether it produces any value other than an empty node set ). This function is equivalent to the standard XMLEXISTS predicate, but it also provides support for a namespace mapping parameter. - - Return value type: bool - - Example: - - ```sql - MogDB=# SELECT xpath_exists('/my:a/text()', 'test',ARRAY[ARRAY['my', 'http://example.com']]); - xpath_exists - -------------- - t - (1 row) - ``` - -- query_to_xml(query text, nulls boolean, tableforest boolean, targetns text) - - Description: This function maps the contents of the relational table to XML values, which can be understood as the export function of XML. - - Return value type: xml - -- query_to_xmlschema(query text, nulls boolean, tableforest boolean, targetns text) - - Description: returns XML schema documents, which describe the mapping performed by the corresponding functions above. - -- query_to_xml_and_xmlschema(query text, nulls boolean, tableforest boolean, targetns text) - - Description: Generate XML data mapping and corresponding XML schema, and link the generated results together in a document. - -- cursor_to_xml(cursor refcursor, count int, nulls boolean,tableforest boolean, targetns text) - - Description: This function maps the contents of the relational table to XML values, which can be understood as the export function of XML. - - Return value type: xml - -- cursor_to_xmlschema(cursor refcursor, nulls boolean, tableforest boolean, targetns text) - - Description: returns XML schema documents, which describe the mapping performed by the corresponding functions above. - - Return value type: xml - -- schema_to_xml(schema name, nulls boolean, tableforest boolean, targetns text) - - Description: Map tables in the schema to XML values. - - Return value type: xml - -- schema_to_xmlschema(schema name, nulls boolean, tableforest boolean, targetns text) - - Description: Map tables in the schema to XML schema documents. - - Return value type: xml - -- schema_to_xml_and_xmlschema(schema name, nulls boolean, tableforest boolean, targetns text) - - Description: Map tables in the schema to XML values and schema documents. - - Return value type: xml - -- database_to_xml(nulls boolean, tableforest boolean, targetns text) - - Description: Map database tables to XML values. - - Return value type: xml - -- database_to_xmlschema(nulls boolean, tableforest boolean, targetns text) - - Description: Map database tables to XML schema documents. - - Return value type: xml - -- database_to_xml_and_xmlschema(nulls boolean, tableforest boolean, targetns text) - - Description: Map database tables to XML values and schema documents. - - Return value type: xml - -- table_to_xml(tbl regclass, nulls boolean, tableforest boolean, targetns text) - - Description: This function maps the contents of the relational table to XML values, which can be understood as the export function of XML. - - Return value type: xml - -- table_to_xmlschema(tbl regclass, nulls boolean, tableforest boolean, targetns text) - - Description: returns XML schema documents, which describe the mapping performed by the corresponding functions above. - - Return value type: xml - -- table_to_xml_and_xmlschema(tbl regclass, nulls boolean, tableforest boolean, targetns text) - - Description: Generate XML data mapping and corresponding XML schema, and link the generated results together in a document. - - > ![img](https://cdn-mogdb.enmotech.com/docs-media/icon/icon-note.gif) **explain:** - > - > - Xpath related functions only support xpath () and xpath_ Exists (). Because it uses the xpath language to query XML documents, these functions rely on the libxml2 library, which is only available in Xpath 1.0, so XPath is limited to 1.0. +--- +title: XML Types +summary: XML Types +author: zhang cuiping +date: 2023-04-07 +--- + +# XML Types + +The following functions are inherited from the open source PG9.2. + +- xmlparse ( { DOCUMENT | CONTENT } value) + + Description: Use the function xmlparse to generate xml-type values from character data. + + Parameter: data type is text + + Return value type: xml + + Example: + + ```sql + MogDB=# SELECT XMLPARSE (DOCUMENT 'Manual...'); + xmlparse + ---------------------------------------------------------- + Manual... + (1 row) + MogDB=# SELECT XMLPARSE (CONTENT 'abcbarfoo'); + xmlparse + --------------------------------- + abcbarfoo + (1 row) + ``` + +- xmlserialize( { DOCUMENT | CONTENT } value AS type ) + + Description: Use the function xmlserialize to generate a string from xml. + + Parameter: The type can be character, character varying or text or a variant of one of them. + + Return value type: Determined by the type of data entered in the function + + Example: + + ```sql + MogDB=# SELECT XMLSERIALIZE(CONTENT 'good' AS CHAR(10)); + xmlserialize + -------------- + good + (1 row) + MogDB=# SELECT xmlserialize(DOCUMENT 'bad' as text); + xmlserialize + ------------------ + bad + (1 row) + ``` + + > ![img](https://cdn-mogdb.enmotech.com/docs-media/icon/icon-note.gif) **NOTE:** + > + > - When a string value is converted to an xml type without XMLPARSE or XMLSERIALIZE, the selection of DOCUMENT and CONTENT is determined by the “XML option” session configuration parameter, which can be set by standard commands: + > + > ``` + > SET XML OPTION { DOCUMENT | CONTENT }; + > ``` + > + > Or use a similar syntax to set: + > + > ``` + > SET xmloption TO { DOCUMENT | CONTENT }; + > ``` + +- xmlcomment(text) + + Description: Creates an XML value and contains an XML comment with the specified text as the content. The text does not contain the “–” character and does not exist at the end of the “-” character. It conforms to the format requirements of XML comments. And when the parameter is empty, the result is also empty. + + Parameter: data type is text. + + Return value type: xml + + Example: + + ```sql + MogDB=# SELECT xmlcomment('hello'); + xmlcomment + -------------- + + ``` + +- xmlconcat(xml[, …]) + + Description: concatenates a list consisting of a single XML value into a single value, which contains an XML content fragment. The null value will be ignored, and the result will be null only when all parameters are null. + + Parameter: data type is xml. + + Return value type: xml + + Example: + + ```sql + MogDB=# SELECT xmlconcat('', 'foo'); + xmlconcat + ---------------------- + foo + ``` + +- xmlelement(name name [, xmlattributes(value [AS attname] [, … ])] [, content, …]) + + Description: Generates an XML element with the given name, attribute, and content. + + Return value type: xml + + Example: + + ```sql + MogDB=# SELECT xmlelement(name foo); + xmlelement + ------------ + + ``` + +- xmlforest(content [AS name] [, …]) + + Description: Generates an XML sequence of elements with a given name and content. + + Return value type: xml + + Example: + + ```sql + MogDB=# SELECT xmlforest('abc' AS foo, 123 AS bar); + xmlforest + ------------------------------ + abc123 + ``` + +- xmlpi(name target [, content]) + + Description: Creates an XML processing instruction. If the content is not empty, the content cannot contain character sequences. + + Return value type: xml + + Example: + + ```sql + MogDB=# SELECT xmlpi(name php, 'echo "hello world";'); + xmlpi + ----------------------------- + + ``` + +- xmlroot(xml, version text | no value [, standalone yes|no|no value]) + + Description: Modify the attribute of the root node of an XML value. If a version is specified, it will replace the value in the version declaration of the root node. If an independent setting is specified, it will replace the value in the independent declaration of the root node. + + Example: + + ```sql + MogDB=# SELECT xmlroot('abc',version '1.0', standalone yes); + xmlroot + ---------------------------------------- + + abc + ``` + +- xmlagg(xml) + + Description: This function is an aggregate function. It concatenates the input values of aggregate function calls and supports cross-row concatenation. + + Parameter: xml + + Return value type: xml + + Example: + + ```sql + MogDB=# CREATE TABLE xmltest ( + id int, + data xml + ); + MogDB=# INSERT INTO xmltest VALUES (1, 'one'); + INSERT 0 1 + MogDB=# INSERT INTO xmltest VALUES (2, 'two'); + INSERT 0 1 + MogDB=# SELECT xmlagg(data) FROM xmltest; + xmlagg + -------------------------------------- + onetwo + (1 row) + ``` + +- xmlexists(text passing [BY REF] xml [BY REF]) + + Description: evaluate an XPath 1.0 expression (the first parameter ), and use the passed XML value as its context item. If the evaluation result produces an empty node set, the function returns false. If it produces any other value, it returns true. If any parameter is null, the function returns null. The non-null value passed as a context item must be an XML document, not a content fragment or any non-XML value. + + Parameter: xml + + Return value type: bool + + Example: + + ```sql + MogDB=# SELECT xmlexists('//town[text() = ''Toronto'']' PASSING BY REF 'TorontoOttawa'); + xmlexists + ------------ + t + (1 row) + ``` + +- xml_is_well_formed(text) + + Description: Check whether the text is in the correct XML type format and the return value is of Boolean type. + + Parameter: text + + Return value type: bool + + Example: + + ```sql + MogDB=# SELECT xml_is_well_formed('<>'); + xml_is_well_formed + -------------------- + f + (1 row) + ``` + +- xml_is_well_formed_document(text) + + Description: Check whether the text is in the correct XML type format and the return value is of Boolean type. + + Parameter: text + + Return value type: bool + + Example: + + ```sql + MogDB=# SELECT xml_is_well_formed_document('bar'); + xml_is_well_formed_document + ----------------------------- + t + (1 row) + ``` + +- xml_is_well_formed_content(text) + + Description: Check whether the text is in the correct XML type format and the return value is of Boolean type. + + Parameter: text + + Return value type: bool + + Example: + + ```sql + MogDB=# select xml_is_well_formed_content('k'); + xml_is_well_formed_content + ---------------------------- + t + (1 row) + ``` + +- xpath(xpath, xml [, nsarray]) + + Description: The XPath 1.0 expression xpath (a text value ) is calculated on the XML value xml. It returns an array of XML values, which corresponds to the node collection generated by the XPath expression. If the XPath expression returns a scalar value instead of a node collection, it will return an array of single elements. + + The second parameter must be a well-formed XML document. Specifically, it must have a single root node element. + + The third optional parameter of this function is an array of namespace mappings. This array should be a two-dimensional text array with the length of its second axis equal to 2 (that is, it should be an array of arrays, each of which is composed of exactly 2 elements). The first element of each array item is the name (alias) of the namespace, and the second element is the URI of the namespace. The aliases provided in this array are not required to be the same as those used in the XML document itself (in other words, aliases are local in the XML document and in the xpath function environment). + + Return value type: xml + + Example: + + ```sql + MogDB=# SELECT xpath('/my:a/text()', 'test',ARRAY[ARRAY['my', 'http://example.com']]); + xpath + -------- + {test} + (1 row) + ``` + +- xpath_exists(xpath, xml [, nsarray]) + + Description: This function is a special form of xpath function. This function does not return a single XML value that satisfies the XPath 1.0 expression. It returns a Boolean value indicating whether the query is satisfied (specifically, whether it produces any value other than an empty node set ). This function is equivalent to the standard XMLEXISTS predicate, but it also provides support for a namespace mapping parameter. + + Return value type: bool + + Example: + + ```sql + MogDB=# SELECT xpath_exists('/my:a/text()', 'test',ARRAY[ARRAY['my', 'http://example.com']]); + xpath_exists + -------------- + t + (1 row) + ``` + +- query_to_xml(query text, nulls boolean, tableforest boolean, targetns text) + + Description: This function maps the contents of the relational table to XML values, which can be understood as the export function of XML. + + Return value type: xml + +- query_to_xmlschema(query text, nulls boolean, tableforest boolean, targetns text) + + Description: returns XML schema documents, which describe the mapping performed by the corresponding functions above. + +- query_to_xml_and_xmlschema(query text, nulls boolean, tableforest boolean, targetns text) + + Description: Generate XML data mapping and corresponding XML schema, and link the generated results together in a document. + +- cursor_to_xml(cursor refcursor, count int, nulls boolean,tableforest boolean, targetns text) + + Description: This function maps the contents of the relational table to XML values, which can be understood as the export function of XML. + + Return value type: xml + +- cursor_to_xmlschema(cursor refcursor, nulls boolean, tableforest boolean, targetns text) + + Description: returns XML schema documents, which describe the mapping performed by the corresponding functions above. + + Return value type: xml + +- schema_to_xml(schema name, nulls boolean, tableforest boolean, targetns text) + + Description: Map tables in the schema to XML values. + + Return value type: xml + +- schema_to_xmlschema(schema name, nulls boolean, tableforest boolean, targetns text) + + Description: Map tables in the schema to XML schema documents. + + Return value type: xml + +- schema_to_xml_and_xmlschema(schema name, nulls boolean, tableforest boolean, targetns text) + + Description: Map tables in the schema to XML values and schema documents. + + Return value type: xml + +- database_to_xml(nulls boolean, tableforest boolean, targetns text) + + Description: Map database tables to XML values. + + Return value type: xml + +- database_to_xmlschema(nulls boolean, tableforest boolean, targetns text) + + Description: Map database tables to XML schema documents. + + Return value type: xml + +- database_to_xml_and_xmlschema(nulls boolean, tableforest boolean, targetns text) + + Description: Map database tables to XML values and schema documents. + + Return value type: xml + +- table_to_xml(tbl regclass, nulls boolean, tableforest boolean, targetns text) + + Description: This function maps the contents of the relational table to XML values, which can be understood as the export function of XML. + + Return value type: xml + +- table_to_xmlschema(tbl regclass, nulls boolean, tableforest boolean, targetns text) + + Description: returns XML schema documents, which describe the mapping performed by the corresponding functions above. + + Return value type: xml + +- table_to_xml_and_xmlschema(tbl regclass, nulls boolean, tableforest boolean, targetns text) + + Description: Generate XML data mapping and corresponding XML schema, and link the generated results together in a document. + + > ![img](https://cdn-mogdb.enmotech.com/docs-media/icon/icon-note.gif) **explain:** + > + > - Xpath related functions only support xpath () and xpath_ Exists (). Because it uses the xpath language to query XML documents, these functions rely on the libxml2 library, which is only available in Xpath 1.0, so XPath is limited to 1.0. > - Xquery, xml extension, and xslt are not supported. \ No newline at end of file diff --git a/product/en/docs-mogdb/v5.0/reference-guide/guc-parameters/thread-pool.md b/product/en/docs-mogdb/v5.0/reference-guide/guc-parameters/thread-pool.md index 8f3a08a1491f5cf10d164cd1a3c231fceaadf276..0edf98f03b713cd0bf71302d845de2efc8c604c2 100644 --- a/product/en/docs-mogdb/v5.0/reference-guide/guc-parameters/thread-pool.md +++ b/product/en/docs-mogdb/v5.0/reference-guide/guc-parameters/thread-pool.md @@ -1,38 +1,40 @@ ---- -title: Thread Pool -summary: Thread Pool -author: Zhang Cuiping -date: 2021-06-15 ---- - -# Thread Pool - -## enable_thread_pool - -**Parameter description**: Specifies whether to enable the thread pool function. 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 thread pool function is enabled. -- **off** indicates that the thread pool function is disabled. - -**Default value**: off - -## thread_pool_attr - -**Parameter description**: Specifies the detailed attributes of the thread pool function. This parameter is valid only when **enable_thread_pool** is set to **on**. 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. - -This parameter consists of three parts: thread_num, group_num, and cpubind_info. The meanings of the three parts are as follows: - -- **thread_num** indicates the total number of threads in the thread pool. The value ranges from 0 to 4096. The value **0** indicates that the database automatically configures the number of threads in the thread pool based on the number of CPU cores. If the value is greater than **0**, the number of threads in the thread pool is the same as the value of **thread_num**. -- **group_num** indicates the number of thread groups in the thread pool. The value ranges from 0 to 64. The value **0** indicates that the database automatically configures the number of thread groups in the thread pool based on the number of NUMA groups. If the value is greater than **0**, the number of thread groups in the thread pool is the same as the value of **group_num**. -- **cpubind_info** indicates whether the thread pool is bound to a core. The available configuration modes are as follows: - 1. **'(nobind)'**: The thread is not bound to a core. - 2. **'(allbind)'**: Use all CPU cores that can be queried in the current system to bind threads. - 3. **'(nodebind: 1, 2)'**: Use the CPU cores in NUMA groups 1 and 2 to bind threads. - 4. **'(cpubind: 0-30)'**: Use the CPU cores 0 to 30 to bind threads. This parameter is case-insensitive. - 5. **'(numabind: 0-30)'**: Use CPU cores 0 to 30 in the NUMA group to bind threads. This parameter is case-insensitive. - -**Default value**: **'16, 2, (nobind)'** +--- +title: Thread Pool +summary: Thread Pool +author: Zhang Cuiping +date: 2021-06-15 +--- + +# Thread Pool + +## enable_thread_pool + +**Parameter description**: Specifies whether to enable the thread pool function. 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 thread pool function is enabled. +- **off** indicates that the thread pool function is disabled. + +**Note**:The HA port is required for logical replication to connect to the database when thread pool is enabled. + +**Default value**: off + +## thread_pool_attr + +**Parameter description**: Specifies the detailed attributes of the thread pool function. This parameter is valid only when **enable_thread_pool** is set to **on**. 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. + +This parameter consists of three parts: thread_num, group_num, and cpubind_info. The meanings of the three parts are as follows: + +- **thread_num** indicates the total number of threads in the thread pool. The value ranges from 0 to 4096. The value **0** indicates that the database automatically configures the number of threads in the thread pool based on the number of CPU cores. If the value is greater than **0**, the number of threads in the thread pool is the same as the value of **thread_num**. +- **group_num** indicates the number of thread groups in the thread pool. The value ranges from 0 to 64. The value **0** indicates that the database automatically configures the number of thread groups in the thread pool based on the number of NUMA groups. If the value is greater than **0**, the number of thread groups in the thread pool is the same as the value of **group_num**. +- **cpubind_info** indicates whether the thread pool is bound to a core. The available configuration modes are as follows: + 1. **'(nobind)'**: The thread is not bound to a core. + 2. **'(allbind)'**: Use all CPU cores that can be queried in the current system to bind threads. + 3. **'(nodebind: 1, 2)'**: Use the CPU cores in NUMA groups 1 and 2 to bind threads. + 4. **'(cpubind: 0-30)'**: Use the CPU cores 0 to 30 to bind threads. This parameter is case-insensitive. + 5. **'(numabind: 0-30)'**: Use CPU cores 0 to 30 in the NUMA group to bind threads. This parameter is case-insensitive. + +**Default value**: **'16, 2, (nobind)'** diff --git a/product/en/docs-mogdb/v5.0/reference-guide/system-catalogs-and-system-views/system-catalogs/STATEMENT_HISTORY.md b/product/en/docs-mogdb/v5.0/reference-guide/system-catalogs-and-system-views/system-catalogs/STATEMENT_HISTORY.md index 9dd7df241b3a40432f40f984e8c8052b56f1961d..a923c3af649992894cda524d1db6093490d75bff 100644 --- a/product/en/docs-mogdb/v5.0/reference-guide/system-catalogs-and-system-views/system-catalogs/STATEMENT_HISTORY.md +++ b/product/en/docs-mogdb/v5.0/reference-guide/system-catalogs-and-system-views/system-catalogs/STATEMENT_HISTORY.md @@ -71,3 +71,7 @@ The constraints on the query of this system catalog are as follows: | details | bytea | List of wait events and statement lock events.
When the value of the record level is L0, the wait events starts to be recorded to the list. Statistics about the wait event of the current statement are displayed. For details about events, see [PG_THREAD_WAIT_STATUS](../system-views/PG_THREAD_WAIT_STATUS.md).
When the record level is L2, the statement lock events starts to be recorded to the list. The events are recorded in time sequence. The number of records is affected by the track\_stmt\_details\_size parameter.
Events include:
- Start locking.
- Complete locking.
- Start lock waiting.
- Complete lock waiting.
- Start unlocking.
- Complete unlocking.
- Start lightweight lock waiting.
- Complete lightweight lock waiting. | L2 | | is_slow_sql | boolean | Whether the SQL statement is a slow SQL statement.
- **t** (true): yes
- **f** (false): no | L0 | | trace_id | text | Driver-specific trace ID, which is associated with an application request. | L0 | + +> **Note**: +> +> To facilitate cleanup of this table, the [TRUNCATE](../../sql-syntax/TRUNCATE.md) command is allowed to empty the table. \ No newline at end of file diff --git a/product/en/docs-mogdb/v5.0/reference-guide/tool-reference/server-tools/gs_check.md b/product/en/docs-mogdb/v5.0/reference-guide/tool-reference/server-tools/gs_check.md index c7b77510148857f81d4b5065e8ce74a95821c994..cdb1f73aa9505f21fcc4e9e919dadaba1a8178cb 100644 --- a/product/en/docs-mogdb/v5.0/reference-guide/tool-reference/server-tools/gs_check.md +++ b/product/en/docs-mogdb/v5.0/reference-guide/tool-reference/server-tools/gs_check.md @@ -348,14 +348,6 @@ date: 2021-06-07 No - - CheckDropCache - - Checks whether there is a dropcache process running on each node. If yes, - this item passes the check. Otherwise, this item fails the check. - - No - CheckFilehandle @@ -1347,7 +1339,7 @@ Check result of a scenario: ```bash [perfadm@SIA1000131072 Check]$ gs_check -e inspect Parsing the check items config file successfully -The below items require root privileges to execute:[CheckBlockdev CheckIOConfigure CheckMTU CheckRXTX CheckMultiQueue CheckFirewall CheckSshdService CheckSshdConfig CheckCrondService CheckMaxProcMemory CheckBootItems CheckFilehandle CheckNICModel CheckDropCache] +The below items require root privileges to execute:[CheckBlockdev CheckIOConfigure CheckMTU CheckRXTX CheckMultiQueue CheckFirewall CheckSshdService CheckSshdConfig CheckCrondService CheckMaxProcMemory CheckBootItems CheckFilehandle CheckNICModel] Please enter root privileges user[root]: Please enter password for user[root]: Check root password connection successfully diff --git a/product/en/docs-mogdb/v5.2/reference-guide/functions-and-operators/statistics-information-functions/statistics-information-functions-1.md b/product/en/docs-mogdb/v5.2/reference-guide/functions-and-operators/statistics-information-functions/statistics-information-functions-1.md index 2263c005b65c784ff2cacc511676979f469b6771..dff20a078074bb9dfb3a84087e3d398fc2073600 100644 --- a/product/en/docs-mogdb/v5.2/reference-guide/functions-and-operators/statistics-information-functions/statistics-information-functions-1.md +++ b/product/en/docs-mogdb/v5.2/reference-guide/functions-and-operators/statistics-information-functions/statistics-information-functions-1.md @@ -450,9 +450,9 @@ Statistics information functions are divided into the following two categories: Return type: bigint -- pg_total_autovac_tuples(bool,bool) +- pg_total_autovac_tuples(bool) - Description: Returns tuple records related to the total autovac, such as **nodename**, **nspname**, **relname**, and tuple IUDs. The input parameters specify whether to query **relation** and **local** information, respectively. + Description: Returns tuple records related to the total autovac, such as **nodename**, **nspname**, **relname**, and tuple IUDs. The input parameters specify whether to query **relation** information. Return type: setofrecord diff --git a/product/en/docs-mogdb/v6.0/developer-guide/mysql-compatibility-description/dolphin-extension/dolphin-syntax/sql-reference/sql-syntax/dolphin-use-db_name.md b/product/en/docs-mogdb/v6.0/developer-guide/mysql-compatibility-description/dolphin-extension/dolphin-syntax/sql-reference/sql-syntax/dolphin-use-db_name.md index 1ab93d29ecefc386c349e587946af7f59dfb8cbc..be7bcdb5108a4d558a1b37320dfeb793d05e91ca 100644 --- a/product/en/docs-mogdb/v6.0/developer-guide/mysql-compatibility-description/dolphin-extension/dolphin-syntax/sql-reference/sql-syntax/dolphin-use-db_name.md +++ b/product/en/docs-mogdb/v6.0/developer-guide/mysql-compatibility-description/dolphin-extension/dolphin-syntax/sql-reference/sql-syntax/dolphin-use-db_name.md @@ -9,7 +9,7 @@ date: 2022-10-24 ## Function -The USE db\_name statement uses the db\_name database as the default (current) database for subsequent statements. The database remains the default database until the end of the paragraph, or until a different USE statement is published. +The USE db_name statement uses the db_name schema as the default (current) schema for subsequent statements. The schema remains the default schema until the end of the paragraph, or until a different USE statement is published. ## Precautions @@ -25,12 +25,12 @@ USE db_name - **db_name** - Database name + Schema name ## Examples ```sql ---Switch to the db1 database. +--Switch to the db1 schema. MogDB=# USE db1; SET MogDB=# CREATE TABLE test(a text); @@ -38,7 +38,7 @@ CREATE TABLE MogDB=# INSERT INTO test VALUES('db1'); INSERT 0 1 ---Switch to the db2 database. +--Switch to the db2 schema. MogDB=# USE db2; SET MogDB=# CREATE TABLE test(a text); @@ -63,7 +63,7 @@ MogDB=# select a from test; db2 (1 row) ---Switch to the db1 database. +--Switch to the db1 schema. MogDB=# USE db1; SET MogDB=# select a from test; diff --git a/product/en/docs-mogdb/v6.0/reference-guide/functions-and-operators/statistics-information-functions/statistics-information-functions-1.md b/product/en/docs-mogdb/v6.0/reference-guide/functions-and-operators/statistics-information-functions/statistics-information-functions-1.md index 2263c005b65c784ff2cacc511676979f469b6771..dff20a078074bb9dfb3a84087e3d398fc2073600 100644 --- a/product/en/docs-mogdb/v6.0/reference-guide/functions-and-operators/statistics-information-functions/statistics-information-functions-1.md +++ b/product/en/docs-mogdb/v6.0/reference-guide/functions-and-operators/statistics-information-functions/statistics-information-functions-1.md @@ -450,9 +450,9 @@ Statistics information functions are divided into the following two categories: Return type: bigint -- pg_total_autovac_tuples(bool,bool) +- pg_total_autovac_tuples(bool) - Description: Returns tuple records related to the total autovac, such as **nodename**, **nspname**, **relname**, and tuple IUDs. The input parameters specify whether to query **relation** and **local** information, respectively. + Description: Returns tuple records related to the total autovac, such as **nodename**, **nspname**, **relname**, and tuple IUDs. The input parameters specify whether to query **relation** information. Return type: setofrecord diff --git a/product/en/docs-mogdb/v6.0/reference-guide/functions-and-operators/xml-functions.md b/product/en/docs-mogdb/v6.0/reference-guide/functions-and-operators/xml-functions.md index 1d273a3018a63f4982584f4f745f3c87d63fe320..c4300f7e7eb90f361ff316add51b9857f9f22df6 100644 --- a/product/en/docs-mogdb/v6.0/reference-guide/functions-and-operators/xml-functions.md +++ b/product/en/docs-mogdb/v6.0/reference-guide/functions-and-operators/xml-functions.md @@ -38,7 +38,7 @@ The following functions are inherited from the open source PG9.2. Parameter: The type can be character, character varying or text or a variant of one of them. - Return value type: xml + Return value type: Determined by the type of data entered in the function Example: diff --git a/product/en/docs-mogdb/v6.0/reference-guide/guc-parameters/thread-pool.md b/product/en/docs-mogdb/v6.0/reference-guide/guc-parameters/thread-pool.md index 74e2bba7af261f6ef4c0f9a84f7da90978814a76..0edf98f03b713cd0bf71302d845de2efc8c604c2 100644 --- a/product/en/docs-mogdb/v6.0/reference-guide/guc-parameters/thread-pool.md +++ b/product/en/docs-mogdb/v6.0/reference-guide/guc-parameters/thread-pool.md @@ -16,6 +16,8 @@ date: 2021-06-15 - **on** indicates that the thread pool function is enabled. - **off** indicates that the thread pool function is disabled. +**Note**:The HA port is required for logical replication to connect to the database when thread pool is enabled. + **Default value**: off ## thread_pool_attr diff --git a/product/en/docs-mogdb/v6.0/reference-guide/system-catalogs-and-system-views/system-catalogs/STATEMENT_HISTORY.md b/product/en/docs-mogdb/v6.0/reference-guide/system-catalogs-and-system-views/system-catalogs/STATEMENT_HISTORY.md index 9dd7df241b3a40432f40f984e8c8052b56f1961d..a923c3af649992894cda524d1db6093490d75bff 100644 --- a/product/en/docs-mogdb/v6.0/reference-guide/system-catalogs-and-system-views/system-catalogs/STATEMENT_HISTORY.md +++ b/product/en/docs-mogdb/v6.0/reference-guide/system-catalogs-and-system-views/system-catalogs/STATEMENT_HISTORY.md @@ -71,3 +71,7 @@ The constraints on the query of this system catalog are as follows: | details | bytea | List of wait events and statement lock events.
When the value of the record level is L0, the wait events starts to be recorded to the list. Statistics about the wait event of the current statement are displayed. For details about events, see [PG_THREAD_WAIT_STATUS](../system-views/PG_THREAD_WAIT_STATUS.md).
When the record level is L2, the statement lock events starts to be recorded to the list. The events are recorded in time sequence. The number of records is affected by the track\_stmt\_details\_size parameter.
Events include:
- Start locking.
- Complete locking.
- Start lock waiting.
- Complete lock waiting.
- Start unlocking.
- Complete unlocking.
- Start lightweight lock waiting.
- Complete lightweight lock waiting. | L2 | | is_slow_sql | boolean | Whether the SQL statement is a slow SQL statement.
- **t** (true): yes
- **f** (false): no | L0 | | trace_id | text | Driver-specific trace ID, which is associated with an application request. | L0 | + +> **Note**: +> +> To facilitate cleanup of this table, the [TRUNCATE](../../sql-syntax/TRUNCATE.md) command is allowed to empty the table. \ No newline at end of file diff --git a/product/en/docs-mogdb/v6.0/reference-guide/tool-reference/server-tools/gs_check.md b/product/en/docs-mogdb/v6.0/reference-guide/tool-reference/server-tools/gs_check.md index c7b77510148857f81d4b5065e8ce74a95821c994..cdb1f73aa9505f21fcc4e9e919dadaba1a8178cb 100644 --- a/product/en/docs-mogdb/v6.0/reference-guide/tool-reference/server-tools/gs_check.md +++ b/product/en/docs-mogdb/v6.0/reference-guide/tool-reference/server-tools/gs_check.md @@ -348,14 +348,6 @@ date: 2021-06-07 No - - CheckDropCache - - Checks whether there is a dropcache process running on each node. If yes, - this item passes the check. Otherwise, this item fails the check. - - No - CheckFilehandle @@ -1347,7 +1339,7 @@ Check result of a scenario: ```bash [perfadm@SIA1000131072 Check]$ gs_check -e inspect Parsing the check items config file successfully -The below items require root privileges to execute:[CheckBlockdev CheckIOConfigure CheckMTU CheckRXTX CheckMultiQueue CheckFirewall CheckSshdService CheckSshdConfig CheckCrondService CheckMaxProcMemory CheckBootItems CheckFilehandle CheckNICModel CheckDropCache] +The below items require root privileges to execute:[CheckBlockdev CheckIOConfigure CheckMTU CheckRXTX CheckMultiQueue CheckFirewall CheckSshdService CheckSshdConfig CheckCrondService CheckMaxProcMemory CheckBootItems CheckFilehandle CheckNICModel] Please enter root privileges user[root]: Please enter password for user[root]: Check root password connection successfully diff --git a/product/zh/docs-mogdb/v1.1/reference-guide/functions-and-operators/25-statistics-information-functions.md b/product/zh/docs-mogdb/v1.1/reference-guide/functions-and-operators/25-statistics-information-functions.md index 468e864d15199e8837d4bb6a68ffa9401814f061..dde367a10ebfa2971205fda83e5f6aaafabcfec1 100644 --- a/product/zh/docs-mogdb/v1.1/reference-guide/functions-and-operators/25-statistics-information-functions.md +++ b/product/zh/docs-mogdb/v1.1/reference-guide/functions-and-operators/25-statistics-information-functions.md @@ -418,9 +418,9 @@ date: 2021-04-20 返回值类型: bigint -- pg_total_autovac_tuples(bool,bool) +- pg_total_autovac_tuples(bool) - 描述: 返回total autovac相关的tuple记录,如nodename,nspname,relname以及各类tuple的IUD信息,入参分别为: 是否查询relation信息,是否查询local信息。 + 描述: 返回total autovac相关的tuple记录,如nodename,nspname,relname以及各类tuple的IUD信息,入参分别为: 是否查询relation信息。 返回值类型: setofrecord diff --git a/product/zh/docs-mogdb/v1.1/reference-guide/system-catalogs-and-system-views/system-catalogs/STATEMENT_HISTORY.md b/product/zh/docs-mogdb/v1.1/reference-guide/system-catalogs-and-system-views/system-catalogs/STATEMENT_HISTORY.md index da9048eb342fc36fdefc11dfa96b4a0b48fa714f..7666d3e16ea02723679589c6cd0c8cfec6ae6888 100644 --- a/product/zh/docs-mogdb/v1.1/reference-guide/system-catalogs-and-system-views/system-catalogs/STATEMENT_HISTORY.md +++ b/product/zh/docs-mogdb/v1.1/reference-guide/system-catalogs-and-system-views/system-catalogs/STATEMENT_HISTORY.md @@ -64,3 +64,7 @@ date: 2021-04-19 | lwlock_wait_time | bigint | 轻量级等锁时间。 | | details | bytea | 语句锁事件的列表,该列表按时间书序记录事件,记录的数量受参数track_stmt_details_size的影响。
事件包括:
- 加锁开始
- 加锁结束
- 等锁开始
- 等锁结束
- 放锁开始
- 放锁结束
- 轻量级等锁开始
- 轻量级等锁结束 | | is_slow_sql | boolean | 该SQL是否为slow SQL。 | + +> **说明**: +> +> 为了方便对该表进行清理,允许使用[TRUNCATE](../../sql-syntax/TRUNCATE.md)命令清空该表。 \ No newline at end of file diff --git a/product/zh/docs-mogdb/v2.0/reference-guide/functions-and-operators/25-statistics-information-functions.md b/product/zh/docs-mogdb/v2.0/reference-guide/functions-and-operators/25-statistics-information-functions.md index 1431df31031123acc1a43a2d295defec4d6ffeaa..dc0603346170273a528ce4ad121d2c571d4fd870 100644 --- a/product/zh/docs-mogdb/v2.0/reference-guide/functions-and-operators/25-statistics-information-functions.md +++ b/product/zh/docs-mogdb/v2.0/reference-guide/functions-and-operators/25-statistics-information-functions.md @@ -424,9 +424,9 @@ date: 2021-04-20 返回值类型:bigint -- pg_total_autovac_tuples(bool,bool) +- pg_total_autovac_tuples(bool) - 描述:返回total autovac相关的tuple记录,如nodename,nspname,relname以及各类tuple的IUD信息,入参分别为:是否查询relation信息,是否查询local信息。 + 描述:返回total autovac相关的tuple记录,如nodename,nspname,relname以及各类tuple的IUD信息,入参分别为:是否查询relation信息。 返回值类型:setofrecord diff --git a/product/zh/docs-mogdb/v2.0/reference-guide/system-catalogs-and-system-views/system-catalogs/STATEMENT_HISTORY.md b/product/zh/docs-mogdb/v2.0/reference-guide/system-catalogs-and-system-views/system-catalogs/STATEMENT_HISTORY.md index da9048eb342fc36fdefc11dfa96b4a0b48fa714f..7666d3e16ea02723679589c6cd0c8cfec6ae6888 100644 --- a/product/zh/docs-mogdb/v2.0/reference-guide/system-catalogs-and-system-views/system-catalogs/STATEMENT_HISTORY.md +++ b/product/zh/docs-mogdb/v2.0/reference-guide/system-catalogs-and-system-views/system-catalogs/STATEMENT_HISTORY.md @@ -64,3 +64,7 @@ date: 2021-04-19 | lwlock_wait_time | bigint | 轻量级等锁时间。 | | details | bytea | 语句锁事件的列表,该列表按时间书序记录事件,记录的数量受参数track_stmt_details_size的影响。
事件包括:
- 加锁开始
- 加锁结束
- 等锁开始
- 等锁结束
- 放锁开始
- 放锁结束
- 轻量级等锁开始
- 轻量级等锁结束 | | is_slow_sql | boolean | 该SQL是否为slow SQL。 | + +> **说明**: +> +> 为了方便对该表进行清理,允许使用[TRUNCATE](../../sql-syntax/TRUNCATE.md)命令清空该表。 \ No newline at end of file diff --git a/product/zh/docs-mogdb/v2.0/reference-guide/tool-reference/server-tools/1-gs_check.md b/product/zh/docs-mogdb/v2.0/reference-guide/tool-reference/server-tools/1-gs_check.md index 4dba98a1a29045937af91f8ed8bb8c9969f0a15e..79af495ab3209f70b14ebaed6227ebaee1790f14 100644 --- a/product/zh/docs-mogdb/v2.0/reference-guide/tool-reference/server-tools/1-gs_check.md +++ b/product/zh/docs-mogdb/v2.0/reference-guide/tool-reference/server-tools/1-gs_check.md @@ -140,7 +140,6 @@ gs_check改进增强,统一化当前系统中存在的各种检查工具,例 | CheckKernelVer(检查内核版本) | 检查各节点系统内核版本信息,如果版本信息一致则检查项通过,否则报Warning。 | 否 | | | CheckEncoding(检查编码格式) | 检查MogDB内各个节点的系统编码,如果编码一致则检查项通过,否则检查项不通过。 | 否 | | | CheckBootItems(检查启动项) | 检查是否有手动添加的启动项,如果没有则检查通过,否则检查不通过。 | 否 | | -| CheckDropCache(检查DropCache进程) | 检查各节点是否有dropcache进程在运行,若有则检查通过,否则检查不通过。 | 否 | | | CheckFilehandle(检查文件句柄) | 此检查项检查以下两项,两项都通过为通过,否则为不通过:
- 检查每个mogdb进程打开的进程数是否超过80万,不超过则检查通过,否则检查不通过。
- 检查是否有slave进程使用的句柄数超过master进程,如果没有则检查通过,否则检查不通过。 | 否 | | | CheckKeyProAdj(检查关键进程omm_adj的值) | 检查所有关键进程,如果所有关键进程的omm_adj值为0,则通过,否则不通过。 | 否 | | | CheckMaxProcMemory(检查max_process_memory参数设置是否合理) | 检查数据库节点的max_process_memory值,判断该参数的值是否大于1G,若不大于则检查项通过,否则检查项不通过。 | 是 | | @@ -500,7 +499,7 @@ Average: all 0.43 0.00 0.35 0.03 0.03 99.17 [perfadm@SIA1000131072 Check]$ gs_check -e inspect Skip CheckHdfsForeignTabEncoding because it only applies to V1R5 upgrade V1R6 with cluster. Parsing the check items config file successfully -The below items require root privileges to execute:[CheckBlockdev CheckIOConfigure CheckMTU CheckRXTX CheckMultiQueue CheckFirewall CheckSshdService CheckSshdConfig CheckCrondService CheckNoCheckSum CheckSctpService CheckMaxProcMemory CheckBootItems CheckFilehandle CheckNICModel CheckDropCache] +The below items require root privileges to execute:[CheckBlockdev CheckIOConfigure CheckMTU CheckRXTX CheckMultiQueue CheckFirewall CheckSshdService CheckSshdConfig CheckCrondService CheckNoCheckSum CheckSctpService CheckMaxProcMemory CheckBootItems CheckFilehandle CheckNICModel] Please enter root privileges user[root]: Please enter password for user[root]: Check root password connection successfully diff --git a/product/zh/docs-mogdb/v2.1/reference-guide/functions-and-operators/25-statistics-information-functions.md b/product/zh/docs-mogdb/v2.1/reference-guide/functions-and-operators/25-statistics-information-functions.md index 1d75398b97cc979b8ab6fce214ad12fa01b1ebd9..9b90e9e95450b27421bfacea31ac2de44c1dfbf5 100644 --- a/product/zh/docs-mogdb/v2.1/reference-guide/functions-and-operators/25-statistics-information-functions.md +++ b/product/zh/docs-mogdb/v2.1/reference-guide/functions-and-operators/25-statistics-information-functions.md @@ -467,9 +467,9 @@ date: 2021-04-20 返回值类型:bigint -- pg_total_autovac_tuples(bool,bool) +- pg_total_autovac_tuples(bool) - 描述:返回total autovac相关的tuple记录,如nodename、nspname、relname以及各类tuple的IUD信息,入参分别为:是否查询relation信息、是否查询local信息。 + 描述:返回total autovac相关的tuple记录,如nodename、nspname、relname以及各类tuple的IUD信息,入参分别为:是否查询relation信息。 返回值类型:setofrecord diff --git a/product/zh/docs-mogdb/v2.1/reference-guide/system-catalogs-and-system-views/system-catalogs/STATEMENT_HISTORY.md b/product/zh/docs-mogdb/v2.1/reference-guide/system-catalogs-and-system-views/system-catalogs/STATEMENT_HISTORY.md index b856efe766b514063306b2e6b9614c5aacf8a694..c0a296b41a058fc1c26acc108ee216d0eb86828b 100644 --- a/product/zh/docs-mogdb/v2.1/reference-guide/system-catalogs-and-system-views/system-catalogs/STATEMENT_HISTORY.md +++ b/product/zh/docs-mogdb/v2.1/reference-guide/system-catalogs-and-system-views/system-catalogs/STATEMENT_HISTORY.md @@ -70,3 +70,7 @@ date: 2021-04-19 | lwlock_wait_time | bigint | 轻量级等锁时间。 | L1 | | details | bytea | 语句锁事件的列表,该列表按时间书序记录事件,记录的数量受参数track_stmt_details_size的影响。
事件包括:
- 加锁开始
- 加锁结束
- 等锁开始
- 等锁结束
- 放锁开始
- 放锁结束
- 轻量级等锁开始
- 轻量级等锁结束 | L2 | | is_slow_sql | boolean | 该SQL是否为slow SQL。 | L0 | + +> **说明**: +> +> 为了方便对该表进行清理,允许使用[TRUNCATE](../../sql-syntax/TRUNCATE.md)命令清空该表。 \ No newline at end of file diff --git a/product/zh/docs-mogdb/v2.1/reference-guide/tool-reference/server-tools/1-gs_check.md b/product/zh/docs-mogdb/v2.1/reference-guide/tool-reference/server-tools/1-gs_check.md index f98d70bc144e2b6a0b710d3fa88bda46de35b937..01e760cafdacaa8ddbc588df19e309ef9d61dee2 100644 --- a/product/zh/docs-mogdb/v2.1/reference-guide/tool-reference/server-tools/1-gs_check.md +++ b/product/zh/docs-mogdb/v2.1/reference-guide/tool-reference/server-tools/1-gs_check.md @@ -289,13 +289,6 @@ gs_check改进增强,统一化当前系统中存在的各种检查工具,例 检查是否有手动添加的启动项,如果没有则检查通过,否则检查不通过。 否 - - CheckDropCache(检查DropCache进程) - - 检查各节点是否有dropcache进程在运行,若有则检查通过,否则检查不通过。 - - 否 - CheckFilehandle(检查文件句柄) @@ -1111,7 +1104,7 @@ Average: all 0.43 0.00 0.35 0.03 0.03 99.17 [perfadm@SIA1000131072 Check]$ gs_check -e inspect Skip CheckHdfsForeignTabEncoding because it only applies to V1R5 upgrade V1R6 with cluster. Parsing the check items config file successfully -The below items require root privileges to execute:[CheckBlockdev CheckIOConfigure CheckMTU CheckRXTX CheckMultiQueue CheckFirewall CheckSshdService CheckSshdConfig CheckCrondService CheckMaxProcMemory CheckBootItems CheckFilehandle CheckNICModel CheckDropCache] +The below items require root privileges to execute:[CheckBlockdev CheckIOConfigure CheckMTU CheckRXTX CheckMultiQueue CheckFirewall CheckSshdService CheckSshdConfig CheckCrondService CheckMaxProcMemory CheckBootItems CheckFilehandle CheckNICModel] Please enter root privileges user[root]: Please enter password for user[root]: Check root password connection successfully diff --git a/product/zh/docs-mogdb/v3.0/reference-guide/functions-and-operators/25-statistics-information-functions.md b/product/zh/docs-mogdb/v3.0/reference-guide/functions-and-operators/25-statistics-information-functions.md index e7d67c73e0b74500dfff4f0b7c89bd09d9c20b4a..0e5e9b921430e514916af21fe7957c8dc611bb87 100644 --- a/product/zh/docs-mogdb/v3.0/reference-guide/functions-and-operators/25-statistics-information-functions.md +++ b/product/zh/docs-mogdb/v3.0/reference-guide/functions-and-operators/25-statistics-information-functions.md @@ -443,9 +443,9 @@ date: 2021-04-20 返回值类型:bigint -- pg_total_autovac_tuples(bool,bool) +- pg_total_autovac_tuples(bool) - 描述:返回total autovac相关的tuple记录,如nodename、nspname、relname以及各类tuple的IUD信息,入参分别为:是否查询relation信息、是否查询local信息。 + 描述:返回total autovac相关的tuple记录,如nodename、nspname、relname以及各类tuple的IUD信息,入参分别为:是否查询relation信息。 返回值类型:setofrecord diff --git a/product/zh/docs-mogdb/v3.0/reference-guide/guc-parameters/32-thread-pool.md b/product/zh/docs-mogdb/v3.0/reference-guide/guc-parameters/32-thread-pool.md index aec1b6b5a9e281eccfd5f94a3b186c817b8f0964..d7ce6893625d7d345c566410819ca36d80a6f6e4 100644 --- a/product/zh/docs-mogdb/v3.0/reference-guide/guc-parameters/32-thread-pool.md +++ b/product/zh/docs-mogdb/v3.0/reference-guide/guc-parameters/32-thread-pool.md @@ -16,6 +16,8 @@ date: 2021-06-07 - on表示开启线程池功能。 - off表示不开启线程池功能。 +**说明**:在开启线程池下,逻辑复制连接数据库需要使用HA端口。 + **默认值**: off ## thread_pool_attr diff --git a/product/zh/docs-mogdb/v3.0/reference-guide/system-catalogs-and-system-views/system-catalogs/STATEMENT_HISTORY.md b/product/zh/docs-mogdb/v3.0/reference-guide/system-catalogs-and-system-views/system-catalogs/STATEMENT_HISTORY.md index f3a97a3e8ade2fab0702df698eac401ee76fda84..c343e508108f8c53ca88b699d2c474d9488aaf0e 100644 --- a/product/zh/docs-mogdb/v3.0/reference-guide/system-catalogs-and-system-views/system-catalogs/STATEMENT_HISTORY.md +++ b/product/zh/docs-mogdb/v3.0/reference-guide/system-catalogs-and-system-views/system-catalogs/STATEMENT_HISTORY.md @@ -71,3 +71,7 @@ date: 2021-04-19 | details | bytea | 语句锁事件的列表,该列表按时间书序记录事件,记录的数量受参数track_stmt_details_size的影响。该字段为二进制,需要借助解析函数pg_catalog.statement_detail_decode读取,见[其他函数](../../../reference-guide/functions-and-operators/24-system-management-functions/9-other-functions.md)表6
事件包括:
- 加锁开始
- 加锁结束
- 等锁开始
- 等锁结束
- 放锁开始
- 放锁结束
- 轻量级等锁开始
- 轻量级等锁结束 | L2 | | is_slow_sql | boolean | 该SQL是否为slow SQL。
- t(true):表示是。
- f(false):表示不是。 | L0 | | trace_id | text | 驱动传入的trace id,与应用的一次请求相关联。 | L0 | + +> **说明**: +> +> 为了方便对该表进行清理,允许使用[TRUNCATE](../../sql-syntax/TRUNCATE.md)命令清空该表。 \ No newline at end of file diff --git a/product/zh/docs-mogdb/v3.0/reference-guide/tool-reference/server-tools/1-gs_check.md b/product/zh/docs-mogdb/v3.0/reference-guide/tool-reference/server-tools/1-gs_check.md index 9ba7f2132b85a9d410e24895a635fc4a5082e9b6..d750aa1f1b6b0d0e50ef5b0820cf4998820c25f2 100644 --- a/product/zh/docs-mogdb/v3.0/reference-guide/tool-reference/server-tools/1-gs_check.md +++ b/product/zh/docs-mogdb/v3.0/reference-guide/tool-reference/server-tools/1-gs_check.md @@ -311,13 +311,6 @@ gs_check改进增强,统一化当前系统中存在的各种检查工具,例 检查是否有手动添加的启动项,如果没有则检查通过,否则检查不通过。 否 - - CheckDropCache(检查DropCache进程) - - 检查各节点是否有dropcache进程在运行,若有则检查通过,否则检查不通过。 - - 否 - CheckFilehandle(检查文件句柄) @@ -1131,7 +1124,7 @@ Average: all 0.43 0.00 0.35 0.03 0.03 99.17 omm@:hostname: gs_check -e inspect Skip CheckHdfsForeignTabEncoding because it only applies to V1R5 upgrade V1R6 with cluster. Parsing the check items config file successfully -The below items require root privileges to execute:[CheckBlockdev CheckIOConfigure CheckMTU CheckRXTX CheckMultiQueue CheckFirewall CheckSshdService CheckSshdConfig CheckCrondService CheckMaxProcMemory CheckBootItems CheckFilehandle CheckNICModel CheckDropCache] +The below items require root privileges to execute:[CheckBlockdev CheckIOConfigure CheckMTU CheckRXTX CheckMultiQueue CheckFirewall CheckSshdService CheckSshdConfig CheckCrondService CheckMaxProcMemory CheckBootItems CheckFilehandle CheckNICModel] Please enter root privileges user[root]: Please enter password for user[root]: Check root password connection successfully diff --git a/product/zh/docs-mogdb/v3.1/reference-guide/functions-and-operators/statistics-information-functions/statistics-information-functions-1.md b/product/zh/docs-mogdb/v3.1/reference-guide/functions-and-operators/statistics-information-functions/statistics-information-functions-1.md index a0113dd38c1bfbab990d93e9a098c8264fee76f8..872046c68226cd7c13d6ccd2a515d1567bf1cfd4 100644 --- a/product/zh/docs-mogdb/v3.1/reference-guide/functions-and-operators/statistics-information-functions/statistics-information-functions-1.md +++ b/product/zh/docs-mogdb/v3.1/reference-guide/functions-and-operators/statistics-information-functions/statistics-information-functions-1.md @@ -443,9 +443,9 @@ date: 2021-04-20 返回值类型:bigint -- pg_total_autovac_tuples(bool,bool) +- pg_total_autovac_tuples(bool) - 描述:返回total autovac相关的tuple记录,如nodename、nspname、relname以及各类tuple的IUD信息,入参分别为:是否查询relation信息、是否查询local信息。 + 描述:返回total autovac相关的tuple记录,如nodename、nspname、relname以及各类tuple的IUD信息,入参分别为:是否查询relation信息。 返回值类型:setofrecord diff --git a/product/zh/docs-mogdb/v3.1/reference-guide/system-catalogs-and-system-views/system-catalogs/STATEMENT_HISTORY.md b/product/zh/docs-mogdb/v3.1/reference-guide/system-catalogs-and-system-views/system-catalogs/STATEMENT_HISTORY.md index 9720e05d9a8d544b1158004999a969cfbeec13cf..f205ab9974eea7f66d700780d2a7a63457cbf6bc 100644 --- a/product/zh/docs-mogdb/v3.1/reference-guide/system-catalogs-and-system-views/system-catalogs/STATEMENT_HISTORY.md +++ b/product/zh/docs-mogdb/v3.1/reference-guide/system-catalogs-and-system-views/system-catalogs/STATEMENT_HISTORY.md @@ -71,3 +71,7 @@ date: 2021-04-19 | details | bytea | 等待事件和语句锁事件的列表。
记录级别的值是L0时,开始记录等待事件的列表。显示当前语句event等待相关的统计信息。具体事件信息见[等待状态列表](../system-views/PG_THREAD_WAIT_STATUS.md#等待状态列表)、[轻量级锁等待事件列表](../system-views/PG_THREAD_WAIT_STATUS.md#轻量级锁等待事件列表)、[IO等待事件列表](../system-views/PG_THREAD_WAIT_STATUS.md#IO等待事件列表)和[事务锁等待事件列表](../system-views/PG_THREAD_WAIT_STATUS.md#事务锁等待事件列表)。关于每种事务锁对业务的影响程度,请参考[LOCK](../../sql-syntax/LOCK.md)语法小节的详细描述。
记录级别的值是L2时,开始记录语句锁事件的列表。该列表按时间顺序记录事件,记录的数量受参数track_stmt_details_size的影响。该字段为二进制,需要借助解析函数pg_catalog.statement_detail_decode读取,见[其他函数](../../../reference-guide/functions-and-operators/24-system-management-functions/9-other-functions.md)表6
事件包括:
- 加锁开始
- 加锁结束
- 等锁开始
- 等锁结束
- 放锁开始
- 放锁结束
- 轻量级等锁开始
- 轻量级等锁结束 | L0 | | is_slow_sql | boolean | 该SQL是否为slow SQL。
- t(true):表示是。
- f(false):表示不是。 | L0 | | trace_id | text | 驱动传入的trace id,与应用的一次请求相关联。 | L0 | + +> **说明**: +> +> 为了方便对该表进行清理,允许使用[TRUNCATE](../../sql-syntax/TRUNCATE.md)命令清空该表。 \ No newline at end of file diff --git a/product/zh/docs-mogdb/v3.1/reference-guide/tool-reference/server-tools/1-gs_check.md b/product/zh/docs-mogdb/v3.1/reference-guide/tool-reference/server-tools/1-gs_check.md index 719ffbb5210010d1bfa261dc1f7110fb94b11a9e..f6d4b13b76887aa951c2c6ddd2d6aa6cc3ce03c9 100644 --- a/product/zh/docs-mogdb/v3.1/reference-guide/tool-reference/server-tools/1-gs_check.md +++ b/product/zh/docs-mogdb/v3.1/reference-guide/tool-reference/server-tools/1-gs_check.md @@ -311,13 +311,6 @@ gs_check改进增强,统一化当前系统中存在的各种检查工具,例 检查是否有手动添加的启动项,如果没有则检查通过,否则检查不通过。 否 - - CheckDropCache(检查DropCache进程) - - 检查各节点是否有dropcache进程在运行,若有则检查通过,否则检查不通过。 - - 否 - CheckFilehandle(检查文件句柄) @@ -1130,7 +1123,7 @@ Average: all 0.43 0.00 0.35 0.03 0.03 99.17 ```bash omm@:hostname: gs_check -e inspect Parsing the check items config file successfully -The below items require root privileges to execute:[CheckBlockdev CheckIOConfigure CheckMTU CheckRXTX CheckMultiQueue CheckFirewall CheckSshdService CheckSshdConfig CheckCrondService CheckMaxProcMemory CheckBootItems CheckFilehandle CheckNICModel CheckDropCache] +The below items require root privileges to execute:[CheckBlockdev CheckIOConfigure CheckMTU CheckRXTX CheckMultiQueue CheckFirewall CheckSshdService CheckSshdConfig CheckCrondService CheckMaxProcMemory CheckBootItems CheckFilehandle CheckNICModel] Please enter root privileges user[root]: Please enter password for user[root]: Check root password connection successfully diff --git a/product/zh/docs-mogdb/v5.0/developer-guide/mysql-compatibility-description/dolphin-extension/dolphin-syntax/sql-reference/sql-syntax/dolphin-use-db-name.md b/product/zh/docs-mogdb/v5.0/developer-guide/mysql-compatibility-description/dolphin-extension/dolphin-syntax/sql-reference/sql-syntax/dolphin-use-db-name.md index de3c0b824f1b5610d7c9281b21b2c6d3e4b2d21e..c81e47107c79b30a125a91f55c0e95847212375f 100644 --- a/product/zh/docs-mogdb/v5.0/developer-guide/mysql-compatibility-description/dolphin-extension/dolphin-syntax/sql-reference/sql-syntax/dolphin-use-db-name.md +++ b/product/zh/docs-mogdb/v5.0/developer-guide/mysql-compatibility-description/dolphin-extension/dolphin-syntax/sql-reference/sql-syntax/dolphin-use-db-name.md @@ -9,7 +9,7 @@ date: 2022-10-24 ## 功能描述 -USE db_name语句将db_name数据库作为默认(当前)数据库使用,用于后续语句。该数据库保持为默认数据库,直到语段的结尾,或者直到发布一个不同的USE语句。 +USE db_name语句将db_name的模式schema作为默认(当前)模式使用,用于后续语句。该模式保持为默认模式,直到语段的结尾,或者直到发布一个不同的USE语句。 ## 注意事项 @@ -25,12 +25,12 @@ USE db_name - **db_name** - 数据库名。 + 模式名。 ## 示例 ```sql ---切换到db1库 +--切换到db1 schema MogDB=# USE db1; SET MogDB=# CREATE TABLE test(a text); @@ -38,7 +38,7 @@ CREATE TABLE MogDB=# INSERT INTO test VALUES('db1'); INSERT 0 1 ---切换到db2库 +--切换到db2 schema MogDB=# USE db2; SET MogDB=# CREATE TABLE test(a text); @@ -63,7 +63,7 @@ MogDB=# select a from test; db2 (1 row) ---切换到db1库 +--切换到db1 schema MogDB=# USE db1; SET MogDB=# select a from test; diff --git a/product/zh/docs-mogdb/v5.0/reference-guide/functions-and-operators/statistics-information-functions/statistics-information-functions-1.md b/product/zh/docs-mogdb/v5.0/reference-guide/functions-and-operators/statistics-information-functions/statistics-information-functions-1.md index 361364b61e121f85684494a59f84808ec89c2f3b..9ea5da2bad67013c6652de091c0b423936b60138 100644 --- a/product/zh/docs-mogdb/v5.0/reference-guide/functions-and-operators/statistics-information-functions/statistics-information-functions-1.md +++ b/product/zh/docs-mogdb/v5.0/reference-guide/functions-and-operators/statistics-information-functions/statistics-information-functions-1.md @@ -443,9 +443,9 @@ date: 2021-04-20 返回值类型:bigint -- pg_total_autovac_tuples(bool,bool) +- pg_total_autovac_tuples(bool) - 描述:返回total autovac相关的tuple记录,如nodename、nspname、relname以及各类tuple的IUD信息,入参分别为:是否查询relation信息、是否查询local信息。 + 描述:返回total autovac相关的tuple记录,如nodename、nspname、relname以及各类tuple的IUD信息,入参分别为:是否查询relation信息。 返回值类型:setofrecord diff --git a/product/zh/docs-mogdb/v5.0/reference-guide/functions-and-operators/xml-functions.md b/product/zh/docs-mogdb/v5.0/reference-guide/functions-and-operators/xml-functions.md index 800f9449d2f0e6eac4096d3c06d3a530dc8009c2..85be5b94c2a812f6683723a55bcbb0449dd33472 100644 --- a/product/zh/docs-mogdb/v5.0/reference-guide/functions-and-operators/xml-functions.md +++ b/product/zh/docs-mogdb/v5.0/reference-guide/functions-and-operators/xml-functions.md @@ -38,7 +38,7 @@ date: 2023-04-07 参数:类型可以是character,character varying或text或其中某个的变种。 - 返回值类型:xml + 返回值类型:由函数中输入的数据类型决定 示例: diff --git a/product/zh/docs-mogdb/v5.0/reference-guide/guc-parameters/thread-pool.md b/product/zh/docs-mogdb/v5.0/reference-guide/guc-parameters/thread-pool.md index 7ecfeacc7f1b4d42bb603e41b5f503e39bccdb07..e935759133c5bfc08f3f1ff295d4fe1caff79827 100644 --- a/product/zh/docs-mogdb/v5.0/reference-guide/guc-parameters/thread-pool.md +++ b/product/zh/docs-mogdb/v5.0/reference-guide/guc-parameters/thread-pool.md @@ -16,7 +16,7 @@ date: 2021-06-07 - on表示开启线程池功能。 - off表示不开启线程池功能。 -说明: 在开启线程池下,逻辑复制连接数据库需要使用HA端口。 +**说明**:在开启线程池下,逻辑复制连接数据库需要使用HA端口。 **默认值**:off diff --git a/product/zh/docs-mogdb/v5.0/reference-guide/guc-parameters/version-and-platform-compatibility/platform-and-client-compatibility.md b/product/zh/docs-mogdb/v5.0/reference-guide/guc-parameters/version-and-platform-compatibility/platform-and-client-compatibility.md index 5992b9b215e4cbd372da86e07f4e4428c7f7028f..6cae56e24c771ba19cdb41a9ebe894a38ff4a8de 100644 --- a/product/zh/docs-mogdb/v5.0/reference-guide/guc-parameters/version-and-platform-compatibility/platform-and-client-compatibility.md +++ b/product/zh/docs-mogdb/v5.0/reference-guide/guc-parameters/version-and-platform-compatibility/platform-and-client-compatibility.md @@ -503,7 +503,7 @@ date: 2021-04-20 | **兼容性配置项** | **兼容性行为控制** | | :--------------- | :----------------------------------------------------------- | | for_loop | 控制存储过程中FOR_LOOP查询语句行为设置此项时,在FOR rec IN query LOOP语句中,若rec已经定义,不会复用已经定义的rec变量,而且重新建立一个新的变量。否则,会复用已经定义的rec变量,不会建立新的变量。(与proc_implicit_for_loop_variable相同,后续进行收编) | -| outparam | out重载条件下,有重载函数;将对out出参常量进行检查,禁止out出参为常量报错。 | +| outparam | 可能存在多个同名但输出参数列表不同的重载参数,若开启该选项,将对out出参进行检查,out出参为常量时报错。 | ## td_compatible_truncation diff --git a/product/zh/docs-mogdb/v5.0/reference-guide/system-catalogs-and-system-views/system-catalogs/STATEMENT_HISTORY.md b/product/zh/docs-mogdb/v5.0/reference-guide/system-catalogs-and-system-views/system-catalogs/STATEMENT_HISTORY.md index 20a306f563d416a3d390c60f358eb34c9b318dd2..7ed76ddef6a4e527392c6cc1334fb5d88822cd63 100644 --- a/product/zh/docs-mogdb/v5.0/reference-guide/system-catalogs-and-system-views/system-catalogs/STATEMENT_HISTORY.md +++ b/product/zh/docs-mogdb/v5.0/reference-guide/system-catalogs-and-system-views/system-catalogs/STATEMENT_HISTORY.md @@ -71,3 +71,7 @@ date: 2021-04-19 | details | bytea | 等待事件和语句锁事件的列表。
记录级别的值是L0时,开始记录等待事件的列表。显示当前语句event等待相关的统计信息。具体事件信息见[等待状态列表](../system-views/PG_THREAD_WAIT_STATUS.md#等待状态列表)、[轻量级锁等待事件列表](../system-views/PG_THREAD_WAIT_STATUS.md#轻量级锁等待事件列表)、[IO等待事件列表](../system-views/PG_THREAD_WAIT_STATUS.md#IO等待事件列表)和[事务锁等待事件列表](../system-views/PG_THREAD_WAIT_STATUS.md#事务锁等待事件列表)。关于每种事务锁对业务的影响程度,请参考[LOCK](../../sql-syntax/LOCK.md)语法小节的详细描述。
记录级别的值是L2时,开始记录语句锁事件的列表。该列表按时间顺序记录事件,记录的数量受参数track_stmt_details_size的影响。该字段为二进制,需要借助解析函数pg_catalog.statement_detail_decode读取,见[其他函数](../../../reference-guide/functions-and-operators/system-management-functions/other-functions.md)表6
事件包括:
- 加锁开始
- 加锁结束
- 等锁开始
- 等锁结束
- 放锁开始
- 放锁结束
- 轻量级等锁开始
- 轻量级等锁结束 | L0 | | is_slow_sql | boolean | 该SQL是否为slow SQL。
- t(true):表示是。
- f(false):表示不是。 | L0 | | trace_id | text | 驱动传入的trace id,与应用的一次请求相关联。 | L0 | + +> **说明**: +> +> 为了方便对该表进行清理,允许使用[TRUNCATE](../../sql-syntax/TRUNCATE.md)命令清空该表。 \ No newline at end of file diff --git a/product/zh/docs-mogdb/v5.0/reference-guide/tool-reference/server-tools/gs_check.md b/product/zh/docs-mogdb/v5.0/reference-guide/tool-reference/server-tools/gs_check.md index 70af10dfd28ae9de77dac5bca5e576d83e34452d..120985efe779a3544358f46f4c2fe9abaec5087d 100644 --- a/product/zh/docs-mogdb/v5.0/reference-guide/tool-reference/server-tools/gs_check.md +++ b/product/zh/docs-mogdb/v5.0/reference-guide/tool-reference/server-tools/gs_check.md @@ -311,13 +311,6 @@ gs_check改进增强,统一化当前系统中存在的各种检查工具,例 检查是否有手动添加的启动项,如果没有则检查通过,否则检查不通过。 否 - - CheckDropCache(检查DropCache进程) - - 检查各节点是否有dropcache进程在运行,若有则检查通过,否则检查不通过。 - - 否 - CheckFilehandle(检查文件句柄) @@ -1130,7 +1123,7 @@ Average: all 0.43 0.00 0.35 0.03 0.03 99.17 ```bash omm@:hostname: gs_check -e inspect Parsing the check items config file successfully -The below items require root privileges to execute:[CheckBlockdev CheckIOConfigure CheckMTU CheckRXTX CheckMultiQueue CheckFirewall CheckSshdService CheckSshdConfig CheckCrondService CheckMaxProcMemory CheckBootItems CheckFilehandle CheckNICModel CheckDropCache] +The below items require root privileges to execute:[CheckBlockdev CheckIOConfigure CheckMTU CheckRXTX CheckMultiQueue CheckFirewall CheckSshdService CheckSshdConfig CheckCrondService CheckMaxProcMemory CheckBootItems CheckFilehandle CheckNICModel] Please enter root privileges user[root]: Please enter password for user[root]: Check root password connection successfully diff --git a/product/zh/docs-mogdb/v5.2/reference-guide/functions-and-operators/statistics-information-functions/statistics-information-functions-1.md b/product/zh/docs-mogdb/v5.2/reference-guide/functions-and-operators/statistics-information-functions/statistics-information-functions-1.md index 361364b61e121f85684494a59f84808ec89c2f3b..9ea5da2bad67013c6652de091c0b423936b60138 100644 --- a/product/zh/docs-mogdb/v5.2/reference-guide/functions-and-operators/statistics-information-functions/statistics-information-functions-1.md +++ b/product/zh/docs-mogdb/v5.2/reference-guide/functions-and-operators/statistics-information-functions/statistics-information-functions-1.md @@ -443,9 +443,9 @@ date: 2021-04-20 返回值类型:bigint -- pg_total_autovac_tuples(bool,bool) +- pg_total_autovac_tuples(bool) - 描述:返回total autovac相关的tuple记录,如nodename、nspname、relname以及各类tuple的IUD信息,入参分别为:是否查询relation信息、是否查询local信息。 + 描述:返回total autovac相关的tuple记录,如nodename、nspname、relname以及各类tuple的IUD信息,入参分别为:是否查询relation信息。 返回值类型:setofrecord diff --git a/product/zh/docs-mogdb/v5.2/reference-guide/guc-parameters/version-and-platform-compatibility/platform-and-client-compatibility.md b/product/zh/docs-mogdb/v5.2/reference-guide/guc-parameters/version-and-platform-compatibility/platform-and-client-compatibility.md index 8a66b921a23f3efc8aee90bcbc250545d7be03e4..5cf21a66b0d68dd8847a2e51e23d59505c7f1202 100644 --- a/product/zh/docs-mogdb/v5.2/reference-guide/guc-parameters/version-and-platform-compatibility/platform-and-client-compatibility.md +++ b/product/zh/docs-mogdb/v5.2/reference-guide/guc-parameters/version-and-platform-compatibility/platform-and-client-compatibility.md @@ -495,7 +495,7 @@ date: 2021-04-20 | **兼容性配置项** | **兼容性行为控制** | | :--------------- | :----------------------------------------------------------- | | for_loop | 控制存储过程中FOR_LOOP查询语句行为设置此项时,在FOR rec IN query LOOP语句中,若rec已经定义,不会复用已经定义的rec变量,而且重新建立一个新的变量。否则,会复用已经定义的rec变量,不会建立新的变量。(与proc_implicit_for_loop_variable相同,后续进行收编) | -| outparam | out重载条件下,有重载函数;将对out出参常量进行检查,禁止out出参为常量报错。 | +| outparam | 可能存在多个同名但输出参数列表不同的重载参数,若开启该选项,将对out出参进行检查,out出参为常量时报错。 | ## td_compatible_truncation diff --git a/product/zh/docs-mogdb/v6.0/developer-guide/mysql-compatibility-description/dolphin-extension/dolphin-syntax/sql-reference/sql-syntax/dolphin-use-db-name.md b/product/zh/docs-mogdb/v6.0/developer-guide/mysql-compatibility-description/dolphin-extension/dolphin-syntax/sql-reference/sql-syntax/dolphin-use-db-name.md index de3c0b824f1b5610d7c9281b21b2c6d3e4b2d21e..c81e47107c79b30a125a91f55c0e95847212375f 100644 --- a/product/zh/docs-mogdb/v6.0/developer-guide/mysql-compatibility-description/dolphin-extension/dolphin-syntax/sql-reference/sql-syntax/dolphin-use-db-name.md +++ b/product/zh/docs-mogdb/v6.0/developer-guide/mysql-compatibility-description/dolphin-extension/dolphin-syntax/sql-reference/sql-syntax/dolphin-use-db-name.md @@ -9,7 +9,7 @@ date: 2022-10-24 ## 功能描述 -USE db_name语句将db_name数据库作为默认(当前)数据库使用,用于后续语句。该数据库保持为默认数据库,直到语段的结尾,或者直到发布一个不同的USE语句。 +USE db_name语句将db_name的模式schema作为默认(当前)模式使用,用于后续语句。该模式保持为默认模式,直到语段的结尾,或者直到发布一个不同的USE语句。 ## 注意事项 @@ -25,12 +25,12 @@ USE db_name - **db_name** - 数据库名。 + 模式名。 ## 示例 ```sql ---切换到db1库 +--切换到db1 schema MogDB=# USE db1; SET MogDB=# CREATE TABLE test(a text); @@ -38,7 +38,7 @@ CREATE TABLE MogDB=# INSERT INTO test VALUES('db1'); INSERT 0 1 ---切换到db2库 +--切换到db2 schema MogDB=# USE db2; SET MogDB=# CREATE TABLE test(a text); @@ -63,7 +63,7 @@ MogDB=# select a from test; db2 (1 row) ---切换到db1库 +--切换到db1 schema MogDB=# USE db1; SET MogDB=# select a from test; diff --git a/product/zh/docs-mogdb/v6.0/reference-guide/functions-and-operators/statistics-information-functions/statistics-information-functions-1.md b/product/zh/docs-mogdb/v6.0/reference-guide/functions-and-operators/statistics-information-functions/statistics-information-functions-1.md index 8c7c16a08c92fb908a09acc3a4ccacb7a45e0584..2659b7441fafd6598bab43fe36582f7f0969d96f 100644 --- a/product/zh/docs-mogdb/v6.0/reference-guide/functions-and-operators/statistics-information-functions/statistics-information-functions-1.md +++ b/product/zh/docs-mogdb/v6.0/reference-guide/functions-and-operators/statistics-information-functions/statistics-information-functions-1.md @@ -443,9 +443,9 @@ date: 2021-04-20 返回值类型:bigint -- pg_total_autovac_tuples(bool,bool) +- pg_total_autovac_tuples(bool) - 描述:返回total autovac相关的tuple记录,如nodename、nspname、relname以及各类tuple的IUD信息,入参分别为:是否查询relation信息、是否查询local信息。 + 描述:返回total autovac相关的tuple记录,如nodename、nspname、relname以及各类tuple的IUD信息,入参分别为:是否查询relation信息。 返回值类型:setofrecord diff --git a/product/zh/docs-mogdb/v6.0/reference-guide/functions-and-operators/xml-functions.md b/product/zh/docs-mogdb/v6.0/reference-guide/functions-and-operators/xml-functions.md index 800f9449d2f0e6eac4096d3c06d3a530dc8009c2..85be5b94c2a812f6683723a55bcbb0449dd33472 100644 --- a/product/zh/docs-mogdb/v6.0/reference-guide/functions-and-operators/xml-functions.md +++ b/product/zh/docs-mogdb/v6.0/reference-guide/functions-and-operators/xml-functions.md @@ -38,7 +38,7 @@ date: 2023-04-07 参数:类型可以是character,character varying或text或其中某个的变种。 - 返回值类型:xml + 返回值类型:由函数中输入的数据类型决定 示例: diff --git a/product/zh/docs-mogdb/v6.0/reference-guide/guc-parameters/thread-pool.md b/product/zh/docs-mogdb/v6.0/reference-guide/guc-parameters/thread-pool.md index 7744d8499d87e1ea29de7bd05184df0630b507a4..0da71ca93ccfcb4feb239bcecc5d456a08239f62 100644 --- a/product/zh/docs-mogdb/v6.0/reference-guide/guc-parameters/thread-pool.md +++ b/product/zh/docs-mogdb/v6.0/reference-guide/guc-parameters/thread-pool.md @@ -16,7 +16,7 @@ date: 2021-06-07 - on表示开启线程池功能。 - off表示不开启线程池功能。 -说明: 在开启线程池下,逻辑复制连接数据库需要使用HA端口。 +**说明**:在开启线程池下,逻辑复制连接数据库需要使用HA端口。 **默认值**:off diff --git a/product/zh/docs-mogdb/v6.0/reference-guide/guc-parameters/version-and-platform-compatibility/platform-and-client-compatibility.md b/product/zh/docs-mogdb/v6.0/reference-guide/guc-parameters/version-and-platform-compatibility/platform-and-client-compatibility.md index a781bfb42c939f2851c09c94864bda59b03bd291..4ac753ad73c5e8f805a2c08b45e0caf92387bf85 100644 --- a/product/zh/docs-mogdb/v6.0/reference-guide/guc-parameters/version-and-platform-compatibility/platform-and-client-compatibility.md +++ b/product/zh/docs-mogdb/v6.0/reference-guide/guc-parameters/version-and-platform-compatibility/platform-and-client-compatibility.md @@ -476,7 +476,7 @@ date: 2021-04-20 | **兼容性配置项** | **兼容性行为控制** | | :--------------- | :----------------------------------------------------------- | | for_loop | 控制存储过程中FOR_LOOP查询语句行为设置此项时,在FOR rec IN query LOOP语句中,若rec已经定义,不会复用已经定义的rec变量,而且重新建立一个新的变量。否则,会复用已经定义的rec变量,不会建立新的变量。(与proc_implicit_for_loop_variable相同,后续进行收编) | -| outparam | out重载条件下,有重载函数;将对out出参常量进行检查,禁止out出参为常量报错。 | +| outparam | 可能存在多个同名但输出参数列表不同的重载参数,若开启该选项,将对out出参进行检查,out出参为常量时报错。 | ## plpgsql.variable_conflict diff --git a/product/zh/docs-mogdb/v6.0/reference-guide/system-catalogs-and-system-views/system-catalogs/STATEMENT_HISTORY.md b/product/zh/docs-mogdb/v6.0/reference-guide/system-catalogs-and-system-views/system-catalogs/STATEMENT_HISTORY.md index 6faab5acaffed09113ea2fc14a86464695f726b1..2581668e4641424589af12829fce5650ab282661 100644 --- a/product/zh/docs-mogdb/v6.0/reference-guide/system-catalogs-and-system-views/system-catalogs/STATEMENT_HISTORY.md +++ b/product/zh/docs-mogdb/v6.0/reference-guide/system-catalogs-and-system-views/system-catalogs/STATEMENT_HISTORY.md @@ -71,3 +71,7 @@ date: 2021-04-19 | details | bytea | 等待事件和语句锁事件的列表。
记录级别的值是L0时,开始记录等待事件的列表。显示当前语句event等待相关的统计信息。具体事件信息见[等待状态列表](../system-views/PG_THREAD_WAIT_STATUS.md#等待状态列表)、[轻量级锁等待事件列表](../system-views/PG_THREAD_WAIT_STATUS.md#轻量级锁等待事件列表)、[IO等待事件列表](../system-views/PG_THREAD_WAIT_STATUS.md#IO等待事件列表)和[事务锁等待事件列表](../system-views/PG_THREAD_WAIT_STATUS.md#事务锁等待事件列表)。关于每种事务锁对业务的影响程度,请参考[LOCK](../../sql-syntax/LOCK.md)语法小节的详细描述。
记录级别的值是L2时,开始记录语句锁事件的列表。该列表按时间顺序记录事件,记录的数量受参数track_stmt_details_size的影响。该字段为二进制,需要借助解析函数pg_catalog.statement_detail_decode读取,见[其他函数](../../../reference-guide/functions-and-operators/system-management-functions/other-functions.md)表6
事件包括:
- 加锁开始
- 加锁结束
- 等锁开始
- 等锁结束
- 放锁开始
- 放锁结束
- 轻量级等锁开始
- 轻量级等锁结束 | L0 | | is_slow_sql | boolean | 该SQL是否为slow SQL。
- t(true):表示是。
- f(false):表示不是。 | L0 | | trace_id | text | 驱动传入的trace id,与应用的一次请求相关联。 | L0 | + +> **说明**: +> +> 为了方便对该表进行清理,允许使用[TRUNCATE](../../sql-syntax/TRUNCATE.md)命令清空该表。 \ No newline at end of file diff --git a/product/zh/docs-mogdb/v6.0/reference-guide/tool-reference/server-tools/gs_check.md b/product/zh/docs-mogdb/v6.0/reference-guide/tool-reference/server-tools/gs_check.md index 70af10dfd28ae9de77dac5bca5e576d83e34452d..120985efe779a3544358f46f4c2fe9abaec5087d 100644 --- a/product/zh/docs-mogdb/v6.0/reference-guide/tool-reference/server-tools/gs_check.md +++ b/product/zh/docs-mogdb/v6.0/reference-guide/tool-reference/server-tools/gs_check.md @@ -311,13 +311,6 @@ gs_check改进增强,统一化当前系统中存在的各种检查工具,例 检查是否有手动添加的启动项,如果没有则检查通过,否则检查不通过。 否 - - CheckDropCache(检查DropCache进程) - - 检查各节点是否有dropcache进程在运行,若有则检查通过,否则检查不通过。 - - 否 - CheckFilehandle(检查文件句柄) @@ -1130,7 +1123,7 @@ Average: all 0.43 0.00 0.35 0.03 0.03 99.17 ```bash omm@:hostname: gs_check -e inspect Parsing the check items config file successfully -The below items require root privileges to execute:[CheckBlockdev CheckIOConfigure CheckMTU CheckRXTX CheckMultiQueue CheckFirewall CheckSshdService CheckSshdConfig CheckCrondService CheckMaxProcMemory CheckBootItems CheckFilehandle CheckNICModel CheckDropCache] +The below items require root privileges to execute:[CheckBlockdev CheckIOConfigure CheckMTU CheckRXTX CheckMultiQueue CheckFirewall CheckSshdService CheckSshdConfig CheckCrondService CheckMaxProcMemory CheckBootItems CheckFilehandle CheckNICModel] Please enter root privileges user[root]: Please enter password for user[root]: Check root password connection successfully