1.1 Query Gauss DB's audit log
1. Log on to Gauss DB with reference to Section 4.1.
2. Execute the following command to query the audit log
Select * from pg_query_audit ('2014-02-18','2014-02-19');
1.2 Query the number of connections to the Gauss database
1. Query the current number of connections
Execute under OMM user:
Source/opt/huawei/Bigdata/dbservice/.dbservice_profile; gsql-d postgres-U omm-W ommHuawei@123-d postgres-p 20051-t-c "SELECT count (*) FROM (SELECT pg_stat_get_end_idset() AS endid);"
2. Query the total number of global connections to the database
Execute under OMM user:
Source/opt/huawei/Bigdata/dbservice/.dbservice_profile;
Gsql-d postgres-U omm-W OMM Huawei@123-d postgres-p 20051-t-c "SHOW max_connections;"
1.3 Modify the upper limit of DBService connections
1. Log on to the main DBServer node and switch to OMM user: su-omm;
2. Open the configuration file/srv/BigData/dbdata_service/data/postgresql.conf
3. Modify the max_connections parameter in the configuration file (upper limit of connection number);
4. After the modification is completed, the gaussdb operation is restarted. Refer to the command:
Source/opt/huawei/Bigdata/dbservice/.dbservice_profile;
Gs_ctl-D $GAUSSDATA restart;
5. Log on to the standby DBServer and Perform 1-3 steps to synchronously modify the contents of the standby DBServer.
