首页 > 技术文章 > pre-existing shared memory block (key 5432001, ID 2883585) is still in use

qianjunjun 2022-02-08 15:45 原文

记一次postgresql启动异常解决方法:

启动postgresql时,提示:

pre-existing shared memory block (key 5432001, ID 2883585) is still in use

Terminate any old server processes associated with data directory

 

网上有直接删除postmaster.pid文件的解决方法,但对我这个不管用

最后解决方法是直接干掉内存块,运行命令:ipcs -m 2883585

然后重启pgsql,就恢复正常了!

推荐阅读