amend relative path, config file, security_audit_schedule0
Offering: openGaussDev More detail:amend relative path, config file, security_audit_schedule0 Match-id-6c3f38437cd2d0ceaff79335056071c6ce88b9c0
This commit is contained in:
@ -23,7 +23,7 @@
|
||||
\! @abs_bindir@/gsql -r -p @portstring@ -d postgres -c " CALL TRANSACTION_TEST_MULTI_THREAD_SPACE();";
|
||||
|
||||
-- 查看 pg_audit 文件总大小 是否超过设置的512M
|
||||
\! (( $(du -h --exclude=done /data6/zhoutl/GaussDB_test/GaussDBKernel-server/opengauss/src/test/regress/tmp_check/datanode1/pg_audit | grep -oP '\d*M' | grep -oP '\d*') > 530 )) && echo 'size of total logs exceeds upper limit' || echo 'size of total logs not exceeds upper limit --512M'
|
||||
\! (( $(du -h --exclude=done @abs_srcdir@/tmp_check/datanode1/pg_audit | grep -oP '\d*M' | grep -oP '\d*') > 530 )) && echo 'size of total logs exceeds upper limit' || echo 'size of total logs not exceeds upper limit --512M'
|
||||
|
||||
-- 获取 pg_audit 中最早建立的adt文件编号 与原编号 0_adt 比较 观察是否删除了最早的日志文件
|
||||
\! [[ $(echo $(ls @abs_srcdir@/tmp_check/datanode1/pg_audit -tr | head -2 | xargs) | tr -cd "[0-9]") > 1 ]] && echo 'delete oldest files' || echo 'fail to delete oldest files'
|
||||
|
||||
@ -1,6 +1,3 @@
|
||||
max_process_memory = 64GB
|
||||
shared_buffers = 500MB
|
||||
work_mem = 128MB
|
||||
fsync = off
|
||||
synchronous_commit = off
|
||||
archive_mode = off
|
||||
@ -21,7 +18,6 @@ comm_tcp_mode = on
|
||||
enable_absolute_tablespace = true
|
||||
#enable_dynamic_workload = false
|
||||
max_connections = 1000
|
||||
query_mem='500MB'
|
||||
auth_iteration_count=2048
|
||||
enable_sonic_hashagg=on
|
||||
enable_sonic_hashjoin=on
|
||||
@ -36,3 +32,9 @@ enable_ustore = on
|
||||
wal_level = logical
|
||||
sql_beta_feature = 'a_style_coerce'
|
||||
enable_global_syscache = on
|
||||
|
||||
# for audit log management, multi thread cases
|
||||
max_process_memory = 64GB
|
||||
shared_buffers = 500MB
|
||||
work_mem = 128MB
|
||||
query_mem='500MB'
|
||||
|
||||
@ -13,18 +13,18 @@ select pg_sleep(1);
|
||||
\! @abs_bindir@/gs_ctl start -D @abs_srcdir@/tmp_check/datanode1/ > /dev/null 2>&1
|
||||
-- 查看线程数是否改为 3
|
||||
\! sleep 5
|
||||
\! @abs_bindir@/gsql -r -p 27500 -d postgres -c "show audit_thread_num";
|
||||
\! @abs_bindir@/gsql -r -p @portstring@ -d postgres -c "show audit_thread_num";
|
||||
audit_thread_num
|
||||
------------------
|
||||
3
|
||||
(1 row)
|
||||
|
||||
-- 产生dml_action 审计日志
|
||||
\! @abs_bindir@/gsql -r -p 27500 -d postgres -c " CREATE TABLE T_TEST_MULTI_THREAD_ROTATION_SIZE(COL1 int4 DEFAULT 1,COL2 VARCHAR(1024) DEFAULT 'test_rotation_size')";
|
||||
\! @abs_bindir@/gsql -r -p @portstring@ -d postgres -c " CREATE TABLE T_TEST_MULTI_THREAD_ROTATION_SIZE(COL1 int4 DEFAULT 1,COL2 VARCHAR(1024) DEFAULT 'test_rotation_size')";
|
||||
CREATE TABLE
|
||||
\! @abs_bindir@/gsql -r -p 27500 -d postgres -c "CREATE OR REPLACE PROCEDURE TRANSACTION_MULTI_THREAD_ROTATION_SIZE() AS BEGIN FOR i IN 0..1000000 LOOP INSERT INTO T_TEST_MULTI_THREAD_ROTATION_SIZE(COL1, COL2) VALUES (i, 'test_multi_thread_rotation_size'); COMMIT; END LOOP; END;";
|
||||
\! @abs_bindir@/gsql -r -p @portstring@ -d postgres -c "CREATE OR REPLACE PROCEDURE TRANSACTION_MULTI_THREAD_ROTATION_SIZE() AS BEGIN FOR i IN 0..1000000 LOOP INSERT INTO T_TEST_MULTI_THREAD_ROTATION_SIZE(COL1, COL2) VALUES (i, 'test_multi_thread_rotation_size'); COMMIT; END LOOP; END;";
|
||||
CREATE PROCEDURE
|
||||
\! @abs_bindir@/gsql -r -p 27500 -d postgres -c "CALL TRANSACTION_MULTI_THREAD_ROTATION_SIZE()";
|
||||
\! @abs_bindir@/gsql -r -p @portstring@ -d postgres -c "CALL TRANSACTION_MULTI_THREAD_ROTATION_SIZE()";
|
||||
transaction_multi_thread_rotation_size
|
||||
----------------------------------------
|
||||
|
||||
@ -43,7 +43,7 @@ all the logs are less than 2.1M
|
||||
\! @abs_bindir@/gs_ctl start -D @abs_srcdir@/tmp_check/datanode1/ > /dev/null 2>&1
|
||||
-- 查看线程数是否恢复 1
|
||||
\! sleep 5
|
||||
\! @abs_bindir@/gsql -r -p 27500 -d postgres -c "show audit_thread_num";
|
||||
\! @abs_bindir@/gsql -r -p @portstring@ -d postgres -c "show audit_thread_num";
|
||||
audit_thread_num
|
||||
------------------
|
||||
1
|
||||
|
||||
@ -12,18 +12,18 @@
|
||||
\! @abs_bindir@/gs_ctl start -D @abs_srcdir@/tmp_check/datanode1/ > /dev/null 2>&1
|
||||
-- 查看是否线程数修改成功
|
||||
\! sleep 5
|
||||
\! @abs_bindir@/gsql -r -p 27500 -d postgres -c "show audit_thread_num;";
|
||||
\! @abs_bindir@/gsql -r -p @portstring@ -d postgres -c "show audit_thread_num;";
|
||||
audit_thread_num
|
||||
------------------
|
||||
3
|
||||
(1 row)
|
||||
|
||||
-- 产生dml_action 审计日志
|
||||
\! @abs_bindir@/gsql -r -p 27500 -d postgres -c "CREATE TABLE T_TEST_MULTI_THREAD_SPACE(COL1 int4 DEFAULT 1, COL2 VARCHAR(1024) DEFAULT 'test_multi_thread_space', COL3 int4 DEFAULT 1, COL4 text DEFAULT 'null')";
|
||||
\! @abs_bindir@/gsql -r -p @portstring@ -d postgres -c "CREATE TABLE T_TEST_MULTI_THREAD_SPACE(COL1 int4 DEFAULT 1, COL2 VARCHAR(1024) DEFAULT 'test_multi_thread_space', COL3 int4 DEFAULT 1, COL4 text DEFAULT 'null')";
|
||||
CREATE TABLE
|
||||
\! @abs_bindir@/gsql -r -p 27500 -d postgres -c "CREATE OR REPLACE PROCEDURE TRANSACTION_TEST_MULTI_THREAD_SPACE() AS BEGIN FOR i IN 0..3000000 LOOP INSERT INTO T_TEST_MULTI_THREAD_SPACE(COL1, COL2,COL3) VALUES (i, 'test_multi_thread_space',2); COMMIT; END LOOP; END;";
|
||||
\! @abs_bindir@/gsql -r -p @portstring@ -d postgres -c "CREATE OR REPLACE PROCEDURE TRANSACTION_TEST_MULTI_THREAD_SPACE() AS BEGIN FOR i IN 0..3000000 LOOP INSERT INTO T_TEST_MULTI_THREAD_SPACE(COL1, COL2,COL3) VALUES (i, 'test_multi_thread_space',2); COMMIT; END LOOP; END;";
|
||||
CREATE PROCEDURE
|
||||
\! @abs_bindir@/gsql -r -p 27500 -d postgres -c " CALL TRANSACTION_TEST_MULTI_THREAD_SPACE();";
|
||||
\! @abs_bindir@/gsql -r -p @portstring@ -d postgres -c " CALL TRANSACTION_TEST_MULTI_THREAD_SPACE();";
|
||||
transaction_test_multi_thread_space
|
||||
-------------------------------------
|
||||
|
||||
@ -48,7 +48,7 @@ delete oldest files
|
||||
\! @abs_bindir@/gs_ctl start -D @abs_srcdir@/tmp_check/datanode1/ > /dev/null 2>&1
|
||||
-- 再次查看是否线程数修改成功
|
||||
\! sleep 5
|
||||
\! @abs_bindir@/gsql -r -p 27500 -d postgres -c "show audit_thread_num;";
|
||||
\! @abs_bindir@/gsql -r -p @portstring@ -d postgres -c "show audit_thread_num;";
|
||||
audit_thread_num
|
||||
------------------
|
||||
1
|
||||
|
||||
@ -1,11 +1,10 @@
|
||||
# ------------------
|
||||
# # Database security audit
|
||||
# # ---------------
|
||||
test: hw_audit_space
|
||||
test: hw_audit_rotation_interval
|
||||
test: hw_audit_rotation_size
|
||||
|
||||
#test: hw_audit_space
|
||||
#test: hw_audit_rotation_interval
|
||||
#test: hw_audit_rotation_size
|
||||
#
|
||||
#--------------------
|
||||
# # Multi thread
|
||||
#-------------------
|
||||
|
||||
Reference in New Issue
Block a user