!2358 增加dolphin guc配置参数

Merge pull request !2358 from zhaojun/dolphin-guc
This commit is contained in:
opengauss-bot
2022-11-26 06:45:16 +00:00
committed by Gitee
7 changed files with 73 additions and 0 deletions

View File

@ -713,6 +713,8 @@ ss_instance_id|int|0,63|NULL|NULL|
ss_interconnect_url|string|0,0|NULL|NULL|
ss_rdma_work_config|string|0,0|NULL|NULL|
ss_ock_log_path|string|0,0|NULL|NULL|
dolphin_server_port|int|1024,65535|NULL|NULL|
enable_dolphin_proto|bool|0,0|NULL|NULL|
[cmserver]
log_dir|string|0,0|NULL|NULL|
log_file_size|int|0,2047|MB|NULL|

View File

@ -347,6 +347,17 @@ static void InitNetworkConfigureNamesBool()
check_ssl,
NULL,
NULL},
{{"enable_dolphin_proto",
PGC_POSTMASTER,
NODE_ALL,
CONN_AUTH_SECURITY,
gettext_noop("Enables dolphin database protocol"),
NULL},
&g_instance.attr.attr_network.enable_dolphin_proto,
false,
NULL,
NULL,
NULL},
/* End-of-list marker */
{{NULL,
@ -855,6 +866,19 @@ static void InitNetworkConfigureNamesInt()
NULL,
NULL,
NULL},
{{"dolphin_server_port",
PGC_POSTMASTER,
NODE_ALL,
CONN_AUTH_SETTINGS,
gettext_noop("Sets the TCP port the server listens on for dolphin client-server protocol."),
NULL},
&g_instance.attr.attr_network.dolphin_server_port,
3308,
1024,
65535,
NULL,
NULL,
NULL},
/* End-of-list marker */
{{NULL,
(GucContext)0,

View File

@ -73,6 +73,8 @@ typedef struct knl_instance_attr_network {
SSL_CTX* SSL_server_context;
GS_UCHAR* server_key;
#endif
bool enable_dolphin_proto;
int dolphin_server_port;
} knl_instance_attr_network;
#endif /* SRC_INCLUDE_KNL_KNL_INSTANCE_ATTR_NETWORK_H_ */

View File

@ -0,0 +1,11 @@
show dolphin_server_port;
show enable_dolphin_proto;
\! @abs_bindir@/gs_guc set -D @abs_srcdir@/tmp_check/datanode1/ -c "enable_dolphin_proto=on" > /dev/null 2>&1
\! @abs_bindir@/gs_guc set -D @abs_srcdir@/tmp_check/datanode1/ -c "dolphin_server_port=3310" > /dev/null 2>&1
\! @abs_bindir@/gs_ctl stop -D @abs_srcdir@/tmp_check/datanode1 > /dev/null 2>&1
\! @abs_bindir@/gs_ctl start -D @abs_srcdir@/tmp_check/datanode1 > /dev/null 2>&1
\! sleep 5
\! @abs_bindir@/gsql -r -p @portstring@ -d postgres -c "show dolphin_server_port";
\! @abs_bindir@/gsql -r -p @portstring@ -d postgres -c "show enable_dolphin_proto";

View File

@ -0,0 +1,29 @@
show dolphin_server_port;
dolphin_server_port
---------------------
3308
(1 row)
show enable_dolphin_proto;
enable_dolphin_proto
----------------------
off
(1 row)
\! @abs_bindir@/gs_guc set -D @abs_srcdir@/tmp_check/datanode1/ -c "enable_dolphin_proto=on" > /dev/null 2>&1
\! @abs_bindir@/gs_guc set -D @abs_srcdir@/tmp_check/datanode1/ -c "dolphin_server_port=3310" > /dev/null 2>&1
\! @abs_bindir@/gs_ctl stop -D @abs_srcdir@/tmp_check/datanode1 > /dev/null 2>&1
\! @abs_bindir@/gs_ctl start -D @abs_srcdir@/tmp_check/datanode1 > /dev/null 2>&1
\! sleep 5
\! @abs_bindir@/gsql -r -p @portstring@ -d postgres -c "show dolphin_server_port";
dolphin_server_port
---------------------
3310
(1 row)
\! @abs_bindir@/gsql -r -p @portstring@ -d postgres -c "show enable_dolphin_proto";
enable_dolphin_proto
----------------------
on
(1 row)

View File

@ -202,6 +202,7 @@ select name,vartype,unit,min_val,max_val from pg_settings where name <> 'qunit_c
dfs_partition_directory_length | integer | | 92 | 7999
dirty_page_percent_max | real | | 0.1 | 1
disable_memory_protect | bool | | |
dolphin_server_port | integer | | 1024 | 65535
dw_file_num | integer | | 1 | 16
dw_file_size | integer | | 32 | 256
dynamic_library_path | string | | |
@ -243,6 +244,7 @@ select name,vartype,unit,min_val,max_val from pg_settings where name <> 'qunit_c
enable_default_ustore_table | bool | | |
enable_defer_calculate_snapshot | bool | | |
enable_delta_store | bool | | |
enable_dolphin_proto | bool | | |
enable_double_write | bool | | |
enable_early_free | bool | | |
enable_extrapolation_stats | bool | | |

View File

@ -1012,3 +1012,6 @@ test: rename_table
# debug instrument
test: test_debug5
# dolphin_guc_config
test: dolphin_guc_config