postgresql 运行报错 FATAL: could not map anonymous shared memory

版权声明:本文为博主原创文章,转载请标明出处。 https://blog.csdn.net/ctypyb2002/article/details/84778070

修改内核参数

# vi /etc/sysctl.conf
vm.overcommit_memory = 2
vm.overcommit_ratio = 90
vm.swappiness = 1

# sysctl -p

同时修改

# vi /etc/rc.local 
echo -1000 > /proc/self/oom_score_adj 

# vi /etc/profile
export PG_OOM_ADJUST_FILE=/proc/self/oom_score_adj
export PG_OOM_ADJUST_VALUE=0

参考:
https://blog.csdn.net/ctypyb2002/article/details/81916536
http://postgres.cn/docs/9.6/kernel-resources.html

猜你喜欢

转载自blog.csdn.net/ctypyb2002/article/details/84778070