openguass主备库开启wdr

网上搜索到的命令都是:

gs_guc reload -N all -I all -c "enable_wdr_snapshot=on"

执行后报错:

gs_guc: unrecognized option '--D'
Try "gs_guc --help" for more information.
omm@opengauss_master:~$ gs_guc reload -N all -I all -c "enable_wdr_snapshot=on"
The gs_guc run with the following arguments: [gs_guc -N all -I all -c enable_wdr_snapshot=on reload ].
realpath(/usr/local/opengauss/bin/cluster_static_config) failed : No such file or directory!
ERROR: Failed to get cluster information from static configuration file.

后把命令改成:

gs_guc reload -D /var/lib/opengauss/data -c "enable_wdr_snapshot=on"

成功执行:

The gs_guc run with the following arguments: [gs_guc -D /var/lib/opengauss/data -c enable_wdr_snapshot=on reload ].
expected instance path: [/var/lib

/opengauss/data/postgresql.conf]
gs_guc reload: enable_wdr_snapshot=on: [/var/lib/opengauss/data/postgresql.conf]
server signaled

Total instances: 1. Failed instances: 0.
Success to perform gs_guc!

你可能感兴趣的:(openguass,数据库)