在启动openGauss时可能会出现 FATAL: could not create shared memory segment: Cannot allocate memory 异常,原因是因为内存空间不足的问题
解决办法,更改配置中要求的空间大小
首先查看配置文件 postgresql.conf 中原本所配置的 shared_buffers 大小为多少,根据原定大小做更改
cat /data/opengauss3.0/data/db/postgresql.conf |grep shared_buffers
根据上图已知,目前要求大小为1GB,可以将该大小更改为512MB,配置更改命令如下(注意这里不能使用gs_guc reload,因为openGauss不属于启动状态,使用reload配置更改会失败,使用set就可以)
gs_guc set -N all -I all -c "shared_buffers = 512MB"
更改完成后使用 gs_om -t start 启动即可