diff --git a/docs/dws/umn/ALL_META.TXT.json b/docs/dws/umn/ALL_META.TXT.json index 7a984aa1..fbcd943d 100644 --- a/docs/dws/umn/ALL_META.TXT.json +++ b/docs/dws/umn/ALL_META.TXT.json @@ -1922,7 +1922,7 @@ "node_id":"en-us_topic_0000001707293881.xml", "product_code":"dws", "code":"102", - "des":"Cluster-level restoration consists of two steps:Data restoration: Restores data in the backup set to the data directory of each primary DN/CN instance in parallel.Rebuild", + "des":"Cluster-level restoration consists of two steps:Data restoration: The backup tool simultaneously restores data from the backup set to the data directory of each instance,", "doc_type":"usermanual", "kw":"Constraints on Restoring a Snapshot,Restoration Using a Snapshot,User Guide", "search_title":"", @@ -3575,7 +3575,7 @@ "node_id":"en-us_topic_0000001330808740.xml", "product_code":"dws", "code":"189", - "des":"After a GaussDB(DWS) cluster is created, you can add, delete, or modify security group rules in the current security group.Modifying an existing security group rule:Log i", + "des":"After a GaussDB(DWS) cluster is created, you can add, delete, or modify security group rules in the current security group.Modify an existing security group rule:Log in t", "doc_type":"usermanual", "kw":"Can I Modify the Security Group of a GaussDB(DWS) Cluster?,General Problems,User Guide", "search_title":"", @@ -4238,7 +4238,7 @@ "node_id":"en-us_topic_0000001330648772.xml", "product_code":"dws", "code":"224", - "des":"CN is short for Coordinator Node. A CN is an important component of GaussDB(DWS) and is closely related to users. It provides interfaces to external applications, optimiz", + "des":"Coordinator Node (CN) is an important component in GaussDB(DWS) that is most closely related to users. It provides external application interfaces, optimizes global execu", "doc_type":"usermanual", "kw":"When Should I Add CNs or Scale out a cluster?,Cluster Management,User Guide", "search_title":"", @@ -4371,7 +4371,7 @@ "node_id":"en-us_topic_0000001330488828.xml", "product_code":"dws", "code":"231", - "des":"No, direct access is not supported. VMs at the bottom layer of GaussDB(DWS) serve as the compute nodes for data analysis. Access cluster databases using the private or pu", + "des":"No, you can't, VMs at the bottom layer of GaussDB(DWS) serve as the compute nodes for data analysis. However, the GaussDB(DWS) compute nodes cannot be accessed directly. ", "doc_type":"usermanual", "kw":"Can I Connect to GaussDB(DWS) Cluster Nodes Using SSH?,Database Connections,User Guide", "search_title":"", @@ -4409,7 +4409,7 @@ "node_id":"en-us_topic_0000001381889069.xml", "product_code":"dws", "code":"233", - "des":"After the EIP is unbound, the network may be disconnected. However, the TCP layer does not detect a faulty physical connection in time due to keepalive settings. As a res", + "des":"The network is disconnected when the EIP is unbound. However, the TCP layer does not detect a faulty physical connection in time due to keepalive settings. As a result, t", "doc_type":"usermanual", "kw":"Why Was I Not Notified of Failure Unbinding the EIP When GaussDB(DWS) Is Connected Over the Internet", "search_title":"", @@ -4597,7 +4597,7 @@ "node_id":"en-us_topic_0000001330648780.xml", "product_code":"dws", "code":"243", - "des":"Heterogeneous data can be imported to GaussDB(DWS) using CDM. You can migrate an entire Oracle, MySQL, SQL Server, or GaussDB(DWS) database to a GaussDB(DWS) databse. For", + "des":"Heterogeneous data can be imported to GaussDB(DWS) using CDM. You can migrate an entire Oracle, MySQL, SQL Server, or GaussDB(DWS) database to a GaussDB(DWS) database. Fo", "doc_type":"usermanual", "kw":"How Do I Import GaussDB(DWS)/Oracle/MySQL/SQL Server Data to GaussDB(DWS) (Whole Database Migration)", "search_title":"", @@ -4730,7 +4730,7 @@ "node_id":"en-us_topic_0000001330808760.xml", "product_code":"dws", "code":"250", - "des":"This section describes how to grant the query permission for a schema as an example. For more information, see \"How Do I Grant Table Permissions to a User?\" in FAQs:Perm", + "des":"This section describes how to grant the query permission for a schema as an example. For more information, see \"How Do I Grant Table Permissions to a User?\" in FAQ. You ", "doc_type":"usermanual", "kw":"How Do I Grant Schema Permissions to a User?,Account, Password, and Permission,User Guide", "search_title":"", @@ -4958,7 +4958,7 @@ "node_id":"en-us_topic_0000001533476366.xml", "product_code":"dws", "code":"262", - "des":"The execution speed of an ordinary user is slower than that of the dbadmin user in the following scenarios:Ordinary users queuing: waiting in queue/waiting in global queu", + "des":"The execution speed of an ordinary user is slower than that of the dbadmin user in the following scenarios:Ordinary users are queuing: waiting in queue/waiting in global ", "doc_type":"usermanual", "kw":"Why the Tasks Executed by an Ordinary User Are Slower Than That Executed by the dbadmin User?,Databa", "search_title":"", diff --git a/docs/dws/umn/CLASS.TXT.json b/docs/dws/umn/CLASS.TXT.json index c76ce1cd..3e0fb081 100644 --- a/docs/dws/umn/CLASS.TXT.json +++ b/docs/dws/umn/CLASS.TXT.json @@ -909,7 +909,7 @@ "code":"101" }, { - "desc":"Cluster-level restoration consists of two steps:Data restoration: Restores data in the backup set to the data directory of each primary DN/CN instance in parallel.Rebuild", + "desc":"Cluster-level restoration consists of two steps:Data restoration: The backup tool simultaneously restores data from the backup set to the data directory of each instance,", "product_code":"dws", "title":"Constraints on Restoring a Snapshot", "uri":"dws_01_1029.html", @@ -1692,7 +1692,7 @@ "code":"188" }, { - "desc":"After a GaussDB(DWS) cluster is created, you can add, delete, or modify security group rules in the current security group.Modifying an existing security group rule:Log i", + "desc":"After a GaussDB(DWS) cluster is created, you can add, delete, or modify security group rules in the current security group.Modify an existing security group rule:Log in t", "product_code":"dws", "title":"Can I Modify the Security Group of a GaussDB(DWS) Cluster?", "uri":"dws_03_0053.html", @@ -2007,7 +2007,7 @@ "code":"223" }, { - "desc":"CN is short for Coordinator Node. A CN is an important component of GaussDB(DWS) and is closely related to users. It provides interfaces to external applications, optimiz", + "desc":"Coordinator Node (CN) is an important component in GaussDB(DWS) that is most closely related to users. It provides external application interfaces, optimizes global execu", "product_code":"dws", "title":"When Should I Add CNs or Scale out a cluster?", "uri":"dws_03_2140.html", @@ -2070,7 +2070,7 @@ "code":"230" }, { - "desc":"No, direct access is not supported. VMs at the bottom layer of GaussDB(DWS) serve as the compute nodes for data analysis. Access cluster databases using the private or pu", + "desc":"No, you can't, VMs at the bottom layer of GaussDB(DWS) serve as the compute nodes for data analysis. However, the GaussDB(DWS) compute nodes cannot be accessed directly. ", "product_code":"dws", "title":"Can I Connect to GaussDB(DWS) Cluster Nodes Using SSH?", "uri":"dws_03_0040.html", @@ -2088,7 +2088,7 @@ "code":"232" }, { - "desc":"After the EIP is unbound, the network may be disconnected. However, the TCP layer does not detect a faulty physical connection in time due to keepalive settings. As a res", + "desc":"The network is disconnected when the EIP is unbound. However, the TCP layer does not detect a faulty physical connection in time due to keepalive settings. As a result, t", "product_code":"dws", "title":"Why Was I Not Notified of Failure Unbinding the EIP When GaussDB(DWS) Is Connected Over the Internet?", "uri":"dws_03_0025.html", @@ -2178,7 +2178,7 @@ "code":"242" }, { - "desc":"Heterogeneous data can be imported to GaussDB(DWS) using CDM. You can migrate an entire Oracle, MySQL, SQL Server, or GaussDB(DWS) database to a GaussDB(DWS) databse. For", + "desc":"Heterogeneous data can be imported to GaussDB(DWS) using CDM. You can migrate an entire Oracle, MySQL, SQL Server, or GaussDB(DWS) database to a GaussDB(DWS) database. Fo", "product_code":"dws", "title":"How Do I Import GaussDB(DWS)/Oracle/MySQL/SQL Server Data to GaussDB(DWS) (Whole Database Migration)?", "uri":"dws_03_0074.html", @@ -2241,7 +2241,7 @@ "code":"249" }, { - "desc":"This section describes how to grant the query permission for a schema as an example. For more information, see \"How Do I Grant Table Permissions to a User?\" in FAQs:Perm", + "desc":"This section describes how to grant the query permission for a schema as an example. For more information, see \"How Do I Grant Table Permissions to a User?\" in FAQ. You ", "product_code":"dws", "title":"How Do I Grant Schema Permissions to a User?", "uri":"dws_03_0196.html", @@ -2349,7 +2349,7 @@ "code":"261" }, { - "desc":"The execution speed of an ordinary user is slower than that of the dbadmin user in the following scenarios:Ordinary users queuing: waiting in queue/waiting in global queu", + "desc":"The execution speed of an ordinary user is slower than that of the dbadmin user in the following scenarios:Ordinary users are queuing: waiting in queue/waiting in global ", "product_code":"dws", "title":"Why the Tasks Executed by an Ordinary User Are Slower Than That Executed by the dbadmin User?", "uri":"dws_03_2112.html", diff --git a/docs/dws/umn/dws_01_0007.html b/docs/dws/umn/dws_01_0007.html index 870206cb..34b1f7ee 100644 --- a/docs/dws/umn/dws_01_0007.html +++ b/docs/dws/umn/dws_01_0007.html @@ -16,7 +16,7 @@
  • Fast data loading

    GDS is a tool that helps you with high-speed massively parallel data loading.

  • High scalability

    - +

    Robust reliability

    diff --git a/docs/dws/umn/dws_01_0128.html b/docs/dws/umn/dws_01_0128.html index 149d75b8..5df59154 100644 --- a/docs/dws/umn/dws_01_0128.html +++ b/docs/dws/umn/dws_01_0128.html @@ -5,7 +5,6 @@

    Procedure

    1. Install and run the gsql client on the local Windows server (in Windows CLI). Windows Server 2008/Windows 7 and later are supported.
    2. Download the Windows gsql client by referring to Downloading the Data Studio client and decompress the package to a local folder.
    3. On the local server, click Start, search for cmd, and run the program as the administrator. Alternatively, press Win+R to open the Windows CLI.
    4. Set environment variables. For a 32-bit OS, select the x86 folder. For a 64-bit OS, select the x64 folder.

      Method 1: Configure environment variables in the Windows CLI. Open the command prompt and run the set path=<window_gsql>;%path% command, where <window_gsql> indicates the folder path where the Windows gsql client was decompressed to in the previous step. For example:

      1
      set path=C:\Users\xx\Desktop\dws_8.1.x_gsql_for_windows\x64;%path%
       
      -

      Method 2: In the Control Panel window, search for System and click View advanced system settings. Click the Advanced tab, and click Environment Variables. Select the Path parameter and click Edit. Add the gsql path in the parameter value. For example:

      Figure 1 Configuring Windows environment variables
      @@ -13,19 +12,16 @@

  • In the Windows CLI, run the following command to connect to the database in the GaussDB(DWS) cluster using the gsql client:

    1
    gsql -d <Database_name> -h <Cluster_address> -U <Database_user> -p <Database_port> -W <Cluster_password> -r
     
    -

    The parameters are as follows:

    For example, run the following command to connect to the default database gaussdb in the GaussDB(DWS) cluster:

    1
    gsql -d gaussdb -h 10.168.0.74 -U dbadmin -p 8000 -W password -r
     
    -

    If the following information is displayed, the connection succeeded:

    1
    gaussdb=>
     
    -

  • @@ -44,7 +40,6 @@ 1 (1 row) -
  • To use the \! metacommand to run a system command in Windows gsql, be sure to use the path separator required by the system command. Generally, the path separator is a backslash (\).
    1
     2
    @@ -54,13 +49,11 @@
     gaussdb=> \! type D:\test.sql
     select 1 as id;
     
    -
  • Windows gsql does not support the \parallel meta-command.
    1
     2
    gaussdb=> \parallel
     ERROR: "\parallel" is not supported in Windows.
     
    -
  • In Linux shell, single quotation marks ('') and double quotation marks ("") can be used to enclose strings. In Windows, only double quotation marks can be used.
    1
     2
    @@ -72,7 +65,6 @@
       1
     (1 row)
     
    -
    If single quotation marks are used, an error will be reported and the input will be ignored.
    1
     2
    @@ -86,27 +78,22 @@
     ERROR:  unterminated quoted string at or near "'select"
     LINE 1: 'select
     
    -
  • If Windows gsql is idle for a long time after a connection is established, the connection session times out, and an SSL error is reported. In this case, you need to log in again. The following error is reported:
    1
    SSL SYSCALL error: Software caused connection abort (0x00002745/10053), remote datanode <NULL>, error: Result too large
     
    -
  • In Windows, press Ctrl+C to exit gsql. If Ctrl+C are pressed during input, the input will be ignored and you will be forced to exit gsql.
    Enter as and press Ctrl+C. After \q is displayed, exit gsql.
    1
     2
    gaussdb=> select 1
     gaussdb=> as \q
     
    -
  • Windows gsql cannot connect to a database using the LATIN1 character encoding. The error information is as follows:
    1
    gsql: FATAL: conversion between GBK and LATIN1 is not supported
     
    -
  • The location of the gsqlrc.conf file:
    The default gsqlrc path is %APPDATA%/postgresql/gsqlrc.conf. You can also set the path using the PSQLRC variable.
    1
    set PSQLRC=C:\Users\xx\Desktop\dws_8.1.x_gsql_for_windows\x64\gsqlrc.conf
     
    -
  • diff --git a/docs/dws/umn/dws_01_0133.html b/docs/dws/umn/dws_01_0133.html index 12ac9e29..395e69df 100644 --- a/docs/dws/umn/dws_01_0133.html +++ b/docs/dws/umn/dws_01_0133.html @@ -105,7 +105,6 @@ return conn; } - diff --git a/docs/dws/umn/dws_01_0169.html b/docs/dws/umn/dws_01_0169.html index 61f443ac..369216f7 100644 --- a/docs/dws/umn/dws_01_0169.html +++ b/docs/dws/umn/dws_01_0169.html @@ -48,7 +48,6 @@ return connection; } -

    @@ -95,7 +94,6 @@ return connection; } -

    diff --git a/docs/dws/umn/dws_01_0171.html b/docs/dws/umn/dws_01_0171.html index d96eeacc..e085976b 100644 --- a/docs/dws/umn/dws_01_0171.html +++ b/docs/dws/umn/dws_01_0171.html @@ -8,7 +8,6 @@
  • You have obtained the public network address, including the IP address and port number in the data warehouse cluster. For details, see Obtaining the Cluster Connection Address.
  • You have installed the third-party function library PyGreSQL.

    Download address: http://www.pygresql.org/download/index.html

  • For details about the installation and deployment operations, see http://www.pygresql.org/contents/install.html
    • In CentOS and Red Hat OS, run the following yum command:
      1
      yum install PyGreSQL
       
      -
    • PyGreSQL depends on the libpq dynamic library of PostgreSQL (32-bit or 64-bit version, whichever matches the PyGreSQL bit version). In Linux, you can run the yum command and do not need to install the library. Before using PyGreSQL in Windows, you need to install libpq in either of the following ways:
      • Install PostgreSQL and configure the libpq, ssl, and crypto dynamic libraries in the environment variable PATH.
      • Install psqlodbc and use the libpq, ssl, and crypto dynamic libraries carried by the PostgreSQL ODBC driver.
    @@ -903,7 +902,6 @@

    Using the Third-Party Function Library PyGreSQL to Connect to a Cluster (Linux)

    1. Log in to the Linux environment as user root.
    2. Run the following command to create the python_dws.py file:

      1
      vi python_dws.py
       
      -

      Copy and paste the following content to the python_dws.py file:

       1
      @@ -1098,7 +1096,6 @@
               delete_data(conn)
               conn.close()
       
      -

      Alternatively, use the dbapi interface.

        1
      @@ -1319,7 +1316,6 @@
               delete_data(conn)
               conn.close()
       
      -

    3. Change the public network address, cluster port number, database name, database username, and database password in the python_dws.py file based on the actual cluster information.

      The PyGreSQL API does not provide the connection retry capability. You need to implement the retry processing in the service code.

      @@ -1333,17 +1329,14 @@ user='dbadmin', password='password') # Database user password
    -

  • Run the following command to connect to the cluster using the third-party function library PyGreSQL:

    1
    python python_dws.py
     
    -

  • Using the Third-Party Function Library PyGreSQL to Connect to a Cluster (Windows)

    1. In the Windows operating system, click the Start button, enter cmd in the search box, and click cmd.exe in the result list to open the command-line interface (CLI).
    2. In the CLI, run the following command to create the python_dws.py file:

      1
      type nul> python_dws.py
       
      -

      Copy and paste the following content to the python_dws.py file:

       1
      @@ -1538,7 +1531,6 @@
               delete_data(conn)
               conn.close()
       
      -

      Alternatively, use the dbapi interface.

        1
      @@ -1759,7 +1751,6 @@
               delete_data(conn)
               conn.close()
       
      -

    3. Change the public network address, cluster port number, database name, database username, and database password in the python_dws.py file based on the actual cluster information.

      The PyGreSQL API does not provide the connection retry capability. You need to implement the retry processing in the service code.

      1
      @@ -1772,11 +1763,9 @@
                                             user='dbadmin',
                                             password='password') # Database user password
       
      -

    4. Run the following command to connect to the cluster using the third-party function library PyGreSQL:

      1
      python python_dws.py
       
      -

    diff --git a/docs/dws/umn/dws_01_0183.html b/docs/dws/umn/dws_01_0183.html index adeeece9..7c7f89e0 100644 --- a/docs/dws/umn/dws_01_0183.html +++ b/docs/dws/umn/dws_01_0183.html @@ -9,12 +9,10 @@

    Using Functions to View Database Audit Logs

    1. Use the SQL client tool to connect to the database cluster. For details, see Cluster Connection.
    2. Use the pg_query_audit function to query the audit logs of the current CN. The syntax is as follows:

      1
      pg_query_audit(timestamptz startime,timestamptz endtime,audit_log)
       
      -

      startime and endtime indicate the start time and end time of the audit record, respectively. audit_log indicates the physical file path of the queried audit logs. If audit_log is not specified, the audit log information of the current instance is queried.

      For example, view the audit records of the current CN node in a specified period.
      1
      SELECT * FROM pg_query_audit('2021-02-23 21:49:00','2021-02-23 21:50:00');
       
      -

      The query result is as follows:

      @@ -24,16 +22,13 @@ ---------------------------+---------------------------+----------------+------------+--------+------------+----------+-----------------+-------------+-----------------+------------------------------------------------------------------+-----------------+----------+--------------+------------------------------+------------+------------- 2021-02-23 21:49:57.76+08 | 2021-02-23 21:49:57.82+08 | login_logout | user_login | ok | dbadmin | gaussdb | gsql@[local] | gaussdb | login db | login db(gaussdb) successfully, the current user is: dbadmin | 0 | 0 | coordinator1 | 140324035360512.667403397820909.coordinator1 | 27777 |
    -

    This record indicates that user dbadmin logged in to the gaussdb database at 2021-02-23 21:49:57.82 (GMT+08:00). After the host specified by log_hostname is started and a client is connected to its IP address, the host name found by reverse DNS resolution is displayed following the at sign (@) in the value of client_conninfo.

  • Use the pgxc_query_audit function to query audit logs of all CNs. The syntax is as follows:

    1
    pgxc_query_audit(timestamptz startime,timestamptz endtime)
     
    -
    For example, view the audit records of all CN nodes in a specified period.
    1
    SELECT * FROM pgxc_query_audit('2021-02-23 22:05:00','2021-02-23 22:07:00') where audit_type = 'user_login' and username = 'user1';
     
    -

    The query result is as follows:

    @@ -45,14 +40,12 @@ 2021-02-23 22:06:22.219+08 | 2021-02-23 22:06:22.271+08 | login_lgout | user_login | ok | user1 | gaussdb | gsql@[local] | gaussdb | login db | login db(gaussdb) successfully, the current user is: user1 | 0 | 0 | coordinator2 | 140689577342720.667404382271356.coordinator | 27782 | 2021-02-23 22:05:51.697+08 | 2021-02-23 22:05:51.749+08 | login_lgout | user_login | ok | user1 | gaussdb | gsql@[local] | gaussdb | login db | login db(gaussdb) successfully, the current user is: user1 | 0 | 0 | coordinator1 | 140525048424192.667404351749143.coordinator1 | 27777 | -

    The query result shows the successful login records of user1 in to CN1 and CN2.

  • Query the audit records of multiple objects.

    1
     2
    SET audit_object_name_format TO 'all';
     SELECT object_name,result,operation_type,command_text FROM pgxc_query_audit('2022-08-26 8:00:00','2022-08-26 22:55:00') where command_text like '%student%';
     
    -

    The query result is as follows:

    1
    @@ -71,7 +64,6 @@
      ["public.student_view01","public.studentscore","public.student"] | ok     | ddl            | CREATE OR REPLACE VIEW student_view01 AS SELECT * FROM student t1 where t1.stuNo in (select stuNo from studentscore t2 where t1.stuNo = t2.stuNo);
      ["public.student_view01","public.student","public.studentscore"] | ok     | dml            | SELECT * FROM student_view01;
     
    -

    In the object_name column, the table, view, and base table associated with the view are displayed.

  • diff --git a/docs/dws/umn/dws_01_07234.html b/docs/dws/umn/dws_01_07234.html index f89c8b0e..91ef8696 100644 --- a/docs/dws/umn/dws_01_07234.html +++ b/docs/dws/umn/dws_01_07234.html @@ -137,7 +137,7 @@

    Time that has been spent in executing the job, in seconds.

    For example, if Time required for execution is set to 100s, a job executed by a user in the resource pool will be terminated after being executed for more than 100 seconds.

    -

    An integer in the range 1 to 2,147,483,647. The value 0 indicates no limit.

    +

    An integer in the range 1 to 2,147,483,647. The value 0 indicates no limit.

    Terminated, Downgraded, or Not limited

    @@ -146,7 +146,7 @@

    Total CPU time spent in executing a job on all DNs, in seconds.

    -

    An integer in the range 1 to 2,147,483,647. The value 0 indicates no limit.

    +

    An integer in the range 1 to 2,147,483,647. The value 0 indicates no limit.

    Terminated, Downgraded, or Not limited

    @@ -155,7 +155,7 @@

    Interval for checking the CPU skew, in seconds. This parameter must be set together with Total CPU Time on All DNs.

    -

    An integer in the range 1 to 2,147,483,647. The value 0 indicates no limit.

    +

    An integer in the range 1 to 2,147,483,647. The value 0 indicates no limit.

    Terminated, Downgraded, or Not limited

    @@ -175,7 +175,7 @@
    NOTE:

    This rule is supported only by clusters of version 8.2.0 or later.

    -

    An integer in the range 1 to 2,147,483,647. The value 0 indicates no limit.

    +

    An integer in the range 1 to 2,147,483,647. The value 0 indicates no limit.

    Terminated, Downgraded, or Not limited

    @@ -197,7 +197,7 @@
    NOTE:

    This rule is supported only by clusters of version 8.2.1 or later.

    -

    An integer in the range 1 to 2,147,483,647. The value 0 indicates no limit.

    +

    An integer in the range 1 to 2,147,483,647. The value 0 indicates no limit.

    Terminated, Downgraded, or Not limited

    diff --git a/docs/dws/umn/dws_01_0821.html b/docs/dws/umn/dws_01_0821.html index 5d79baae..bba047ed 100644 --- a/docs/dws/umn/dws_01_0821.html +++ b/docs/dws/umn/dws_01_0821.html @@ -2,12 +2,11 @@

    Scaling In a Cluster

    You can scale in your clusters on the console to release unnecessary computing and storage resources provided by GaussDB(DWS).

    -

    Impact on the System

    +

    Impact on the System

    • Before the scale-in, exit the client connections that have created temporary tables, because temporary tables created before or during the scale-in will become invalid and operations performed on these temporary tables will fail. Temporary tables created after the scale-in will not be affected.
    • If you start a scale-in, an automatic snapshot will be created for the cluster before scale-in. If you do not need the snapshot, you can disable the automated backup function on the scale-in page.
    • Before scale-in, ensure that the skew rate does not exceed 10%. There is no general requirement for the dirty page rate. However, for a large table whose size is greater than 50 GB, ensure that the dirty page rate does not exceed 20% to 30%.
    • In a cluster that is being scaled in, the following functions are disabled: cluster restart, cluster scale-out, snapshot creation, node management, intelligent O&M, resource management, parameter modification, security configurations, log service, database administrator password resetting, and cluster deletion.
    • During offline scale-in, stop all services or run only a few query statements. During table redistribution, a shared lock is added to tables. All insert, update, and delete operations as well as DDL operations on the tables are blocked for a long time, which may cause a lock wait timeout. After a table is redistributed, you can access the table. During redistribution, avoid querying data for more than 20 minutes. The default time for applying a write lock during redistribution is 20 minutes. Exceeding this duration may lead to redistribution failure due to lock waiting timeout.
    • During online scale-in, you can perform insert, update, and delete operations on tables, but data updates may still be blocked for a short period of time. Redistribution consumes lots of CPU and I/O resources, which will greatly impact job performance. Therefore, perform redistribution when services are stopped or during periods of light load.
    • During online scale-in, if a node is deleted while DDL statements are executed (to create a schema or function), these statements may report errors, because the DN cannot be found. In this case, you simply need to retry the statements.
    • If a cluster scale-in fails, the database does not automatically roll back the scale-in operation, and no O&M operations can be performed. In this case, you need to click the Scale In on the console to try again.

    Prerequisites

    • The cluster is in Available state, is not read-only, and there is no data being redistributed in the cluster.
    • A cluster configuration file has been generated, and configuration information is consistent with the current cluster configuration.
    • Before the scale-in operation starts, the value of default_storage_nodegroup is installation.
    • The cluster is configured in the ring mode. A ring is the smallest unit for scale-in. Four or five hosts form a ring. The primary, standby, and secondary DNs are deployed in this ring.
    • The scale-in host does not contain the GTM, ETCD, or CM Server component.
    • There are no CNs on the nodes to be scaled in.
    • Scale-in does not support rollback but supports retry. A data redistribution failure after a scale-in does not affect services. You can complete scale-in at other appropriate time. Otherwise, unbalanced data distribution will persist for a long time.
    • Before redistribution, ensure that the data_redis schema in the corresponding database is reserved for redistribution and that no user operation on it or its tables is allowed. During redistribution, data_redis is used. After the operation is complete, the schema will be deleted. User tables (if any) in the schema will also be deleted.
    • gs_cgroup cannot be used during scale-in.
    • Before the scale-in, check the remaining capacity of the cluster. The nodes remaining in a scale-in must have sufficient space to store the data of the entire cluster. Otherwise, the scale-in cannot be properly performed.
      • The used physical disk space on each node is less than 80%.
      • All the users and roles use less than 80% of resource quota in total.
      • The estimated space usage after scale-in must be less than 80%.
      • The available space is 1.5 times larger than the maximum size of a single table.

        To check the maximum size of a single table, use the following inspection tool:

        1
        gs_check -i CheckBiggestTable -L
         
        -
      diff --git a/docs/dws/umn/dws_01_1029.html b/docs/dws/umn/dws_01_1029.html index 73b5cd4f..a7dd7fca 100644 --- a/docs/dws/umn/dws_01_1029.html +++ b/docs/dws/umn/dws_01_1029.html @@ -1,7 +1,7 @@

      Constraints on Restoring a Snapshot

      -

      Cluster-Level Snapshot Restoration

      Cluster-level restoration consists of two steps:
      1. Data restoration: Restores data in the backup set to the data directory of each primary DN/CN instance in parallel.
      2. Rebuilding the standby DN: After the primary DN is restored, standby DNs are rebuilt with full data in parallel.
      +

      Cluster-Level Snapshot Restoration

      Cluster-level restoration consists of two steps:
      1. Data restoration: The backup tool simultaneously restores data from the backup set to the data directory of each instance, including the primary CN and primary DN.
      2. Rebuilding the standby DN: After the primary DN is restored, standby DNs are rebuilt with full data in parallel.
      • The restoration process takes 1.5 to 2 times longer than the backup process.
      • The parameters after cluster-level restoration are the same as those before backup. When restoring data to a new cluster, ensure that the flavor of the new cluster is the same as that of the original cluster. If the flavor of the new cluster is smaller, the restoration may fail.
      diff --git a/docs/dws/umn/dws_01_1162.html b/docs/dws/umn/dws_01_1162.html index 3798e7e8..d21f5f25 100644 --- a/docs/dws/umn/dws_01_1162.html +++ b/docs/dws/umn/dws_01_1162.html @@ -6,7 +6,7 @@

    -

    Adding an O&M Plan

    1. Log in to the GaussDB(DWS) management console.
    2. Click the name of the target cluster.
    3. In the navigation pane, choose Intelligent O&M.
    4. Click the O&M Plan tab. Click Add O&M Task.

      +

      Adding an O&M Plan

      1. Log in to the GaussDB(DWS) management console.
      2. Click the name of the target cluster.
      3. In the navigation pane, choose Intelligent O&M.
      4. Click the O&M Plan tab. Click Add O&M Task.

      5. In the displayed Add O&M Task dialog box, configure basic information about the O&M task.

        @@ -69,7 +69,7 @@ diff --git a/docs/dws/umn/dws_01_7115.html b/docs/dws/umn/dws_01_7115.html index 0fccd1cd..3ff071fa 100644 --- a/docs/dws/umn/dws_01_7115.html +++ b/docs/dws/umn/dws_01_7115.html @@ -11,7 +11,7 @@

        Adding CNs

        1. Log in to the GaussDB(DWS) management console.
        2. On the Clusters > Dedicated Clusters page, locate the cluster to which you want to add CNs.
        3. In the Operation column of the specified cluster, choose More > Manage CN > Add CN Node.

        4. In the displayed dialog box, determine whether to add CNs to a specified node. If you select No, set the number of CNs after adjustment and click OK. If you select Yes, select a node and click OK.

          -
          • Before adding a CN, ensure that the cluster is in the Available or Unbalanced state.
          • The number of CNs after adjustment cannot exceed the number of deployed CNs. It must be less than or equal to the number of nodes, and less than or equal to 20.
          +
          • Before adding a CN, ensure that the cluster is in the Available or Unbalanced state.
          • The number of CNs cannot exceed the total number of nodes after adjustment.
          • You cannot add more CNs than the number of CNs that have already been deployed.

        diff --git a/docs/dws/umn/dws_01_7251.html b/docs/dws/umn/dws_01_7251.html index 803d322b..137bdc72 100644 --- a/docs/dws/umn/dws_01_7251.html +++ b/docs/dws/umn/dws_01_7251.html @@ -12,7 +12,6 @@ 2
        Table 1 Basic configuration items of an O&M task

        Configuration Item

        Advanced Settings

        Automatic Vacuum is triggered based on either the default or customized conditions. These conditions include the bloat rate and the reclaimable space of the target table. When either of these conditions is met, the Automatic Vacuum process is initiated.

        -
        • Default: The default bloat rate that triggers Vacuum is 80%, and the default reclaimable space of is 100 GB.
        • Custom: You can set the conditions for triggering automatic Vacuum based on the site requirements.
          NOTE:

          VACUUM bloat rate: After frequent UPDATE and DELETE operations are performed in a database, the deleted or updated rows are logically deleted from the database, but actually still exist in tables. Before VACUUM is complete, such data is still stored in disks, causing table bloat. If the bloat rate reaches the percentage threshold set in an O&M task, VACUUM will be automatically triggered.

          +
          • Default: The default bloat rate that triggers Vacuum is 80%, and the default reclaimable space of the target table is 100 GB.
          • Custom: You can set the conditions for triggering automatic Vacuum based on the site requirements.
            NOTE:

            VACUUM bloat rate: After frequent UPDATE and DELETE operations are performed in a database, the deleted or updated rows are logically deleted from the database, but actually still exist in tables. Before VACUUM is complete, such data is still stored in disks, causing table bloat. If the bloat rate reaches the percentage threshold set in an O&M task, VACUUM will be automatically triggered.

        CREATE TABLE t1 (id int, name varchar(20));
         INSERT INTO t1 VALUES (1,'joy'),(2,'lily');
         
        -

    @@ -39,7 +38,6 @@

    Creating Logical Clusters, Associating Them with Users, and Querying Data Across Logical Clusters

    1. Connect to the database as the system administrator and run the following SQL statement to query the original service table t1:

      Verify that service data can be queried after the conversion.

      1
      SELECT * FROM t1;
       
      -

    2. Run the following statements to associate u1 with logical cluster lc1 and u2 with logical cluster lc2, and grant all permissions of the original service table t1 to user u1:

      1
       2
      @@ -47,26 +45,22 @@
       CREATE USER u2 NODE GROUP 'lc2' password '{password}';
       GRANT ALL ON TABLE t1 TO u1;
       
      -

    3. Switch to user u2 and query data in the original service table t1. A message is displayed, indicating that you do not have the permission to access logical cluster lc1. This indicates data is isolated between logical clusters.

      1
       2
      SET ROLE u2 PASSWORD '{password}';
       SELECT * FROM t1;
       
      -

    4. Switch back to system administrator dbadmin and grant the access permission of logical cluster lc1 to user u2.

      1
       2
      SET ROLE dbadmin PASSWORD '{password}';
       GRANT USAGE ON NODE GROUP lc1 TO u2;
       
      -

    5. Switch to user u2 and query the t1 table. This proves that the user bound to logical cluster lc2 can query the original service table t1 across logical clusters. In this way, data is shared between logical clusters.

      1
       2
      SET ROLE u2 PASSWORD '{password}';
       SELECT * FROM t1;
       
      -

    diff --git a/docs/dws/umn/dws_01_7252.html b/docs/dws/umn/dws_01_7252.html index 6a93e188..c8f90d57 100644 --- a/docs/dws/umn/dws_01_7252.html +++ b/docs/dws/umn/dws_01_7252.html @@ -10,14 +10,12 @@

    Creating Logical Clusters, Associating Them with Users, and Querying Data Across Logical Clusters

    1. Connect to the database as system administrator dbadmin and run the following SQL statement to check whether the logical cluster is created:

      1
      SELECT group_name FROM PGXC_GROUP;
       
      -

    2. Create users u1 and u2 and associate them with logical clusters lc1 and lc2, respectively.

      1
       2
      CREATE USER u1  NODE GROUP "lc1" password '{password}';
       CREATE USER u2  NODE GROUP "lc2" password '{password}';
       
      -

    3. Switch to user u1, create table t1, and insert data into the table.

      1
       2
      @@ -25,7 +23,6 @@
       CREATE TABLE u1.t1 (id int);
       INSERT INTO u1.t1 VALUES (1),(2);
       
      -

    4. Switch to user u2, create table t2, and insert data into the table.

      1
       2
      @@ -33,11 +30,9 @@
       CREATE TABLE u2.t2 (id int);
       INSERT INTO u2.t2 VALUES (1),(2);
       
      -

    5. Query the u1.t1 table as user u2. The command output indicates that the user does not have the permission.

      1
      SELECT * FROM u1.t1;
       
      -

      @@ -47,7 +42,6 @@ SELECT p.oid,relname,pgroup,nodeoids FROM pg_class p LEFT JOIN pgxc_class pg ON p.oid = pg.pcrelid WHERE p.relname = 't1'; SELECT p.oid,relname,pgroup,nodeoids FROM pg_class p LEFT JOIN pgxc_class pg ON p.oid = pg.pcrelid WHERE p.relname = 't2';
    -

    @@ -57,7 +51,6 @@ GRANT usage ON SCHEMA u1 TO u2; GRANT select ON TABLE u1.t1 TO u2; -

    Logical clusters implement permission isolation (by node groups) based on physical clusters. To let a user access data across logical clusters, you need to grant the logical cluster (node-group layer) permissions, schema permissions, and table permissions to the user in sequence. If no logical cluster permissions are granted, the error message "permission denied for node group xx" will be displayed.

    @@ -65,7 +58,6 @@ 2
    SET ROLE u2 PASSWORD '{password}';
     SELECT * FROM u1.t1;
     
    -

    diff --git a/docs/dws/umn/dws_03_0002.html b/docs/dws/umn/dws_03_0002.html index 3d99c507..16fde9d0 100644 --- a/docs/dws/umn/dws_03_0002.html +++ b/docs/dws/umn/dws_03_0002.html @@ -50,7 +50,6 @@ 7521 | WARD | SALESMAN | 7698 | 1981-02-22 00:00:00 | 1250.00 | 500.00 | 30 (4 rows) -

    Create the emp_comp function to accept two numbers as input and return the calculated value.

    1
    @@ -71,7 +70,6 @@
     END;
     /
     
    -

    Run the SELECT command to invoke the function:

    1
    @@ -90,7 +88,6 @@
      WARD  | 1250.00 |     500.00 |           42000.00
     (4 rows)
     
    -
  • Creating and Invoking a Stored Procedure

    Create the MATCHES table and insert data into the table. The table data is as follows:

    1
    @@ -111,7 +108,6 @@
           11 |      2 |      112 |   2 |    3
     (5 rows)
     
    -

    Create the stored procedure delete_matches to delete all matches that a specified player participates in.

    1
    @@ -126,12 +122,10 @@
     END;
     /
     
    -

    Invoke the stored procedure delete_matches.

    1
    CALL delete_matches(57);
     
    -

    Query the MATCHES table again. The returned result indicates that the data of the player whose playerno is 57 has been deleted.

    1
    @@ -150,7 +144,6 @@
            9 |      2 |       27 |   3 |    2
     (4 rows)
     
    -
  • diff --git a/docs/dws/umn/dws_03_0009.html b/docs/dws/umn/dws_03_0009.html index 70c67d9b..c8db1b57 100644 --- a/docs/dws/umn/dws_03_0009.html +++ b/docs/dws/umn/dws_03_0009.html @@ -1,37 +1,37 @@

    Should I Choose Public Cloud GaussDB(DWS) or RDS?

    -

    Both allow you to run conventional relational databases on the cloud and transfer database management loads. RDS databases are useful for OLTP, reporting, and analysis, but are less capable of handling read operations of a large amount of data (complex read-only queries). GaussDB(DWS) is useful for OLAP by reducing analysis and report workloads of large data sets by an order of magnitude, thanks to its multi-node scale and resources and optimized algorithms (column storage, vectorized executors, and distributed frameworks).

    +

    Both allow you to run conventional relational databases on the cloud and transfer database management loads. RDS databases are useful for OLTP, reporting, and analysis, but are less capable of handling read operations of a large amount of data (complex read-only queries). GaussDB(DWS) is useful for OLAP by reducing analysis and report workloads of large data sets by an order of magnitude, thanks to its multi-node scale and resources and optimized algorithms (column storage, vectorized executors, and distributed frameworks).

    You can scale out a GaussDB(DWS) cluster to address complex data and queries, or to handle overwhelming analysis and report workloads that affect OLTP performance.

    The following table shows the comparison between OLTP and OLAP.

    -
    Table 1 Feature comparison between OLTP and OLAP

    Feature

    +
    - - - - - - - - - - - - @@ -59,7 +59,7 @@ - diff --git a/docs/dws/umn/dws_03_0016.html b/docs/dws/umn/dws_03_0016.html index 7effb0fa..e0e083e2 100644 --- a/docs/dws/umn/dws_03_0016.html +++ b/docs/dws/umn/dws_03_0016.html @@ -1,9 +1,9 @@

    What Do I Do If Creating a GaussDB(DWS) Cluster Failed?

    -

    Troubleshooting

    Check that you have enough quota for creating the cluster.

    +

    Possible Causes

    Check that you have enough quota for creating the cluster.

    -

    Technical Support

    Call the Customer Hotline for support.

    +

    Contacting Customer Service

    Call the Customer Hotline for support.

    Telephone:

    Germany: 0800 330 44 44

    International: +800 44556600

    diff --git a/docs/dws/umn/dws_03_0017.html b/docs/dws/umn/dws_03_0017.html index 46f7091d..c013a9a7 100644 --- a/docs/dws/umn/dws_03_0017.html +++ b/docs/dws/umn/dws_03_0017.html @@ -2,7 +2,7 @@

    Does GaussDB(DWS) Support Third-Party Clients and JDBC and ODBC Drivers?

    Yes, but GaussDB(DWS) clients and drivers are recommended. Unlike open-source PostgreSQL clients and drivers, GaussDB(DWS) clients and drivers have two key advantages:

    -
    • Security hardening: PostgreSQL drivers only support MD5 authentication, but GaussDB(DWS) drivers support SHA256 and MD5.
    • Data type enhancement: GaussDB(DWS) drivers support new data types smalldatetime and tinyint.
    +
    • Security hardening: PostgreSQL drivers only support MD5 authentication, but GaussDB(DWS) drivers support SHA256 and MD5.
    • Data type enhancement: GaussDB(DWS) drivers support new data types smalldatetime and tinyint.

    GaussDB(DWS) supports open-source PostgreSQL clients and JDBC and ODBC drivers.

    The compatible client and driver versions are:

    • PostgreSQL psql 9.2.4 or later
    • PostgreSQL JDBC Driver 9.3-1103 or later
    • PSQL ODBC 09.01.0200 or later
    diff --git a/docs/dws/umn/dws_03_0025.html b/docs/dws/umn/dws_03_0025.html index d03932ce..65e4c654 100644 --- a/docs/dws/umn/dws_03_0025.html +++ b/docs/dws/umn/dws_03_0025.html @@ -1,17 +1,16 @@

    Why Was I Not Notified of Failure Unbinding the EIP When GaussDB(DWS) Is Connected Over the Internet?

    -

    After the EIP is unbound, the network may be disconnected. However, the TCP layer does not detect a faulty physical connection in time due to keepalive settings. As a result, the gsql, ODBC, and JDBC clients also cannot identify the network fault in time.

    -

    The duration when the database sends the disconnection message to the client depends on the keepalive settings. The specific algorithm for calculating the duration is:

    -

    keepalive_time + keepalive_probes x keepalive_intvl

    +

    The network is disconnected when the EIP is unbound. However, the TCP layer does not detect a faulty physical connection in time due to keepalive settings. As a result, the gsql, ODBC, and JDBC clients also cannot identify the network fault in time.

    +

    The time for the client to wait for the database to return is related to the setting of the keepalive parameter, and may be specifically expressed as: keepalive_time + keepalive_probes*keepalive_intvl.

    Keepalive values affect network communication stability. Adjust them to service pressure and network conditions.

    -

    On Linux, run the sysctl command to modify the following parameters:

    +

    On Linux, run the sysctl command to modify the following parameters:

    • net.ipv4.tcp_keepalive_time
    • net.ipv4.tcp_keeaplive_probes
    • net.ipv4.tcp_keepalive_intvl
    -

    For example, if you want to change the value of net.ipv4.tcp_keepalive_time, run the following command to change it to 120.

    +

    For example, if you want to change the value of net.ipv4.tcp_keepalive_time, run the following command to change it to 120.

    sysctl net.ipv4.tcp_keepalive_time=120

    -

    On Windows, modify the following configuration information in registry HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\Tcpip\Parameters:

    -
    • KeepAliveTime
    • KeepAliveInterval
    • TcpMaxDataRetransmissions (equivalent to tcp_keepalive_probes)
    -

    If you cannot find the preceding parameters in registry HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\Tcpip\Parameters, add these parameters. Open Registry Editor, right-click the blank area on the right, and choose Create > DWORD (32-bit) Value to add these parameters.

    +

    On Windows, modify the following configuration information in registry HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\Tcpip\Parameters:

    +
    • KeepAliveTime
    • KeepAliveInterval
    • TcpMaxDataRetransmissions (equivalent to tcp_keepalive_probes)
    +

    If you cannot find the preceding parameters in registry HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\Tcpip\Parameters, add these parameters. Open Registry Editor, right-click the blank area on the right, and choose Create > DWORD (32-bit) Value to add these parameters.

    diff --git a/docs/dws/umn/dws_03_0033.html b/docs/dws/umn/dws_03_0033.html index 53eba447..dced3ef0 100644 --- a/docs/dws/umn/dws_03_0033.html +++ b/docs/dws/umn/dws_03_0033.html @@ -10,7 +10,6 @@

    The following information is displayed once the space is cleared:

    Table 1 Comparison between OLTP and OLAP

    Feature

    RDS for OLTP

    +

    OLTP

    GaussDB(DWS) for OLAP

    +

    OLAP

    User

    +

    Users

    Operations and low-level management

    +

    Operation personnel and junior managers

    Decision-makers and senior management

    +

    Decision-making personnel and senior managers

    Function

    +

    Functionality

    Daily operation processing

    +

    Daily operations

    Analysis and decision-making

    Design

    By application

    +

    Application-oriented

    By theme

    +

    Subject-oriented

    Data

    @@ -43,12 +43,12 @@

    Access

    Dozens of read and write records

    +

    Reads/Writes dozens of records.

    Millions of read records

    +

    Reads millions of records.

    Coverage

    +

    Scope of Work

    Simple read/write operations

    Hundreds of GB

    TB or PB

    +

    TB to PB

    1
    VACUUM
     
    -
    • VACUUM FULL reclaims all expired row space, however it requires an exclusive lock on each table being processed, and might take a long time to complete on large, distributed database tables. You are advised to do VACUUM FULL to specified tables. If you want to do VACUUM FULL to the entire database, you are advised to do it during database maintenance.
    • The statistical information will be lost if you use the FULL parameter. To collect the statistics, add keyword ANALYZE, for example, VACUUM FULL ANALYZE;. For more information about VACUUM, see "SQL Reference > SQL Syntax > VACUUM" in the Data Warehouse Service (DWS) Developer Guide.
    diff --git a/docs/dws/umn/dws_03_0040.html b/docs/dws/umn/dws_03_0040.html index 39c7df70..527c6e05 100644 --- a/docs/dws/umn/dws_03_0040.html +++ b/docs/dws/umn/dws_03_0040.html @@ -1,7 +1,7 @@

    Can I Connect to GaussDB(DWS) Cluster Nodes Using SSH?

    -

    No, direct access is not supported. VMs at the bottom layer of GaussDB(DWS) serve as the compute nodes for data analysis. Access cluster databases using the private or public network access address instead.

    +

    No, you can't, VMs at the bottom layer of GaussDB(DWS) serve as the compute nodes for data analysis. However, the GaussDB(DWS) compute nodes cannot be accessed directly. You can only access cluster databases using the private or public network access address.

    -
    diff --git a/docs/dws/umn/dws_03_0071.html b/docs/dws/umn/dws_03_0071.html index a1baeca6..fd84ec1e 100644 --- a/docs/dws/umn/dws_03_0071.html +++ b/docs/dws/umn/dws_03_0071.html @@ -3,7 +3,7 @@

    Why Is SQL Execution Slow After Long GaussDB(DWS) Usage?

    After a database is used for a period of time, the table data increases as services grow, or the table data is frequently added, deleted, or modified. As a result, bloating tables and inaccurate statistics are incurred, deteriorating database performance.

    You are advised to periodically run VACUUM FULL and ANALYZE on tables that are frequently added, deleted, or modified. Perform the following operations:

    -
    1. By default, 100 out of 30,000 records of statistics are collected. When a large amount of data is involved, the SQL execution is unstable, which may be caused by a changed execution plan. In this case, the sampling rate needs to be adjusted for statistics. You can run set default_statistics_target to increase the sampling rate, which helps the optimizer generate the optimal plan.

      +
      1. By default, 100 out of 30,000 records of statistics are collected. When a large amount of data is involved, the SQL execution is unstable, which may be caused by a changed execution plan. In this case, the sampling rate needs to be adjusted for statistics. You can run set default_statistics_target to increase the sampling rate, which helps the optimizer generate the optimal plan.

      2. Run ANALYZE again. For details, see "ANALYZE | ANALYSE" in the Developer Guide.

      To test whether disk fragments affect database performance, use the following function:

      diff --git a/docs/dws/umn/dws_03_0073.html b/docs/dws/umn/dws_03_0073.html index 413a2b46..8731b029 100644 --- a/docs/dws/umn/dws_03_0073.html +++ b/docs/dws/umn/dws_03_0073.html @@ -1,7 +1,7 @@

      How Do I Use \Copy to Import and Export Data?

      -

      GaussDB(DWS) is a fully managed service on the cloud. Users cannot log in to the background to import or export data by using COPY, so the COPY syntax is disabled. You are advised to store data files on OBS and use OBS foreign tables to import data. If you want to use COPY to import and export data, perform the following operations:

      +

      GaussDB(DWS) is a fully managed service on the cloud. Users cannot log in to the background to import or export data by using COPY, so the COPY syntax is disabled. You are advised to store data files on OBS and use OBS foreign tables to import data. If you want to use COPY to import and export data, perform the following operations:

      1. Place the data file on the client.
      2. Use gsql to connect to the target cluster.
      3. Run the following command to import data. Enter the directory name and file name of the data file on the client and specify the import option in with. The command is almost the same as the common COPY command. You only need to add a backslash (\) before the command. When the data is successfully imported, no notification will be displayed.
        \copy tb_name from '/directory_name/file_name' with(...);
      4. Run the following command to export data to a local file. Retain the default settings of parameters.
        \copy table_name to '/directory_name/file_name';
      5. Specify the copy_option parameter to export data to a CSV file.
        \copy table_name to '/directory_name/file_name' CSV;
        diff --git a/docs/dws/umn/dws_03_0074.html b/docs/dws/umn/dws_03_0074.html index d82f3822..135d6771 100644 --- a/docs/dws/umn/dws_03_0074.html +++ b/docs/dws/umn/dws_03_0074.html @@ -1,7 +1,7 @@

        How Do I Import GaussDB(DWS)/Oracle/MySQL/SQL Server Data to GaussDB(DWS) (Whole Database Migration)?

        -

        Heterogeneous data can be imported to GaussDB(DWS) using CDM. You can migrate an entire Oracle, MySQL, SQL Server, or GaussDB(DWS) database to a GaussDB(DWS) databse. For details, see section "Creating an Entire Database Migration Job" in the Cloud Data Migration User Guide.

        +

        Heterogeneous data can be imported to GaussDB(DWS) using CDM. You can migrate an entire Oracle, MySQL, SQL Server, or GaussDB(DWS) database to a GaussDB(DWS) database. For details, see section "DataArts Migration" in the DataArts Studio User Guide.

        You can also store data to OBS and then dump the data to GaussDB(DWS). For details, see section "About Parallel Data Import from OBS" in the Data Warehouse Service (DWS) Developer Guide.

        diff --git a/docs/dws/umn/dws_03_0080.html b/docs/dws/umn/dws_03_0080.html index 45857226..4aead8a8 100644 --- a/docs/dws/umn/dws_03_0080.html +++ b/docs/dws/umn/dws_03_0080.html @@ -7,7 +7,6 @@ 2
        postgres=> CREATE DATABASE A ENCODING 'UTF8' template = template0;
         postgres=> CREATE DATABASE B ENCODING 'GBK' template = template0;
         
        -

    2. View the database list. You can view the created databases A and B.

       1
        2
      @@ -37,7 +36,6 @@
        xiaodi    | dbadmin | UTF8      | C       | C     |
       (7 rows)
       
      -

    3. Switch to database A and enter the user password. Create a table named test01 and insert data into the table.

       1
        2
      @@ -77,11 +75,9 @@
       a=> INSERT INTO test01 VALUES (456, 'good');
       INSERT 0 1
       
      -

    4. Run the \COPY command to export data from the UTF8 library in Unicode format to the test01.dat file.

      1
      \copy test01 to '/opt/test01.dat' with (ENCODING 'Unicode');
       
      -

    5. Switch to database B and create a table with the same name test01.

       1
        2
      @@ -111,13 +107,11 @@
        with (orientation = column,compression=middle)
        distribute by hash (c_last_name);
       
      -

    6. Run the \COPY command to import the test01.dat file to database B.

      1
      \copy test01 from '/opt/test01.dat' with (ENCODING 'Unicode' ,COMPATIBLE_ILLEGAL_CHARS 'true');
       
      -
      -
      • The error tolerance parameter COMPATIBLE_ILLEGAL_CHARS specifies that invalid characters are tolerated during data import. Invalid characters are converted and then imported to the database. No error message is displayed. The import is not interrupted.
      • The BINARY format is not supported. When data of such format is imported, error "cannot specify bulkload compatibility options in BINARY mode" will occur.
      • The parameter is valid only for data importing using the COPY FROM option.
      +
      • The error tolerance parameter COMPATIBLE_ILLEGAL_CHARS specifies that invalid characters are tolerated during data import. Invalid characters are converted and then imported to the database. No error message is displayed. The import is not interrupted.
      • The BINARY format is not supported. When data of such format is imported, error "cannot specify bulkload compatibility options in BINARY mode" will occur.
      • The parameter is valid only for data importing using the COPY FROM option.

    7. View data in the test01 table in database B.

      1
       2
      @@ -131,7 +125,6 @@
                  456 | good          |              |
       (2 rows)
       
      -

    8. After the preceding operations are performed, data is imported from database A (UTF8) to database B (GBK).
    diff --git a/docs/dws/umn/dws_03_0085.html b/docs/dws/umn/dws_03_0085.html index e0f0fdb5..4d58a795 100644 --- a/docs/dws/umn/dws_03_0085.html +++ b/docs/dws/umn/dws_03_0085.html @@ -12,7 +12,6 @@ UTF8 (1 row)
    -

    Setting the Database Character Encoding

    GaussDB(DWS) does not support the modification of the character encoding format of a created database.

    @@ -35,7 +34,6 @@ [ DBCOMPATIBILITY [=] compatibility_type ] | [ CONNECTION LIMIT [=] connlimit ]}[...] ];
    -
  • You can also connect to the database and run the ALTER USER command to change the password validity period of a database account (common user and administrator dbadmin).
    1
    ALTER USER username PASSWORD EXPIRATION 90;
     
    -
  • diff --git a/docs/dws/umn/dws_03_0186.html b/docs/dws/umn/dws_03_0186.html index 1a8c3094..8b3152ac 100644 --- a/docs/dws/umn/dws_03_0186.html +++ b/docs/dws/umn/dws_03_0186.html @@ -21,9 +21,8 @@ HINT: Please use 'DISTRIBUTE BY' clause to specify suitable data distribution column. CREATE TABLE - -

    If the problem cannot be solved by changing the compatibility, you can try to change the column type. For example, insert data of the date type as trings into a table. Example:

    +

    If the problem cannot be solved by changing the compatibility, you can try to change the column type. For example, insert data of the date type as strings into a table. Example:

     1
      2
      3
    @@ -62,7 +61,6 @@
      2023-12-10          | 2
     (2 rows)
     
    -
    diff --git a/docs/dws/umn/dws_03_0195.html b/docs/dws/umn/dws_03_0195.html index 5a4fde15..f72cfdde 100644 --- a/docs/dws/umn/dws_03_0195.html +++ b/docs/dws/umn/dws_03_0195.html @@ -12,27 +12,22 @@ 2
    gsql -d gaussdb -p 8000 -h 192.168.x.xx -U dbadmin -W password -r
     gaussdb=>
     
    -

  • Create user u1.

    1
    gaussdb=> CREATE USER u1 IDENTIFIED BY 'xxxxxxxx';
     
    -

  • Verify that user u1 can access GaussDB.

    1
     2
    gsql -d gaussdb -p 8000 -h 192.168.x.xx -U u1 -W password -r
     gaussdb=>
     
    -

  • Connect to database gaussdb as administrator dbadmin and run the REVOKE command to revoke the connect on database permission of user public.

    1
    gsql -d gaussdb -h 192.168.x.xx -U dbadmin -p 8000 -r
     
    -
    1
     2
    gaussdb=> REVOKE CONNECT ON DATABASE gaussdb FROM public;
     REVOKE
     
    -

  • Verify the result. Use u1 to connect to the database. If the following information is displayed, the connect on database permission of user u1 has been revoked successfully:

    1
     2
    @@ -40,7 +35,6 @@
     gsql: FATAL:  permission denied for database "gaussdb"
     DETAIL:  User does not have CONNECT privilege.
     
    -

  • diff --git a/docs/dws/umn/dws_03_0196.html b/docs/dws/umn/dws_03_0196.html index dc3f4edd..2ff5245f 100644 --- a/docs/dws/umn/dws_03_0196.html +++ b/docs/dws/umn/dws_03_0196.html @@ -1,70 +1,59 @@

    How Do I Grant Schema Permissions to a User?

    -

    This section describes how to grant the query permission for a schema as an example. For more information, see "How Do I Grant Table Permissions to a User?" in FAQs:

    +

    This section describes how to grant the query permission for a schema as an example. For more information, see "How Do I Grant Table Permissions to a User?" in FAQ. You can grant:

    -

    Assume that there are users u1 and u2, and two schemas named after them. User u2 needs to access tables in schema u1.

    -

    +

    Assume that there are users jim and mike, and two schemas named after them. User mike needs to access tables in schema jim, as shown in Figure 1.

    +
    Figure 1 User mike accesses a table in SCHEMA jim.

    -
    1. Connect to your database as dbadmin. Run the following statements to create users u1 and u2. Two schemas will be created and named after the users by default.

      1
      -2
      CREATE USER u1 PASSWORD '{password}';
      -CREATE USER u2 PASSWORD '{password}';
      +
      1. Connect to your database as dbadmin. Run the following statements to create users jim and mike. Two schemas will be created and named after the users by default.

        1
        +2
        CREATE USER jim PASSWORD '{password}';
        +CREATE USER mike PASSWORD '{password}';
         
        -
        -

      2. Create tables u1.t1 and u1.t2 in schema u1.

        1
        -2
        CREATE TABLE u1.t1 (c1 int, c2 int);
        -CREATE TABLE u1.t2 (c1 int, c2 int);
        +

      3. Create tables jim.name and jim.address in schema jim.

        1
        +2
        CREATE TABLE jim.name (c1 int, c2 int);
        +CREATE TABLE jim.address (c1 int, c2 int);
         
        -
        -

      4. Grant the access permission of schema u1 to user u2.

        1
        GRANT USAGE ON SCHEMA u1 TO u2;
        +

      5. Grant the access permission of schema jim to user mike.

        1
        GRANT USAGE ON SCHEMA jim TO mike;
         
        -
        -

      6. Grant user u2 the permission to query table u1.t1 in schema u1.

        1
        GRANT SELECT ON u1.t1 TO u2;
        +

      7. Grant user mike the permission to query table jim.name in schema jim.

        1
        GRANT SELECT ON jim.name TO mike;
         
        -
        -

      8. Start a new session and connect to the database as user u2 Verify that user u2 can query the u1.t1 table but not the u1.t2 table.

        1
        -2
        SELECT * FROM u1.t1;
        -SELECT * FROM u1.t2;
        +

      9. Start a new session and connect to the database as user mike Verify that user mike can query the jim.name table but not the jim.address table.

        1
        +2
        SELECT * FROM jim.name;
        +SELECT * FROM jim.address;
         
        -
        -

        -

      10. In the session started by user dbadmin, grant user u2 the permission to query all the tables in schema u1.

        1
        GRANT SELECT ON ALL TABLES IN SCHEMA u1 TO u2;
        +

        +

      11. In the session started by user dbadmin, grant user mike the permission to query all the tables in schema jim.

        1
        GRANT SELECT ON ALL TABLES IN SCHEMA jim TO mike;
         
        -
        -

      12. In the session started by user u2, verify that u2 can query all tables.

        1
        -2
        SELECT * FROM u1.t1;
        -SELECT * FROM u1.t2;
        +

      13. In the session started by user mike, verify that mike can query all tables.

        1
        +2
        SELECT * FROM jim.name;
        +SELECT * FROM jim.address;
         
        -
        -

        -

      14. In the session started by user dbadmin, create table u1.t3.

        1
        CREATE TABLE u1.t3 (c1 int, c2 int);
        +

        +

      15. In the session started by user dbadmin, create table jim.employ.

        1
        CREATE TABLE jim.employ (c1 int, c2 int);
         
        -
        -

      16. In the session started by user u2, verify that user u2 does not have the query permission for u1.t3. It indicates that user u2 has the permission to access all the existing tables in schema u1, but not the tables to be created in the future.

        1
        SELECT * FROM u1.t3;
        +

      17. In the session started by user mike, verify that user mike does not have the query permission for jim.employ. It indicates that user mike has the permission to access all the existing tables in schema jim, but not the tables to be created in the future.

        1
        SELECT * FROM jim.employ;
         
        -
        -

        -

      18. In the session started by user dbadmin, grant user u2 the permission to query the tables to be created in schema u1. Create table u1.t4.

        1
        -2
        ALTER DEFAULT PRIVILEGES FOR ROLE u1 IN SCHEMA u1 GRANT SELECT ON TABLES TO u2;
        -CREATE TABLE u1.t4 (c1 int, c2 int);
        +

        +

      19. In the session started by user dbadmin, grant user mike the permission to query the tables to be created in schema jim. Create table jim.hobby.

        1
        +2
        ALTER DEFAULT PRIVILEGES FOR ROLE jim IN SCHEMA jim GRANT SELECT ON TABLES TO mike;
        +CREATE TABLE jim.hobby (c1 int, c2 int);
         
        -
        -

      20. In the session started by user u2, verify that user u2 can access table u1.t4, but does not have the permission to access u1.t3. To let the user access table u1.t3, you can grant permissions by performing 4.

        1
        SELECT * FROM u1.t4;
        +

      21. In the session started by user mike, verify that user mike can access table jim.hobby, but does not have the permission to access jim.employ. To let the user access table jim.employ, you can grant permissions by performing 4.

        1
        SELECT * FROM jim.hobby;
         
        -
        -

        +

      22. diff --git a/docs/dws/umn/dws_03_0197.html b/docs/dws/umn/dws_03_0197.html index 566919c4..95e84ed7 100644 --- a/docs/dws/umn/dws_03_0197.html +++ b/docs/dws/umn/dws_03_0197.html @@ -14,7 +14,6 @@ TO { [ GROUP ] role_name | PUBLIC } [, ...] [ WITH GRANT OPTION ];
        -
      23. Scenario

        Assume there are users u1, u2, u3, u4, and u5 and five schemas named after these users. Their permission requirements are as follows:

        @@ -59,7 +58,6 @@
        1
        GRANT SELECT ON u1.t1 TO u2;
         
        -

        √

        @@ -77,7 +75,6 @@
        1
        GRANT INSERT ON u1.t1 TO u3;
         
        -

        x

        @@ -95,7 +92,6 @@
        1
        GRANT SELECT,UPDATE ON u1.t1 TO u4;  
         
        -
        NOTICE:

        The UPDATE permission must be granted together with the SELECT permission, or information leakage may occur.

        @@ -115,7 +111,6 @@
        1
        GRANT ALL PRIVILEGES ON u1.t1 TO u5;
         
        -

        √

        @@ -142,25 +137,20 @@ CREATE USER u4 PASSWORD '{password}'; CREATE USER u5 PASSWORD '{password}';
        -

        1. Create table u1.t1 in schema u1.

          1
          CREATE TABLE u1.t1 (c1 int, c2 int);
           
          -

        2. Insert two records to the table.

          1
           2
          INSERT INTO u1.t1 VALUES (1,2);
           INSERT INTO u1.t1 VALUES (1,2);
           
          -

        3. Grant schema permissions to users.

          1
          GRANT USAGE ON SCHEMA u1 TO u2,u3,u4,u5;
           
          -

        4. Grant user u2 the permission to query the u1.t1 table.

          1
          GRANT SELECT ON u1.t1 TO u2;
           
          -

        5. Start a new session and connect to the database as user u2. Verify that user u2 can query the u1.t1 table but cannot write to or modify the table.

          1
           2
          @@ -168,7 +158,6 @@
           INSERT INTO u1.t1 VALUES (1,20);
           UPDATE u1.t1 SET c2 = 3 WHERE c1 =1;
           
          -

        6. In the session started by user dbadmin, grant permissions to users u3, u4, and u5.

          1
          @@ -177,7 +166,6 @@
           GRANT SELECT,UPDATE ON u1.t1 TO u4; -- Allow u4 to modify the table.
           GRANT ALL PRIVILEGES ON u1.t1 TO u5; -- Allow u5 to query, insert, modify, and delete table data.
           
          -

        7. Start a new session and connect to the database as user u3. Verify that user u3 can query the u1.t1 table but cannot query or modify the table.

          1
           2
          @@ -185,7 +173,6 @@
           INSERT INTO u1.t1 VALUES (1,20);
           UPDATE u1.t1 SET c2 = 3 WHERE c1 =1;
           
          -

        8. Start a new session and connect to the database as user u4. Verify that user u4 can modify and query the u1.t1 table, but cannot insert data to the table.

          1
          @@ -194,7 +181,6 @@
           INSERT INTO u1.t1 VALUES (1,20);
           UPDATE u1.t1 SET c2 = 3 WHERE c1 =1;
           
          -

        9. Start a new session and connect to the database as user u5. Verify that user u5 can query, insert, modify, and delete data in the u1.t1 table.

          1
          @@ -205,12 +191,10 @@
           UPDATE u1.t1 SET c2 = 3 WHERE c1 =1;
           DELETE FROM u1.t1;
           
          -

        10. In the session started by user dbadmin, execute the has_table_privilege function to query user permissions.

          1
          SELECT * FROM pg_class WHERE relname = 't1';
           
          -

          Check the relacl column in the command output. rolename=xxxx/yyyy indicates that rolename has the xxxx permission on the table and the permission is obtained from yyyy.

          The following figure shows the command output.

          diff --git a/docs/dws/umn/dws_03_0198.html b/docs/dws/umn/dws_03_0198.html index 07f33bba..d4a5d717 100644 --- a/docs/dws/umn/dws_03_0198.html +++ b/docs/dws/umn/dws_03_0198.html @@ -8,7 +8,6 @@

        Procedure

        1. Connect to the DWS database as user dbadmin.
        2. Run the following SQL statement to create role role1:

          1
          CREATE ROLE role1 PASSWORD disable;
           
          -

        3. Run the following SQL statement to grant permissions to role1:

          1
           2
          @@ -16,11 +15,9 @@
           GRANT select ON ALL TABLES IN SCHEMA s1 TO role1; -- grants the query permission on all tables in schema s1.
           ALTER DEFAULT PRIVILEGES FOR USER tom IN SCHEMA s1 GRANT select ON TABLES TO role1; -- grants schema s1 the permission to create tables. tom is the owner of schema s1.
           
          -

        4. Run the following SQL statement to grant the role role1 to the actual user user1:

          1
          GRANT role1 TO user1;
           
          -

        1. Read all table data in schema s1 as read-only user user1.
        diff --git a/docs/dws/umn/dws_03_0199.html b/docs/dws/umn/dws_03_0199.html index d5ff0e14..35123eeb 100644 --- a/docs/dws/umn/dws_03_0199.html +++ b/docs/dws/umn/dws_03_0199.html @@ -11,7 +11,6 @@

        Procedure

        1. Connect to the DWS database as user dbadmin.
        2. Run the following SQL statement to create private user u1:

          1
          CREATE USER u1 WITH INDEPENDENT IDENTIFIED BY 'password';
           
          -

        1. Switch to user u1, create the table test, and insert data into the table.

          1
           2
          @@ -19,17 +18,14 @@
           INSERT INTO test VALUES (1, 'joe');
           INSERT INTO test VALUES (2, 'jim');
           
          -

        2. Switch to user dbadmin and run the following SQL statement to check whether user dbadmin can access the private table test created by private user u1:

          1
          SELECT * FROM u1.test;
           
          -

          The query result indicates that the user dbadmin does not have the access permission. This means the private user and private table are created successfully.

        3. Run the DROP statement as user dbadmin to delete the table test.

          1
          DROP TABLE u1.test;
           
          -

        diff --git a/docs/dws/umn/dws_03_0200.html b/docs/dws/umn/dws_03_0200.html index 33ba85b5..9e11f4a6 100644 --- a/docs/dws/umn/dws_03_0200.html +++ b/docs/dws/umn/dws_03_0200.html @@ -33,7 +33,6 @@ gaussdb=> CREATE TABLE myschema_1.t1(a int, b int) DISTRIBUTE BY HASH(b); CREATE TABLE
        -

        Schemas logically divide workloads. These workloads are interdependent with the schemas. Therefore, if a schema contains objects, deleting it will cause errors with dependency information displayed.

        1
        @@ -44,7 +43,6 @@
         Detail: table myschema_1.t1 depends on schema myschema_1 
         Hint: Use DROP ... CASCADE to drop the dependent objects too.
         
        -

        When a schema is deleted, the CASCADE option is used to delete the objects that depend on the schema.

        1
        @@ -53,7 +51,6 @@
         NOTICE:  drop cascades to table myschema_1.t1
         gaussdb=> DROP SCHEMA
         
        -
      24. USER/ROLE

        Users and roles are used to implement permission control on the database server (cluster). They are the owners and executors of cluster workloads and manage all object permissions in clusters. A role is not confined in a specific database. However, when it logs in to the cluster, it must explicitly specify a user name to ensure the transparency of the operation. A user's permissions to a database can be specified through permission management.

        @@ -76,46 +73,39 @@ 2
        testdb=> GRANT CREATE ON DATABASE testdb to user_1;
         GRANT
         
        -

      25. Switch to user user_1.

        1
         2
        testdb=> SET SESSION AUTHORIZATION user_1 PASSWORD '********';
         SET
         
        -

        Create a schema named myschema_2 in the testdb database as user_1.

        1
         2
        testdb=> CREATE SCHEMA myschema_2;
         CREATE SCHEMA
         
        -

      26. Switch to the administrator dbadmin.

        1
         2
        testdb=> RESET SESSION AUTHORIZATION;
         RESET
         
        -

        Create table t1 in schema myschema_2 as the administrator dbadmin.

        1
         2
        testdb=> CREATE TABLE myschema_2.t1(a int, b int) DISTRIBUTE BY HASH(b);
         CREATE TABLE
         
        -

      27. Switch to user user_1.

        1
         2
        testdb=> SET SESSION AUTHORIZATION user_1 PASSWORD '********';
         SET
         
        -

        Delete table t1 created by administrator dbadmin in schema myschema_2 as user user_1.

        1
         2
        testdb=> drop table myschema_2.t1;
         DROP TABLE
         
        -

      28. Example 2:

        @@ -124,13 +114,11 @@ 2
        gaussdb=> GRANT SELECT ON TABLE myschema.t1 TO user_1;
         GRANT
         
        -

      29. Switch to user user_1.

        1
         2
        SET SESSION AUTHORIZATION user_1 PASSWORD '********';
         SET
         
        -

        Query the table myschema.t1.

        1
        @@ -139,26 +127,22 @@
         ERROR:  permission denied for schema myschema
         LINE 1: SELECT * FROM myschema.t1;
         
        -

      30. Switch to the administrator dbadmin.

        1
         2
        gaussdb=> RESET SESSION AUTHORIZATION;
         RESET
         
        -

        Grant the permission on the myschema.t1 table to user user_1.

        1
         2
        gaussdb=> GRANT USAGE ON SCHEMA myschema TO user_1;
         GRANT
         
        -

      31. Switch to user user_1.

        1
         2
        gaussdb=> SET SESSION AUTHORIZATION user_1 PASSWORD '********';
         SET
         
        -

        Query the table myschema.t1.

        1
        @@ -169,7 +153,6 @@
         ---+---
         (0 rows)
         
        -

      32. diff --git a/docs/dws/umn/dws_03_0201.html b/docs/dws/umn/dws_03_0201.html index c9bb3f58..c052e603 100644 --- a/docs/dws/umn/dws_03_0201.html +++ b/docs/dws/umn/dws_03_0201.html @@ -4,7 +4,6 @@

        Scenario 1: Run the information_schema.table_privileges command to view the table permissions of a user. Example:

        1
        SELECT * FROM information_schema.table_privileges WHERE GRANTEE='user_name'; 
         
        -

        @@ -137,12 +136,10 @@ t (1 row)
        -

        Scenario 2: To check whether a user has permissions on a table, perform the following steps:

        1. Query the pg_class system catalog.

          1
          SELECT * FROM pg_class WHERE relname = 'tablename';
           
          -

          Check the relacl column. The command output is shown in the following figure. For details about the permission parameters, see Table 2.

          • rolename=xxxx/yyyy: indicates that rolename has the xxxx permission on the table and the permission is obtained from yyyy.
          • =xxxx/yyyy: indicates that public has the xxxx permission on the table and the permission is obtained from yyyy.
          @@ -237,12 +234,10 @@
      33. You can also use the has_table_privilege function to query user permissions on tables.

        1
        SELECT * FROM has_table_privilege('Username','Table_name', 'select');
         
        -

        For example, query whether user joe has the query permission on table t1.

        1
        SELECT * FROM has_table_privilege('joe','t1','select');
         
        -

      34. diff --git a/docs/dws/umn/dws_03_1002.html b/docs/dws/umn/dws_03_1002.html index 502ab28b..5734da11 100644 --- a/docs/dws/umn/dws_03_1002.html +++ b/docs/dws/umn/dws_03_1002.html @@ -11,19 +11,16 @@ 2
        CREATE TABLE t (n1 number,n2 number,n3 number,PRIMARY KEY (n3));
         CREATE INDEX t_idx ON t(n1,n2);
         
        -

        GaussDB (DWS) supports multiple unique indexes for a table.

        1
         2
        CREATE UNIQUE INDEX u_index ON t(n3);
         CREATE UNIQUE INDEX u_index1 ON t(n3);
         
        -

        You can use the index t_idx created in the example above to create a unique constraint t_uk, which is unique only on column n1. A unique constraint is stricter than a unique index.

        1
        ALTER TABLE t ADD CONSTRAINT t_uk UNIQUE USING INDEX u_index;
         
        -
      35. diff --git a/docs/dws/umn/dws_03_1004.html b/docs/dws/umn/dws_03_1004.html index eb230802..1a557108 100644 --- a/docs/dws/umn/dws_03_1004.html +++ b/docs/dws/umn/dws_03_1004.html @@ -31,11 +31,9 @@ INSERT INTO t_customer VALUES ('5', 'Jennifer', 'Female', 'good_job@sample.com'); INSERT INTO t_customer VALUES ('6', 'Tom', 'Male', 'high_salary@sample.com');
        -

      36. Query the t_customer table.

        1
        SELECT * FROM t_customer ORDER BY id;
         
        -

      37. @@ -58,7 +56,6 @@ GROUP BY cust_name,gender ORDER BY id;
        -

        According to the query result, duplicate data rows whose IDs are 3, 5, and 6 are filtered out.

        @@ -74,11 +71,9 @@ GROUP BY cust_name,gender );
      38. -

      39. Query the t_customer table after duplicate data is deleted.

        1
        SELECT * FROM t_customer ORDER BY id;
         
        -

        The command output indicates that duplicate data has been deleted.

        @@ -97,7 +92,6 @@ ROW_NUMBER() OVER (PARTITION BY cust_name,gender ORDER BY id) num FROM t_customer;
      -

      According to the command output, the data in num>1 is duplicate.

      @@ -117,11 +111,9 @@ WHERE row_num >1 ) );
    -

  • Query the t_customer table after duplicate data is deleted.

    1
    SELECT * FROM t_customer ORDER BY id;
     
    -

  • diff --git a/docs/dws/umn/dws_03_2100.html b/docs/dws/umn/dws_03_2100.html index a037d9c2..efd2563d 100644 --- a/docs/dws/umn/dws_03_2100.html +++ b/docs/dws/umn/dws_03_2100.html @@ -34,7 +34,6 @@ TO GROUP group_version1; (1 row) -
    diff --git a/docs/dws/umn/dws_03_2101.html b/docs/dws/umn/dws_03_2101.html index 29912653..5cb70379 100644 --- a/docs/dws/umn/dws_03_2101.html +++ b/docs/dws/umn/dws_03_2101.html @@ -76,7 +76,6 @@ END $$ IMMUTABLE LANGUAGE plpgsql;
    -

    Verify the rewriting result.

    1
    @@ -89,7 +88,6 @@
            |     0 | 2212294583
     (1 row)
     
    -

    For details about how to use user-defined functions, see section "CREATE FUNCTION" in SQL Syntax References.

    diff --git a/docs/dws/umn/dws_03_2102.html b/docs/dws/umn/dws_03_2102.html index 6c070e9d..1f811fac 100644 --- a/docs/dws/umn/dws_03_2102.html +++ b/docs/dws/umn/dws_03_2102.html @@ -13,7 +13,6 @@ hello (1 row) -

    Use left join to join the tables course1 and course2.

     1
    @@ -60,7 +59,6 @@
      MAX        |    1001 | Science            | Anne
     (3 rows)
     
    -

    Use the COALESCE function to replace null values in the query result with 0 or other non-zero values:

     1
    @@ -89,7 +87,6 @@
      MAX        |    1001 | Science            | Anne
     (3 rows)
     
    -
    diff --git a/docs/dws/umn/dws_03_2104.html b/docs/dws/umn/dws_03_2104.html index bcda6af5..078bed23 100644 --- a/docs/dws/umn/dws_03_2104.html +++ b/docs/dws/umn/dws_03_2104.html @@ -43,7 +43,6 @@ INSERT INTO my_table VALUES(1015, 'flashlight', 990); INSERT INTO my_table VALUES(1016, 'ropes', 890);
    -

    Run the following command to view the created column-store partitioned table:

     1
    @@ -66,7 +65,6 @@
            1016 | ropes        |              890
     (6 rows)
     
    -

    Querying the Boundary of a Partition

    1
     2
    @@ -86,7 +84,6 @@
      my_table_p4 | r            | {1000}
     (5 rows)
     
    -

    Querying the Number of Columns in a Column-Store Table

    1
    @@ -99,7 +96,6 @@
          3
     (1 row)
     
    -

    Querying Data Distribution on DNs

     1
    @@ -122,7 +118,6 @@
      ("dn_6011_6012        ",0,0.000%)
     (6 rows)
     
    -

    Querying the Names of the Cudesc and Delta Tables in Partition P1 on a DN

    1
    @@ -137,7 +132,6 @@
      pg_cudesc_part_60317
     (2 rows)
     
    -
    diff --git a/docs/dws/umn/dws_03_2105.html b/docs/dws/umn/dws_03_2105.html index 6835afce..4c264167 100644 --- a/docs/dws/umn/dws_03_2105.html +++ b/docs/dws/umn/dws_03_2105.html @@ -13,7 +13,6 @@

    For example, when a table is created, indexes are created in columns a, b, and c.

    1
    CREATE TABLE test(a int, b text, c date); 
     
    -
    @@ -250,7 +246,6 @@ Query estimated mem: 1024KB (24 rows) -
     1
      2
    @@ -308,7 +303,6 @@
      Query estimated mem: 1024KB
     (24 rows)
     
    -

    Optimization method: Do not use unnecessary functions on indexed columns.

  • Implicit conversion of data types.

    This scenario is common. For example, the type of column b is Text, and the filtering condition is where b = 2. During plan generation, the Text type is implicitly converted to the Bigint type, and the actual filtering condition changes to where b::bigint = 2. As a result, the index in column b becomes invalid.

    @@ -368,7 +362,6 @@ Query estimated mem: 1024KB (24 rows) -
     1
      2
    @@ -426,7 +419,6 @@
      Query estimated mem: 1024KB
     (24 rows)
     
    -

    Optimization method: Use constants of the same type as the indexed column to avoid implicit type conversion.

  • @@ -518,7 +510,6 @@ Query estimated mem: 5144KB (3 rows) -

    If the optimizer does not select such an execution plan, you can optimize it as follows:

    @@ -528,7 +519,6 @@ set enable_hashjoin = off; set enable_seqscan = off; -

    Reason 5: The Scan Method Is Incorrectly Specified by Hints.

    GaussDB(DWS) plan hints can specify three scan method: tablescan, indexscan, and indexonlyscan.

    @@ -591,7 +581,6 @@ Query estimated mem: 1024KB (24 rows)
    -
     1
      2
    @@ -649,14 +638,12 @@
      Query estimated mem: 1024KB
     (24 rows)
     
    -

    Optimization method: Correctly specify Index scan and Index-Only Scan.

    Reason 6: Incorrect Use of GIN Index in Full-Text Retrieval

    To accelerate text search, you can create a GIN index for full-text search.

    1
    CREATE INDEX idxb ON test using gin(to_tsvector('english',b));
     
    -

    When creating the GIN index, you must use the 2-argument version of to_tsvector. Only when the query also uses the 2-argument version and the arguments are the same as that in the Gin index, the GIN index can be called.

    The to_tsvector() function accepts one or two augments. If the one-augment version of the index is used, the system will use the configuration specified by default_text_search_config by default. To create an index, the two-augment version must be used, or the index content may be inconsistent.

    @@ -727,7 +714,6 @@ Query estimated mem: 1024KB (29 rows)
    -
     1
      2
    @@ -801,7 +787,6 @@
      Query estimated mem: 2048KB
     (32 rows)
     
    -

    Optimization method: Use the 2-argument version of to_tsvector for the query and ensure that the argument values are the same as those in the index.

    diff --git a/docs/dws/umn/dws_03_2106.html b/docs/dws/umn/dws_03_2106.html index 0f242948..a9f038a1 100644 --- a/docs/dws/umn/dws_03_2106.html +++ b/docs/dws/umn/dws_03_2106.html @@ -4,7 +4,6 @@

    When you query the schema list, the query result may contain schemas starting with pg_temp* or pg_toast_temp*, as shown in the following figure.

    1
    SELECT * FROM pg_namespace;
     
    -

    These schemas are created when temporary tables are created. Each session has an independent schema starting with pg_temp to ensure that the temporary tables are visible only to the current session. Therefore, you are not advised to manually delete schemas starting with pg_temp or pg_toast_temp during routine operations.

    diff --git a/docs/dws/umn/dws_03_2107.html b/docs/dws/umn/dws_03_2107.html index e9581d9e..1a59c015 100644 --- a/docs/dws/umn/dws_03_2107.html +++ b/docs/dws/umn/dws_03_2107.html @@ -39,11 +39,10 @@ 3 | 1 (1 row)
    -

    Analysis:

    -

    As shown above, run select c,rn from (select c,row_number() over(order by a,b) as rn from t3) where rn = 1; twice, the results are different. That is because duplicate values 1 and 2 exist in the sorting columns a and b of the window function while their values in column c are different. As a result, when the first record is obtained based on the sorting result in columns a and b, the obtained data in column c is random, as a result, the result sets are inconsistent.

    +

    As shown above, run select c,rn from (select c,row_number() over(order by a,b) as rn from t3) where rn = 1; twice, the results are different. That is because duplicate values 1 and 2 exist in the sorting columns a and b of the window function while their values in column c are different. As a result, when the first record is obtained based on the sorting result in columns a and b, the obtained data in column c is random, as a result, the result sets are inconsistent.

    Solution:

    The values in column c need to be added to the sorting.
    1
     2
    @@ -55,7 +54,6 @@
      1 |  1
     (1 row)
     
    -
    @@ -72,7 +70,6 @@ INSERT INTO test(b) SELECT b FROM test; CREATE VIEW v as SELECT * FROM test ORDER BY a; -

    Problem SQL:

    @@ -110,7 +107,6 @@ 1 | 1 (1 row) -

    Analysis:

    ORDER BY is invalid for subviews and subqueries.

    @@ -140,7 +136,6 @@ 1 (1 row) -

    Analysis:

    The LIMIT in the subquery causes random results to be obtained.

    @@ -186,26 +181,22 @@ 1 (1 row) -

    Analysis:

    The string_agg function is used to concatenate data in a group into one row. However, if you use string_agg(ename, ','), the order of concatenated results needs to be specified. For example, in the preceding statement, select deptno, string_agg(ename, ',') from employee group by deptno;

    can output either of the following:

    1
    30 | ALLEN,MARTIN
     
    -

    Or:

    1
    30 |MARTIN,ALLEN
     
    -

    In the preceding scenario, the result of subquery t1 may be different from that of subquery t2 when deptno is 30.

    Solution:

    Add ORDER BY to String_agg to ensure that data is concatenated in sequence.

    1
    SELECT count(*) FROM (select deptno, string_agg(ename, ',' order by ename desc) from employee group by deptno) t1 ,(select deptno, string_agg(ename, ',' order by ename desc) from employee group by deptno) t2 where t1.string_agg = t2.string_agg;
     
    -

    Database Compatibility Mode

    Scenario: The query results of empty strings in the database are inconsistent.

    @@ -220,7 +211,6 @@ f (1 row)
    -

    database2 (ORA compatible):

    1
    @@ -233,11 +223,10 @@
      t
     (1 row)
     
    -

    Analysis:

    The empty string query results are different because the syntax of the empty string is different from that of the null string in different database compatibility.

    -

    Currently, GaussDB(DWS) supports three types of database compatibility: Oracle, TD, and MySQL. The syntax and behavior vary depending on the compatibility mode. For details about the compatibility differences, see "Syntax Compatibility Differences Among Oracle, Teradata, and MySQL" in GaussDB(DWS) Developer Guide.

    +

    Currently, GaussDB(DWS) supports three types of database compatibility: Oracle, TD, and MySQL. The syntax and behavior vary depending on the compatibility mode. For details about the compatibility differences, see "Syntax Compatibility Differences Among Oracle, Teradata, and MySQL" in GaussDB(DWS) Developer Guide.

    Databases in different compatibility modes have different compatibility issues. You can run select datname, datcompatibility from pg_database; to check the database compatibility.

    Solution:

    The problem is solved when the compatibility modes of the databases in the two environments are set to the same. The DBCOMPATIBILITY attribute of a database does not support ALTER. You can only specify the same DBCOMPATIBILITY attribute when creating a database.

    @@ -254,7 +243,6 @@ 2018-05-28 00:00:00 (1 row) -

    database2:

    1
    @@ -267,7 +255,6 @@
     2018-05-31 00:00:00
     (1 row)
     
    -

    Analysis:

    Some behaviors may vary depending on the settings of the database compatibility configuration item behavior_compat_options. For details about the options of this item, see "GUC Parameters > Miscellaneous Parameters > behavior_compat_options" in GaussDB(DWS) Developer Guide..

    @@ -298,7 +285,6 @@ $$ language plpgsql; -

    Call this function.

     1
    @@ -323,7 +309,6 @@
           1032
     (1 row)
     
    -

    Analysis:

    This function specifies the SHIPPABLE attribute. When a plan is generated, the function pushes it down to DNs for execution. The test table defined in the function is a hash table. Therefore, each DN has only part of the data in the table, the result returned by select count(*) from test; is not the result of full data in the test table. The expected result changes after from is added.

    diff --git a/docs/dws/umn/dws_03_2108.html b/docs/dws/umn/dws_03_2108.html index bdc3ffe4..ad2927ac 100644 --- a/docs/dws/umn/dws_03_2108.html +++ b/docs/dws/umn/dws_03_2108.html @@ -10,7 +10,6 @@
  • The following system catalogs affect resource monitoring and table size query interfaces, but do not affect other services.
  • Other system catalogs do not occupy space and do not need to be cleared.
  • During routine O&M, you are advised to monitor the sizes of these system catalogs, and collect statistics every week. If the space must be reclaimed, clear the space based on the sizes of the system tables.
    The statement is as follows:
    1
    SELECT c.oid,c.relname, c.relkind, pg_relation_size(c.oid) AS size  FROM pg_class c WHERE c.relkind IN ('r') AND c.oid <16385 ORDER BY size DESC;
     
    -
  • diff --git a/docs/dws/umn/dws_03_2109.html b/docs/dws/umn/dws_03_2109.html index 2dea6e08..835be1c4 100644 --- a/docs/dws/umn/dws_03_2109.html +++ b/docs/dws/umn/dws_03_2109.html @@ -6,7 +6,6 @@

    Scenario 1: A Transaction Is Started But Not Committed, and the Statement Is in the "idle in transaction" State

    BEGIN/START TRANSACTION is manually executed to start a transaction. After statements are executed, COMMIT/ROLLBACK is not executed. View the PGXC_STAT_ACTIVITY:

    1
    SELECT state, query, query_id FROM pgxc_stat_activity;
     
    -

    The result shows that the statement is in the idle in transaction state.

    @@ -34,12 +33,10 @@ RETURN; END$$;
    -
    View the PGXC_STAT_ACTIVITY view:
    1
    SELECT coorname,pid,query_id,state,query,usename FROM pgxc_stat_activity WHERE usename='jack';
     
    -

    The result shows that truncate t2 is in the idle in transaction state and coorname is coordinator2. This indicates that the statement has been executed on cn2 and the stored procedure is executing the next statement.

    @@ -49,7 +46,6 @@

    Scenario 3: A Large Number of SAVEPOINT/RELEASE Statements Are in the "idle in transaction" State (Cluster Versions Earlier Than 8.1.0)

    View the PGXC_STAT_ACTIVITY view:

    1
    SELECT coorname,pid,query_id,state,query,usename FROM pgxc_stat_activity WHERE usename='jack';
     
    -

    The result shows that the SAVEPOINT/RELEASE statement is in the idle in transaction state.

    @@ -72,7 +68,6 @@ ... end -

    If there is EXCEPTION in a stored procedure when it is started, a subtransaction will be started. If there is and exception during the execution, the current transaction is rolled back and the exception is handled; if there is no exception, the subtransaction is committed.

    This problem may occur when there are many such stored procedures and the stored procedures are nested. Similar to scenario 2, you only have to wait after the entire stored procedure is executed. If there are a large number of RELEASE messages, the stored procedure triggered multiple exceptions. In this case, you must re-examine the logic of the stored procedure.

    diff --git a/docs/dws/umn/dws_03_2110.html b/docs/dws/umn/dws_03_2110.html index 0e880fd1..079ab9e5 100644 --- a/docs/dws/umn/dws_03_2110.html +++ b/docs/dws/umn/dws_03_2110.html @@ -30,7 +30,6 @@ INSERT INTO students_info VALUES('jack','physics',95); INSERT INTO students_info VALUES('jack','literature',95); -
    View information about the students_info table.
     1
      2
    @@ -56,7 +55,6 @@
      jack | physics    |    95
      jack | literature |    95
     
    -
  • Create a column-store table students_info1, and insert data into the table.
    1
    @@ -67,7 +65,6 @@
     INSERT INTO students_info1 VALUES('matu',75,90,85);
     INSERT INTO students_info1 VALUES('jack',90,95,95);
     
    -

    View information about table students_info1.

    1
    @@ -84,7 +81,6 @@
      jack |   90 |      95 |         95
     (3 rows)
     
    -
  • @@ -109,7 +105,6 @@ jack | 90 | 95 | 95 (3 rows) -

    Dynamic row-to-column conversion

    For clusters of 8.1.2 or later, you can use GROUP_CONCAT to generate column-store statements.

    @@ -133,7 +128,6 @@ ', score, 0)) AS "matu" (1 row)
    -

    In 8.1.1 and earlier versions, you can use LISTAGG to generate column-store statements.

    1
    @@ -152,7 +146,6 @@
     "
     (1 row)
     
    -

    Dynamically rebuild the view:

     1
    @@ -187,12 +180,10 @@
     	EXECUTE sql;
     END$$;
     
    -

    Rebuild the database:

    1
    CALL build_view();
     
    -

    Query view:

    1
    @@ -209,7 +200,6 @@
      jack |         95 |      95 |   90
     (3 rows)
     
    -

    Column-to-Row Conversion

    Use UNION ALL to merge subjects (math, physics, and literature) into one column. The following is an example:

    @@ -255,7 +245,6 @@ matu | literature | 85 (9 rows)
    - diff --git a/docs/dws/umn/dws_03_2112.html b/docs/dws/umn/dws_03_2112.html index 0606e7ba..ca3d7797 100644 --- a/docs/dws/umn/dws_03_2112.html +++ b/docs/dws/umn/dws_03_2112.html @@ -2,11 +2,11 @@

    Why the Tasks Executed by an Ordinary User Are Slower Than That Executed by the dbadmin User?

    The execution speed of an ordinary user is slower than that of the dbadmin user in the following scenarios:

    -

    Scenario 1: Ordinary users are subject to resource management.

    Ordinary users queuing: waiting in queue/waiting in global queue/waiting in ccn queue

    -
    1. Ordinary users will be waiting in queue/waiting in global queue when the number of active statements exceeds the value of max_active_statements. While administrators do not need to queue.

      You can increase the value of this parameter or clear some statements to avoid queuing.

      -

      Change the value of max_active_statements on the management console.

      +

      Scenario 1: Ordinary Users Are Subject to Resource Management.

      Ordinary users are queuing: waiting in queue/waiting in global queue/waiting in ccn queue.

      +
      1. Ordinary users are waiting in queue/waiting in global queue.

        Ordinary users are queuing because the number of active statements exceeds the value of max_active_statements. Administrators do not need to wait in queue because they are not subject to resource management. You can change the value of max_active_statements on the management console.

        1. Log in to the GaussDB(DWS) management console.
        2. In the navigation tree on the left, choose Clusters > Dedicated Clusters.
        3. In the cluster list, find the target cluster and click the cluster name. The Basic Information page is displayed.
        4. Go to the Parameter Modifications page of the cluster, search for the max_active_statements parameter, change its value, and click Save.
        -
      2. It takes a long time for ordinary users to wait in the ccn queue. When dynamic resource management is enabled (enable_dynamic_workload is set to on), if the concurrency is high and the available memory is small, ordinary users may get into this state when executing statements. Administrators are not controlled. You can stop some statements or increase the memory parameter value. If the memory usage of each DN is not high, you can disable the dynamic resource management parameter enable_dynamic_workload by setting it to off.
      +
    2. It takes a long time for an ordinary user to wait in the ccn queue.

      When dynamic resource management is enabled (enable_dynamic_workload=on), if the concurrency is high and the available memory is small, ordinary users may wait in the ccn queue. Administrators are not subject to these controls. To mitigate this, one can either terminate certain statements or increase the memory parameter value. If the memory consumption on each DN remain low, consider disabling dynamic resource management (enable_dynamic_workload=off).

      +

    Scenario 2: The OR condition in the execution plan checks the statements executed by common users one by one. This consumes a lot of time.

    The OR conditions in the execution plans contain permission-related checks. This scenario usually occurs when the system view is used. For example, in the following SQL statement:

    1
    @@ -25,14 +25,12 @@
     on (dtp.schema = ta.table_schema and dtp.table_name = ta.table_name) 
     where ta.table_schema = 'public';
     
    -

    Part of the execution plan is as follows:

    In the system view, the OR condition is used for permission check.

    1
    pg_has_role(c.relowner, 'USAGE'::text) OR has_table_privilege(c.oid, 'SELECT, INSERT, UPDATE, DELETE, TRUNCATE, REFERENCES, TRIGGER'::text) OR has_any_column_privilege(c.oid, 'SELECT, INSERT, UPDATE, REFERENCES'::text)
     
    -

    true is always returned for pg_has_role of the dbadmin use. Therefore, the conditions after OR do not need to be checked.

    While the OR conditions of an ordinary user need to be checked one by one. If there are a large number of tables in the database, the execution time of the ordinary user is longer than that of the dbadmin user.

    @@ -41,7 +39,6 @@

    Scenario 3: The resource pools allocated to ordinary users and administrators are different.

    Run the following command to check whether the resource pools corresponding to an ordinary user are the same as that of the administrator user. If they are different, check whether the tenant resources allocated to the two users are different.

    1
    SELECt * FROM pg_user;
     
    -
    diff --git a/docs/dws/umn/dws_03_2119.html b/docs/dws/umn/dws_03_2119.html index daf3bada..0eabfe40 100644 --- a/docs/dws/umn/dws_03_2119.html +++ b/docs/dws/umn/dws_03_2119.html @@ -1,7 +1,7 @@

    What Are the gaussdb and postgres Databases of GaussDB(DWS)?

    -

    The gaussdb and postgres databases are built-in databases of GaussDB(DWS). You can create schemas and tables in them. However, you are advised to recreate a database and create schemas and tables in the new database.

    +

    The gaussdb and postgres databases are built-in databases of GaussDB(DWS). You can create schemas and tables in them. However, you are advised to recreate a database and create schemas and tables in the new database.

    -

  • Migrate data to the new table.

    1
     2
    @@ -30,38 +29,31 @@
     INSERT INTO table1_new SELECT * FROM table1;
     COMMIT;
     
    -

  • Verify that the table data has been migrated. Delete the original table.

    1
     2
    SELECT COUNT(*) FROM table1_new;
     DROP TABLE table1;
     
    -

  • Replace the original table.

    1
    ALTER TABLE table1_new RENAME TO table1;
     
    -

    1. Query the table definition. The command output shows that the distribution column of the table is c_last_name.

      1
      SELECT pg_get_tabledef('customer_t1');
       
      -

    2. Try updating data in the distribution column. An error message will be displayed.

      1
      UPDATE customer_t1 SET c_last_name = 'Jimy' WHERE c_customer_sk = 6885;
       
      -

    3. Change the distribution column of the table to a column that cannot be updated, for example, c_customer_sk.

      1
      ALTER TABLE customer_t1 DISTRIBUTE BY hash (c_customer_sk); 
       
      -

    4. Update the data in the old distribution column.

      1
      UPDATE customer_t1 SET c_last_name = 'Jimy'WHERE c_customer_sk = 6885;
       
      -

    diff --git a/docs/dws/umn/dws_03_2127.html b/docs/dws/umn/dws_03_2127.html index 1cdba992..dc77cd13 100644 --- a/docs/dws/umn/dws_03_2127.html +++ b/docs/dws/umn/dws_03_2127.html @@ -33,7 +33,6 @@ w_warehouse_sk (1 row)
    -
  • Scenario 2

    If the primary key or unique constraint is not included during table creation but there are columns whose data types can be used as distribution columns, hash distribution is selected. The distribution column is the first column whose data type can be used as a distribution column.

     1
    @@ -66,7 +65,6 @@
      w_warehouse_sk
     (1 row)
     
    -
  • Scenario 3

    If the primary key or unique constraint is not included during table creation and no column whose data type can be used as a distribution column exists, round-robin distribution is selected.

    CREATE TABLE warehouse3
    diff --git a/docs/dws/umn/dws_03_2140.html b/docs/dws/umn/dws_03_2140.html
    index f37a827c..b5acdf9e 100644
    --- a/docs/dws/umn/dws_03_2140.html
    +++ b/docs/dws/umn/dws_03_2140.html
    @@ -1,9 +1,9 @@
     
     
     

    When Should I Add CNs or Scale out a cluster?

    -

    Introduction to CN Concurrency

    CN is short for Coordinator Node. A CN is an important component of GaussDB(DWS) and is closely related to users. It provides interfaces to external applications, optimizes global execution plans, distributes execution plans to DataNodes, and summarizes and processes execution results. A CN is an interface to external applications. The concurrency capability of the CN determines the service concurrency.

    +

    Introduction to CN Concurrency

    Coordinator Node (CN) is an important component in GaussDB(DWS) that is most closely related to users. It provides external application interfaces, optimizes global execution plans, distributes the execution plans to DataNodes, and summarizes and processes execution results. A CN is an interface to external applications. The concurrency capability of the CN determines the service concurrency.

    CN concurrency is determined by the following parameters:

    -
    • max_connections: specifies the maximum number of concurrent connections to the database. This parameter affects the concurrent processing capability of the cluster. The default value depends on the cluster specifications. For details, see "Managing Database Connections".
    • max_active_statements: specifies the maximum number of concurrent jobs. This parameter applies to all the jobs on one CN. The default value is 60, which indicates a maximum of 60 jobs can run at the same time. Other jobs will be queued.
    +
    • max_connections: specifies the maximum number of concurrent connections to the database. This parameter affects the concurrent processing capability of the cluster. The default value depends on the cluster specifications. For details, see "Managing Database Connections".
    • max_active_statements: specifies the maximum number of concurrent jobs. This parameter applies to all the jobs on one CN. The default value is 60, which indicates a maximum of 60 jobs can run at the same time. Other jobs will be queued.

    Add CNs or Scale out a Cluster?

    • Insufficient connections: When a cluster is created for the first time, the default number of CNs in the cluster is 3, which can meet the customer's basic connection requirements. If the cluster has a large number of concurrent requests and the number of connections to each CN is large, or the CPU usage of a CN exceeds its capacity, you are advised to add CNs. For details, see "CNs".
    • Insufficient storage capacity and performance: If your business grows and you have higher requirements on storage capacity and performance, or the CPU of your cluster is insufficient, you are advised to scale out your cluster. For details, see "Scaling Out a Cluster".

    With the expansion of cluster nodes, more CNs are needed to meet the distribution requirements of GaussDB(DWS). In short, adding CNs does not necessarily require cluster scale-out. However, after cluster scale-out, CNs may need to be added.

    diff --git a/docs/dws/umn/figure/en-us_image_0000001330488880.png b/docs/dws/umn/figure/en-us_image_0000001330488880.png deleted file mode 100644 index 0fbe8992..00000000 Binary files a/docs/dws/umn/figure/en-us_image_0000001330488880.png and /dev/null differ diff --git a/docs/dws/umn/figure/en-us_image_0000001381609457.png b/docs/dws/umn/figure/en-us_image_0000001381609457.png deleted file mode 100644 index 853b6045..00000000 Binary files a/docs/dws/umn/figure/en-us_image_0000001381609457.png and /dev/null differ diff --git a/docs/dws/umn/figure/en-us_image_0000001381728633.png b/docs/dws/umn/figure/en-us_image_0000001381728633.png deleted file mode 100644 index 183ced53..00000000 Binary files a/docs/dws/umn/figure/en-us_image_0000001381728633.png and /dev/null differ diff --git a/docs/dws/umn/figure/en-us_image_0000001381808809.png b/docs/dws/umn/figure/en-us_image_0000001381808809.png deleted file mode 100644 index 68a8bdfa..00000000 Binary files a/docs/dws/umn/figure/en-us_image_0000001381808809.png and /dev/null differ diff --git a/docs/dws/umn/figure/en-us_image_0000001381889129.png b/docs/dws/umn/figure/en-us_image_0000001381889129.png deleted file mode 100644 index d40c154c..00000000 Binary files a/docs/dws/umn/figure/en-us_image_0000001381889129.png and /dev/null differ diff --git a/docs/dws/umn/figure/en-us_image_0000001711592328.png b/docs/dws/umn/figure/en-us_image_0000001711592328.png deleted file mode 100644 index 5dd1719f..00000000 Binary files a/docs/dws/umn/figure/en-us_image_0000001711592328.png and /dev/null differ diff --git a/docs/dws/umn/figure/en-us_image_0000001894150128.png b/docs/dws/umn/figure/en-us_image_0000001894150128.png new file mode 100644 index 00000000..07a130c0 Binary files /dev/null and b/docs/dws/umn/figure/en-us_image_0000001894150128.png differ diff --git a/docs/dws/umn/figure/en-us_image_0000001936081689.png b/docs/dws/umn/figure/en-us_image_0000001936081689.png new file mode 100644 index 00000000..f7181c23 Binary files /dev/null and b/docs/dws/umn/figure/en-us_image_0000001936081689.png differ diff --git a/docs/dws/umn/figure/en-us_image_0000001936107161.png b/docs/dws/umn/figure/en-us_image_0000001936107161.png new file mode 100644 index 00000000..881fd61b Binary files /dev/null and b/docs/dws/umn/figure/en-us_image_0000001936107161.png differ diff --git a/docs/dws/umn/figure/en-us_image_0000001936108293.png b/docs/dws/umn/figure/en-us_image_0000001936108293.png new file mode 100644 index 00000000..0769fb28 Binary files /dev/null and b/docs/dws/umn/figure/en-us_image_0000001936108293.png differ diff --git a/docs/dws/umn/figure/en-us_image_0000001936109033.png b/docs/dws/umn/figure/en-us_image_0000001936109033.png new file mode 100644 index 00000000..a0e40515 Binary files /dev/null and b/docs/dws/umn/figure/en-us_image_0000001936109033.png differ diff --git a/docs/dws/umn/figure/en-us_image_0000001962140553.png b/docs/dws/umn/figure/en-us_image_0000001962140553.png new file mode 100644 index 00000000..07e1f50a Binary files /dev/null and b/docs/dws/umn/figure/en-us_image_0000001962140553.png differ