简体   繁体   English

为什么我的postgres进程仍在运行?

[英]why is my postgres process still running?

I used 'sudo apt-get autoremove postgres' to uninstall the postgresql database on my local server. 我使用“ sudo apt-get autoremove postgres”来卸载本地服务器上的postgresql数据库。 and I used 'sudo netstat -anpt' to find the the postgres is still there and is running? 并且我使用了'sudo netstat -anpt'来查找postgres仍然存在并且正在运行? Why? 为什么? Anybody to correct my understanding? 有人纠正我的理解吗?

you can try a manual uninstallation (as root, assuming a default installation path): 您可以尝试手动卸载(以root用户身份,使用默认安装路径):

/opt/PostgreSQL/8.3/installer/server/removeshortcuts.sh /opt/PostgreSQL/8.3 8.3
/etc/init.d postgresql-8.3 stop
rm -rf /opt/PostgreSQL
rm /etc/postgres-reg.ini
rm -rf /etc/init.d/postgresql-8.3
userdel postgres

if /etc/ld.so.conf exists, edit it and remove /opt/PostgreSQL/8.3/lib
if present.

if /etc/ld.so.conf.d exists:

rm /etc/ld.so.conf.d/postgresql-8.3.conf 

It's because a running process is in memory so it's independent of what's happening on the disk. 这是因为正在运行的进程在内存中,因此它与磁盘上发生的事情无关。 It only matters if the running process needs to load something that's been removed. 仅在运行的进程需要加载已删除的内容时才重要。 All you need to do is find the process id ( ps -aux ) then kill -9 <pid> . 您所需要做的就是找到进程ID( ps -aux ),然后kill -9 <pid>

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM